Package org.eclipse.lemminx.extensions.xsd.contentmodel

## Class CMXSDContentModelProvider

- java.lang.Object
- - org.eclipse.lemminx.extensions.xsd.contentmodel.CMXSDContentModelProvider

All Implemented Interfaces:
  `ContentModelProvider`

    public class CMXSDContentModelProvider
    extends Object
    implements ContentModelProvider

XSD content model provider.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.lemminx.extensions.contentmodel.model.ContentModelProvider

`ContentModelProvider.Identifier`

### Constructor Summary

Constructors
`CMXSDContentModelProvider​(URIResolverExtensionManager resolverExtensionManager)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `adaptFor​(String uri)` 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.
`CMDocument` `createCMDocument​(String key, boolean resolveExternalEntities)` Create content model document (XSD, DTD, etc) from the given resource key and null otherwise.
`CMDocument` `createInternalCMDocument​(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.
`org.apache.xerces.impl.xs.XSLoaderImpl` `getLoader()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CMXSDContentModelProvider

    public CMXSDContentModelProvider​(URIResolverExtensionManager resolverExtensionManager)

### Method Detail

#### adaptFor

    public boolean adaptFor​(DOMDocument document,
                            boolean internal)

Description copied from interface: `ContentModelProvider`
Returns the content model provider by using standard association (xsi:schemaLocation, xsi:noNamespaceSchemaLocation, doctype) and null otherwise.

Specified by:
  `adaptFor` in interface `ContentModelProvider`
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

    public boolean adaptFor​(String uri)

Description copied from interface: `ContentModelProvider`
Returns true if the given resource uri can be adapted for this content model and false otherwise. o@param uri the resource Uri.

Specified by:
  `adaptFor` in interface `ContentModelProvider`
Returns:
  true if the given resource uri can be adapted for this content model and false otherwise.

#### getIdentifiers

    public Collection<ContentModelProvider.Identifier> getIdentifiers​(DOMDocument xmlDocument,
                                                                      String namespaceURI)

Description copied from interface: `ContentModelProvider`
Returns the identifiers list from the given document and namespace.

Specified by:
  `getIdentifiers` in interface `ContentModelProvider`
Parameters:
  `xmlDocument` - the DOM document.
  `namespaceURI` - the namespace.
Returns:
  the identifiers list from the given document and namespace.

#### createCMDocument

    public CMDocument createCMDocument​(String key,
                                       boolean resolveExternalEntities)

Description copied from interface: `ContentModelProvider`
Create content model document (XSD, DTD, etc) from the given resource key and null otherwise.

Specified by:
  `createCMDocument` in interface `ContentModelProvider`
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

    public CMDocument createInternalCMDocument​(DOMDocument xmlDocument,
                                               boolean resolveExternalEntities)

Description copied from interface: `ContentModelProvider`
Create the internal content model (for DOCTYPE subset) from the given DOM document.

Specified by:
  `createInternalCMDocument` in interface `ContentModelProvider`
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.

#### getLoader

    public org.apache.xerces.impl.xs.XSLoaderImpl getLoader()