Class GraphAdapter

java.lang.Object
org.graffiti.event.GraphAdapter
All Implemented Interfaces:
EventListener, GraphListener, TransactionListener

public class GraphAdapter
extends Object
implements GraphListener
Adapter for the GraphListener interface, providing default empty implementation. Useful, given you don't need all interface methods.
Since:
2.7.0
Author:
D. Garkov
  • Constructor Details

    • GraphAdapter

      public GraphAdapter()
  • Method Details

    • transactionFinished

      public void transactionFinished​(TransactionEvent e, BackgroundTaskStatusProviderSupportingExternalCall status)
      Description copied from interface: TransactionListener
      Called when a transaction has stopped.
      The class TransactionHashMap merges duplicate AttributeEvents. In case the Attribute path for the same Attributable is not equal, detailed information about Attribute path is lost. Instead a generic AttributeEvent containing just the Attributable is in the list of changed Objects (see TransactionEvent).
      In case no detailed information about an Attribute change is available, your code should completely re-process the affected Attributable.
      Specified by:
      transactionFinished in interface TransactionListener
      Parameters:
      e - the EdgeEvent detailing the changes.
    • transactionStarted

      public void transactionStarted​(TransactionEvent e)
      Description copied from interface: TransactionListener
      Called when a transaction has started.
      Specified by:
      transactionStarted in interface TransactionListener
      Parameters:
      e - the EdgeEvent detailing the changes.
    • postEdgeAdded

      public void postEdgeAdded​(GraphEvent e)
      Description copied from interface: GraphListener
      Called after an edge has been added to the graph.
      Specified by:
      postEdgeAdded in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • postEdgeRemoved

      public void postEdgeRemoved​(GraphEvent e)
      Description copied from interface: GraphListener
      Called after an edge has been removed from the graph.
      Specified by:
      postEdgeRemoved in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • postGraphCleared

      public void postGraphCleared​(GraphEvent e)
      Description copied from interface: GraphListener
      Called after method clear() has been called on a graph. No other events (like remove events) are generated.
      Specified by:
      postGraphCleared in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • postNodeAdded

      public void postNodeAdded​(GraphEvent e)
      Description copied from interface: GraphListener
      Called after an edge has been added to the graph.
      Specified by:
      postNodeAdded in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • postNodeRemoved

      public void postNodeRemoved​(GraphEvent e)
      Description copied from interface: GraphListener
      Called after a node has been removed from the graph. All edges incident to this node have already been removed (preEdgeRemoved and postEdgeRemoved have been called).
      Specified by:
      postNodeRemoved in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • preEdgeAdded

      public void preEdgeAdded​(GraphEvent e)
      Description copied from interface: GraphListener
      Called just before an edge is added to the graph.
      Specified by:
      preEdgeAdded in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • preEdgeRemoved

      public void preEdgeRemoved​(GraphEvent e)
      Description copied from interface: GraphListener
      Called just before an edge is removed from the graph.
      Specified by:
      preEdgeRemoved in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • preGraphCleared

      public void preGraphCleared​(GraphEvent e)
      Description copied from interface: GraphListener
      Called before method clear() is called on a graph. No other events (like remove events) are generated.
      Specified by:
      preGraphCleared in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • preNodeAdded

      public void preNodeAdded​(GraphEvent e)
      Description copied from interface: GraphListener
      Called just before a node is added to the graph.
      Specified by:
      preNodeAdded in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.
    • preNodeRemoved

      public void preNodeRemoved​(GraphEvent e)
      Description copied from interface: GraphListener
      Called just before a node is removed from the graph. This method is called before the incident edges are deleted.
      Specified by:
      preNodeRemoved in interface GraphListener
      Parameters:
      e - the GraphEvent detailing the changes.