slib.sglib.io.loader
Class GraphLoaderGeneric

java.lang.Object
  extended by slib.sglib.io.loader.GraphLoaderGeneric

public class GraphLoaderGeneric
extends Object

Graph Loader is a class used to facilitate graph loading.

Author:
Harispe Sébastien

Field Summary
static org.slf4j.Logger logger
           
static GFormat[] supportedFormat
          The formats currently supported by the generic loader.
 
Constructor Summary
GraphLoaderGeneric()
           
 
Method Summary
static slib.sglib.model.graph.G createGraph(org.openrdf.model.URI uri)
          Create a graph and register it.
static GFormat[] getSupportedFormat()
          Access to the set of supported format.
static void load(Collection<GraphConf> graphConfs)
          Load the collection of configurations.
static slib.sglib.model.graph.G load(GraphConf graphConf)
          Build the graph considering the given configuration.
static slib.sglib.model.graph.G load(GraphConf graphConf, slib.sglib.model.graph.G g)
          Impact the given graph considering the given configuration.
static slib.sglib.model.graph.G populate(GDataConf dataConf, slib.sglib.model.graph.G g)
          Populate a given graph considering a configuration.
static boolean supportFormat(String format)
          Check if the generic loader support the given format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static org.slf4j.Logger logger

supportedFormat

public static GFormat[] supportedFormat
The formats currently supported by the generic loader.

Constructor Detail

GraphLoaderGeneric

public GraphLoaderGeneric()
Method Detail

populate

public static slib.sglib.model.graph.G populate(GDataConf dataConf,
                                                slib.sglib.model.graph.G g)
                                         throws slib.utils.ex.SLIB_Exception
Populate a given graph considering a configuration.

Parameters:
dataConf - the object defining the configuration of the data to load
g - the graph to populate with the data
Returns:
the graph which have been populated. The treatment is performed in place, i.e. no extra graph is created and the reference to the graph returned will be the same as the one passed in parameter.
Throws:
slib.utils.ex.SLIB_Exception - if an error is encountered during loading.

createGraph

public static slib.sglib.model.graph.G createGraph(org.openrdf.model.URI uri)
Create a graph and register it.

Parameters:
uri - the URI of the graph
Returns:
the created graph.

load

public static slib.sglib.model.graph.G load(GraphConf graphConf)
                                     throws slib.utils.ex.SLIB_Exception
Build the graph considering the given configuration. Add the loaded graph to the DataRepository.

Parameters:
graphConf - the graph configuration
Returns:
the graph which as been build form the configuration
Throws:
slib.utils.ex.SLIB_Exception

load

public static slib.sglib.model.graph.G load(GraphConf graphConf,
                                            slib.sglib.model.graph.G g)
                                     throws slib.utils.ex.SLIB_Exception
Impact the given graph considering the given configuration. The graph will be populated by the data and actions will be performed on it if any exist.

Parameters:
graphConf - the graph configuration
Returns:
the graph which as been build form the configuration
Throws:
slib.utils.ex.SLIB_Exception

load

public static void load(Collection<GraphConf> graphConfs)
                 throws slib.utils.ex.SLIB_Exception
Load the collection of configurations.

Parameters:
graphConfs - the collection of configurations
Throws:
slib.utils.ex.SLIB_Exception

supportFormat

public static boolean supportFormat(String format)
Check if the generic loader support the given format.

Parameters:
format - the format
Returns:
true if the format is supported.

getSupportedFormat

public static GFormat[] getSupportedFormat()
Access to the set of supported format.

Returns:


Copyright © 2013. All Rights Reserved.