Class GraphJson<V>

    • Constructor Detail

      • GraphJson

        public GraphJson​(Type vertexClass)
    • Method Detail

      • setVertexDecoder

        public void setVertexDecoder​(VertexDecoder<V> vertexDecoder)
        Description copied from interface: GraphReader
        Sets the vertex decoder.
        Specified by:
        setVertexDecoder in interface GraphReader<V>
        Parameters:
        vertexDecoder - the vertex decoder
      • setEdgeDecoder

        public void setEdgeDecoder​(EdgeDecoder<V> edgeDecoder)
        Description copied from interface: GraphReader
        Sets the edge decoder.
        Specified by:
        setEdgeDecoder in interface GraphReader<V>
        Parameters:
        edgeDecoder - the edge decoder
      • read

        public Graph<V> read​(Resource location)
                      throws IOException
        Description copied from interface: GraphReader
        Reads a graph in from a resource
        Specified by:
        read in interface GraphReader<V>
        Parameters:
        location - the location of the graph
        Returns:
        A Graph constructed based on the resource
        Throws:
        IOException - Something went wrong reading
      • write

        public void write​(Graph<V> graph,
                          Resource location,
                          Multimap<String,​String> parameters)
                   throws IOException
        Description copied from interface: GraphWriter
        Writes the given graph to the give location in this format, using the defined vertex and edge encoders.
        Specified by:
        write in interface GraphWriter<V>
        Parameters:
        graph - the graph to write
        location - the location to write to
        parameters - multimap of parameters used by the underling writer
        Throws:
        IOException - Something went wrong writing the graph