gnu.kawa.xml

Class KNode

Implemented Interfaces:
Consumable, java.util.Enumeration, java.util.ListIterator
Known Direct Subclasses:
KAttr, KCharacterData, KDocument, KElement, KProcessingInstruction

public abstract class KNode
extends SeqPosition
implements Consumable

Field Summary

Fields inherited from class gnu.lists.SeqPosition

ipos, sequence

Constructor Summary

KNode(NodeTree seq, int ipos)

Method Summary

static Object
atomicValue(Object value)
Path
baseURI()
static KNode
coerce(Object value)
Convert value to a KNode, returning null if it isn't a node.
void
consume(Consumer out)
SeqPosition
copy()
String
getBaseURI()
Object
getFeature(String feature, String version)
String
getLocalName()
String
getNamespaceURI()
String
getNodeName()
Object
getNodeNameObject()
Get the raw "type object" of a node.
Symbol
getNodeSymbol()
The Data Model's node-name accessor.
String
getNodeValue()
void
getNodeValue(StringBuffer sbuf)
static String
getNodeValue(NodeTree seq, int ipos)
static void
getNodeValue(NodeTree seq, int ipos, StringBuffer sbuf)
String
getPrefix()
String
getTextContent()
protected void
getTextContent(StringBuffer sbuf)
boolean
hasAttributes()
boolean
hasChildNodes()
boolean
isDefaultNamespace(String namespaceURI)
boolean
isSupported(String feature, String version)
String
lookupNamespaceURI(String prefix)
String
lookupPrefix(String namespaceURI)
static KNode
make(NodeTree seq)
static KNode
make(NodeTree seq, int ipos)
void
normalize()
String
toString()

Methods inherited from class gnu.lists.SeqPosition

add, copy, 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, toString

Constructor Details

KNode

public KNode(NodeTree seq,
             int ipos)

Method Details

atomicValue

public static Object atomicValue(Object value)

baseURI

public Path baseURI()

coerce

public static KNode coerce(Object value)
Convert value to a KNode, returning null if it isn't a node.

consume

public void consume(Consumer out)
Specified by:
consume in interface Consumable

copy

public SeqPosition copy()
Overrides:
copy in interface SeqPosition

getBaseURI

public String getBaseURI()

getFeature

public Object getFeature(String feature,
                         String version)

getLocalName

public String getLocalName()

getNamespaceURI

public String getNamespaceURI()

getNodeName

public String getNodeName()

getNodeNameObject

public Object getNodeNameObject()
Get the raw "type object" of a node.

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.

getNodeValue

public String getNodeValue()

getNodeValue

public void getNodeValue(StringBuffer sbuf)

getNodeValue

public static String getNodeValue(NodeTree seq,
                                  int ipos)

getNodeValue

public static void getNodeValue(NodeTree seq,
                                int ipos,
                                StringBuffer sbuf)

getPrefix

public String getPrefix()

getTextContent

public String getTextContent()

getTextContent

protected void getTextContent(StringBuffer sbuf)

hasAttributes

public boolean hasAttributes()

hasChildNodes

public boolean hasChildNodes()

isDefaultNamespace

public boolean isDefaultNamespace(String namespaceURI)

isSupported

public boolean isSupported(String feature,
                           String version)

lookupNamespaceURI

public String lookupNamespaceURI(String prefix)

lookupPrefix

public String lookupPrefix(String namespaceURI)

make

public static KNode make(NodeTree seq)

make

public static KNode make(NodeTree seq,
                         int ipos)

normalize

public void normalize()

toString

public String toString()
Overrides:
toString in interface SeqPosition