Interface CMDocument
-
- All Known Implementing Classes:
CMDTDDocument,CMRelaxNGDocument,CMXSDDocument
public interface CMDocumentContent model document which abstracts element declaration from a given grammar (XML Schema, DTD).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CMAttributeDeclarationfindCMAttribute(DOMAttr attr)default CMElementDeclarationfindCMElement(DOMElement element)Returns the declared element which matches the given XML element and null otherwise.CMElementDeclarationfindCMElement(DOMElement element, String namespace)Returns the declared element which matches the given XML element and null otherwise.org.eclipse.lsp4j.LocationLinkfindTypeLocation(DOMNode node)Returns the location of the type definition of the given node.Collection<CMElementDeclaration>getElements()Returns the elements declaration of the model document root.default List<Entity>getEntities()Returns list of declared entities.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.
-
-
-
Method Detail
-
hasNamespace
boolean hasNamespace(String namespaceURI)
Returns true if the model document defines the given namespace and false otherwise.- Parameters:
namespaceURI-- Returns:
- true if the model document defines the given namespace and false otherwise.
-
getElements
Collection<CMElementDeclaration> getElements()
Returns the elements declaration of the model document root.- Returns:
- the elements declaration of the model document root.
-
findCMElement
default CMElementDeclaration findCMElement(DOMElement element)
Returns the declared element which matches the given XML element and null otherwise.- Parameters:
element- the XML element- Returns:
- the declared element which matches the given XML element and null otherwise.
-
findCMElement
CMElementDeclaration findCMElement(DOMElement element, String namespace)
Returns the declared element which matches the given XML element and null otherwise.- Parameters:
element- the XML elementnamespace- the given namespace- Returns:
- the declared element which matches the given XML element and null otherwise.
-
findCMAttribute
default CMAttributeDeclaration findCMAttribute(DOMAttr attr)
-
findTypeLocation
org.eclipse.lsp4j.LocationLink findTypeLocation(DOMNode node)
Returns the location of the type definition of the given node.- Parameters:
node- the node- Returns:
- the location of the type definition of the given node.
-
isDirty
boolean isDirty()
Returns true if the content model document is dirty and false otherwise.- Returns:
- true if the content model document is dirty and false otherwise.
-
-