Top Description Methods
com.sun.xml.xsom.parser

public Interface SchemaDocument

Known Direct Implementers
com.sun.xml.xsom.impl.parser.SchemaDocumentImpl
Imports
com.sun.xml.xsom.XSSchema, java.util.Set

Represents a parsed XML schema document.

Unlike schema components defined in XS**** interfaces, which are inherently de-coupled from where it was loaded from, SchemaDocument represents a single XML infoset that is a schema document.

This concept is often useful in tracking down the reference relationship among schema documents.

Author
Kohsuke Kawaguchi
See Also
XSOMParser#getDocuments()

Method Summary

Modifier and TypeMethod and Description
public Set<SchemaDocument>

Returns:

can be empty but never null. read-only. this set is always a subset of getReferencedDocuments().
getImportedDocuments
(String
The namespace URI of the import that you want to get s for.
targetNamespace
)

Gets the s that are imported from this document.

public Set<SchemaDocument>

Returns:

can be empty but never null. read-only. this set is always a subset of getReferencedDocuments().
getIncludedDocuments
()

Gets the s that are included from this document.

public Set<SchemaDocument>

Returns:

can be empty but never null. read-only.
getReferencedDocuments
()

Set of s that are included/imported from this document.

public Set<SchemaDocument>

Returns:

can be empty but never null. read-only.
getReferers
()

Set of s that include/import this document.

public XSSchema

Returns:

never null.
getSchema
()

Gets XSSchema component that contains all the schema components defined in this namespace.

public String

Returns:

null if XSOMParser was not given the system Id.
getSystemId
()

Gets the system ID of the schema document.

public String

Returns:

can be "" but never null.
getTargetNamespace
()

The namespace that this schema defines.

public boolean
imports(SchemaDocument doc)

Returns true if this document imports the given document.

public boolean
includes(SchemaDocument doc)

Returns true if this document includes the given document.

Method Detail

getImportedDocumentsback to summary
public Set<SchemaDocument> getImportedDocuments(String targetNamespace)

Gets the s that are imported from this document.

Parameters
targetNamespace:String

The namespace URI of the import that you want to get s for.

Returns:Set<SchemaDocument>

can be empty but never null. read-only. this set is always a subset of getReferencedDocuments().

getIncludedDocumentsback to summary
public Set<SchemaDocument> getIncludedDocuments()

Gets the s that are included from this document.

Returns:Set<SchemaDocument>

can be empty but never null. read-only. this set is always a subset of getReferencedDocuments().

getReferencedDocumentsback to summary
public Set<SchemaDocument> getReferencedDocuments()

Set of s that are included/imported from this document.

Returns:Set<SchemaDocument>

can be empty but never null. read-only.

getReferersback to summary
public Set<SchemaDocument> getReferers()

Set of s that include/import this document.

This works as the opposite of getReferencedDocuments().

Returns:Set<SchemaDocument>

can be empty but never null. read-only.

getSchemaback to summary
public XSSchema getSchema()

Gets XSSchema component that contains all the schema components defined in this namespace.

The returned XSSchema contains not just components defined in this but all the other components defined in all the schemas that collectively define this namespace.

Returns:XSSchema

never null.

getSystemIdback to summary
public String getSystemId()

Gets the system ID of the schema document.

Returns:String

null if XSOMParser was not given the system Id.

getTargetNamespaceback to summary
public String getTargetNamespace()

The namespace that this schema defines.

More precisely, this method simply returns the targetNamespace attribute 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.

Returns:String

can be "" but never null.

importsback to summary
public boolean imports(SchemaDocument doc)

Returns true if this document imports the given document.

Note that this method returns false if this document includes the given document.

includesback to summary
public boolean includes(SchemaDocument doc)

Returns true if this document includes the given document.

Note that this method returns false if this document imports the given document.