Class DOTGraphParser<NP,​EP,​G extends MutableGraph<?,​?,​NP,​EP>>

    • Constructor Detail

      • DOTGraphParser

        public DOTGraphParser​(Supplier<G> creator,
                              Function<Map<String,​String>,​NP> nodeParser,
                              Function<Map<String,​String>,​EP> edgeParser)
        Parser for (directed) Graphs with a custom graph instance and custom node and edge attributes.
        Parameters:
        creator - a creator that is used to instantiate the returned graph
        nodeParser - a node parser that extracts from a property map of a node the node property
        edgeParser - an edge parser that extracts from a property map of an edge the edge property
    • Method Detail

      • readModel

        public G readModel​(InputStream is)
                    throws IOException
        Description copied from interface: ModelDeserializer
        Reads the contents from the given input stream and de-serializes it into a model instance.

        Note: the input stream will not be closed.

        Specified by:
        readModel in interface ModelDeserializer<NP>
        Parameters:
        is - the input stream to read data from
        Returns:
        the de-serialized model
        Throws:
        IOException - if an error occurred while reading from the stream