public class ContentModelManager extends Object
Constructor and Description |
---|
ContentModelManager(URIResolverExtensionManager resolverManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
dependsOnGrammar(DOMDocument document,
String grammarURI)
Returns true if the given document is linked to the given grammar URI (XML
Schema, DTD) and false otherwise.
|
Collection<CMDocument> |
findCMDocument(DOMDocument xmlDocument,
String namespaceURI) |
Collection<CMDocument> |
findCMDocument(DOMDocument xmlDocument,
String namespaceURI,
boolean withInternal)
Returns the declared documents which match the given DOM document.
|
Collection<CMDocument> |
findCMDocument(DOMElement element)
Returns the owner document of the declared element which matches the given
XML element and null otherwise.
|
Collection<CMDocument> |
findCMDocument(DOMElement element,
String namespaceURI)
Returns the owner document of the declared element which matches the given
XML element and null otherwise.
|
org.apache.xerces.xni.grammars.XMLGrammarPool |
getGrammarPool() |
ContentModelProvider |
getModelProviderByURI(String uri)
Returns the model provider by the given uri and null otherwise.
|
void |
refreshCatalogs()
Refresh the XML catalogs.
|
void |
registerModelProvider(ContentModelProvider modelProvider) |
boolean |
setCatalogs(String[] catalogs)
Set up XML catalogs.
|
boolean |
setFileAssociations(XMLFileAssociation[] fileAssociations)
Set file associations.
|
void |
setRootURI(String rootUri) |
void |
setUseCache(boolean useCache) |
void |
unregisterModelProvider(ContentModelProvider modelProvider) |
public ContentModelManager(URIResolverExtensionManager resolverManager)
public Collection<CMDocument> findCMDocument(DOMElement element)
element
- the XML elementpublic Collection<CMDocument> findCMDocument(DOMElement element, String namespaceURI)
element
- the XML elementpublic Collection<CMDocument> findCMDocument(DOMDocument xmlDocument, String namespaceURI)
public Collection<CMDocument> findCMDocument(DOMDocument xmlDocument, String namespaceURI, boolean withInternal)
xmlDocument
- the DOM document.namespaceURI
- the namespace URIpublic boolean dependsOnGrammar(DOMDocument document, String grammarURI)
document
- the DOM documentgrammarURI
- the grammar URIpublic ContentModelProvider getModelProviderByURI(String uri)
uri
- the grammar URIpublic boolean setCatalogs(String[] catalogs)
catalogs
- list of XML catalog files.public void refreshCatalogs()
public boolean setFileAssociations(XMLFileAssociation[] fileAssociations)
fileAssociations
- public void setRootURI(String rootUri)
public void setUseCache(boolean useCache)
public void registerModelProvider(ContentModelProvider modelProvider)
public void unregisterModelProvider(ContentModelProvider modelProvider)
public org.apache.xerces.xni.grammars.XMLGrammarPool getGrammarPool()
Copyright © 2020. All rights reserved.