org.jrdf
Class PersistentJRDFFactoryImpl

java.lang.Object
  extended by org.jrdf.PersistentJRDFFactoryImpl
All Implemented Interfaces:
JRDFFactory, PersistentJRDFFactory

public final class PersistentJRDFFactoryImpl
extends Object
implements PersistentJRDFFactory

Uses BDB JE and a BTree to store graphs, that can be accessed by name (using hasGraph and getGraph). Returns sorted results.

Version:
$Id: PersistentJRDFFactoryImpl.java 3321 2010-09-27 19:35:32Z newmana $
Author:
Andrew Newman

Method Summary
 void close()
           
 Graph getExistingGraph(String name)
           
static PersistentJRDFFactory getFactory(DirectoryHandler handler)
           
 Graph getGraph()
          Create a new JRDF graph depending on the current configuration.
 Graph getGraph(String name)
           
 Graph getNewGraph(String name)
           
 SparqlConnection getNewSparqlConnection()
          Create a new connection to perform SPARQL operations depending on the current configuration.
 boolean hasGraph(String name)
           
 void refresh()
          Reload any configuration files used to create the objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFactory

public static PersistentJRDFFactory getFactory(DirectoryHandler handler)

getNewSparqlConnection

public SparqlConnection getNewSparqlConnection()
Description copied from interface: JRDFFactory
Create a new connection to perform SPARQL operations depending on the current configuration.

Specified by:
getNewSparqlConnection in interface JRDFFactory
Returns:
a new instance of a SPARQL connection.

hasGraph

public boolean hasGraph(String name)
Specified by:
hasGraph in interface PersistentJRDFFactory

getGraph

public Graph getGraph()
Description copied from interface: JRDFFactory
Create a new JRDF graph depending on the current configuration.

Specified by:
getGraph in interface JRDFFactory
Returns:
a new instance of a JRDF graph.

getGraph

public Graph getGraph(String name)
Specified by:
getGraph in interface PersistentJRDFFactory

getNewGraph

public Graph getNewGraph(String name)
Specified by:
getNewGraph in interface PersistentJRDFFactory

getExistingGraph

public Graph getExistingGraph(String name)
                       throws IllegalArgumentException
Specified by:
getExistingGraph in interface PersistentJRDFFactory
Throws:
IllegalArgumentException

refresh

public void refresh()
Description copied from interface: JRDFFactory
Reload any configuration files used to create the objects.

Specified by:
refresh in interface JRDFFactory

close

public void close()