class RamRemapper extends java.lang.Object implements Remapper
Modifier and Type | Field and Description |
---|---|
private boolean |
bound
Track bind/unbind calls
|
protected java.lang.Object |
mutex
Object which is used synchronize access to tree root
|
protected RamNode |
root
Root node for the in memory representation
|
private SchemaStorage |
schema
Schema container
|
Constructor and Description |
---|
RamRemapper()
Construct an instance of the XmlRemapper for a given file.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
addAttributeValueExt(RamNode node,
java.lang.String name,
java.lang.Object val)
This method is invoked by
addAttributeValue() when most
checks are passed and it is about to add new value to the attribute. |
boolean |
addNode(java.lang.String nodeId,
java.lang.String nodeClass,
java.lang.String[] names,
java.lang.Object[] values)
Add new node of specified class with specified ID.
|
boolean |
addNodeBitField(java.lang.String nodeId,
java.lang.String name,
BitField value)
Add new
BitField value to the attribute. |
boolean |
addNodeBitSelector(java.lang.String nodeId,
java.lang.String name,
BitSelector value)
Add new
BitSelector value to the attribute. |
boolean |
addNodeBoolean(java.lang.String nodeId,
java.lang.String name,
boolean value)
Add new
boolean value to the attribute. |
boolean |
addNodeByteArray(java.lang.String nodeId,
java.lang.String name,
byte[] value)
Add new
byte array value to the attribute. |
boolean |
addNodeDate(java.lang.String nodeId,
java.lang.String name,
DateValue value)
Add new
DateValue value to the attribute. |
boolean |
addNodeDouble(java.lang.String nodeId,
java.lang.String name,
double value)
Add new
double value to the attribute. |
protected boolean |
addNodeExt(RamNode parent,
RamNode newNode)
This method is invoked by
addNode() when all checks are
passed and it is about to add new node to the tree. |
boolean |
addNodeInteger(java.lang.String nodeId,
java.lang.String name,
int value)
Add new
int value to the attribute. |
boolean |
addNodeString(java.lang.String nodeId,
java.lang.String name,
java.lang.String value)
Add new
String value to the attribute. |
boolean |
addNodeTime(java.lang.String nodeId,
java.lang.String name,
TimeValue value)
Add new
TimeValue value to the attribute. |
private boolean |
addNodeValue(java.lang.String id,
java.lang.String name,
java.lang.Object val)
Add new value to the attribute.
|
boolean |
bind()
Initialise back-end and open session.
|
boolean |
deleteNode(java.lang.String nodeId)
Remove specified node from the directory (unless node has children).
|
boolean |
deleteNodeAttribute(java.lang.String nodeId,
java.lang.String name)
Remove whole node attribute.
|
protected boolean |
deleteNodeAttributeExt(RamNode node,
java.lang.String name)
This method is invoked by
deleteNodeAttribute() when most
checks are passed and it is about to delete attribute. |
boolean |
deleteNodeAttributeValue(java.lang.String nodeId,
java.lang.String name,
int index)
Remove particular value from the node attribute.
|
protected boolean |
deleteNodeAttributeValueExt(RamNode node,
java.lang.String name,
int index)
This method is invoked by
deleteNodeAttribute() when most
checks are passed and it is about to delete attribute value. |
protected boolean |
deleteNodeExt(RamNode parent,
java.lang.String child)
This method is invoked by
deleteNode() when all checks are
passed and it is about to remove node from the tree. |
AttributeDefinition[] |
enumerateNodeAttributes(java.lang.String nodeId)
Return list of all node attribute definitions.
|
java.lang.String[] |
enumerateNodes(java.lang.String nodeId)
Get direct list of children nodes for current node.
|
AttributeDefinition[] |
getClassDefinition(java.lang.String className)
Get definitions for all class attributes.
|
java.lang.String[] |
getClassNames()
Get list of names of all defined classes.
|
BitField |
getNodeBitField(java.lang.String nodeId,
java.lang.String name,
int index)
Get
BitField attribute value for specified node ID and
index. |
BitSelector |
getNodeBitSelector(java.lang.String nodeId,
java.lang.String name,
int index)
Get
BitSelector attribute value for specified node ID and
index. |
java.lang.Boolean |
getNodeBoolean(java.lang.String nodeId,
java.lang.String name,
int index)
Get
Boolean attribute value for specified node ID and
index. |
byte[] |
getNodeByteArray(java.lang.String nodeId,
java.lang.String name,
int index)
Get
byte array attribute value for specified node ID and
index. |
java.lang.String |
getNodeClassName(java.lang.String nodeId)
Return class name for the specified node.
|
DateValue |
getNodeDate(java.lang.String nodeId,
java.lang.String name,
int index)
Get
DateValue attribute value for specified node ID and
index. |
java.lang.Double |
getNodeDouble(java.lang.String nodeId,
java.lang.String name,
int index)
Get
Double attribute value for specified node ID and
index. |
java.lang.Integer |
getNodeInteger(java.lang.String nodeId,
java.lang.String name,
int index)
Get
Integer attribute value for specified node ID and
index. |
java.lang.String |
getNodeString(java.lang.String nodeId,
java.lang.String name,
int index)
Get
String attribute value for specified node ID and
index. |
TimeValue |
getNodeTime(java.lang.String nodeId,
java.lang.String name,
int index)
Get
TimeValue attribute value for specified node ID and
index. |
private java.lang.Object |
getNodeValue(java.lang.String id,
java.lang.String name,
int ndx)
Return value of specified variable of node attribute.
|
protected java.lang.Object |
getNodeValueExt(RamNode node,
java.lang.String name,
int ndx)
This method is invoked by
getNodeValue() when most checks
are passed and it is about to retrieve attribute value. |
protected ObjectClass |
getObjClass(java.lang.String name)
Return ObjectClass for a given name.
|
(package private) RamNode |
getRoot()
Return root of the three.
|
protected boolean |
isBound()
Verifies that calling thread is properly bound.
|
boolean |
isClassImmutable(java.lang.String className)
Class is immutable if the back-end does not allow any change to its
state.
|
boolean |
isClassLeaf(java.lang.String className)
Class is leaf if no other object can be created under objects of the
class.
|
protected void |
load()
Load tree from external storage.
|
protected RamNode |
locateNode(java.lang.String id)
Locate node for given nodeId.
|
private RamNode |
locateNode0(java.lang.String id)
This is actual worker for the
locateNode() method. |
boolean |
moveNode(java.lang.String nodeId,
java.lang.String newId)
Moves or renames the existing object, specified by nodeId to different
location.
|
protected boolean |
moveNodeExt(RamNode parent,
java.lang.String name,
RamNode newParent,
java.lang.String newName)
This method is invoked by
moveNode() when most checks are
passed and it is about to move node to the new location. |
boolean |
refresh()
Generic implementation.
|
protected void |
save()
Save current tree into external storage.
|
boolean |
setNodeBitField(java.lang.String nodeId,
java.lang.String name,
int index,
BitField value)
Set
BitField attribute value for specified node ID,
attribute name and index. |
boolean |
setNodeBitSelector(java.lang.String nodeId,
java.lang.String name,
int index,
BitSelector value)
Set
BitSelector attribute value for specified node ID,
attribute name and index. |
boolean |
setNodeBoolean(java.lang.String nodeId,
java.lang.String name,
int index,
boolean value)
Set
boolean attribute value for specified node ID,
attribute name and index. |
boolean |
setNodeByteArray(java.lang.String nodeId,
java.lang.String name,
int index,
byte[] value)
Set
byte array attribute value for specified node ID,
attribute name and index. |
boolean |
setNodeDate(java.lang.String nodeId,
java.lang.String name,
int index,
DateValue value)
Set
DateValue attribute value for specified node ID,
attribute name and index. |
boolean |
setNodeDouble(java.lang.String nodeId,
java.lang.String name,
int index,
double value)
Set
double attribute value for specified node ID,
attribute name and index. |
boolean |
setNodeInteger(java.lang.String nodeId,
java.lang.String name,
int index,
int value)
Set
int attribute value for specified node ID, attribute
name and index. |
boolean |
setNodeString(java.lang.String nodeId,
java.lang.String name,
int index,
java.lang.String value)
Set
String attribute value for specified node ID,
attribute name and index. |
boolean |
setNodeTime(java.lang.String nodeId,
java.lang.String name,
int index,
TimeValue value)
Set
TimeValue attribute value for specified node ID,
attribute name and index. |
private boolean |
setNodeValue(java.lang.String id,
java.lang.String name,
int index,
java.lang.Object val)
Set attribute value for specified node ID, attribute name and index.
|
protected boolean |
setNodeValueExt(RamNode node,
java.lang.String name,
java.lang.Object val,
int index)
This method is invoked by
setNodeValue() when most checks
are passed and it is about to change attribute value. |
(package private) void |
setRoot(RamNode node)
Set tree root.
|
boolean |
unbind()
Close session and shutdown back-end.
|
boolean |
update()
Update external storage.
|
protected java.lang.Object mutex
protected RamNode root
private boolean bound
private SchemaStorage schema
RamRemapper()
public boolean addNode(java.lang.String nodeId, java.lang.String nodeClass, java.lang.String[] names, java.lang.Object[] values)
public boolean addNodeBitField(java.lang.String nodeId, java.lang.String name, BitField value)
BitField
value to the attribute.addNodeBitField
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeBitSelector(java.lang.String nodeId, java.lang.String name, BitSelector value)
BitSelector
value to the attribute.addNodeBitSelector
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeBoolean(java.lang.String nodeId, java.lang.String name, boolean value)
boolean
value to the attribute.addNodeBoolean
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeByteArray(java.lang.String nodeId, java.lang.String name, byte[] value)
byte array
value to the attribute.addNodeByteArray
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeDate(java.lang.String nodeId, java.lang.String name, DateValue value)
DateValue
value to the attribute.addNodeDate
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeDouble(java.lang.String nodeId, java.lang.String name, double value)
double
value to the attribute.addNodeDouble
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeInteger(java.lang.String nodeId, java.lang.String name, int value)
int
value to the attribute.addNodeInteger
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeString(java.lang.String nodeId, java.lang.String name, java.lang.String value)
String
value to the attribute.addNodeString
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean addNodeTime(java.lang.String nodeId, java.lang.String name, TimeValue value)
TimeValue
value to the attribute.addNodeTime
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean bind()
public boolean deleteNode(java.lang.String nodeId)
deleteNode
in interface Remapper
nodeId
- Node identifier.true
if operation was successful and
false
otherwise.public boolean deleteNodeAttribute(java.lang.String nodeId, java.lang.String name)
deleteNodeAttribute
in interface Remapper
nodeId
- Node name.name
- Attribute name.true
if operation was successful and
false
otherwise.public boolean deleteNodeAttributeValue(java.lang.String nodeId, java.lang.String name, int index)
deleteNodeAttributeValue
in interface Remapper
nodeId
- Node name.name
- Attribute name.index
- Attribute value index.true
if operation was successful and
false
otherwise.public AttributeDefinition[] enumerateNodeAttributes(java.lang.String nodeId)
enumerateNodeAttributes
in interface Remapper
nodeId
- Node for which list of attributes is requested.public java.lang.String[] enumerateNodes(java.lang.String nodeId)
enumerateNodes
in interface Remapper
nodeId
- Node for which list of nodes is requested.public AttributeDefinition[] getClassDefinition(java.lang.String className)
getClassDefinition
in interface Remapper
className
- Name of the class.public java.lang.String[] getClassNames()
getClassNames
in interface Remapper
public BitField getNodeBitField(java.lang.String nodeId, java.lang.String name, int index)
BitField
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not BitField
then null
is returned.getNodeBitField
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public BitSelector getNodeBitSelector(java.lang.String nodeId, java.lang.String name, int index)
BitSelector
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not BitSelector
then
null
is returned.getNodeBitSelector
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public java.lang.Boolean getNodeBoolean(java.lang.String nodeId, java.lang.String name, int index)
Boolean
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not Boolean
then null
is returned.getNodeBoolean
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public byte[] getNodeByteArray(java.lang.String nodeId, java.lang.String name, int index)
byte array
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not byte array
then
null
is returned.getNodeByteArray
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public java.lang.String getNodeClassName(java.lang.String nodeId)
getNodeClassName
in interface Remapper
nodeId
- Node for which class name is requested.public DateValue getNodeDate(java.lang.String nodeId, java.lang.String name, int index)
DateValue
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not DateValue
then null
is returned.getNodeDate
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public java.lang.Double getNodeDouble(java.lang.String nodeId, java.lang.String name, int index)
Double
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not Double
then null
is returned.getNodeDouble
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public java.lang.Integer getNodeInteger(java.lang.String nodeId, java.lang.String name, int index)
Integer
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not Integer
then null
is returned.getNodeInteger
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public java.lang.String getNodeString(java.lang.String nodeId, java.lang.String name, int index)
String
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not String
then null
is returned.getNodeString
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public TimeValue getNodeTime(java.lang.String nodeId, java.lang.String name, int index)
TimeValue
attribute value for specified node ID and
index. If wrong parameter (node ID, attribute name or index) are passed
or attribute type is not TimeValue
then null
is returned.getNodeTime
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.public boolean isClassImmutable(java.lang.String className)
isClassImmutable
in interface Remapper
className
- Name of the class.true
if class is read-only.public boolean isClassLeaf(java.lang.String className)
isClassLeaf
in interface Remapper
className
- Name of the class.true
if class is leaf.public boolean moveNode(java.lang.String nodeId, java.lang.String newId)
public boolean setNodeBitField(java.lang.String nodeId, java.lang.String name, int index, BitField value)
BitField
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeBitField
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeBitSelector(java.lang.String nodeId, java.lang.String name, int index, BitSelector value)
BitSelector
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeBitSelector
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeBoolean(java.lang.String nodeId, java.lang.String name, int index, boolean value)
boolean
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeBoolean
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeByteArray(java.lang.String nodeId, java.lang.String name, int index, byte[] value)
byte array
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeByteArray
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeDate(java.lang.String nodeId, java.lang.String name, int index, DateValue value)
DateValue
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeDate
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeDouble(java.lang.String nodeId, java.lang.String name, int index, double value)
double
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeDouble
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeInteger(java.lang.String nodeId, java.lang.String name, int index, int value)
int
attribute value for specified node ID, attribute
name and index. If wrong parameter is passed or attribute read-only then
false
is returned.setNodeInteger
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeString(java.lang.String nodeId, java.lang.String name, int index, java.lang.String value)
String
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeString
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean setNodeTime(java.lang.String nodeId, java.lang.String name, int index, TimeValue value)
TimeValue
attribute value for specified node ID,
attribute name and index. If wrong parameter is passed or attribute
read-only then false
is returned.setNodeTime
in interface Remapper
nodeId
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.value
- New value for the attribute variable.true
is operation is successful and
false
otherwise.public boolean unbind()
public boolean update()
public boolean refresh()
refresh
in interface Remapper
true
if operation was successful.Remapper.refresh()
protected boolean addAttributeValueExt(RamNode node, java.lang.String name, java.lang.Object val)
addAttributeValue()
when most
checks are passed and it is about to add new value to the attribute.
Derived classes should override it if they need to handle this
operation. The main reason of this method is that it is invoked inside
synchronisation block and therefore derived class does not need to worry
about this.
Note that derived class must call this method before successful exit.
node
- A node from which attribute value is requested.name
- Name of the attribute.val
- New value which will be added to the attribute.true
is operation is successful and
false
otherwise.protected boolean addNodeExt(RamNode parent, RamNode newNode)
addNode()
when all checks are
passed and it is about to add new node to the tree. Derived classes
should override it if they need to handle adding node somehow. The main
reason of this method is that it is invoked inside synchronisation block
and therefore derived class does not need to worry about this.
Note that derived class must call this method before successful exit.
parent
- A node to which newNode
will be added.newNode
- New node which need to be added to parent
.true
if operation was successful and
false
otherwise.protected boolean deleteNodeAttributeExt(RamNode node, java.lang.String name)
deleteNodeAttribute()
when most
checks are passed and it is about to delete attribute. Derived classes
should override it if they need to handle this operation. The main
reason of this method is that it is invoked inside synchronisation block
and therefore derived class does not need to worry about this.
Note that derived class must call this method before successful exit.
node
- A node from which attribute value is requested.name
- Name of the attribute.true
if operation was successful and
false
otherwise.protected boolean deleteNodeAttributeValueExt(RamNode node, java.lang.String name, int index)
deleteNodeAttribute()
when most
checks are passed and it is about to delete attribute value. Derived
classes should override it if they need to handle this operation. The
main reason of this method is that it is invoked inside synchronisation
block and therefore derived class does not need to worry about this.
Note that derived class must call this method before successful exit.
Note that according to specification attribute must be deleted if last value is removed.
node
- A node from which attribute value will be deleted.name
- Name of the attribute.index
- Attribute value index.true
is operation is successful and
false
otherwise.protected boolean deleteNodeExt(RamNode parent, java.lang.String child)
deleteNode()
when all checks are
passed and it is about to remove node from the tree. Derived classes
should override it if they need to handle removing of the node somehow. The main
reason of this method is that it is invoked inside synchronisation block
and therefore derived class does not need to worry about this.
Note that derived class must call this method before successful exit.
parent
- A node to which newNode
will be added.child
- An ID of the child node to remove.true
if operation was successful and
false
otherwise.protected java.lang.Object getNodeValueExt(RamNode node, java.lang.String name, int ndx)
getNodeValue()
when most checks
are passed and it is about to retrieve attribute value. Derived classes
should override it if they need to handle this operation. The main
reason of this method is that it is invoked inside synchronisation block
and therefore derived class does not need to worry about this.
Note that derived class must call this method before successful exit.
node
- A node from which attribute value is requested.name
- Name of the attribute.ndx
- Index of the attribute value.protected ObjectClass getObjClass(java.lang.String name)
name
- Class name to find.null
otherwise.protected boolean isBound()
true
if thread is properly bound.protected void load() throws java.lang.Exception
java.lang.Exception
- In case of various errors. The use of Exception here is
intentional: child classes must be allowed throw other
exceptions without changing method signature.protected RamNode locateNode(java.lang.String id)
null
is returned.id
- Node id to locate.protected boolean moveNodeExt(RamNode parent, java.lang.String name, RamNode newParent, java.lang.String newName)
moveNode()
when most checks are
passed and it is about to move node to the new location. Derived classes
should override it if they need to handle this operation. The main
reason of this method is that it is invoked inside synchronisation block
and therefore derived class does not need to worry about this.
Note that derived class must call this method before successful exit.
Note that derived class can check if parent and newParent parameters point to the same node. In many cases such a situation can be performed in more efficient way.
parent
- A parent node of the node which is about to be moved to new
location.name
- Name of the node which will be moved.newParent
- A node which will be new parent node if operation will be
successful.newName
- New name of the node.true
is operation is successful and
false
otherwise.protected void save() throws java.lang.Exception
java.lang.Exception
- In case of various errors. The use of Exception here is
intentional: child classes must be allowed throw other
exceptions without changing method signature.protected boolean setNodeValueExt(RamNode node, java.lang.String name, java.lang.Object val, int index)
setNodeValue()
when most checks
are passed and it is about to change attribute value. Derived classes
should override it if they need to handle this operation. The main
reason of this method is that it is invoked inside synchronisation block
and therefore derived class does not need to worry about this.
Note that derived class must call this method before successful exit.
node
- A node which contains the attribute to change.name
- Attribute name.index
- Index of the value to retrieve.val
- New value for the attribute variable.true
is operation is successful and
false
otherwise.RamNode getRoot()
void setRoot(RamNode node)
node
- The root node of the tree.private boolean addNodeValue(java.lang.String id, java.lang.String name, java.lang.Object val)
id
- Node identifier.name
- Attribute name.val
- New value for the attribute variable.true
is operation is successful and
false
otherwise.private java.lang.Object getNodeValue(java.lang.String id, java.lang.String name, int ndx)
id
- Node identifier.name
- Attribute name.ndx
- Index of the value to retrieve.null
.private RamNode locateNode0(java.lang.String id)
locateNode()
method.id
- Node id to locate.private boolean setNodeValue(java.lang.String id, java.lang.String name, int index, java.lang.Object val)
false
is returned.id
- Node identifier.name
- Attribute name.index
- Index of the value to retrieve.val
- New value for the attribute variable.true
is operation is successful and
false
otherwise.