public final class ElementNode extends Object implements INode, IStructNode, INameNode
Node representing an XML element.
Constructor and Description |
---|
ElementNode(NodeDelegate pDel,
StructNodeDelegate pStrucDel,
NameNodeDelegate pNameDel,
List<Long> pAttributeKeys,
List<Long> pNamespaceKeys)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
decrementChildCount()
Decrementing the child count.
|
boolean |
equals(Object obj) |
int |
getAttributeCount()
Getting the count of attributes.
|
long |
getAttributeKey(int pIndex)
Getting the attribute key for an given index.
|
long |
getChildCount()
Gets the number of children of the item.
|
long |
getDataKey()
Gets unique
IData key. |
long |
getFirstChildKey()
Gets key of the context item's first child.
|
com.google.common.hash.Funnel<IData> |
getFunnel()
Getting a Funnel for computing guava-based hashes.
|
long |
getHash()
Getting the persisted hash value for this node.
|
int |
getKind()
Gets the kind of the item (atomic value, element node, attribute
node....).
|
long |
getLeftSiblingKey()
Gets key of the context item's left sibling.
|
int |
getNameKey()
Gets key of qualified name.
|
int |
getNamespaceCount()
Getting the count of namespaces.
|
long |
getNamespaceKey(int pNamespaceKey)
Getting the namespace key for an given index.
|
long |
getParentKey()
Gets key of the context item's parent.
|
long |
getRightSiblingKey()
Gets key of the context item's right sibling.
|
int |
getTypeKey()
Gets value type of the item.
|
int |
getURIKey()
Gets key of the URI.
|
boolean |
hasFirstChild()
Declares, whether the item has a first child.
|
int |
hashCode() |
boolean |
hasLeftSibling()
Declares, whether the item has a left sibling.
|
boolean |
hasParent()
Declares, whether the item has a parent.
|
boolean |
hasRightSibling()
Declares, whether the item has a right sibling.
|
void |
incrementChildCount()
Incrementing the child count.
|
void |
insertAttribute(long pAttrKey)
Inserting an attribute.
|
void |
insertNamespace(long pNamespaceKey)
Inserting a namespace.
|
void |
removeAttribute(long pAttrKey)
Removing an attribute.
|
void |
removeNamespace(long pNamespaceKey)
Removing a namepsace.
|
void |
serialize(DataOutput pOutput)
Serializing to given dataput
|
void |
setFirstChildKey(long pKey)
Setting the first child sibling key to this node.
|
void |
setHash(long pHash)
Setting the hash of this node including substructure.
|
void |
setLeftSiblingKey(long pKey)
Setting the left sibling key to this node.
|
void |
setNameKey(int pNameKey)
Setting the name key.
|
void |
setParentKey(long pParentKey)
Setting the parent key.
|
void |
setRightSiblingKey(long pKey)
Setting the right sibling key to this node.
|
void |
setTypeKey(int pTypeKey)
Setting the type key.
|
void |
setURIKey(int pUriKey)
Setting the uri key.
|
String |
toString() |
public ElementNode(NodeDelegate pDel, StructNodeDelegate pStrucDel, NameNodeDelegate pNameDel, List<Long> pAttributeKeys, List<Long> pNamespaceKeys)
pDel
- NodeDelegate
to be setpStrucDel
- StructNodeDelegate
to be setpNameDel
- NameNodeDelegate
to be setpAttributeKeys
- keys of attributes to be setpNamespaceKeys
- keys of namespaces to be setpublic int getAttributeCount()
public long getAttributeKey(int pIndex)
pIndex
- index of the attributepublic void insertAttribute(long pAttrKey)
pAttrKey
- the new attribute keypublic void removeAttribute(long pAttrKey)
pAttrKey
- the key of the attribute to be removedpublic int getNamespaceCount()
public long getNamespaceKey(int pNamespaceKey)
pNamespaceKey
- index of the namespacepublic void insertNamespace(long pNamespaceKey)
pNamespaceKey
- new namespace keypublic void removeNamespace(long pNamespaceKey)
pNamespaceKey
- the key of the namespace to be removedpublic long getDataKey()
IData
key.
This key should be set over the IBucketWriteTrx.incrementDataKey
for getting the correct
offset
within retrievals.getDataKey
in interface IData
public long getParentKey()
getParentKey
in interface INode
public void setParentKey(long pParentKey)
setParentKey
in interface INode
pParentKey
- the parent to be set.public long getHash()
public void setHash(long pHash)
public int getTypeKey()
getTypeKey
in interface INode
public void setTypeKey(int pTypeKey)
setTypeKey
in interface INode
pTypeKey
- the type to be set.public boolean hasParent()
public int getNameKey()
getNameKey
in interface INameNode
public int getURIKey()
public void setNameKey(int pNameKey)
setNameKey
in interface INameNode
pNameKey
- the namekey to be set.public void setURIKey(int pUriKey)
public boolean hasFirstChild()
hasFirstChild
in interface IStructNode
public boolean hasLeftSibling()
hasLeftSibling
in interface IStructNode
public boolean hasRightSibling()
hasRightSibling
in interface IStructNode
public long getChildCount()
getChildCount
in interface IStructNode
public long getFirstChildKey()
getFirstChildKey
in interface IStructNode
public long getLeftSiblingKey()
getLeftSiblingKey
in interface IStructNode
public long getRightSiblingKey()
getRightSiblingKey
in interface IStructNode
public void setRightSiblingKey(long pKey)
setRightSiblingKey
in interface IStructNode
pKey
- the new key to be set.public void setLeftSiblingKey(long pKey)
setLeftSiblingKey
in interface IStructNode
pKey
- the new key to be set.public void setFirstChildKey(long pKey)
setFirstChildKey
in interface IStructNode
pKey
- the new key to be set.public void decrementChildCount()
decrementChildCount
in interface IStructNode
public void incrementChildCount()
incrementChildCount
in interface IStructNode
public int getKind()
public void serialize(DataOutput pOutput) throws TTIOException
serialize
in interface IData
pOutput
- to serialize toTTIOException
Copyright © 2013. All Rights Reserved.