Package com.sun.xml.xsom.impl.parser
Class SchemaDocumentImpl
- java.lang.Object
-
- com.sun.xml.xsom.impl.parser.SchemaDocumentImpl
-
- All Implemented Interfaces:
SchemaDocument
public final class SchemaDocumentImpl extends Object implements SchemaDocument
SchemaDocumentimplementation.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSchemaDocumentImpl(SchemaImpl schema, String _schemaDocumentURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Set<SchemaDocument>getImportedDocuments(String targetNamespace)Gets theSchemaDocuments that are imported from this document.Set<SchemaDocument>getIncludedDocuments()Gets theSchemaDocuments that are included from this document.Set<SchemaDocument>getReferencedDocuments()Set ofSchemaDocuments that are included/imported from this document.Set<SchemaDocument>getReferers()Set ofSchemaDocuments that include/import this document.SchemaImplgetSchema()GetsXSSchemacomponent that contains all the schema components defined in this namespace.StringgetSystemId()Gets the system ID of the schema document.StringgetTargetNamespace()The namespace that this schema defines.inthashCode()booleanimports(SchemaDocument doc)Returns true if this document imports the given document.booleanincludes(SchemaDocument doc)Returns true if this document includes the given document.
-
-
-
Constructor Detail
-
SchemaDocumentImpl
protected SchemaDocumentImpl(SchemaImpl schema, String _schemaDocumentURI)
-
-
Method Detail
-
getSystemId
public String getSystemId()
Description copied from interface:SchemaDocumentGets the system ID of the schema document.- Specified by:
getSystemIdin interfaceSchemaDocument- Returns:
- null if
XSOMParserwas not given the system Id.
-
getTargetNamespace
public String getTargetNamespace()
Description copied from interface:SchemaDocumentThe namespace that this schema defines.More precisely, this method simply returns the
targetNamespaceattribute of the schema document. When schemas are referenced in certain ways (AKA chameleon schema), schema components in this schema document may end up defining components in other namespaces.- Specified by:
getTargetNamespacein interfaceSchemaDocument- Returns:
- can be "" but never null.
-
getSchema
public SchemaImpl getSchema()
Description copied from interface:SchemaDocumentGetsXSSchemacomponent that contains all the schema components defined in this namespace.The returned
XSSchemacontains not just components defined in thisSchemaDocumentbut all the other components defined in all the schemas that collectively define this namespace.- Specified by:
getSchemain interfaceSchemaDocument- Returns:
- never null.
-
getReferencedDocuments
public Set<SchemaDocument> getReferencedDocuments()
Description copied from interface:SchemaDocumentSet ofSchemaDocuments that are included/imported from this document.- Specified by:
getReferencedDocumentsin interfaceSchemaDocument- Returns:
- can be empty but never null. read-only.
-
getIncludedDocuments
public Set<SchemaDocument> getIncludedDocuments()
Description copied from interface:SchemaDocumentGets theSchemaDocuments that are included from this document.- Specified by:
getIncludedDocumentsin interfaceSchemaDocument- Returns:
- can be empty but never null. read-only.
this set is always a subset of
SchemaDocument.getReferencedDocuments().
-
getImportedDocuments
public Set<SchemaDocument> getImportedDocuments(String targetNamespace)
Description copied from interface:SchemaDocumentGets theSchemaDocuments that are imported from this document.- Specified by:
getImportedDocumentsin interfaceSchemaDocument- Parameters:
targetNamespace- The namespace URI of the import that you want to getSchemaDocuments for.- Returns:
- can be empty but never null. read-only.
this set is always a subset of
SchemaDocument.getReferencedDocuments().
-
includes
public boolean includes(SchemaDocument doc)
Description copied from interface:SchemaDocumentReturns true if this document includes the given document.Note that this method returns false if this document imports the given document.
- Specified by:
includesin interfaceSchemaDocument
-
imports
public boolean imports(SchemaDocument doc)
Description copied from interface:SchemaDocumentReturns true if this document imports the given document.Note that this method returns false if this document includes the given document.
- Specified by:
importsin interfaceSchemaDocument
-
getReferers
public Set<SchemaDocument> getReferers()
Description copied from interface:SchemaDocumentSet ofSchemaDocuments that include/import this document.This works as the opposite of
SchemaDocument.getReferencedDocuments().- Specified by:
getReferersin interfaceSchemaDocument- Returns:
- can be empty but never null. read-only.
-
-