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:
copyin classSeqPosition<Object,NodeTree>
-
isSupported
public boolean isSupported(String feature, String version)
- Specified by:
isSupportedin interfaceNode
-
getNodeType
public abstract short getNodeType()
- Specified by:
getNodeTypein interfaceNode
-
getNodeName
public String getNodeName()
- Specified by:
getNodeNamein 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:
getNamespaceURIin interfaceNode
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfaceNode
-
getNodeValue
public static void getNodeValue(NodeTree seq, int ipos, StringBuffer sbuf)
-
getNodeValue
public String getNodeValue()
- Specified by:
getNodeValuein interfaceNode
-
getNodeValue
public void getNodeValue(StringBuffer sbuf)
-
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodesin interfaceNode
-
getTextContent
public String getTextContent()
- Specified by:
getTextContentin interfaceNode
-
getTextContent
protected void getTextContent(StringBuffer sbuf)
-
getParentNode
public Node getParentNode()
- Specified by:
getParentNodein interfaceNode
-
getPreviousSibling
public Node getPreviousSibling()
- Specified by:
getPreviousSiblingin interfaceNode
-
getNextSibling
public Node getNextSibling()
- Specified by:
getNextSiblingin interfaceNode
-
getFirstChild
public Node getFirstChild()
- Specified by:
getFirstChildin interfaceNode
-
getLastChild
public Node getLastChild()
- Specified by:
getLastChildin interfaceNode
-
getChildNodes
public NodeList getChildNodes()
- Specified by:
getChildNodesin interfaceNode
-
setNodeValue
public void setNodeValue(String nodeValue) throws DOMException
Not implemented.- Specified by:
setNodeValuein interfaceNode- Throws:
DOMException
-
setPrefix
public void setPrefix(String prefix) throws DOMException
Not implemented.- Specified by:
setPrefixin interfaceNode- Throws:
DOMException
-
insertBefore
public Node insertBefore(Node newChild, Node refChild) throws DOMException
Not implemented.- Specified by:
insertBeforein interfaceNode- Throws:
DOMException
-
replaceChild
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
Not implemented.- Specified by:
replaceChildin interfaceNode- Throws:
DOMException
-
removeChild
public Node removeChild(Node oldChild) throws DOMException
Not implemented.- Specified by:
removeChildin interfaceNode- Throws:
DOMException
-
appendChild
public Node appendChild(Node newChild) throws DOMException
Not implemented.- Specified by:
appendChildin interfaceNode- Throws:
DOMException
-
setTextContent
public void setTextContent(String textContent) throws DOMException
Not implemented.- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
cloneNode
public Node cloneNode(boolean deep)
Only implemented if deep is true.
-
getOwnerDocument
public Document getOwnerDocument()
- Specified by:
getOwnerDocumentin interfaceNode
-
getAttributes
public NamedNodeMap getAttributes()
- Specified by:
getAttributesin interfaceNode
-
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributesin interfaceNode
-
isDefaultNamespace
public boolean isDefaultNamespace(String namespaceURI)
- Specified by:
isDefaultNamespacein interfaceNode
-
lookupNamespaceURI
public String lookupNamespaceURI(String prefix)
- Specified by:
lookupNamespaceURIin interfaceNode
-
lookupPrefix
public String lookupPrefix(String namespaceURI)
- Specified by:
lookupPrefixin interfaceNode
-
getBaseURI
public String getBaseURI()
- Specified by:
getBaseURIin interfaceNode
-
baseURI
public gnu.kawa.io.Path baseURI()
-
compareDocumentPosition
public short compareDocumentPosition(Node other) throws DOMException
- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
isSameNode
public boolean isSameNode(Node node)
- Specified by:
isSameNodein interfaceNode
-
isEqualNode
public boolean isEqualNode(Node node)
- Specified by:
isEqualNodein interfaceNode
-
toString
public String toString()
- Overrides:
toStringin classSeqPosition<Object,NodeTree>
-
getFeature
public Object getFeature(String feature, String version)
- Specified by:
getFeaturein interfaceNode
-
consume
public void consume(Consumer out)
- Specified by:
consumein interfaceConsumable
-
setUserData
public Object setUserData(String key, Object data, UserDataHandler handler)
- Specified by:
setUserDatain interfaceNode
-
getUserData
public Object getUserData(String key)
- Specified by:
getUserDatain interfaceNode
-
-