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

java.lang.Object
  extended by org.gcube.data.trees.data.Node
      extended by org.gcube.data.trees.data.InnerNode
          extended by org.gcube.data.trees.data.Tree
              extended by org.gcube.data.tr.neo.nodes.PersistentTree

public class PersistentTree
extends org.gcube.data.trees.data.Tree

A Tree 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
PersistentTree(PersistentNode root)
           
 
Method Summary
 boolean add(org.gcube.data.trees.data.Edge e)
          
 String attribute(QName name)
          
 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 document
 void delete()
          
 List<org.gcube.data.trees.data.Edge> edges()
          
 boolean hasEdge(QName l)
          
 String id()
          
 boolean remove(org.gcube.data.trees.data.Edge e)
          
 String removeAttribute(QName name)
          
 String setAttribute(QName name, String value)
          
 
Methods inherited from class org.gcube.data.trees.data.Tree
delta, equals, hashCode, setSourceId, sourceId, toString
 
Methods inherited from class org.gcube.data.trees.data.InnerNode
add, add, child, child, child, child, child, child, children, children, children, children, children, children, children, children, clearState, delta, descendant, descendant, descendants, descendants, descendants, descendants, edge, edge, edge, edges, edges, edges, find, find, hasEdge, hasEdge, labels, labels, markAsNew, remove, remove, remove, remove, size, update
 
Methods inherited from class org.gcube.data.trees.data.Node
ancestors, ancestorsAndSelf, attribute, hasAttribute, hasAttribute, parent, removeAttribute, setAttribute, setParent, state, state, uri, uri
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentTree

public PersistentTree(PersistentNode root)
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 document

Returns:
the database node

id

public String id()

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

attributes

public Map<QName,String> attributes()

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

attribute

public String attribute(QName name)
                 throws IllegalStateException

Overrides:
attribute in class org.gcube.data.trees.data.Node
Throws:
IllegalStateException

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

hasEdge

public boolean hasEdge(QName l)

Overrides:
hasEdge in class org.gcube.data.trees.data.InnerNode

add

public boolean add(org.gcube.data.trees.data.Edge e)

Overrides:
add in class org.gcube.data.trees.data.InnerNode

edges

public List<org.gcube.data.trees.data.Edge> edges()

Overrides:
edges in class org.gcube.data.trees.data.InnerNode

remove

public boolean remove(org.gcube.data.trees.data.Edge e)

Overrides:
remove in class org.gcube.data.trees.data.InnerNode

delete

public void delete()

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


Copyright © 2012. All Rights Reserved.