Interface ContentModelProvider

All Known Implementing Classes:
CMDTDContentModelProvider, CMRelaxNGContentModelProvider, CMXMLModelContentModelProvider, CMXSDContentModelProvider

public interface ContentModelProvider
Content model provider API.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the given resource uri can be adapted for this content model and false otherwise.
    boolean
    adaptFor(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

      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.