Package gnu.kawa.xml
Class KNode
- java.lang.Object
-
- gnu.lists.SeqPosition<Object,NodeTree>
-
- gnu.kawa.xml.KNode
-
- All Implemented Interfaces:
Consumable
,Enumeration<Object>
,Iterator<Object>
,ListIterator<Object>
,Node
- Direct Known Subclasses:
KAttr
,KCharacterData
,KDocument
,KElement
,KProcessingInstruction
public abstract class KNode extends SeqPosition<Object,NodeTree> implements Node, Consumable
-
-
Field Summary
-
Fields inherited from class gnu.lists.SeqPosition
ipos, sequence
-
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
-
-
Method Summary
-
Methods inherited from class gnu.lists.SeqPosition
add, finalize, fromEndIndex, getContainingSequenceSize, getNext, getNextKind, getNextTypeName, getNextTypeObject, getPos, getPrevious, gotoChildrenStart, gotoEnd, gotoNext, gotoPrevious, gotoStart, hasMoreElements, hasNext, hasPrevious, isAfter, make, next, nextElement, nextIndex, previous, previousIndex, release, remove, set, set, set, setNext, setPos, setPos, setPrevious, toInfo
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
KNode
public KNode(NodeTree seq, int ipos)
-
-
Method Detail
-
coerce
public static KNode coerce(Object value)
Convert value to a KNode, returning null if it isn't a node.
-
copy
public KNode copy()
- Overrides:
copy
in classSeqPosition<Object,NodeTree>
-
isSupported
public boolean isSupported(String feature, String version)
- Specified by:
isSupported
in interfaceNode
-
getNodeType
public abstract short getNodeType()
- Specified by:
getNodeType
in interfaceNode
-
getNodeName
public String getNodeName()
- Specified by:
getNodeName
in interfaceNode
-
getNodeSymbol
public Symbol getNodeSymbol()
The Data Model's node-name accessor. Return the node's name as a SSymbol (QName) or null if there is none.
-
getNodeNameObject
public Object getNodeNameObject()
Get the raw "type object" of a node.
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURI
in interfaceNode
-
getLocalName
public String getLocalName()
- Specified by:
getLocalName
in interfaceNode
-
getNodeValue
public static void getNodeValue(NodeTree seq, int ipos, StringBuffer sbuf)
-
getNodeValue
public String getNodeValue()
- Specified by:
getNodeValue
in interfaceNode
-
getNodeValue
public void getNodeValue(StringBuffer sbuf)
-
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodes
in interfaceNode
-
getTextContent
public String getTextContent()
- Specified by:
getTextContent
in interfaceNode
-
getTextContent
protected void getTextContent(StringBuffer sbuf)
-
getParentNode
public Node getParentNode()
- Specified by:
getParentNode
in interfaceNode
-
getPreviousSibling
public Node getPreviousSibling()
- Specified by:
getPreviousSibling
in interfaceNode
-
getNextSibling
public Node getNextSibling()
- Specified by:
getNextSibling
in interfaceNode
-
getFirstChild
public Node getFirstChild()
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
public Node getLastChild()
- Specified by:
getLastChild
in interfaceNode
-
getChildNodes
public NodeList getChildNodes()
- Specified by:
getChildNodes
in interfaceNode
-
setNodeValue
public void setNodeValue(String nodeValue) throws DOMException
Not implemented.- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
setPrefix
public void setPrefix(String prefix) throws DOMException
Not implemented.- Specified by:
setPrefix
in interfaceNode
- Throws:
DOMException
-
insertBefore
public Node insertBefore(Node newChild, Node refChild) throws DOMException
Not implemented.- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
replaceChild
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
Not implemented.- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
removeChild
public Node removeChild(Node oldChild) throws DOMException
Not implemented.- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
appendChild
public Node appendChild(Node newChild) throws DOMException
Not implemented.- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
setTextContent
public void setTextContent(String textContent) throws DOMException
Not implemented.- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
cloneNode
public Node cloneNode(boolean deep)
Only implemented if deep is true.
-
getOwnerDocument
public Document getOwnerDocument()
- Specified by:
getOwnerDocument
in interfaceNode
-
getAttributes
public NamedNodeMap getAttributes()
- Specified by:
getAttributes
in interfaceNode
-
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributes
in interfaceNode
-
isDefaultNamespace
public boolean isDefaultNamespace(String namespaceURI)
- Specified by:
isDefaultNamespace
in interfaceNode
-
lookupNamespaceURI
public String lookupNamespaceURI(String prefix)
- Specified by:
lookupNamespaceURI
in interfaceNode
-
lookupPrefix
public String lookupPrefix(String namespaceURI)
- Specified by:
lookupPrefix
in interfaceNode
-
getBaseURI
public String getBaseURI()
- Specified by:
getBaseURI
in interfaceNode
-
baseURI
public gnu.kawa.io.Path baseURI()
-
compareDocumentPosition
public short compareDocumentPosition(Node other) throws DOMException
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
isSameNode
public boolean isSameNode(Node node)
- Specified by:
isSameNode
in interfaceNode
-
isEqualNode
public boolean isEqualNode(Node node)
- Specified by:
isEqualNode
in interfaceNode
-
toString
public String toString()
- Overrides:
toString
in classSeqPosition<Object,NodeTree>
-
getFeature
public Object getFeature(String feature, String version)
- Specified by:
getFeature
in interfaceNode
-
consume
public void consume(Consumer out)
- Specified by:
consume
in interfaceConsumable
-
setUserData
public Object setUserData(String key, Object data, UserDataHandler handler)
- Specified by:
setUserData
in interfaceNode
-
getUserData
public Object getUserData(String key)
- Specified by:
getUserData
in interfaceNode
-
-