Package org.eclipse.lemminx.dom
Class DOMAttr
java.lang.Object
org.eclipse.lemminx.dom.DOMNode
org.eclipse.lemminx.dom.DOMAttr
An attribute node.
-
Field Summary
FieldsFields 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_VALUEFields 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintgetEnd()Returns the end offset of the node.getName()shortGet original attribute value from the document.Returns the owner document and null otherwise.Returns the prefix if the given URI matches this attributes value.booleanintgetStart()Returns the start offset of the node.getValue()booleaninthashCode()booleanReturns true if attribute name is the default xmlns attribute and false otherwise.static booleanisDefaultXmlns(String attributeName) booleanisId()booleanisIncluded(int offset) booleanReturns true if attribute name is the no default xmlns attribute and false otherwise.static booleanisNoDefaultXmlns(String attributeName) booleanisXmlns()Returns true if attribute name is a xmlns attribute and false otherwise.static booleanvoidsetDelimiter(int delimiter) voidvoidbooleanvalueContainsOffset(int offset) Methods inherited from class org.eclipse.lemminx.dom.DOMNode
addChild, appendChild, cloneNode, compareDocumentPosition, findAttrAt, findAttrAt, findNodeAt, findNodeBefore, findNodeOrAttrAt, findTextAt, getAttribute, getAttributeAtIndex, getAttributeNode, getAttributeNode, getAttributeNodes, getAttributes, getBaseURI, getChild, getChildNodes, getChildren, getChildrenWithAttributeValue, getFeature, getFirstChild, getLastChild, getOrphanEndElement, getOrphanEndElement, getParentElement, getParentNode, getPreviousNonTextSibling, getPreviousSibling, 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Field Details
-
XMLNS_ATTR
- See Also:
-
XMLNS_NO_DEFAULT_ATTR
- See Also:
-
-
Constructor Details
-
DOMAttr
-
DOMAttr
-
-
Method Details
-
getNodeType
public short getNodeType()- Specified by:
getNodeTypein interfaceNode
-
getNodeName
- Specified by:
getNodeNamein interfaceNode
-
getName
-
getNodeValue
- Specified by:
getNodeValuein interfaceNode- Overrides:
getNodeValuein classDOMNode- Throws:
DOMException
-
getLocalName
- Specified by:
getLocalNamein interfaceNode- Overrides:
getLocalNamein classDOMNode
-
getOwnerElement
- Specified by:
getOwnerElementin interfaceAttr
-
getOwnerDocument
Description copied from class:DOMNodeReturns the owner document and null otherwise.- Specified by:
getOwnerDocumentin interfaceDOMRange- Specified by:
getOwnerDocumentin interfaceNode- Overrides:
getOwnerDocumentin classDOMNode- Returns:
- the owner document and null otherwise.
-
getValue
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfoin interfaceAttr
-
getSpecified
public boolean getSpecified()- Specified by:
getSpecifiedin interfaceAttr
-
isId
public boolean isId() -
setValue
- Specified by:
setValuein interfaceAttr- Throws:
DOMException
-
getNodeAttrName
-
setDelimiter
public void setDelimiter(int delimiter) -
hasDelimiter
public boolean hasDelimiter() -
getOriginalValue
Get original attribute value from the document. This will include quotations (", ').- Returns:
- attribute value with quotations if it had them.
-
setValue
-
getNodeAttrValue
-
valueContainsOffset
public boolean valueContainsOffset(int offset) -
getPrefix
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceNode- Overrides:
getNamespaceURIin classDOMNode
-
isXmlns
public boolean isXmlns()Returns true if attribute name is a xmlns attribute and false otherwise.- Parameters:
attributeName-- Returns:
- true if attribute name is a xmlns attribute and false otherwise.
-
isXmlns
-
isDefaultXmlns
public boolean isDefaultXmlns()Returns true if attribute name is the default xmlns attribute and false otherwise.- Parameters:
attributeName-- Returns:
- true if attribute name is the default xmlns attribute and false otherwise.
-
isDefaultXmlns
-
extractPrefixFromXmlns
-
getPrefixIfMatchesURI
Returns the prefix if the given URI matches this attributes value. If the URI doesnt match, null is returned.- Parameters:
uri-- Returns:
-
isNoDefaultXmlns
public boolean isNoDefaultXmlns()Returns true if attribute name is the no default xmlns attribute and false otherwise.- Parameters:
attributeName-- Returns:
- true if attribute name is the no default xmlns attribute and false otherwise.
-
isNoDefaultXmlns
-
getNextSibling
- Specified by:
getNextSiblingin interfaceNode- Overrides:
getNextSiblingin classDOMNode
-
isIncluded
public boolean isIncluded(int offset) -
getStart
public int getStart()Description copied from interface:DOMRangeReturns the start offset of the node. -
getEnd
public int getEnd()Description copied from interface:DOMRangeReturns the end offset of the node. -
hashCode
public int hashCode() -
equals
-
getDelimiterOffset
public int getDelimiterOffset()
-