org.grinvin.io.graphs

Class GraphBundleLoader


public class GraphBundleLoader
extends java.lang.Object

Loads a GraphBundle from a zip file.

Method Summary

static void
load(GraphBundle bundle, SectionLoader sloader, String path)
static void
loadFromDirectory(GraphBundle bundle, File dir)
Load the bundle from the given directory.
static void
loadFromZip(GraphBundle bundle, File file)
Load the bundle from the given file.
static void
loadFromZip(GraphBundle bundle, InputStream in)
Load the bundle from the given input stream.

Method Details

load

public static void load(GraphBundle bundle,
                        SectionLoader sloader,
                        String path)
            throws IOException

loadFromDirectory

public static void loadFromDirectory(GraphBundle bundle,
                                     File dir)
            throws IOException
Load the bundle from the given directory. The directory should contain the uncompressed contents of a ZIP-archive.

Note: The preferred representation of graph bundles on disk is by means of compressed ZIP-archives. This method is provided primarily for debugging purposes.

Parameters:
bundle - Empty bundle which will hold the result of the load operation.
dir - Directory which contains the graph bundle as uncompressed contents of a ZIP-archive.

loadFromZip

public static void loadFromZip(GraphBundle bundle,
                               File file)
            throws IOException
Load the bundle from the given file.
Parameters:
bundle - Empty bundle which will hold the result of the load operation.
file - File which contains the graph bundle in Zip-format

loadFromZip

public static void loadFromZip(GraphBundle bundle,
                               InputStream in)
            throws IOException
Load the bundle from the given input stream.
Parameters:
bundle - Empty bundle which will hold the result of the load operation.
in - Input stream which contains the graph bundle in Zip-format