com.knowledgereefsystems.agsail
Class AllegroSail

java.lang.Object
  extended by com.knowledgereefsystems.agsail.AllegroSail
All Implemented Interfaces:
org.openrdf.sail.Sail

public class AllegroSail
extends java.lang.Object
implements org.openrdf.sail.Sail

This class implements a Sesame 2.x Sail interface to an AllegroGraph triple store.

The constructor is the only unique implementation in this class.

The methods are described in the Sesame documentation.


Constructor Summary
AllegroSail(AllegroGraph ag)
          Create a Sail instance for an AllegroGraph triple store.
AllegroSail(java.lang.String host, int port, boolean start, java.lang.String name, java.io.File directory, int lookahead, int selectLimit, boolean reindexOnCommit, boolean syncOnInsert)
          Create a Sail instance to an AllegroGaph triple store.
 
Method Summary
 void addSailChangedListener(org.openrdf.sail.SailChangedListener listener)
           
 AGSInternal getAGSInternal()
           
 AllegroSailConnection getConnection()
          Opens a connection on the Sail which can be used to query and update data.
 java.io.File getDataDir()
           
 org.openrdf.model.ValueFactory getValueFactory()
           
 void initialize()
           
 boolean isBackgroundIndexing()
           
 boolean isIndexAllOnCommit()
           
 boolean isReindexOnCommit()
           
 boolean isWritable()
           
 void removeSailChangedListener(org.openrdf.sail.SailChangedListener listener)
           
 void setBackgroundIndexing(boolean backgroundIndexing)
           
 void setDataDir(java.io.File dataDir)
           
 void setIndexAllOnCommit(boolean indexAllOnCommit)
           
 void setParameter(java.lang.String key, java.lang.String value)
           
 void setReindexOnCommit(boolean roc)
           
 void shutDown()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllegroSail

public AllegroSail(java.lang.String host,
                   int port,
                   boolean start,
                   java.lang.String name,
                   java.io.File directory,
                   int lookahead,
                   int selectLimit,
                   boolean reindexOnCommit,
                   boolean syncOnInsert)
Create a Sail instance to an AllegroGaph triple store. Each instance is serviced by a separate connection to the server.

Parameters:
host - network host serving AllegroGraph
port - AllegroGraph port
start - whether to start a new server
name - name of the triple store
directory - parent directory of the triple store
lookahead - value for search operations. If less than 1, a default value will be used
selectLimit - the value of the AllegroGraph's select limit parameter. If less than 1, a default value will be used.
reindexOnCommit - when true, re-index the store after each commit
syncOnInsert - when true, synchronize the store after every insert operation

AllegroSail

public AllegroSail(AllegroGraph ag)
Create a Sail instance for an AllegroGraph triple store. The application program creates the AllegroGraph and AllegroGraphConnection instances needed to reach the server. The application program is responsible for disabling the connection and closing the triple store.

Parameters:
ag - an AllegroGraph instance already connected to the server.
Method Detail

getAGSInternal

public AGSInternal getAGSInternal()

addSailChangedListener

public void addSailChangedListener(org.openrdf.sail.SailChangedListener listener)
Specified by:
addSailChangedListener in interface org.openrdf.sail.Sail

getConnection

public AllegroSailConnection getConnection()
                                    throws org.openrdf.sail.SailException
Opens a connection on the Sail which can be used to query and update data.

Specified by:
getConnection in interface org.openrdf.sail.Sail
Returns:
A connection that allows operations on this store. Only one connection instance is created for each Sail instance.
Throws:
org.openrdf.sail.SailException

getDataDir

public java.io.File getDataDir()
Specified by:
getDataDir in interface org.openrdf.sail.Sail

getValueFactory

public org.openrdf.model.ValueFactory getValueFactory()
Specified by:
getValueFactory in interface org.openrdf.sail.Sail

initialize

public void initialize()
                throws org.openrdf.sail.SailException
Specified by:
initialize in interface org.openrdf.sail.Sail
Throws:
org.openrdf.sail.SailException

isWritable

public boolean isWritable()
                   throws org.openrdf.sail.SailException
Specified by:
isWritable in interface org.openrdf.sail.Sail
Throws:
org.openrdf.sail.SailException

removeSailChangedListener

public void removeSailChangedListener(org.openrdf.sail.SailChangedListener listener)
Specified by:
removeSailChangedListener in interface org.openrdf.sail.Sail

setDataDir

public void setDataDir(java.io.File dataDir)
Specified by:
setDataDir in interface org.openrdf.sail.Sail

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)

shutDown

public void shutDown()
              throws org.openrdf.sail.SailException
Specified by:
shutDown in interface org.openrdf.sail.Sail
Throws:
org.openrdf.sail.SailException

isReindexOnCommit

public boolean isReindexOnCommit()

setReindexOnCommit

public void setReindexOnCommit(boolean roc)

isIndexAllOnCommit

public boolean isIndexAllOnCommit()

setIndexAllOnCommit

public void setIndexAllOnCommit(boolean indexAllOnCommit)

isBackgroundIndexing

public boolean isBackgroundIndexing()

setBackgroundIndexing

public void setBackgroundIndexing(boolean backgroundIndexing)