Class CMRelaxNGDocument
- java.lang.Object
-
- com.thaiopensource.relaxng.pattern.CMRelaxNGDocument
-
- All Implemented Interfaces:
CMDocument
public class CMRelaxNGDocument extends Object implements CMDocument
RelaxNG content document implementation.NOTE : this class is hosted in 'com.thaiopensource.relaxng.pattern' because
Patternimplementation likeElementPatternare not public. Once https://github.com/relaxng/jing-trang/issues/271 will be fixed we could move this class in 'org.eclipse.lemminx.extensions.relaxng.contentmodel' package.- Author:
- Angelo ZERR
-
-
Constructor Summary
Constructors Constructor Description CMRelaxNGDocument(String relaxNGURI, com.thaiopensource.relaxng.pattern.Pattern start, URIResolverExtensionManager resolverExtensionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMElementDeclarationfindCMElement(DOMElement element, String namespace)Returns the declared element which matches the given XML element and null otherwise.org.eclipse.lsp4j.LocationLinkfindTypeLocation(DOMNode originNode)Returns the location of the type definition of the given node.DOMDocumentgetDocument(String systemId)StringgetDocumentation(Locator locator)StringgetDocumentation(Locator locator, String value)Collection<CMElementDeclaration>getElements()Returns the elements declaration of the model document root.booleanhasNamespace(String namespaceURI)Returns true if the model document defines the given namespace and false otherwise.booleanisDirty()Returns true if the content model document is dirty and false otherwise.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.lemminx.extensions.contentmodel.model.CMDocument
findCMAttribute, findCMElement, getEntities
-
-
-
-
Constructor Detail
-
CMRelaxNGDocument
public CMRelaxNGDocument(String relaxNGURI, com.thaiopensource.relaxng.pattern.Pattern start, URIResolverExtensionManager resolverExtensionManager)
-
-
Method Detail
-
hasNamespace
public boolean hasNamespace(String namespaceURI)
Description copied from interface:CMDocumentReturns true if the model document defines the given namespace and false otherwise.- Specified by:
hasNamespacein interfaceCMDocument- Returns:
- true if the model document defines the given namespace and false otherwise.
-
getElements
public Collection<CMElementDeclaration> getElements()
Description copied from interface:CMDocumentReturns the elements declaration of the model document root.- Specified by:
getElementsin interfaceCMDocument- Returns:
- the elements declaration of the model document root.
-
findCMElement
public CMElementDeclaration findCMElement(DOMElement element, String namespace)
Description copied from interface:CMDocumentReturns the declared element which matches the given XML element and null otherwise.- Specified by:
findCMElementin interfaceCMDocument- Parameters:
element- the XML elementnamespace- the given namespace- Returns:
- the declared element which matches the given XML element and null otherwise.
-
findTypeLocation
public org.eclipse.lsp4j.LocationLink findTypeLocation(DOMNode originNode)
Description copied from interface:CMDocumentReturns the location of the type definition of the given node.- Specified by:
findTypeLocationin interfaceCMDocument- Parameters:
originNode- the node- Returns:
- the location of the type definition of the given node.
-
getDocument
public DOMDocument getDocument(String systemId)
-
isDirty
public boolean isDirty()
Description copied from interface:CMDocumentReturns true if the content model document is dirty and false otherwise.- Specified by:
isDirtyin interfaceCMDocument- Returns:
- true if the content model document is dirty and false otherwise.
-
-