org.gcube.data.tr.neo.nodes
Class PersistentLeaf

java.lang.Object
  extended by org.gcube.data.trees.data.Node
      extended by org.gcube.data.trees.data.Leaf
          extended by org.gcube.data.tr.neo.nodes.PersistentLeaf

public class PersistentLeaf
extends org.gcube.data.trees.data.Leaf

A Leaf with persistent state.

Author:
Fabio Simeoni
See Also:
PersistentNode

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.data.trees.data.Node
org.gcube.data.trees.data.Node.State
 
Constructor Summary
PersistentLeaf(org.neo4j.graphdb.GraphDatabaseService db, org.gcube.data.trees.data.Leaf node)
          Creates an instance from a given Leaf and using a given NodeBinder.
PersistentLeaf(org.neo4j.graphdb.Node dbnode, BindingMode mode)
           
 
Method Summary
 Map<QName,String> attributes()
          
 org.neo4j.graphdb.Node dbnode()
          Returns the database node that acts as the entry point to the persistent state of this node
 void delete()
          
 boolean equals(Object obj)
          
 int hashCode()
          
 String removeAttribute(QName name)
          
 String setAttribute(QName name, String value)
          
 String value()
          
 void value(String v)
          
 
Methods inherited from class org.gcube.data.trees.data.Leaf
delta, size, toString, update
 
Methods inherited from class org.gcube.data.trees.data.Node
ancestors, ancestorsAndSelf, attribute, attribute, hasAttribute, hasAttribute, id, parent, removeAttribute, setAttribute, setParent, state, state
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentLeaf

public PersistentLeaf(org.neo4j.graphdb.GraphDatabaseService db,
                      org.gcube.data.trees.data.Leaf node)
               throws IllegalArgumentException
Creates an instance from a given Leaf and using a given NodeBinder.

Parameters:
dbnode - the persistent node
Throws:
IllegalArgumentException

PersistentLeaf

public PersistentLeaf(org.neo4j.graphdb.Node dbnode,
                      BindingMode mode)
Method Detail

dbnode

public org.neo4j.graphdb.Node dbnode()
Returns the database node that acts as the entry point to the persistent state of this node

Returns:
the database node

attributes

public Map<QName,String> attributes()

Overrides:
attributes in class org.gcube.data.trees.data.Node

setAttribute

public String setAttribute(QName name,
                           String value)

Overrides:
setAttribute in class org.gcube.data.trees.data.Node

removeAttribute

public String removeAttribute(QName name)

Overrides:
removeAttribute in class org.gcube.data.trees.data.Node

value

public String value()

Overrides:
value in class org.gcube.data.trees.data.Leaf

value

public void value(String v)
           throws IllegalArgumentException

Overrides:
value in class org.gcube.data.trees.data.Leaf
Throws:
IllegalArgumentException

delete

public void delete()

Overrides:
delete in class org.gcube.data.trees.data.Leaf

equals

public boolean equals(Object obj)

Overrides:
equals in class org.gcube.data.trees.data.Leaf

hashCode

public int hashCode()

Overrides:
hashCode in class org.gcube.data.trees.data.Leaf


Copyright © 2012. All Rights Reserved.