Package org.eclipse.lemminx.dom
Class DTDElementDecl
- java.lang.Object
-
- org.eclipse.lemminx.dom.DOMNode
-
- org.eclipse.lemminx.dom.DTDDeclNode
-
- org.eclipse.lemminx.dom.DTDElementDecl
-
public class DTDElementDecl extends DTDDeclNode
DTD Element Declaration-
-
Field Summary
Fields Modifier and Type Field Description DTDDeclParametercategoryFormats: orDTDDeclParametercontent-
Fields inherited from class org.eclipse.lemminx.dom.DTDDeclNode
declType, unrecognized
-
Fields inherited from class org.eclipse.lemminx.dom.DOMNode
DTD_ATT_LIST_NODE, DTD_DECL_NODE, DTD_ELEMENT_DECL_NODE, DTD_ENTITY_DECL_NODE, DTD_NOTATION_DECL, NULL_VALUE
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Constructor Description DTDElementDecl(int start, int end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectParameters(DTDDeclParameter target, BiConsumer<DTDDeclParameter,DTDDeclParameter> collector)Collect parameters which matches the given target.StringgetCategory()StringgetContent()intgetEndElementTag()Returns the offset of the end of tagStringgetNodeName()shortgetNodeType()DTDDeclParametergetParameterAt(int offset)Returns the parameter (start/end offset) at the given offset and null otherwise.DTDDeclParametergetReferencedElementNameAt(int offset)Returns the parameter name which references a DTD element declaration (voidsetCategory(int start, int end)voidsetContent(int start, int end)-
Methods inherited from class org.eclipse.lemminx.dom.DTDDeclNode
addNewParameter, getDeclType, getName, getNameParameter, getOwnerDocType, getParameterAtIndex, getParameters, getUnrecognized, isInNameParameter, setDeclType, setName, setUnrecognized, updateLastParameterEnd
-
Methods inherited from class org.eclipse.lemminx.dom.DOMNode
addChild, appendChild, cloneNode, compareDocumentPosition, findAttrAt, findAttrAt, findDTDDeclParameterAt, findDTDDeclParameterAt, findNodeAt, findNodeBefore, findNodeOrAttrAt, findTextAt, getAttribute, getAttributeAtIndex, getAttributeNode, getAttributeNode, getAttributeNodes, getAttributes, getBaseURI, getChild, getChildNodes, getChildren, getChildrenWithAttributeValue, getEnd, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOrphanEndElement, getOrphanEndElement, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousNonTextSibling, getPreviousSibling, getStart, getTextContent, getUserData, hasAttribute, hasAttributes, hasChildNodes, insertBefore, isAttribute, isCDATA, isCharacterData, isChildOfOwnerDocument, isClosed, isComment, isDefaultNamespace, isDoctype, isDTDAttListDecl, isDTDElementDecl, isDTDEntityDecl, isDTDNotationDecl, isElement, isEqualNode, isGenericDTDDecl, isIncluded, isIncluded, isOwnerDocument, isProcessingInstruction, isProlog, isSameNode, isSupported, isText, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setAttributeNode, setNodeValue, setPrefix, setTextContent, setUserData, toString
-
-
-
-
Field Detail
-
category
public DTDDeclParameter category
Formats: or
-
content
public DTDDeclParameter content
-
-
Method Detail
-
getNodeName
public String getNodeName()
- Specified by:
getNodeNamein interfaceNode- Overrides:
getNodeNamein classDTDDeclNode
-
getCategory
public String getCategory()
-
setCategory
public void setCategory(int start, int end)
-
getContent
public String getContent()
-
setContent
public void setContent(int start, int end)
-
getNodeType
public short getNodeType()
- Specified by:
getNodeTypein interfaceNode- Overrides:
getNodeTypein classDTDDeclNode
-
getEndElementTag
public int getEndElementTag()
Returns the offset of the end of tag- Returns:
- the offset of the end of tag
-
getParameterAt
public DTDDeclParameter getParameterAt(int offset)
Returns the parameter (start/end offset) at the given offset and null otherwise.will return (start/end offset) of heading.
will return null.
- Parameters:
offset- the offset- Returns:
- the parameter (start/end offset) at the given offset and null otherwise.
-
getReferencedElementNameAt
public DTDDeclParameter getReferencedElementNameAt(int offset)
Description copied from class:DTDDeclNodeReturns the parameter name which references a DTD element declaration (- Overrides:
getReferencedElementNameAtin classDTDDeclNode- Parameters:
offset- the offset- Returns:
- the parameter name which references a DTD element declaration (
-
collectParameters
public void collectParameters(DTDDeclParameter target, BiConsumer<DTDDeclParameter,DTDDeclParameter> collector)
Collect parameters which matches the given target.- Parameters:
target- the targetcollector- the collector to collect parameters.
-
-
-