KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > xam > locator > CatalogModel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /*
21  * Locator.java
22  *
23  * Created on March 29, 2006, 3:44 PM
24  *
25  * To change this template, choose Tools | Template Manager
26  * and open the template in the editor.
27  */

28
29 package org.netbeans.modules.xml.xam.locator;
30
31 import java.net.URI JavaDoc;
32 import org.netbeans.modules.xml.xam.ModelSource;
33 import org.w3c.dom.ls.LSResourceResolver JavaDoc;
34 import org.xml.sax.EntityResolver JavaDoc;
35
36 /**
37  *
38  * @author girix
39  */

40 public interface CatalogModel extends EntityResolver JavaDoc, LSResourceResolver JavaDoc{
41     
42     /**
43      * Given the location parameter (schemaLocation for schema and location for wsdl)
44      * this method should return ModelSource object containing the concrete FileObject
45      * of the locally stored file. This method will just look up in the public catalog file
46      * and return result. It Will NOT do relative path resolution.
47      *
48      * @param locationURI
49      * @return ModelSource
50      * @throws CatalogModelException
51      * CatalogModelException will be throw for the following:<B></B>
52      * 1. If the file that was supposed to be there but not found. This case a
53      * FileNotFoundException is wrapped inside<B></B>
54      * 2. If a (java)File object could not be created from the retrived catalog
55      * entry.URISyntaxException will be wrapped inside DepResolverException.<B></B>
56      * 3. IOException will be wrapped around if a (NB)FileObject could not be
57      * created from the File object for various reasons by NB module
58      */

59     public ModelSource getModelSource(URI JavaDoc locationURI) throws CatalogModelException;
60     
61     
62     /**
63      * Given the location parameter (schemaLocation for schema and location for wsdl)
64      * this method should return ModelSource object containing the concrete FileObject
65      * of the locally stored file. This method will just look up in the public catalog file
66      * and return result. If not found in the catalog will then do relative path resolution
67      * against modelSourceOfSourceDocument's FileObject. Relative locations should be resolved using this method
68      *
69      * @param locationURI
70      * @param modelSourceOfSourceDocument
71      * @return ModelSource
72      * @throws CatalogModelException
73      * CatalogModelException will be throw for the following:<B></B>
74      * 1. If the file that was supposed to be there but not found. This case a
75      * FileNotFoundException is wrapped inside<B></B>
76      * 2. If a (java)File object could not be created from the retrived catalog
77      * entry.URISyntaxException will be wrapped inside DepResolverException.<B></B>
78      * 3. IOException will be wrapped around if a (NB)FileObject could not be
79      * created from the File object for various reasons by NB module
80      */

81     public ModelSource getModelSource(URI JavaDoc locationURI, ModelSource modelSourceOfSourceDocument) throws CatalogModelException;
82     
83 }
84
Popular Tags