Class BaseEventDrivenImporter<V,E>
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<BiConsumer<String, Attribute>> private List<Consumer<ImportEvent>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEdgeAttributeConsumer(BiConsumer<Pair<E, String>, Attribute> consumer) Add an edge attribute consumer.voidaddEdgeConsumer(Consumer<E> consumer) Add an edge consumer.voidaddEdgeCountConsumer(Consumer<Integer> consumer) Add an edge count consumer.voidaddEdgeWithAttributesConsumer(BiConsumer<E, Map<String, Attribute>> consumer) Add an edge with attributes consumer.voidaddGraphAttributeConsumer(BiConsumer<String, Attribute> consumer) Add a graph attribute consumer.voidaddImportEventConsumer(Consumer<ImportEvent> consumer) Add an ImportEvent consumer.voidaddVertexAttributeConsumer(BiConsumer<Pair<V, String>, Attribute> consumer) Add a vertex attribute consumer.voidaddVertexConsumer(Consumer<V> consumer) Add a vertex consumer.voidaddVertexCountConsumer(Consumer<Integer> consumer) Add a vertex count consumer.voidaddVertexWithAttributesConsumer(BiConsumer<V, Map<String, Attribute>> consumer) Add a vertex with attributes consumer.protected voidnotifyEdge(E e) Notify for an edge.protected voidnotifyEdgeAttribute(E e, String key, Attribute value) Notify for an edge attributeprotected voidnotifyEdgeCount(Integer edgeCount) Notify for the edge count.protected voidnotifyEdgeWithAttributes(E e, Map<String, Attribute> attrs) Notify for an edge with attributes.protected voidnotifyGraphAttribute(String key, Attribute value) Notify for a graph attributeprotected voidnotifyImportEvent(ImportEvent importEvent) Notify for an importer ImportEventprotected voidnotifyVertex(V v) Notify for a vertex.protected voidnotifyVertexAttribute(V v, String key, Attribute value) Notify for a vertex attributeprotected voidnotifyVertexCount(Integer vertexCount) Notify for the vertex count.protected voidnotifyVertexWithAttributes(V v, Map<String, Attribute> attrs) Notify for a vertex with attributes.voidremoveEdgeAttributeConsumer(BiConsumer<Pair<E, String>, Attribute> consumer) Remove an edge attribute consumer.voidremoveEdgeConsumer(Consumer<E> consumer) Remove an edge consumer.voidremoveEdgeCountConsumer(Consumer<Integer> consumer) Remove an edge count consumer.voidremoveEdgeWithAttributesConsumer(BiConsumer<E, Map<String, Attribute>> consumer) Remove an edge with attributes consumervoidremoveGraphAttributeConsumer(BiConsumer<String, Attribute> consumer) Remove a graph attribute consumer.voidremoveImportEventConsumer(Consumer<ImportEvent> consumer) Remove an ImportEvent consumer.voidremoveVertexAttributeConsumer(BiConsumer<Pair<V, String>, Attribute> consumer) Remove a vertex attribute consumer.voidremoveVertexConsumer(Consumer<V> consumer) Remove a vertex consumer.voidremoveVertexCountConsumer(Consumer<Integer> consumer) Remove a vertex count consumer.voidremoveVertexWithAttributesConsumer(BiConsumer<V, Map<String, Attribute>> consumer) Remove a vertex with attributes consumer
-
Field Details
-
vertexCountConsumers
-
edgeCountConsumers
-
vertexConsumers
-
vertexWithAttributesConsumers
-
edgeConsumers
-
edgeWithAttributesConsumers
-
graphAttributeConsumers
-
vertexAttributeConsumers
-
edgeAttributeConsumers
-
importEventConsumers
-
-
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
-
removeVertexCountConsumer
-
addEdgeCountConsumer
-
removeEdgeCountConsumer
-
addVertexConsumer
-
removeVertexConsumer
-
addEdgeConsumer
-
removeEdgeConsumer
-
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
-
notifyVertexWithAttributes
-
notifyEdge
-
notifyEdgeWithAttributes
-
notifyGraphAttribute
-
notifyVertexAttribute
-
notifyEdgeAttribute
-
notifyImportEvent
Notify for an importer ImportEvent- Parameters:
importEvent- the ImportEvent
-