|
|||||||
| 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, getParentStoredNode, 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 NamedNodepublic void setIndexType(int idxType)
public int getIndexType()
public boolean isDirty()
StoredNode
isDirty in class StoredNodepublic void setDirty(boolean dirty)
setDirty in class StoredNodepublic 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 NodeappendChild in class NodeImplDOMExceptionNode.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 NodeImplDOMExceptionpublic short getAttributesCount()
getAttributesCount in class NodeImplpublic void setAttributes(short attribNum)
setAttributes in class NodeImplattribNum - The new attributes valuepublic String getAttribute(String name)
getAttribute in interface ElementElement.getAttribute(java.lang.String)
public String getAttributeNS(String namespaceURI,
String localName)
getAttributeNS in interface ElementElement.getAttributeNS(java.lang.String, java.lang.String)public Attr getAttributeNode(String name)
getAttributeNode in interface ElementElement.getAttributeNode(java.lang.String)
public Attr getAttributeNodeNS(String namespaceURI,
String localName)
getAttributeNodeNS in interface ElementElement.getAttributeNodeNS(java.lang.String, java.lang.String)public NamedNodeMap getAttributes()
getAttributes in interface NodegetAttributes in class NodeImplNode.getAttributes()public int getChildCount()
getChildCount in class NodeImplNodeImpl.getChildCount()public NodeList getChildNodes()
getChildNodes in interface NodegetChildNodes in class NodeImplpublic NodeList getElementsByTagName(String tagName)
getElementsByTagName in interface ElementElement.getElementsByTagName(java.lang.String)
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
getElementsByTagNameNS in interface ElementElement.getElementsByTagNameNS(java.lang.String, java.lang.String)public Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class NodeImplNode.getFirstChild()public Node getLastChild()
getLastChild in interface NodegetLastChild in class NodeImplNode.getLastChild()public String getTagName()
getTagName in interface ElementElement.getTagName()public boolean hasAttribute(String name)
hasAttribute in interface ElementElement.hasAttribute(java.lang.String)
public boolean hasAttributeNS(String namespaceURI,
String localName)
hasAttributeNS in interface ElementElement.hasAttributeNS(java.lang.String, java.lang.String)public boolean hasAttributes()
hasAttributes in interface NodehasAttributes in class NodeImplNode.hasAttributes()public boolean hasChildNodes()
hasChildNodes in interface NodehasChildNodes in class NodeImplNode.hasChildNodes()public String getNodeValue()
getNodeValue in interface NodegetNodeValue in class NodeImplNode.getNodeValue()
public void removeAttribute(String name)
throws DOMException
removeAttribute in interface ElementDOMExceptionElement.removeAttribute(java.lang.String)
public void removeAttributeNS(String namespaceURI,
String name)
throws DOMException
removeAttributeNS in interface ElementDOMExceptionElement.removeAttributeNS(java.lang.String, java.lang.String)
public Attr removeAttributeNode(Attr oldAttr)
throws DOMException
removeAttributeNode in interface ElementDOMException
public void setAttribute(String name,
String value)
throws DOMException
setAttribute in interface ElementDOMException
public void setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
throws DOMException
setAttributeNS in interface ElementDOMException
public Attr setAttributeNode(Attr newAttr)
throws DOMException
setAttributeNode in interface ElementDOMExceptionpublic Attr setAttributeNodeNS(Attr newAttr)
setAttributeNodeNS in interface Elementpublic 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 StoredNodeObject.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 NodeinsertBefore in class NodeImplDOMExceptionNode.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)
public void insertBefore(Txn transaction,
NodeList nodes,
Node refChild)
throws DOMException
insertBefore in class NodeImplDOMException
public void insertAfter(Txn transaction,
NodeList nodes,
Node refChild)
throws DOMException
insertAfter in class NodeImplDOMException
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 NodeImploldChild - newChild -
DOMException
public Node removeChild(Txn transaction,
Node oldChild)
throws DOMException
removeChild in class NodeImplDOMExceptionNode.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 NodeImpltransaction - newChild - oldChild -
Node.replaceChild(Node, Node) specification)
DOMExceptionNode.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 ElementDOMException
public void setIdAttributeNS(String namespaceURI,
String localName,
boolean isId)
throws DOMException
setIdAttributeNS in interface ElementDOMException
public void setIdAttributeNode(Attr idAttr,
boolean isId)
throws DOMException
setIdAttributeNode in interface ElementDOMExceptionpublic String getBaseURI()
getBaseURI in interface NodegetBaseURI in class NodeImpl
public short compareDocumentPosition(Node other)
throws DOMException
compareDocumentPosition in interface NodecompareDocumentPosition in class NodeImplDOMException
public String getTextContent()
throws DOMException
getTextContent in interface NodegetTextContent in class NodeImplDOMException
public void setTextContent(String textContent)
throws DOMException
setTextContent in interface NodesetTextContent in class NodeImplDOMExceptionpublic boolean isSameNode(Node other)
isSameNode in interface NodeisSameNode in class NodeImplpublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface NodelookupPrefix in class NodeImplpublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface NodeisDefaultNamespace in class NodeImplpublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface NodelookupNamespaceURI in class NodeImplpublic boolean isEqualNode(Node arg)
isEqualNode in interface NodeisEqualNode in class NodeImpl
public Object getFeature(String feature,
String version)
getFeature in interface NodegetFeature in class NodeImpl
public Object setUserData(String key,
Object data,
UserDataHandler handler)
setUserData in interface NodesetUserData in class NodeImplpublic Object getUserData(String key)
getUserData in interface NodegetUserData in class NodeImpl
public boolean accept(Iterator iterator,
NodeVisitor visitor)
Visitable
accept in interface Visitableaccept in class StoredNodeiterator - 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 | ||||||