de.grogra.imp
Class GraphDescriptor

java.lang.Object
  extended by de.grogra.imp.GraphDescriptor
All Implemented Interfaces:
Manageable
Direct Known Subclasses:
FilterDescriptor, MetaGraphDescriptor, ProjectGraphDescriptor

public abstract class GraphDescriptor
extends java.lang.Object
implements Manageable

A GraphDescriptor represents the persistent information which is needed to obtain a specific Graph in the context of a View.

Author:
Ole Kniemeyer

Nested Class Summary
static class GraphDescriptor.Type
           
 
Field Summary
static GraphDescriptor.Type $TYPE
           
 
Constructor Summary
GraphDescriptor()
           
 
Method Summary
 void fieldModified(PersistenceField field, int[] indices, Transaction t)
           
abstract  Graph getGraph(View view)
          Returns the graph described by this descriptor, given the context view.
 Path getPathFor(View view, GraphState gs, java.lang.Object obj, boolean node)
           
 int getStamp()
          Returns a stamp for this object.
 Manageable manageableReadResolve()
           
 java.lang.Object manageableWriteReplace()
           
 void substituteSelection(GraphState[] gs, java.lang.Object[] object, boolean[] asNode, int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.grogra.persistence.Manageable
getManageableType
 

Field Detail

$TYPE

public static final GraphDescriptor.Type $TYPE
Constructor Detail

GraphDescriptor

public GraphDescriptor()
Method Detail

fieldModified

public void fieldModified(PersistenceField field,
                          int[] indices,
                          Transaction t)
Specified by:
fieldModified in interface Manageable

getGraph

public abstract Graph getGraph(View view)
Returns the graph described by this descriptor, given the context view.

Parameters:
view - the context for the graph
Returns:
graph corresponding to this descriptor

getPathFor

public Path getPathFor(View view,
                       GraphState gs,
                       java.lang.Object obj,
                       boolean node)

getStamp

public int getStamp()
Description copied from interface: Manageable
Returns a stamp for this object. Each modification to this object increments the stamp. The initial stamp is non-negative.

Specified by:
getStamp in interface Manageable
Returns:
a stamp

manageableReadResolve

public Manageable manageableReadResolve()
Specified by:
manageableReadResolve in interface Manageable

manageableWriteReplace

public java.lang.Object manageableWriteReplace()
Specified by:
manageableWriteReplace in interface Manageable

substituteSelection

public void substituteSelection(GraphState[] gs,
                                java.lang.Object[] object,
                                boolean[] asNode,
                                int index)