Interface ContentModelProvider
-
- All Known Implementing Classes:
CMDTDContentModelProvider,CMRelaxNGContentModelProvider,CMXMLModelContentModelProvider,CMXSDContentModelProvider
public interface ContentModelProviderContent model provider API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classContentModelProvider.Identifier
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadaptFor(String uri)Returns true if the given resource uri can be adapted for this content model and false otherwise.booleanadaptFor(DOMDocument document, boolean internal)Returns the content model provider by using standard association (xsi:schemaLocation, xsi:noNamespaceSchemaLocation, doctype) and null otherwise.CMDocumentcreateCMDocument(String key, boolean resolveExternalEntities)Create content model document (XSD, DTD, etc) from the given resource key and null otherwise.CMDocumentcreateInternalCMDocument(DOMDocument xmlDocument, boolean resolveExternalEntities)Create the internal content model (for DOCTYPE subset) from the given DOM document.Collection<ContentModelProvider.Identifier>getIdentifiers(DOMDocument xmlDocument, String namespaceURI)Returns the identifiers list from the given document and namespace.
-
-
-
Method Detail
-
adaptFor
boolean adaptFor(DOMDocument document, boolean internal)
Returns the content model provider by using standard association (xsi:schemaLocation, xsi:noNamespaceSchemaLocation, doctype) and null otherwise.- Parameters:
document- the DOM document.internal- true if it is an internal content model (ex : DOCCTYPE subset) and false otherwise.- Returns:
- the content model provider by using standard association (xsi:schemaLocation, xsi:noNamespaceSchemaLocation, doctype) and null otherwise.
-
adaptFor
boolean adaptFor(String uri)
Returns true if the given resource uri can be adapted for this content model and false otherwise. o@param uri the resource Uri.- Returns:
- true if the given resource uri can be adapted for this content model and false otherwise.
-
getIdentifiers
Collection<ContentModelProvider.Identifier> getIdentifiers(DOMDocument xmlDocument, String namespaceURI)
Returns the identifiers list from the given document and namespace.- Parameters:
xmlDocument- the DOM document.namespaceURI- the namespace.- Returns:
- the identifiers list from the given document and namespace.
-
createCMDocument
CMDocument createCMDocument(String key, boolean resolveExternalEntities)
Create content model document (XSD, DTD, etc) from the given resource key and null otherwise.- Parameters:
key- the resource key.resolveExternalEntities- true if external entities can be resolved and false otherwise.- Returns:
- the content model document (XSD, DTD, etc) from the given resource key and null otherwise.
-
createInternalCMDocument
CMDocument createInternalCMDocument(DOMDocument xmlDocument, boolean resolveExternalEntities)
Create the internal content model (for DOCTYPE subset) from the given DOM document.- Parameters:
xmlDocument- the DOM document.resolveExternalEntities- true if external entities can be resolved and false otherwise.- Returns:
- the internal content model (for DOCTYPE subset) from the given DOM document.
-
-