cdqa.object
Class XDOMObject

java.lang.Object
  extended by cdqa.object.XObject
      extended by cdqa.object.XDOMObject
Direct Known Subclasses:
XAttr, XDocument, XElement, XText

public abstract class XDOMObject
extends XObject

XDOMObject based on XObject

Author:
simonkm

Field Summary
(package private)  org.w3c.dom.Node n
          the wrapped node
 
Fields inherited from class cdqa.object.XObject
LOGGER, TYPE_ATTR, TYPE_BOOLEAN, TYPE_DOCUMENT, TYPE_DOUBLE, TYPE_ELEMENT, TYPE_END, TYPE_INTEGER, TYPE_STRING, TYPE_TEXT
 
Constructor Summary
protected XDOMObject(org.w3c.dom.Node n)
           
 
Method Summary
(package private)  boolean booleanValue()
           
 org.w3c.dom.Node createDOMClone()
          creates a clone of this object
static XDOMObject createXDOMObject(org.w3c.dom.Node n)
          factory
(package private)  double doubleValue()
           
 XElement getDocumentElement()
          The root element of the document this object belongs to, if any.
 XString getNodeName()
          Returns a XString containing the node name of this XObject as defined in the W3C recommandation, if this XObject wraps a DOM object.
 XDocument getOwnerDocument(IRepository repository)
          The document this object belongs to, if any.
 XDOMObject getParentNode()
          Returns the parent object of this object null if this object has no parent
 org.w3c.dom.Node getWrappedNode()
          returns the wrapped node
(package private)  int intValue()
           
 boolean isAtomic()
          Returns true iff this object is atomic
 boolean isDOM()
          Returns true iff this object is a DOM object
 void print(XObjectWriter w)
          output
 void setWrappedNode(org.w3c.dom.Node n)
           
 java.lang.String toString()
           
 
Methods inherited from class cdqa.object.XObject
asBoolean, asDouble, asInteger, asString, fullText, getFullText, getLabel, getType, isEND, isFALSE, isTRUE, pathTo, shortText, stringValue, theENDObject, valueCompare, valueCompare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

n

org.w3c.dom.Node n
the wrapped node

Constructor Detail

XDOMObject

protected XDOMObject(org.w3c.dom.Node n)
Method Detail

getWrappedNode

public final org.w3c.dom.Node getWrappedNode()
returns the wrapped node

Returns:

setWrappedNode

public final void setWrappedNode(org.w3c.dom.Node n)

booleanValue

final boolean booleanValue()
                    throws CastException
Specified by:
booleanValue in class XObject
Throws:
CastException

intValue

final int intValue()
            throws CastException
Specified by:
intValue in class XObject
Throws:
CastException

doubleValue

final double doubleValue()
                  throws CastException
Specified by:
doubleValue in class XObject
Throws:
CastException

isAtomic

public final boolean isAtomic()
Returns true iff this object is atomic

Specified by:
isAtomic in class XObject

isDOM

public final boolean isDOM()
Returns true iff this object is a DOM object

Specified by:
isDOM in class XObject

getParentNode

public final XDOMObject getParentNode()
Description copied from class: XObject
Returns the parent object of this object null if this object has no parent

Specified by:
getParentNode in class XObject

getOwnerDocument

public final XDocument getOwnerDocument(IRepository repository)
Description copied from class: XObject
The document this object belongs to, if any. null otherwise

Specified by:
getOwnerDocument in class XObject

getDocumentElement

public final XElement getDocumentElement()
Description copied from class: XObject
The root element of the document this object belongs to, if any. null otherwise.

Specified by:
getDocumentElement in class XObject

getNodeName

public XString getNodeName()
Description copied from class: XObject
Returns a XString containing the node name of this XObject as defined in the W3C recommandation, if this XObject wraps a DOM object. null otherwise

Specified by:
getNodeName in class XObject

createDOMClone

public org.w3c.dom.Node createDOMClone()
creates a clone of this object

Specified by:
createDOMClone in class XObject

createXDOMObject

public static XDOMObject createXDOMObject(org.w3c.dom.Node n)
factory


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

print

public final void print(XObjectWriter w)
output

Specified by:
print in class XObject