Class BaseEventDrivenImporter<V,E>

java.lang.Object
org.jgrapht.nio.BaseEventDrivenImporter<V,E>
Type Parameters:
V - the graph vertex type
E - the graph edge type
Direct Known Subclasses:
CSVEventDrivenImporter, CSVImporter, DIMACSEventDrivenImporter, DIMACSImporter, DOTEventDrivenImporter, DOTImporter, GmlEventDrivenImporter, GmlImporter, Graph6Sparse6EventDrivenImporter, Graph6Sparse6Importer, GraphMLEventDrivenImporter, GraphMLImporter, JSONEventDrivenImporter, JSONImporter, SimpleGEXFEventDrivenImporter, SimpleGEXFImporter, SimpleGraphMLEdgeListImporter, SimpleGraphMLEventDrivenImporter, SimpleGraphMLImporter

public abstract class BaseEventDrivenImporter<V,E> extends Object
Base implementation for an importer which uses consumers to notify interested parties. Note that this importer does not compute anything, it simply calls the appropriate consumers to do the actual work.
Author:
Dimitrios Michail
  • Constructor Details

    • BaseEventDrivenImporter

      public BaseEventDrivenImporter()
      Constructor
  • Method Details

    • addImportEventConsumer

      public void addImportEventConsumer(Consumer<ImportEvent> consumer)
      Add an ImportEvent consumer.
      Parameters:
      consumer - the consumer
    • removeImportEventConsumer

      public void removeImportEventConsumer(Consumer<ImportEvent> consumer)
      Remove an ImportEvent consumer.
      Parameters:
      consumer - the consumer
    • addVertexCountConsumer

      public void addVertexCountConsumer(Consumer<Integer> consumer)
      Add a vertex count consumer.
      Parameters:
      consumer - the consumer
    • removeVertexCountConsumer

      public void removeVertexCountConsumer(Consumer<Integer> consumer)
      Remove a vertex count consumer.
      Parameters:
      consumer - the consumer
    • addEdgeCountConsumer

      public void addEdgeCountConsumer(Consumer<Integer> consumer)
      Add an edge count consumer.
      Parameters:
      consumer - the consumer
    • removeEdgeCountConsumer

      public void removeEdgeCountConsumer(Consumer<Integer> consumer)
      Remove an edge count consumer.
      Parameters:
      consumer - the consumer
    • addVertexConsumer

      public void addVertexConsumer(Consumer<V> consumer)
      Add a vertex consumer.
      Parameters:
      consumer - the consumer
    • removeVertexConsumer

      public void removeVertexConsumer(Consumer<V> consumer)
      Remove a vertex consumer.
      Parameters:
      consumer - the consumer
    • addEdgeConsumer

      public void addEdgeConsumer(Consumer<E> consumer)
      Add an edge consumer.
      Parameters:
      consumer - the consumer
    • removeEdgeConsumer

      public void removeEdgeConsumer(Consumer<E> consumer)
      Remove an edge consumer.
      Parameters:
      consumer - the consumer
    • addGraphAttributeConsumer

      public void addGraphAttributeConsumer(BiConsumer<String,Attribute> consumer)
      Add a graph attribute consumer.
      Parameters:
      consumer - the consumer
    • removeGraphAttributeConsumer

      public void removeGraphAttributeConsumer(BiConsumer<String,Attribute> consumer)
      Remove a graph attribute consumer.
      Parameters:
      consumer - the consumer
    • addVertexAttributeConsumer

      public void addVertexAttributeConsumer(BiConsumer<Pair<V,String>,Attribute> consumer)
      Add a vertex attribute consumer.
      Parameters:
      consumer - the consumer
    • removeVertexAttributeConsumer

      public void removeVertexAttributeConsumer(BiConsumer<Pair<V,String>,Attribute> consumer)
      Remove a vertex attribute consumer.
      Parameters:
      consumer - the consumer
    • addVertexWithAttributesConsumer

      public void addVertexWithAttributesConsumer(BiConsumer<V,Map<String,Attribute>> consumer)
      Add a vertex with attributes consumer.
      Parameters:
      consumer - the consumer
    • removeVertexWithAttributesConsumer

      public void removeVertexWithAttributesConsumer(BiConsumer<V,Map<String,Attribute>> consumer)
      Remove a vertex with attributes consumer
      Parameters:
      consumer - the consumer
    • addEdgeAttributeConsumer

      public void addEdgeAttributeConsumer(BiConsumer<Pair<E,String>,Attribute> consumer)
      Add an edge attribute consumer.
      Parameters:
      consumer - the consumer
    • removeEdgeAttributeConsumer

      public void removeEdgeAttributeConsumer(BiConsumer<Pair<E,String>,Attribute> consumer)
      Remove an edge attribute consumer.
      Parameters:
      consumer - the consumer
    • addEdgeWithAttributesConsumer

      public void addEdgeWithAttributesConsumer(BiConsumer<E,Map<String,Attribute>> consumer)
      Add an edge with attributes consumer.
      Parameters:
      consumer - the consumer
    • removeEdgeWithAttributesConsumer

      public void removeEdgeWithAttributesConsumer(BiConsumer<E,Map<String,Attribute>> consumer)
      Remove an edge with attributes consumer
      Parameters:
      consumer - the consumer
    • notifyVertexCount

      protected void notifyVertexCount(Integer vertexCount)
      Notify for the vertex count.
      Parameters:
      vertexCount - the number of vertices in the graph
    • notifyEdgeCount

      protected void notifyEdgeCount(Integer edgeCount)
      Notify for the edge count.
      Parameters:
      edgeCount - the number of edges in the graph
    • notifyVertex

      protected void notifyVertex(V v)
      Notify for a vertex.
      Parameters:
      v - the vertex
    • notifyVertexWithAttributes

      protected void notifyVertexWithAttributes(V v, Map<String,Attribute> attrs)
      Notify for a vertex with attributes.
      Parameters:
      v - the vertex
      attrs - the attributes
    • notifyEdge

      protected void notifyEdge(E e)
      Notify for an edge.
      Parameters:
      e - the edge
    • notifyEdgeWithAttributes

      protected void notifyEdgeWithAttributes(E e, Map<String,Attribute> attrs)
      Notify for an edge with attributes.
      Parameters:
      e - the edge
      attrs - the attributes
    • notifyGraphAttribute

      protected void notifyGraphAttribute(String key, Attribute value)
      Notify for a graph attribute
      Parameters:
      key - the attribute key
      value - the attribute
    • notifyVertexAttribute

      protected void notifyVertexAttribute(V v, String key, Attribute value)
      Notify for a vertex attribute
      Parameters:
      v - the vertex
      key - the attribute key
      value - the attribute
    • notifyEdgeAttribute

      protected void notifyEdgeAttribute(E e, String key, Attribute value)
      Notify for an edge attribute
      Parameters:
      e - the edge
      key - the attribute key
      value - the attribute
    • notifyImportEvent

      protected void notifyImportEvent(ImportEvent importEvent)
      Notify for an importer ImportEvent
      Parameters:
      importEvent - the ImportEvent