Interface ContentModelProvider
- All Known Implementing Classes:
CMDTDContentModelProvider,CMRelaxNGContentModelProvider,CMXMLModelContentModelProvider,CMXSDContentModelProvider
public interface ContentModelProvider
Content model provider API.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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.createCMDocument(String key, boolean resolveExternalEntities) Create content model document (XSD, DTD, etc) from the given resource key and null otherwise.createInternalCMDocument(DOMDocument xmlDocument, boolean resolveExternalEntities) Create the internal content model (for DOCTYPE subset) from the given DOM document.getIdentifiers(DOMDocument xmlDocument, String namespaceURI) Returns the identifiers list from the given document and namespace.
-
Method Details
-
adaptFor
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
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
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
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.
-