Class CMDTDElementDeclaration
java.lang.Object
org.apache.xerces.impl.dtd.XMLElementDecl
org.eclipse.lemminx.extensions.dtd.contentmodel.CMDTDElementDeclaration
- All Implemented Interfaces:
CMElementDeclaration
public class CMDTDElementDeclaration
extends org.apache.xerces.impl.dtd.XMLElementDecl
implements CMElementDeclaration
DTD element declaration.
-
Field Summary
Fields inherited from class org.apache.xerces.impl.dtd.XMLElementDecl
contentModelValidator, name, scope, simpleType, type, TYPE_ANY, TYPE_CHILDREN, TYPE_EMPTY, TYPE_MIXED, TYPE_SIMPLEFields inherited from interface org.eclipse.lemminx.extensions.contentmodel.model.CMElementDeclaration
ANY_ELEMENT_DECLARATIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindCMAttribute(String attributeName, String namespace) Returns the declared attribute which match the given name and null otherwise.findCMElement(String tag, String namespace) Returns the declared element which matches the given XML tag name / namespace and null otherwise.Returns the attributes of this declared element.getDocumentation(String attrName) getDocumentation(ISharedSettingsRequest settings) Returns formatted documentation of the declared element, according to settings defined inrequest.Returns the owner document URI where the element is declared.Returns the children declared element of this declared element.Return the enumeration values.intgetIndex()Returns the declared element local name.Returns the target namespace and null otherwise.getPossibleElements(DOMElement parentElement, int offset) Returns the possible declared elements at the given offset of the given parent element.Returns the xmlns prefix from the given namespace URI and null otherwise.Returns a list of required/non-optional child elements of the current element.getTextDocumentation(String value, ISharedSettingsRequest request) Returns the documentation for the given enumeration value and null otherwise.booleanisEmpty()Returns true if the element cannot contains element children or text content and false otherwise.booleanReturns true if the element can contains text and element both and false otherwise.booleanReturns true if the element can have an explicit null value assigned to it.booleanisOptional(String childElementName) Returns true if the child element name is optional and false otherwise.booleanReturns true if the element is a string type (ex : xs:string) and false otherwise.Methods inherited from class org.apache.xerces.impl.dtd.XMLElementDecl
clear, setValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.lemminx.extensions.contentmodel.model.CMElementDeclaration
findCMAttribute, getName
-
Constructor Details
-
CMDTDElementDeclaration
-
-
Method Details
-
getLocalName
Description copied from interface:CMElementDeclarationReturns the declared element local name.- Specified by:
getLocalNamein interfaceCMElementDeclaration- Returns:
- the declared element local name.
-
getNamespace
Description copied from interface:CMElementDeclarationReturns the target namespace and null otherwise.- Specified by:
getNamespacein interfaceCMElementDeclaration- Returns:
- the target namespace and null otherwise.
-
getPrefix
Description copied from interface:CMElementDeclarationReturns the xmlns prefix from the given namespace URI and null otherwise.- Specified by:
getPrefixin interfaceCMElementDeclaration- Parameters:
namespaceURI- the namespace- Returns:
- the xmlns prefix from the given namespace URI and null otherwise.
-
getAttributes
Description copied from interface:CMElementDeclarationReturns the attributes of this declared element.- Specified by:
getAttributesin interfaceCMElementDeclaration- Returns:
- the attributes element of this declared element.
-
getElements
Description copied from interface:CMElementDeclarationReturns the children declared element of this declared element.- Specified by:
getElementsin interfaceCMElementDeclaration- Returns:
- the children declared element of this declared element.
-
getPossibleElements
Description copied from interface:CMElementDeclarationReturns the possible declared elements at the given offset of the given parent element.- Specified by:
getPossibleElementsin interfaceCMElementDeclaration- Parameters:
parentElement- the parent elementoffset- the offset- Returns:
- the possible declared elements at the given offset of the given parent element.
-
findCMElement
Description copied from interface:CMElementDeclarationReturns the declared element which matches the given XML tag name / namespace and null otherwise.- Specified by:
findCMElementin interfaceCMElementDeclaration- Returns:
- the declared element which matches the given XML tag name / namespace and null otherwise.
-
findCMAttribute
Description copied from interface:CMElementDeclarationReturns the declared attribute which match the given name and null otherwise.- Specified by:
findCMAttributein interfaceCMElementDeclaration- Parameters:
attributeName- the attribute name.namespace- the attribute namespace and null otherwise.- Returns:
- the declared attribute which match the given name and null otherwise.
-
getDocumentation
-
isEmpty
public boolean isEmpty()Description copied from interface:CMElementDeclarationReturns true if the element cannot contains element children or text content and false otherwise.- Specified by:
isEmptyin interfaceCMElementDeclaration- Returns:
- true if the element cannot contains element children or text content and false otherwise.
-
isNillable
public boolean isNillable()Description copied from interface:CMElementDeclarationReturns true if the element can have an explicit null value assigned to it.- Specified by:
isNillablein interfaceCMElementDeclaration- Returns:
- true if the element can have an explicit null value assigned to it.
-
getEnumerationValues
Description copied from interface:CMElementDeclarationReturn the enumeration values.- Specified by:
getEnumerationValuesin interfaceCMElementDeclaration- Returns:
- the enumeration values.
-
getIndex
public int getIndex() -
getDocumentURI
Description copied from interface:CMElementDeclarationReturns the owner document URI where the element is declared.- Specified by:
getDocumentURIin interfaceCMElementDeclaration- Returns:
- the owner document URI where the element is declared.
-
isStringType
public boolean isStringType()Description copied from interface:CMElementDeclarationReturns true if the element is a string type (ex : xs:string) and false otherwise.- Specified by:
isStringTypein interfaceCMElementDeclaration- Returns:
- true if the element is a string type (ex : xs:string) and false otherwise.
-
isMixedContent
public boolean isMixedContent()Description copied from interface:CMElementDeclarationReturns true if the element can contains text and element both and false otherwise.- Specified by:
isMixedContentin interfaceCMElementDeclaration- Returns:
- true if the element can contains text and element both and false otherwise.
-
isOptional
Description copied from interface:CMElementDeclarationReturns true if the child element name is optional and false otherwise.- Specified by:
isOptionalin interfaceCMElementDeclaration- Returns:
- true if the child element name is optional and false otherwise.
-
getRequiredElements
Description copied from interface:CMElementDeclarationReturns a list of required/non-optional child elements of the current element.- Specified by:
getRequiredElementsin interfaceCMElementDeclaration- Returns:
- a list of required/non-optional child elements of the current element.
-