com.xml_project.morganaxpath.nodes
Class ModelNode

java.lang.Object
  extended by com.xml_project.morganaxdm.XdmSequence
      extended by com.xml_project.morganaxdm.XdmItem
          extended by com.xml_project.morganaxpath.nodes.ModelNode
All Implemented Interfaces:
java.lang.Iterable<XdmItem>

public class ModelNode
extends XdmItem

This is the basic implementation of node() for XDM (likely to change in future versions).


Constructor Summary
ModelNode(java.lang.Object node, NodeModel aModel)
           
ModelNode(java.lang.Object node, NodeModel aModel, boolean directConstr)
           
ModelNode(java.lang.Object node, NodeModel aModel, boolean constrDoc, boolean directConstr)
           
 
Method Summary
 AtomizingIterator atomize()
          Returns an AtomizingIterator which gives access to the atomized value of the elements in this sequence.
 boolean contains(ModelNode n)
           
 boolean equals(java.lang.Object other)
           
 ModelNode getAttribute(javax.xml.namespace.QName qname)
           
 XdmSequence getAxis(NodeModel.NodeAxis a)
           
 java.lang.String getBaseURI()
           
 ModelNode getDocumentNode()
           
 java.lang.String getDocumentURI()
           
 XdmSequence getIDREFs(java.util.List<java.lang.String> idrefs)
           
 XdmSequence getIDs(java.util.List<java.lang.String> ids)
           
 javax.xml.namespace.QName getName()
           
 NodeModel.NodeKinds getNodeKind()
           
 NodeModel getNodeModel()
           
 java.lang.Class<? extends XS_AnyType> getNodeType()
           
 NodeModel.NodeOrderNumber getOrderNumber()
           
 XdmSequence getPrefixes()
           
 java.lang.String getStringValue()
          Returns the string value.
 XdmValue getTypedValue()
           
 java.lang.String getUriForPrefix(java.lang.String prefix)
           
 java.lang.Object getValue()
          Returns the value itself.
 boolean isDirectlyConstructed()
           
 boolean isPreviousTo(java.lang.Object other)
           
 boolean isValue()
          Flags, this item is a value as opposed to a node
 void setBaseURI(XS_AnyURI uri)
           
 void setNotConstructed()
          Setters
 
Methods inherited from class com.xml_project.morganaxdm.XdmItem
first, get, hasValues, isEmpty, iterator, size, subSequence
 
Methods inherited from class com.xml_project.morganaxdm.XdmSequence
concat, hasCommonType, normalize, serialize, serialize, serialize, wrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelNode

public ModelNode(java.lang.Object node,
                 NodeModel aModel,
                 boolean constrDoc,
                 boolean directConstr)

ModelNode

public ModelNode(java.lang.Object node,
                 NodeModel aModel,
                 boolean directConstr)

ModelNode

public ModelNode(java.lang.Object node,
                 NodeModel aModel)
Method Detail

atomize

public AtomizingIterator atomize()
Description copied from class: XdmSequence
Returns an AtomizingIterator which gives access to the atomized value of the elements in this sequence.

Overrides:
atomize in class XdmItem
Returns:
an AtomizingIterator.

isValue

public boolean isValue()
Description copied from class: XdmItem
Flags, this item is a value as opposed to a node

Specified by:
isValue in class XdmItem
Returns:
true, if this item is an XDMValue and not a node()

contains

public boolean contains(ModelNode n)

isDirectlyConstructed

public boolean isDirectlyConstructed()

getTypedValue

public XdmValue getTypedValue()

getNodeType

public java.lang.Class<? extends XS_AnyType> getNodeType()

getStringValue

public java.lang.String getStringValue()
Description copied from class: XdmItem
Returns the string value.

Specified by:
getStringValue in class XdmItem
Returns:
the string value.

getValue

public java.lang.Object getValue()
Description copied from class: XdmItem
Returns the value itself.

Specified by:
getValue in class XdmItem
Returns:
the value.

getPrefixes

public XdmSequence getPrefixes()
                        throws XPathException
Throws:
XPathException

getDocumentNode

public ModelNode getDocumentNode()

getIDs

public XdmSequence getIDs(java.util.List<java.lang.String> ids)
                   throws XPathException
Throws:
XPathException

getIDREFs

public XdmSequence getIDREFs(java.util.List<java.lang.String> idrefs)
                      throws XPathException
Throws:
XPathException

getNodeKind

public NodeModel.NodeKinds getNodeKind()

getNodeModel

public NodeModel getNodeModel()

getName

public javax.xml.namespace.QName getName()

getDocumentURI

public java.lang.String getDocumentURI()

getBaseURI

public java.lang.String getBaseURI()

getUriForPrefix

public java.lang.String getUriForPrefix(java.lang.String prefix)

getAttribute

public ModelNode getAttribute(javax.xml.namespace.QName qname)
                       throws XPathException
Throws:
XPathException

getAxis

public XdmSequence getAxis(NodeModel.NodeAxis a)
                    throws XPathException
Throws:
XPathException

setNotConstructed

public void setNotConstructed()
Setters


setBaseURI

public void setBaseURI(XS_AnyURI uri)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

isPreviousTo

public boolean isPreviousTo(java.lang.Object other)

getOrderNumber

public NodeModel.NodeOrderNumber getOrderNumber()