Package org.apache.batik.dom
Class AbstractDocument.XPathExpr.Result
- java.lang.Object
-
- org.apache.batik.dom.AbstractDocument.XPathExpr.Result
-
- All Implemented Interfaces:
org.w3c.dom.xpath.XPathResult
- Enclosing class:
- AbstractDocument.XPathExpr
public class AbstractDocument.XPathExpr.Result extends java.lang.Object implements org.w3c.dom.xpath.XPathResultXPathResult implementation. XXX Namespace nodes are not handled correctly, since Xalan returns namespace nodes as simply the attribute node that caused the namespace to be in scope on the element in question. Thus it is impossible to tell the difference between a selected attribute that begins with 'xmlns' and an XPath namespace node.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanbooleanValueThe boolean value.protected org.w3c.dom.NodeListiteratorThe NodeList for iterators.protected intiteratorPositionThe position of the iterator.protected doublenumberValueThe number value.protected shortresultTypeThe result type.protected org.w3c.dom.NodesingleNodeValueThe single node value.protected java.lang.StringstringValueThe string value.
-
Constructor Summary
Constructors Constructor Description Result(boolean b)Creates a new boolean Result object.Result(double d)Creates a new number Result object.Result(java.lang.String s)Creates a new string Result object.Result(org.w3c.dom.NodeList nl, short type)Creates a new node iterator Result object.Result(org.w3c.dom.Node n, short type)Creates a new single node Result object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBooleanValue()Gets the boolean value.booleangetInvalidIteratorState()Returns whether the iterator has been invalidated by document modifications.doublegetNumberValue()Gets the number value.shortgetResultType()Gets the result type.org.w3c.dom.NodegetSingleNodeValue()Gets the single node value.intgetSnapshotLength()Returns the length of the snapshot.java.lang.StringgetStringValue()Gets the string value.org.w3c.dom.NodeiterateNext()DOM: ImplementXPathResult.iterateNext().org.w3c.dom.NodesnapshotItem(int i)Returns theith item in the snapshot.
-
-
-
Field Detail
-
resultType
protected short resultType
The result type.
-
numberValue
protected double numberValue
The number value.
-
stringValue
protected java.lang.String stringValue
The string value.
-
booleanValue
protected boolean booleanValue
The boolean value.
-
singleNodeValue
protected org.w3c.dom.Node singleNodeValue
The single node value.
-
iterator
protected org.w3c.dom.NodeList iterator
The NodeList for iterators.
-
iteratorPosition
protected int iteratorPosition
The position of the iterator.
-
-
Constructor Detail
-
Result
public Result(org.w3c.dom.Node n, short type)Creates a new single node Result object.
-
Result
public Result(boolean b) throws javax.xml.transform.TransformerExceptionCreates a new boolean Result object.- Throws:
javax.xml.transform.TransformerException
-
Result
public Result(double d) throws javax.xml.transform.TransformerExceptionCreates a new number Result object.- Throws:
javax.xml.transform.TransformerException
-
Result
public Result(java.lang.String s)
Creates a new string Result object.
-
Result
public Result(org.w3c.dom.NodeList nl, short type)Creates a new node iterator Result object.
-
-
Method Detail
-
getResultType
public short getResultType()
Gets the result type.- Specified by:
getResultTypein interfaceorg.w3c.dom.xpath.XPathResult
-
getBooleanValue
public boolean getBooleanValue()
Gets the boolean value.- Specified by:
getBooleanValuein interfaceorg.w3c.dom.xpath.XPathResult
-
getNumberValue
public double getNumberValue()
Gets the number value.- Specified by:
getNumberValuein interfaceorg.w3c.dom.xpath.XPathResult
-
getStringValue
public java.lang.String getStringValue()
Gets the string value.- Specified by:
getStringValuein interfaceorg.w3c.dom.xpath.XPathResult
-
getSingleNodeValue
public org.w3c.dom.Node getSingleNodeValue()
Gets the single node value.- Specified by:
getSingleNodeValuein interfaceorg.w3c.dom.xpath.XPathResult
-
getInvalidIteratorState
public boolean getInvalidIteratorState()
Returns whether the iterator has been invalidated by document modifications.- Specified by:
getInvalidIteratorStatein interfaceorg.w3c.dom.xpath.XPathResult
-
getSnapshotLength
public int getSnapshotLength()
Returns the length of the snapshot.- Specified by:
getSnapshotLengthin interfaceorg.w3c.dom.xpath.XPathResult
-
iterateNext
public org.w3c.dom.Node iterateNext()
DOM: ImplementXPathResult.iterateNext().- Specified by:
iterateNextin interfaceorg.w3c.dom.xpath.XPathResult
-
snapshotItem
public org.w3c.dom.Node snapshotItem(int i)
Returns theith item in the snapshot.- Specified by:
snapshotItemin interfaceorg.w3c.dom.xpath.XPathResult
-
-