Class GraphModel.Serialization

  • Enclosing interface:
    GraphModel

    public static class GraphModel.Serialization
    extends Object
    Serialization utility to read/write graph models from/to input/output.
    • Constructor Detail

      • Serialization

        public Serialization()
    • Method Detail

      • read

        public static GraphModel read​(DataInput input)
                               throws IOException
        Read the input and return the read graph model.
        Parameters:
        input - data input to read from
        Returns:
        new graph model
        Throws:
        IOException - if an io error occurs
      • readWithoutVersionHeader

        public static GraphModel readWithoutVersionHeader​(DataInput input,
                                                          float graphStoreVersion)
                                                   throws IOException
        Read the input and return the read graph model without an explicit version header in the input. To be used with old graphstore serialized data prior to version 0.4 (first, that added the version header).
        Parameters:
        input - data input to read from
        graphStoreVersion - Forced version to use
        Returns:
        new graph model
        Throws:
        IOException - if an io error occurs
      • write

        public static void write​(DataOutput output,
                                 GraphModel graphModel)
                          throws IOException
        Write graphModel to output.
        Parameters:
        output - data output to write to
        graphModel - graph model to write
        Throws:
        IOException - if an io error occurs