org.exist.memtree
Class ElementImpl

java.lang.Object
  extended by org.exist.memtree.NodeImpl
      extended by org.exist.memtree.ElementImpl
All Implemented Interfaces:
Comparable, QNameable, Item, NodeValue, Sequence, Element, Node

public class ElementImpl
extends NodeImpl
implements Element, QNameable


Field Summary
 
Fields inherited from class org.exist.memtree.NodeImpl
NAMESPACE_NODE, REFERENCE_NODE
 
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
 
Fields inherited from interface org.exist.xquery.value.NodeValue
IN_MEMORY_NODE, PERSISTENT_NODE
 
Fields inherited from interface org.exist.xquery.value.Sequence
EMPTY_SEQUENCE
 
Constructor Summary
ElementImpl(DocumentImpl doc, int nodeNumber)
           
 
Method Summary
 boolean declaresNamespacePrefixes()
          The method declaresNamespacePrefixes
 String getAttribute(String name)
           
 Attr getAttributeNode(String name)
           
 Attr getAttributeNodeNS(String namespaceURI, String localName)
           
 String getAttributeNS(String namespaceURI, String localName)
           
 NamedNodeMap getAttributes()
           
 int getAttributesCount()
           
 String getBaseURI()
          ? @see org.w3c.dom.Node#getBaseURI()
 int getChildCount()
           
 NodeList getChildNodes()
           
 NodeList getElementsByTagName(String name)
           
 NodeList getElementsByTagNameNS(String namespaceURI, String name)
           
 Node getFirstChild()
           
 int getItemType()
          Return the primary type to which all items in this sequence belong.
 String getLocalName()
           
 String getNamespaceForPrefix(String name)
          The method getNamespaceForPrefix
 Map getNamespaceMap()
          The method getNamespaceMap
 String getNamespaceURI()
           
 String getPrefix()
           
 Set getPrefixes()
          The method getPrefixes
 QName getQName()
           
 TypeInfo getSchemaTypeInfo()
          ? @see org.w3c.dom.Element#getSchemaTypeInfo()
 String getTagName()
           
 boolean hasAttribute(String name)
           
 boolean hasAttributeNS(String namespaceURI, String localName)
           
 boolean hasAttributes()
           
 boolean hasChildNodes()
           
 void removeAttribute(String arg0)
           
 Attr removeAttributeNode(Attr arg0)
           
 void removeAttributeNS(String arg0, String arg1)
           
 void selectAttributes(NodeTest test, Sequence result)
           
 void selectChildren(NodeTest test, Sequence result)
           
 void selectDescendantAttributes(NodeTest test, Sequence result)
           
 void selectDescendants(boolean includeSelf, NodeTest test, Sequence result)
           
 void setAttribute(String arg0, String arg1)
           
 Attr setAttributeNode(Attr arg0)
           
 Attr setAttributeNodeNS(Attr arg0)
           
 void setAttributeNS(String arg0, String arg1, String arg2)
           
 void setIdAttribute(String name, boolean isId)
          ? @see org.w3c.dom.Element#setIdAttribute(java.lang.String, boolean)
 void setIdAttributeNode(Attr idAttr, boolean isId)
          ? @see org.w3c.dom.Element#setIdAttributeNode(org.w3c.dom.Attr, boolean)
 void setIdAttributeNS(String namespaceURI, String localName, boolean isId)
          ? @see org.w3c.dom.Element#setIdAttributeNS(java.lang.String, java.lang.String, boolean)
 String toString()
           
 
Methods inherited from class org.exist.memtree.NodeImpl
add, addAll, addContextNode, after, appendChild, atomize, before, clearContext, cloneNode, compareDocumentPosition, compareTo, conversionPreference, convertTo, copyTo, deepCopy, effectiveBooleanValue, equals, equals, expand, getCardinality, getCollectionIterator, getDocument, getDocumentSet, getFeature, getImplementationType, getItemCount, getLastChild, getLength, getNextSibling, getNode, getNodeId, getNodeName, getNodeNumber, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getState, getStringValue, getTextContent, getType, getUserData, hasChanged, hasMany, hasOne, insertBefore, isCacheable, isCached, isDefaultNamespace, isEmpty, isEqualNode, isPersistentSet, isSameNode, isSupported, itemAt, iterate, lookupNamespaceURI, lookupPrefix, nodeMoved, normalize, removeChild, removeDuplicates, replaceChild, selectAncestors, selectFollowing, selectFollowingSiblings, selectParentNode, selectPreceding, selectPrecedingSiblings, setIsCached, setNodeValue, setPrefix, setSelfAsContext, setTextContent, setUserData, streamTo, toJavaObject, toMemNodeSet, toNodeSet, toSAX, toSequence, unorderedIterator
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getFeature, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Constructor Detail

ElementImpl

public ElementImpl(DocumentImpl doc,
                   int nodeNumber)
Method Detail

getTagName

public String getTagName()
Specified by:
getTagName in interface Element

getQName

public QName getQName()
Specified by:
getQName in interface QNameable
Overrides:
getQName in class NodeImpl

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface Node
Overrides:
hasChildNodes in class NodeImpl

getFirstChild

public Node getFirstChild()
Specified by:
getFirstChild in interface Node
Overrides:
getFirstChild in class NodeImpl

getChildNodes

public NodeList getChildNodes()
Specified by:
getChildNodes in interface Node
Overrides:
getChildNodes in class NodeImpl

getChildCount

public int getChildCount()

getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface Node
Overrides:
getNamespaceURI in class NodeImpl

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface Node
Overrides:
getPrefix in class NodeImpl

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface Node
Overrides:
getLocalName in class NodeImpl

hasAttributes

public boolean hasAttributes()
Specified by:
hasAttributes in interface Node
Overrides:
hasAttributes in class NodeImpl

getAttribute

public String getAttribute(String name)
Specified by:
getAttribute in interface Element

setAttribute

public void setAttribute(String arg0,
                         String arg1)
                  throws DOMException
Specified by:
setAttribute in interface Element
Throws:
DOMException

removeAttribute

public void removeAttribute(String arg0)
                     throws DOMException
Specified by:
removeAttribute in interface Element
Throws:
DOMException

getAttributesCount

public int getAttributesCount()

getAttributes

public NamedNodeMap getAttributes()
Specified by:
getAttributes in interface Node
Overrides:
getAttributes in class NodeImpl

getAttributeNode

public Attr getAttributeNode(String name)
Specified by:
getAttributeNode in interface Element

setAttributeNode

public Attr setAttributeNode(Attr arg0)
                      throws DOMException
Specified by:
setAttributeNode in interface Element
Throws:
DOMException

removeAttributeNode

public Attr removeAttributeNode(Attr arg0)
                         throws DOMException
Specified by:
removeAttributeNode in interface Element
Throws:
DOMException

selectAttributes

public void selectAttributes(NodeTest test,
                             Sequence result)
                      throws XPathException
Overrides:
selectAttributes in class NodeImpl
Throws:
XPathException

selectDescendantAttributes

public void selectDescendantAttributes(NodeTest test,
                                       Sequence result)
                                throws XPathException
Overrides:
selectDescendantAttributes in class NodeImpl
Throws:
XPathException

selectChildren

public void selectChildren(NodeTest test,
                           Sequence result)
                    throws XPathException
Overrides:
selectChildren in class NodeImpl
Throws:
XPathException

selectDescendants

public void selectDescendants(boolean includeSelf,
                              NodeTest test,
                              Sequence result)
                       throws XPathException
Overrides:
selectDescendants in class NodeImpl
Throws:
XPathException

getElementsByTagName

public NodeList getElementsByTagName(String name)
Specified by:
getElementsByTagName in interface Element

getAttributeNS

public String getAttributeNS(String namespaceURI,
                             String localName)
Specified by:
getAttributeNS in interface Element

setAttributeNS

public void setAttributeNS(String arg0,
                           String arg1,
                           String arg2)
                    throws DOMException
Specified by:
setAttributeNS in interface Element
Throws:
DOMException

removeAttributeNS

public void removeAttributeNS(String arg0,
                              String arg1)
                       throws DOMException
Specified by:
removeAttributeNS in interface Element
Throws:
DOMException

getAttributeNodeNS

public Attr getAttributeNodeNS(String namespaceURI,
                               String localName)
Specified by:
getAttributeNodeNS in interface Element

setAttributeNodeNS

public Attr setAttributeNodeNS(Attr arg0)
                        throws DOMException
Specified by:
setAttributeNodeNS in interface Element
Throws:
DOMException

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(String namespaceURI,
                                       String name)
Specified by:
getElementsByTagNameNS in interface Element

hasAttribute

public boolean hasAttribute(String name)
Specified by:
hasAttribute in interface Element

hasAttributeNS

public boolean hasAttributeNS(String namespaceURI,
                              String localName)
Specified by:
hasAttributeNS in interface Element

getNamespaceForPrefix

public String getNamespaceForPrefix(String name)
The method getNamespaceForPrefix

Parameters:
name - a String value
Returns:
a String value

getPrefixes

public Set getPrefixes()
The method getPrefixes

Returns:
a Set value

declaresNamespacePrefixes

public boolean declaresNamespacePrefixes()
The method declaresNamespacePrefixes

Returns:
a boolean value

getNamespaceMap

public Map getNamespaceMap()
The method getNamespaceMap

Returns:
a Map value

getItemType

public int getItemType()
Description copied from interface: Sequence
Return the primary type to which all items in this sequence belong. This is Type.NODE for node sets, Type.ITEM for other sequences with mixed items.

Specified by:
getItemType in interface Sequence
Overrides:
getItemType in class NodeImpl
Returns:
the primary type of the items in this sequence.

getBaseURI

public String getBaseURI()
? @see org.w3c.dom.Node#getBaseURI()

Specified by:
getBaseURI in interface Node
Overrides:
getBaseURI in class NodeImpl

getSchemaTypeInfo

public TypeInfo getSchemaTypeInfo()
? @see org.w3c.dom.Element#getSchemaTypeInfo()

Specified by:
getSchemaTypeInfo in interface Element

setIdAttribute

public void setIdAttribute(String name,
                           boolean isId)
                    throws DOMException
? @see org.w3c.dom.Element#setIdAttribute(java.lang.String, boolean)

Specified by:
setIdAttribute in interface Element
Throws:
DOMException

setIdAttributeNS

public void setIdAttributeNS(String namespaceURI,
                             String localName,
                             boolean isId)
                      throws DOMException
? @see org.w3c.dom.Element#setIdAttributeNS(java.lang.String, java.lang.String, boolean)

Specified by:
setIdAttributeNS in interface Element
Throws:
DOMException

setIdAttributeNode

public void setIdAttributeNode(Attr idAttr,
                               boolean isId)
                        throws DOMException
? @see org.w3c.dom.Element#setIdAttributeNode(org.w3c.dom.Attr, boolean)

Specified by:
setIdAttributeNode in interface Element
Throws:
DOMException

toString

public String toString()
Overrides:
toString in class Object


Copyright (C) Wolfgang Meier. All rights reserved.