16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package com.sun.xml.internal.xsom.parser; 27 28 import com.sun.xml.internal.xsom.XSSchema; 29 30 import java.util.Set; 31 32 /** 33 * Represents a parsed XML schema document. 34 * 35 * <p> 36 * Unlike schema components defined in <tt>XS****</tt> interfaces, 37 * which are inherently de-coupled from where it was loaded from, 38 * {@link SchemaDocument} represents a single XML infoset that 39 * is a schema document. 40 * 41 * <p> 42 * This concept is often useful in tracking down the reference 43 * relationship among schema documents. 44 * 45 * @see XSOMParser#getDocuments() 46 * @author Kohsuke Kawaguchi 47 */ 48 public interface SchemaDocument { 49 /** 50 * Gets the system ID of the schema document. 51 * 52 * @return 53 * null if {@link XSOMParser} was not given the system Id. 54 */ 55 String getSystemId(); 56 57 /** 58 * The namespace that this schema defines. 59 * 60 * <p> 61 * More precisely, this method simply returns the <tt>targetNamespace</tt> attribute 62 * of the schema document. When schemas are referenced in certain ways 63 * (AKA chameleon schema), schema components in this schema document 64 * may end up defining components in other namespaces. 65 * 66 * @return 67 * can be "" but never null. 68 */ 69 String getTargetNamespace(); 70 71 /** 72 * Gets {@link XSSchema} component that contains all the schema 73 * components defined in this namespace. 74 * 75 * <p> 76 * The returned {@link XSSchema} contains not just components 77 * defined in this {@link SchemaDocument} but all the other components 78 * defined in all the schemas that collectively define this namespace. 79 * 80 * @return 81 * never null. | 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package com.sun.xml.internal.xsom.parser; 27 28 import com.sun.xml.internal.xsom.XSSchema; 29 30 import java.util.Set; 31 32 /** 33 * Represents a parsed XML schema document. 34 * 35 * <p> 36 * Unlike schema components defined in {@code XS****} interfaces, 37 * which are inherently de-coupled from where it was loaded from, 38 * {@link SchemaDocument} represents a single XML infoset that 39 * is a schema document. 40 * 41 * <p> 42 * This concept is often useful in tracking down the reference 43 * relationship among schema documents. 44 * 45 * @see XSOMParser#getDocuments() 46 * @author Kohsuke Kawaguchi 47 */ 48 public interface SchemaDocument { 49 /** 50 * Gets the system ID of the schema document. 51 * 52 * @return 53 * null if {@link XSOMParser} was not given the system Id. 54 */ 55 String getSystemId(); 56 57 /** 58 * The namespace that this schema defines. 59 * 60 * <p> 61 * More precisely, this method simply returns the {@code targetNamespace} attribute 62 * of the schema document. When schemas are referenced in certain ways 63 * (AKA chameleon schema), schema components in this schema document 64 * may end up defining components in other namespaces. 65 * 66 * @return 67 * can be "" but never null. 68 */ 69 String getTargetNamespace(); 70 71 /** 72 * Gets {@link XSSchema} component that contains all the schema 73 * components defined in this namespace. 74 * 75 * <p> 76 * The returned {@link XSSchema} contains not just components 77 * defined in this {@link SchemaDocument} but all the other components 78 * defined in all the schemas that collectively define this namespace. 79 * 80 * @return 81 * never null. |