NP
- the node property typeEP
- the edge property typeG
- the graph typepublic class DOTGraphParser<NP,EP,G extends MutableGraph<?,?,NP,EP>> extends Object implements ModelDeserializer<G>
MutableGraph
s.Constructor and Description |
---|
DOTGraphParser(Supplier<G> creator,
Function<Map<String,Object>,NP> nodeParser,
Function<Map<String,Object>,EP> edgeParser)
Parser for (directed)
Graph s with a custom graph instance and custom node and edge attributes. |
Modifier and Type | Method and Description |
---|---|
G |
readModel(InputStream is)
Reads the contents from the given input stream and de-serializes it into a model instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readModel, readModel, readModel
public DOTGraphParser(Supplier<G> creator, Function<Map<String,Object>,NP> nodeParser, Function<Map<String,Object>,EP> edgeParser)
Graph
s with a custom graph instance and custom node and edge attributes.creator
- a creator that is used to instantiate the returned graphnodeParser
- a node parser that extracts from a property map of a node the node propertyedgeParser
- an edge parser that extracts from a property map of an edge the edge propertypublic G readModel(InputStream is)
ModelDeserializer
readModel
in interface ModelDeserializer<G extends MutableGraph<?,?,NP,EP>>
is
- the input stream to read data fromCopyright © 2020. All rights reserved.