com.tensegrity.graph.event
Class GraphEvent

java.lang.Object
  extended bycom.tensegrity.graph.event.AbstractGraphEvent
      extended bycom.tensegrity.graph.event.GraphEvent
All Implemented Interfaces:
GraphRootEvent

public class GraphEvent
extends com.tensegrity.graph.event.AbstractGraphEvent

This class describes graph events.

Version:
$Id: GraphEvent.java,v 1.18 2005/10/26 08:48:54 MichaelKegel Exp $
Author:
Stepan Rutz

Field Summary
static int EDGE_ADDED
          Constants that define the type of the event.
static int EDGE_ATTACH_REJECTED
          Constants that define the type of the event.
static int EDGE_REMOVED
          Constants that define the type of the event.
static int EDGE_SPLIT
          Constants that define the type of the event.
static int NODE_ADDED
          Constants that define the type of the event.
static int NODE_CASCADE_EDGES
          Constants that define the type of the event.
static int NODE_REMOVED
          Constants that define the type of the event.
static int PRE_EDGE_ADD
          Constants that define the type of the event.
static int PRE_EDGE_REMOVE
          Constants that define the type of the event.
static int PRE_EDGE_SPLIT
          Constants that define the type of the event.
static int PRE_NODE_ADD
          Constants that define the type of the event.
static int PRE_NODE_CASCADE_EDGES
          Constants that define the type of the event.
static int PRE_NODE_REMOVE
          Constants that define the type of the event.
 
Constructor Summary
GraphEvent(int eventid, Graph graph, Edge edge, long edgeid)
          Constructs a new GraphEvent.
GraphEvent(int eventid, Graph graph, Node node, long nodeid)
          Constructs a new GraphEvent.
GraphEvent(int eventid, Graph graph, Subgraph subgraph, Node node, Edge edge, long nodeid, long edgeid)
          Constructs a new GraphEvent.
GraphEvent(int eventid, Graph graph, Subgraph subgraph, Node node, Edge edge, long nodeid, long edgeid, Edge newedge1, Edge newedge2)
          Constructs a new GraphEvent.
GraphEvent(int eventid, long nodeid, Node node, Graph graph, Subgraph subgraph, long edgeid, Edge edge, GraphObjectContainer edgeGOC, Edge newedge1, GraphObjectContainer newedge1GOC, Edge newedge2, GraphObjectContainer newedge2GOC)
           
GraphEvent(int eventid, Subgraph subgraph, Edge edge, long edgeid)
          Constructs a new GraphEvent.
GraphEvent(int eventid, Subgraph subgraph, Node node, long nodeid)
          Constructs a new GraphEvent.
 
Method Summary
 java.lang.String getDescription()
          Returns a textual description for the event.
 Graph getGraph()
          Returns the Graph that caused the event.
 int getID()
          Returns the event id of this event.
 Edge getNewSplitEdge1()
          If the event is an edge-split event, this method will return the first of the two newly introduced edges that replace the original split edge.
 GraphObjectContainer getNewSplitEdge1Container()
           
 Edge getNewSplitEdge2()
          If the event is an edge-split event, this method will return the second of the two newly introduced edges that replace the original split edge.
 GraphObjectContainer getNewSplitEdge2Container()
           
 Edge getOldEdge1()
          If the event is an node-delete-cascade-edge event, this method will return the first of the two removed edges that were replaced with the new merged edge.
 GraphObjectContainer getOldEdge1Container()
           
 Edge getOldEdge2()
          If the event is an node-delete-cascade-edge event, this method will return the second of the two removed edges that were replaced with the new merged edge.
 GraphObjectContainer getOldEdge2Container()
           
 Subgraph getSubgraph()
          Returns the Subgraph that caused the event.
 Edge getSubjectEdge()
          Returns the associated Edge of this event.
 GraphObjectContainer getSubjectEdgeContainer()
           
 long getSubjectEdgeID()
          Returns the id of the associated Edge of this event.
 Node getSubjectNode()
          Returns the associated Node of this event.
 long getSubjectNodeID()
          Returns the id of the associated Node of this event.
static java.lang.String id2string(int id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_ADDED

public static final int NODE_ADDED
Constants that define the type of the event.

See Also:
Constant Field Values

NODE_REMOVED

public static final int NODE_REMOVED
Constants that define the type of the event.

See Also:
Constant Field Values

EDGE_ADDED

public static final int EDGE_ADDED
Constants that define the type of the event.

See Also:
Constant Field Values

EDGE_REMOVED

public static final int EDGE_REMOVED
Constants that define the type of the event.

See Also:
Constant Field Values

PRE_NODE_ADD

public static final int PRE_NODE_ADD
Constants that define the type of the event.

See Also:
Constant Field Values

PRE_NODE_REMOVE

public static final int PRE_NODE_REMOVE
Constants that define the type of the event.

See Also:
Constant Field Values

PRE_EDGE_ADD

public static final int PRE_EDGE_ADD
Constants that define the type of the event.

See Also:
Constant Field Values

PRE_EDGE_REMOVE

public static final int PRE_EDGE_REMOVE
Constants that define the type of the event.

See Also:
Constant Field Values

EDGE_ATTACH_REJECTED

public static final int EDGE_ATTACH_REJECTED
Constants that define the type of the event.

See Also:
Constant Field Values

PRE_EDGE_SPLIT

public static final int PRE_EDGE_SPLIT
Constants that define the type of the event.

See Also:
Constant Field Values

EDGE_SPLIT

public static final int EDGE_SPLIT
Constants that define the type of the event.

See Also:
Constant Field Values

PRE_NODE_CASCADE_EDGES

public static final int PRE_NODE_CASCADE_EDGES
Constants that define the type of the event.

See Also:
Constant Field Values

NODE_CASCADE_EDGES

public static final int NODE_CASCADE_EDGES
Constants that define the type of the event.

See Also:
Constant Field Values
Constructor Detail

GraphEvent

public GraphEvent(int eventid,
                  Graph graph,
                  Node node,
                  long nodeid)
Constructs a new GraphEvent.

Parameters:
eventid - the id of the event.
graph - the Graph that is associated with the event.
node - the Node that is associated with the event
nodeid - the id of the associated Node

GraphEvent

public GraphEvent(int eventid,
                  Subgraph subgraph,
                  Node node,
                  long nodeid)
Constructs a new GraphEvent.

Parameters:
eventid - the id of the event.
subgraph - the Subgraph that is associated with the event
node - the Node that is associated with the event
nodeid - the id of the associated Node

GraphEvent

public GraphEvent(int eventid,
                  Graph graph,
                  Edge edge,
                  long edgeid)
Constructs a new GraphEvent.

Parameters:
eventid - the id of the event.
graph - the Graph that is associated with the event.
edge - the Edge that is associated with the event
edgeid - the id of the associated Edge

GraphEvent

public GraphEvent(int eventid,
                  Subgraph subgraph,
                  Edge edge,
                  long edgeid)
Constructs a new GraphEvent.

Parameters:
eventid - the id of the event.
subgraph - the Subgraph that is associated with the event
edge - the Edge that is associated with the event
edgeid - the id of the associated Edge

GraphEvent

public GraphEvent(int eventid,
                  Graph graph,
                  Subgraph subgraph,
                  Node node,
                  Edge edge,
                  long nodeid,
                  long edgeid)
Constructs a new GraphEvent.

Parameters:
eventid - the id of the event.
graph - the Graph that is associated with the event.
subgraph - the Subgraph that is associated with the event
node - the Node that is associated with the event
edge - the Edge that is associated with the event
nodeid - the id of the associated Node
edgeid - the id of the associated Edge

GraphEvent

public GraphEvent(int eventid,
                  Graph graph,
                  Subgraph subgraph,
                  Node node,
                  Edge edge,
                  long nodeid,
                  long edgeid,
                  Edge newedge1,
                  Edge newedge2)
Constructs a new GraphEvent.

Parameters:
eventid - the id of the event.
graph - the Graph that is associated with the event.
subgraph - the Subgraph that is associated with the event
node - the Node that is associated with the event
edge - the Edge that is associated with the event
nodeid - the id of the associated Node
edgeid - the id of the associated Edge
newedge1 - the first new edge (in case of a split).
newedge2 - the second new edge (in case of a split).

GraphEvent

public GraphEvent(int eventid,
                  long nodeid,
                  Node node,
                  Graph graph,
                  Subgraph subgraph,
                  long edgeid,
                  Edge edge,
                  GraphObjectContainer edgeGOC,
                  Edge newedge1,
                  GraphObjectContainer newedge1GOC,
                  Edge newedge2,
                  GraphObjectContainer newedge2GOC)
Method Detail

id2string

public static final java.lang.String id2string(int id)

getID

public int getID()
Returns the event id of this event.

Returns:
the event id of this event.

getSubjectNodeID

public long getSubjectNodeID()
Returns the id of the associated Node of this event.

Returns:
the id of the associated Node of this event.

getSubjectNode

public Node getSubjectNode()
Returns the associated Node of this event.

Returns:
the associated Node of this event.

getSubjectEdgeID

public long getSubjectEdgeID()
Returns the id of the associated Edge of this event.

Returns:
the id of the associated Edge of this event.

getSubjectEdge

public Edge getSubjectEdge()
Returns the associated Edge of this event.

Returns:
the associated Edge of this event.

getSubjectEdgeContainer

public GraphObjectContainer getSubjectEdgeContainer()

getNewSplitEdge1

public Edge getNewSplitEdge1()
If the event is an edge-split event, this method will return the first of the two newly introduced edges that replace the original split edge.

Returns:
the first split edge.

getNewSplitEdge1Container

public GraphObjectContainer getNewSplitEdge1Container()

getNewSplitEdge2

public Edge getNewSplitEdge2()
If the event is an edge-split event, this method will return the second of the two newly introduced edges that replace the original split edge.

Returns:
the second split edge.

getNewSplitEdge2Container

public GraphObjectContainer getNewSplitEdge2Container()

getOldEdge1

public Edge getOldEdge1()
If the event is an node-delete-cascade-edge event, this method will return the first of the two removed edges that were replaced with the new merged edge.

Returns:
the first new edge.

getOldEdge1Container

public GraphObjectContainer getOldEdge1Container()

getOldEdge2

public Edge getOldEdge2()
If the event is an node-delete-cascade-edge event, this method will return the second of the two removed edges that were replaced with the new merged edge.

Returns:
the second new edge.

getOldEdge2Container

public GraphObjectContainer getOldEdge2Container()

getDescription

public java.lang.String getDescription()
Returns a textual description for the event.

Specified by:
getDescription in interface GraphRootEvent
Returns:
a textual description for the event.

getGraph

public Graph getGraph()
Returns the Graph that caused the event.

Specified by:
getGraph in interface GraphRootEvent
Returns:
the Graph that caused the event.

getSubgraph

public Subgraph getSubgraph()
Returns the Subgraph that caused the event.

Returns:
the Subgraph that caused the event.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.