java.lang.Object
org.jgrapht.nio.BaseEventDrivenImporter<V,E>
- Type Parameters:
V
- the graph vertex typeE
- 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
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEdgeAttributeConsumer
(BiConsumer<Pair<E, String>, Attribute> consumer) Add an edge attribute consumer.void
addEdgeConsumer
(Consumer<E> consumer) Add an edge consumer.void
addEdgeCountConsumer
(Consumer<Integer> consumer) Add an edge count consumer.void
addEdgeWithAttributesConsumer
(BiConsumer<E, Map<String, Attribute>> consumer) Add an edge with attributes consumer.void
addGraphAttributeConsumer
(BiConsumer<String, Attribute> consumer) Add a graph attribute consumer.void
addImportEventConsumer
(Consumer<ImportEvent> consumer) Add an ImportEvent consumer.void
addVertexAttributeConsumer
(BiConsumer<Pair<V, String>, Attribute> consumer) Add a vertex attribute consumer.void
addVertexConsumer
(Consumer<V> consumer) Add a vertex consumer.void
addVertexCountConsumer
(Consumer<Integer> consumer) Add a vertex count consumer.void
addVertexWithAttributesConsumer
(BiConsumer<V, Map<String, Attribute>> consumer) Add a vertex with attributes consumer.protected void
notifyEdge
(E e) Notify for an edge.protected void
notifyEdgeAttribute
(E e, String key, Attribute value) Notify for an edge attributeprotected void
notifyEdgeCount
(Integer edgeCount) Notify for the edge count.protected void
notifyEdgeWithAttributes
(E e, Map<String, Attribute> attrs) Notify for an edge with attributes.protected void
notifyGraphAttribute
(String key, Attribute value) Notify for a graph attributeprotected void
notifyImportEvent
(ImportEvent importEvent) Notify for an importer ImportEventprotected void
notifyVertex
(V v) Notify for a vertex.protected void
notifyVertexAttribute
(V v, String key, Attribute value) Notify for a vertex attributeprotected void
notifyVertexCount
(Integer vertexCount) Notify for the vertex count.protected void
notifyVertexWithAttributes
(V v, Map<String, Attribute> attrs) Notify for a vertex with attributes.void
removeEdgeAttributeConsumer
(BiConsumer<Pair<E, String>, Attribute> consumer) Remove an edge attribute consumer.void
removeEdgeConsumer
(Consumer<E> consumer) Remove an edge consumer.void
removeEdgeCountConsumer
(Consumer<Integer> consumer) Remove an edge count consumer.void
removeEdgeWithAttributesConsumer
(BiConsumer<E, Map<String, Attribute>> consumer) Remove an edge with attributes consumervoid
removeGraphAttributeConsumer
(BiConsumer<String, Attribute> consumer) Remove a graph attribute consumer.void
removeImportEventConsumer
(Consumer<ImportEvent> consumer) Remove an ImportEvent consumer.void
removeVertexAttributeConsumer
(BiConsumer<Pair<V, String>, Attribute> consumer) Remove a vertex attribute consumer.void
removeVertexConsumer
(Consumer<V> consumer) Remove a vertex consumer.void
removeVertexCountConsumer
(Consumer<Integer> consumer) Remove a vertex count consumer.void
removeVertexWithAttributesConsumer
(BiConsumer<V, Map<String, Attribute>> consumer) Remove a vertex with attributes consumer
-
Constructor Details
-
BaseEventDrivenImporter
public BaseEventDrivenImporter()Constructor
-
-
Method Details
-
addImportEventConsumer
Add an ImportEvent consumer.- Parameters:
consumer
- the consumer
-
removeImportEventConsumer
Remove an ImportEvent consumer.- Parameters:
consumer
- the consumer
-
addVertexCountConsumer
Add a vertex count consumer.- Parameters:
consumer
- the consumer
-
removeVertexCountConsumer
Remove a vertex count consumer.- Parameters:
consumer
- the consumer
-
addEdgeCountConsumer
Add an edge count consumer.- Parameters:
consumer
- the consumer
-
removeEdgeCountConsumer
Remove an edge count consumer.- Parameters:
consumer
- the consumer
-
addVertexConsumer
Add a vertex consumer.- Parameters:
consumer
- the consumer
-
removeVertexConsumer
Remove a vertex consumer.- Parameters:
consumer
- the consumer
-
addEdgeConsumer
Add an edge consumer.- Parameters:
consumer
- the consumer
-
removeEdgeConsumer
Remove an edge consumer.- Parameters:
consumer
- the consumer
-
addGraphAttributeConsumer
Add a graph attribute consumer.- Parameters:
consumer
- the consumer
-
removeGraphAttributeConsumer
Remove a graph attribute consumer.- Parameters:
consumer
- the consumer
-
addVertexAttributeConsumer
Add a vertex attribute consumer.- Parameters:
consumer
- the consumer
-
removeVertexAttributeConsumer
Remove a vertex attribute consumer.- Parameters:
consumer
- the consumer
-
addVertexWithAttributesConsumer
Add a vertex with attributes consumer.- Parameters:
consumer
- the consumer
-
removeVertexWithAttributesConsumer
Remove a vertex with attributes consumer- Parameters:
consumer
- the consumer
-
addEdgeAttributeConsumer
Add an edge attribute consumer.- Parameters:
consumer
- the consumer
-
removeEdgeAttributeConsumer
Remove an edge attribute consumer.- Parameters:
consumer
- the consumer
-
addEdgeWithAttributesConsumer
Add an edge with attributes consumer.- Parameters:
consumer
- the consumer
-
removeEdgeWithAttributesConsumer
Remove an edge with attributes consumer- Parameters:
consumer
- the consumer
-
notifyVertexCount
Notify for the vertex count.- Parameters:
vertexCount
- the number of vertices in the graph
-
notifyEdgeCount
Notify for the edge count.- Parameters:
edgeCount
- the number of edges in the graph
-
notifyVertex
Notify for a vertex.- Parameters:
v
- the vertex
-
notifyVertexWithAttributes
Notify for a vertex with attributes.- Parameters:
v
- the vertexattrs
- the attributes
-
notifyEdge
Notify for an edge.- Parameters:
e
- the edge
-
notifyEdgeWithAttributes
Notify for an edge with attributes.- Parameters:
e
- the edgeattrs
- the attributes
-
notifyGraphAttribute
Notify for a graph attribute- Parameters:
key
- the attribute keyvalue
- the attribute
-
notifyVertexAttribute
Notify for a vertex attribute- Parameters:
v
- the vertexkey
- the attribute keyvalue
- the attribute
-
notifyEdgeAttribute
Notify for an edge attribute- Parameters:
e
- the edgekey
- the attribute keyvalue
- the attribute
-
notifyImportEvent
Notify for an importer ImportEvent- Parameters:
importEvent
- the ImportEvent
-