|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.graph.GraphBase de.grogra.graph.GraphFilter de.grogra.graph.AttributeOverwritingFilter
public abstract class AttributeOverwritingFilter
This graph filter may be used as superclass for graph filters
which overwrite attribute values of their source graphs.
It implements the attribute-related methods such that the attributes
of the filtered graph are the attributes of the source graph plus
the additionally defined attributes (which may be overwritten
attributes of the source graph). The additional attributes have to be
declared by overriding the methods initNodeAccessors(AccessorMap)
and initEdgeAccessors(AccessorMap)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.grogra.graph.GraphFilter |
---|
GraphFilter.AccessorBridge, GraphFilter.State |
Nested classes/interfaces inherited from interface de.grogra.util.Lockable |
---|
Lockable.DeadLockException |
Field Summary |
---|
Fields inherited from class de.grogra.graph.GraphFilter |
---|
source |
Fields inherited from interface de.grogra.graph.ChangeBoundaryListener |
---|
ATTRIBUTE_PRIORITY, TOPOLOGY_PRIORITY, UPDATE_PRIORITY |
Fields inherited from interface de.grogra.graph.Graph |
---|
BRANCH_EDGE, CONTAINMENT_EDGE, CONTAINMENT_END_EDGE, EDGENODE_IN_EDGE, EDGENODE_OUT_EDGE, ELLIPSE_SYMBOL, MAIN_GRAPH, MARK_EDGE, MIN_NORMAL_BIT_INDEX, MIN_UNUSED_EDGE, MIN_UNUSED_EDGE_BIT, NOTIFIES_EDGE, PERSISTENT, PERSISTENT_DELETED, RECTANGLE_SYMBOL, REFINEMENT_EDGE, RHOMBUS_SYMBOL, ROUND_RECTANGLE_SYMBOL, SPECIAL_EDGE_MASK, SPECIAL_EDGE_OF_SOURCE_BIT, STD_EDGE_5, STD_EDGE_6, SUCCESSOR_EDGE, TRANSIENT |
Constructor Summary | |
---|---|
AttributeOverwritingFilter(Graph source)
|
Method Summary | |
---|---|
void |
accept(java.lang.Object startNode,
Visitor visitor,
ArrayPath placeInPath)
|
AttributeAccessor |
getAccessor(java.lang.Object object,
boolean asNode,
Attribute attribute)
Returns an attribute accessor for the given attribute on the given object. |
Attribute[] |
getAttributes(java.lang.Object object,
boolean asNode)
Returns the set of attributes which are available for the given object. |
protected boolean |
getBoolean(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected byte |
getByte(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected char |
getChar(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected double |
getDouble(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected float |
getFloat(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected int |
getInt(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected long |
getLong(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected java.lang.Object |
getObject(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
java.lang.Object placeIn,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected short |
getShort(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
GraphState gs)
This method has to be implemented by subclasses in order to obtain the value of an additional attribute which is defined by an GraphFilter.AccessorBridge . |
protected void |
initAttributeOverwritingFilter()
|
protected void |
initEdgeAccessors(AccessorMap accessors)
Additional (possibly overwritten) attributes for edges have to be declared in subclasses by overriding this method. |
protected void |
initNodeAccessors(AccessorMap accessors)
Additional (possibly overwritten) attributes for nodes have to be declared in subclasses by overriding this method. |
protected boolean |
setBoolean(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
boolean value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected byte |
setByte(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
byte value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected char |
setChar(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
char value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected double |
setDouble(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
double value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected float |
setFloat(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
float value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected int |
setInt(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
int value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected long |
setLong(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
long value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected java.lang.Object |
setObject(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
java.lang.Object value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
protected short |
setShort(java.lang.Object object,
GraphFilter.AccessorBridge accessor,
short value,
GraphState gs)
This method has to be implemented by subclasses in order to set value of an additional writable attribute which is defined by an GraphFilter.AccessorBridge . |
Methods inherited from class de.grogra.graph.GraphFilter |
---|
accept, attributeChanged, beginChange, createBooleanMap, createMainState, createObjectMap, createState, edgeChanged, endChange, getColor, getDependent, getDependentOfSource, getDescription, getEdgeBits, getFirstEdge, getId, getInstantiator, getLifeCycleState, getName, getNextEdge, getNodeForId, getObjectForName, getParentAttribute, getPriority, getRoot, getRootKeys, getSourceNode, getSourceState, getSpecialEdgeDescriptors, getStamp, getSymbol, getTargetNode, getTreePattern, isWritable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeOverwritingFilter(Graph source)
Method Detail |
---|
public void accept(java.lang.Object startNode, Visitor visitor, ArrayPath placeInPath)
public AttributeAccessor getAccessor(java.lang.Object object, boolean asNode, Attribute attribute)
Graph
getAccessor
in interface Graph
getAccessor
in class GraphFilter
object
- the objectasNode
- true
if object
is a node,
false
if object
is an edgeattribute
- the attribute
public Attribute[] getAttributes(java.lang.Object object, boolean asNode)
Graph
getAttributes
in interface Graph
getAttributes
in class GraphFilter
object
- the objectasNode
- true
if object
is a node,
false
if object
is an edge
protected boolean getBoolean(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getBoolean
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected byte getByte(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getByte
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected char getChar(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getChar
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected double getDouble(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getDouble
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected float getFloat(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getFloat
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected int getInt(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getInt
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected long getLong(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getLong
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected java.lang.Object getObject(java.lang.Object object, GraphFilter.AccessorBridge accessor, java.lang.Object placeIn, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getObject
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodplaceIn
- an instance for the result may be provided by the callergs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected short getShort(java.lang.Object object, GraphFilter.AccessorBridge accessor, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
returns the value of accessor
's attribute
in the source graph.
getShort
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodgs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected void initAttributeOverwritingFilter()
protected void initEdgeAccessors(AccessorMap accessors)
accessors
. Instances of
GraphFilter.AccessorBridge
may be used for this purpose.
accessors
- set of node accessorsprotected void initNodeAccessors(AccessorMap accessors)
accessors
. Instances of
GraphFilter.AccessorBridge
may be used for this purpose.
accessors
- set of node accessorsprotected boolean setBoolean(java.lang.Object object, GraphFilter.AccessorBridge accessor, boolean value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setBoolean
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected byte setByte(java.lang.Object object, GraphFilter.AccessorBridge accessor, byte value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setByte
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected char setChar(java.lang.Object object, GraphFilter.AccessorBridge accessor, char value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setChar
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected double setDouble(java.lang.Object object, GraphFilter.AccessorBridge accessor, double value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setDouble
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected float setFloat(java.lang.Object object, GraphFilter.AccessorBridge accessor, float value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setFloat
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected int setInt(java.lang.Object object, GraphFilter.AccessorBridge accessor, int value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setInt
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected long setLong(java.lang.Object object, GraphFilter.AccessorBridge accessor, long value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setLong
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected java.lang.Object setObject(java.lang.Object object, GraphFilter.AccessorBridge accessor, java.lang.Object value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setObject
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the objectprotected short setShort(java.lang.Object object, GraphFilter.AccessorBridge accessor, short value, GraphState gs)
GraphFilter.AccessorBridge
. The default implementation
sets the value of accessor
's attribute
in the source graph.
setShort
in class GraphFilter
object
- the objectaccessor
- the accessor bridge which invokes this methodvalue
- the new value for the attributegs
- current graph state
NoSuchKeyException
- if the attribute is not defined for the object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |