|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.dom.NodeImpl
org.exist.dom.StoredNode
org.exist.dom.NamedNode
org.exist.dom.ElementImpl
public class ElementImpl
ElementImpl.java
Field Summary | |
---|---|
static int |
LENGTH_ATTRIBUTES_COUNT
|
static int |
LENGTH_ELEMENT_CHILD_COUNT
|
static int |
LENGTH_NS_ID
|
static int |
LENGTH_PREFIX_LENGTH
|
Fields inherited from class org.exist.dom.StoredNode |
---|
LENGTH_SIGNATURE_LENGTH, UNKNOWN_NODE_IMPL_ADDRESS |
Constructor Summary | |
---|---|
ElementImpl()
|
|
ElementImpl(ElementImpl other)
|
|
ElementImpl(QName nodeName)
Constructor for the ElementImpl object |
Method Summary | |
---|---|
boolean |
accept(Iterator iterator,
NodeVisitor visitor)
Visit the current node. |
void |
addNamespaceMapping(String prefix,
String ns)
|
void |
appendAttributes(Txn transaction,
NodeList attribs)
|
Node |
appendChild(Node child)
|
void |
appendChildInternal(StoredNode prevNode,
StoredNode child)
Append a child to this node. |
void |
appendChildren(Txn transaction,
NodeList nodes,
int child)
|
void |
clear()
Reset this element to its initial state. |
short |
compareDocumentPosition(Node other)
? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) |
boolean |
declaresNamespacePrefixes()
|
static StoredNode |
deserialize(byte[] data,
int start,
int len,
DocumentImpl doc,
boolean pooled)
|
String |
getAttribute(String name)
|
Attr |
getAttributeNode(String name)
|
Attr |
getAttributeNodeNS(String namespaceURI,
String localName)
|
String |
getAttributeNS(String namespaceURI,
String localName)
|
NamedNodeMap |
getAttributes()
|
short |
getAttributesCount()
|
String |
getBaseURI()
? @see org.w3c.dom.Node#getBaseURI() |
int |
getChildCount()
|
NodeList |
getChildNodes()
|
NodeList |
getElementsByTagName(String tagName)
|
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
|
Object |
getFeature(String feature,
String version)
? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String) |
Node |
getFirstChild()
|
int |
getIndexType()
|
Node |
getLastChild()
|
String |
getNamespaceForPrefix(String prefix)
|
String |
getNodeValue()
|
int |
getPosition()
|
int |
getPrefixCount()
|
Iterator |
getPrefixes()
|
TypeInfo |
getSchemaTypeInfo()
? @see org.w3c.dom.Element#getSchemaTypeInfo() |
String |
getTagName()
|
String |
getTextContent()
? @see org.w3c.dom.Node#getTextContent() |
Object |
getUserData(String key)
? @see org.w3c.dom.Node#getUserData(java.lang.String) |
boolean |
hasAttribute(String name)
|
boolean |
hasAttributeNS(String namespaceURI,
String localName)
|
boolean |
hasAttributes()
|
boolean |
hasChildNodes()
|
void |
insertAfter(Txn transaction,
NodeList nodes,
Node refChild)
Insert a list of nodes at the position following the reference child. |
Node |
insertBefore(Node newChild,
Node refChild)
|
void |
insertBefore(Txn transaction,
NodeList nodes,
Node refChild)
Insert a list of nodes at the position before the reference child. |
boolean |
isDefaultNamespace(String namespaceURI)
? @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String) |
boolean |
isDirty()
Returns true if the node was modified recently and nodes were inserted at the start or in the middle of its children. |
boolean |
isEqualNode(Node arg)
? @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node) |
boolean |
isSameNode(Node other)
? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node) |
String |
lookupNamespaceURI(String prefix)
? @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String) |
String |
lookupPrefix(String namespaceURI)
? @see org.w3c.dom.Node#lookupPrefix(java.lang.String) |
boolean |
preserveSpace()
|
static void |
readNamespaceDecls(List namespaces,
Value value,
DocumentImpl document,
NodeId nodeId)
|
static QName |
readQName(Value value,
DocumentImpl document,
NodeId nodeId)
|
void |
removeAppendAttributes(Txn transaction,
NodeList removeList,
NodeList appendList)
|
void |
removeAttribute(String name)
|
Attr |
removeAttributeNode(Attr oldAttr)
|
void |
removeAttributeNS(String namespaceURI,
String name)
|
Node |
removeChild(Txn transaction,
Node oldChild)
|
Node |
replaceChild(Txn transaction,
Node newChild,
Node oldChild)
Replaces the oldNode with the newChild |
byte[] |
serialize()
|
void |
setAttribute(String name,
String value)
|
Attr |
setAttributeNode(Attr newAttr)
|
Attr |
setAttributeNodeNS(Attr newAttr)
|
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
|
void |
setAttributes(short attribNum)
Set the attributes that belong to this node. |
void |
setChildCount(int count)
Set the number of children. |
void |
setDirty(boolean dirty)
|
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) |
void |
setIndexType(int idxType)
|
void |
setNamespaceMappings(Map map)
|
void |
setPosition(int position)
|
void |
setPreserveSpace(boolean preserveWS)
|
void |
setTextContent(String textContent)
? @see org.w3c.dom.Node#setTextContent(java.lang.String) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler)
? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler) |
String |
toString()
|
String |
toString(boolean top)
|
String |
toString(boolean top,
TreeSet namespaces)
Method toString. |
void |
update(Txn transaction,
NodeList newContent)
Update the contents of this element. |
StoredNode |
updateChild(Txn transaction,
Node oldChild,
Node newChild)
Update a child node. |
Methods inherited from class org.exist.dom.NamedNode |
---|
getQName, setNodeName |
Methods inherited from class org.exist.dom.StoredNode |
---|
accept, deserialize, equals, getDocId, getDocument, getInternalAddress, getNextSibling, getNodeId, getNodeType, getOwnerDocument, getParentNode, getPath, getPath, getPreviousSibling, release, setInternalAddress, setNodeId, setOwnerDocument |
Methods inherited from class org.exist.dom.NodeImpl |
---|
cloneNode, getLocalName, getNamespaceURI, getNodeName, getPrefix, insertAfter, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix, supports, updateChild |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
---|
cloneNode, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Field Detail |
---|
public static final int LENGTH_ELEMENT_CHILD_COUNT
public static final int LENGTH_ATTRIBUTES_COUNT
public static final int LENGTH_NS_ID
public static final int LENGTH_PREFIX_LENGTH
Constructor Detail |
---|
public ElementImpl()
public ElementImpl(QName nodeName)
nodeName
- Description of the Parameterpublic ElementImpl(ElementImpl other)
Method Detail |
---|
public void clear()
clear
in class NamedNode
public void setIndexType(int idxType)
public int getIndexType()
public boolean isDirty()
StoredNode
isDirty
in class StoredNode
public void setDirty(boolean dirty)
setDirty
in class StoredNode
public void setPosition(int position)
public int getPosition()
public boolean declaresNamespacePrefixes()
public byte[] serialize()
serialize
in class StoredNode
public static StoredNode deserialize(byte[] data, int start, int len, DocumentImpl doc, boolean pooled)
public static QName readQName(Value value, DocumentImpl document, NodeId nodeId)
public static void readNamespaceDecls(List namespaces, Value value, DocumentImpl document, NodeId nodeId)
public void addNamespaceMapping(String prefix, String ns)
public void appendChildInternal(StoredNode prevNode, StoredNode child) throws DOMException
child
-
DOMException
public Node appendChild(Node child) throws DOMException
appendChild
in interface Node
appendChild
in class NodeImpl
DOMException
Node.appendChild(org.w3c.dom.Node)
public void appendAttributes(Txn transaction, NodeList attribs) throws DOMException
DOMException
public void appendChildren(Txn transaction, NodeList nodes, int child) throws DOMException
appendChildren
in class NodeImpl
DOMException
public short getAttributesCount()
getAttributesCount
in class NodeImpl
public void setAttributes(short attribNum)
setAttributes
in class NodeImpl
attribNum
- The new attributes valuepublic String getAttribute(String name)
getAttribute
in interface Element
Element.getAttribute(java.lang.String)
public String getAttributeNS(String namespaceURI, String localName)
getAttributeNS
in interface Element
Element.getAttributeNS(java.lang.String, java.lang.String)
public Attr getAttributeNode(String name)
getAttributeNode
in interface Element
Element.getAttributeNode(java.lang.String)
public Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS
in interface Element
Element.getAttributeNodeNS(java.lang.String, java.lang.String)
public NamedNodeMap getAttributes()
getAttributes
in interface Node
getAttributes
in class NodeImpl
Node.getAttributes()
public int getChildCount()
getChildCount
in class NodeImpl
NodeImpl.getChildCount()
public NodeList getChildNodes()
getChildNodes
in interface Node
getChildNodes
in class NodeImpl
public NodeList getElementsByTagName(String tagName)
getElementsByTagName
in interface Element
Element.getElementsByTagName(java.lang.String)
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Element
Element.getElementsByTagNameNS(java.lang.String, java.lang.String)
public Node getFirstChild()
getFirstChild
in interface Node
getFirstChild
in class NodeImpl
Node.getFirstChild()
public Node getLastChild()
getLastChild
in interface Node
getLastChild
in class NodeImpl
Node.getLastChild()
public String getTagName()
getTagName
in interface Element
Element.getTagName()
public boolean hasAttribute(String name)
hasAttribute
in interface Element
Element.hasAttribute(java.lang.String)
public boolean hasAttributeNS(String namespaceURI, String localName)
hasAttributeNS
in interface Element
Element.hasAttributeNS(java.lang.String, java.lang.String)
public boolean hasAttributes()
hasAttributes
in interface Node
hasAttributes
in class NodeImpl
Node.hasAttributes()
public boolean hasChildNodes()
hasChildNodes
in interface Node
hasChildNodes
in class NodeImpl
Node.hasChildNodes()
public String getNodeValue()
getNodeValue
in interface Node
getNodeValue
in class NodeImpl
Node.getNodeValue()
public void removeAttribute(String name) throws DOMException
removeAttribute
in interface Element
DOMException
Element.removeAttribute(java.lang.String)
public void removeAttributeNS(String namespaceURI, String name) throws DOMException
removeAttributeNS
in interface Element
DOMException
Element.removeAttributeNS(java.lang.String, java.lang.String)
public Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode
in interface Element
DOMException
public void setAttribute(String name, String value) throws DOMException
setAttribute
in interface Element
DOMException
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS
in interface Element
DOMException
public Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode
in interface Element
DOMException
public Attr setAttributeNodeNS(Attr newAttr)
setAttributeNodeNS
in interface Element
public void setChildCount(int count)
NodeImpl
count
- The new childCount valuepublic void setNamespaceMappings(Map map)
public Iterator getPrefixes()
public String getNamespaceForPrefix(String prefix)
public int getPrefixCount()
public String toString()
toString
in class StoredNode
Object.toString()
public String toString(boolean top)
toString
in class StoredNode
public String toString(boolean top, TreeSet namespaces)
public Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore
in interface Node
insertBefore
in class NodeImpl
DOMException
Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)
public void insertBefore(Txn transaction, NodeList nodes, Node refChild) throws DOMException
insertBefore
in class NodeImpl
DOMException
public void insertAfter(Txn transaction, NodeList nodes, Node refChild) throws DOMException
insertAfter
in class NodeImpl
DOMException
public void update(Txn transaction, NodeList newContent) throws DOMException
newContent
-
DOMException
public StoredNode updateChild(Txn transaction, Node oldChild, Node newChild) throws DOMException
updateChild
in class NodeImpl
oldChild
- newChild
-
DOMException
public Node removeChild(Txn transaction, Node oldChild) throws DOMException
removeChild
in class NodeImpl
DOMException
Node.removeChild(org.w3c.dom.Node)
public void removeAppendAttributes(Txn transaction, NodeList removeList, NodeList appendList)
public Node replaceChild(Txn transaction, Node newChild, Node oldChild) throws DOMException
replaceChild
in class NodeImpl
transaction
- newChild
- oldChild
-
Node.replaceChild(Node, Node)
specification)
DOMException
Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
public void setPreserveSpace(boolean preserveWS)
public boolean preserveSpace()
public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface Element
public void setIdAttribute(String name, boolean isId) throws DOMException
setIdAttribute
in interface Element
DOMException
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
setIdAttributeNS
in interface Element
DOMException
public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
setIdAttributeNode
in interface Element
DOMException
public String getBaseURI()
getBaseURI
in interface Node
getBaseURI
in class NodeImpl
public short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition
in interface Node
compareDocumentPosition
in class NodeImpl
DOMException
public String getTextContent() throws DOMException
getTextContent
in interface Node
getTextContent
in class NodeImpl
DOMException
public void setTextContent(String textContent) throws DOMException
setTextContent
in interface Node
setTextContent
in class NodeImpl
DOMException
public boolean isSameNode(Node other)
isSameNode
in interface Node
isSameNode
in class NodeImpl
public String lookupPrefix(String namespaceURI)
lookupPrefix
in interface Node
lookupPrefix
in class NodeImpl
public boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace
in interface Node
isDefaultNamespace
in class NodeImpl
public String lookupNamespaceURI(String prefix)
lookupNamespaceURI
in interface Node
lookupNamespaceURI
in class NodeImpl
public boolean isEqualNode(Node arg)
isEqualNode
in interface Node
isEqualNode
in class NodeImpl
public Object getFeature(String feature, String version)
getFeature
in interface Node
getFeature
in class NodeImpl
public Object setUserData(String key, Object data, UserDataHandler handler)
setUserData
in interface Node
setUserData
in class NodeImpl
public Object getUserData(String key)
getUserData
in interface Node
getUserData
in class NodeImpl
public boolean accept(Iterator iterator, NodeVisitor visitor)
Visitable
accept
in interface Visitable
accept
in class StoredNode
iterator
- an iterator positioned at the current nodevisitor
- the visitor to call.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |