net.fortytwo.linkeddata.sail
Class LinkedDataSail

java.lang.Object
  extended by org.openrdf.sail.helpers.SailBase
      extended by net.fortytwo.linkeddata.sail.LinkedDataSail
All Implemented Interfaces:
org.openrdf.sail.NotifyingSail, org.openrdf.sail.Sail, org.openrdf.sail.StackableSail

public class LinkedDataSail
extends org.openrdf.sail.helpers.SailBase
implements org.openrdf.sail.StackableSail, org.openrdf.sail.NotifyingSail

A dynamic storage layer which treats the Semantic Web as a single global graph of linked data. LinkedDataSail is layered on top of another Sail which serves as a database for cached Semantic Web documents.

Author:
Joshua Shinavier (http://fortytwo.net)

Field Summary
static String CACHE_LIFETIME
           
static String DATATYPE_HANDLING_POLICY
           
static String MEMORY_CACHE_CAPACITY
           
 
Fields inherited from class org.openrdf.sail.helpers.SailBase
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, initializationLock, logger
 
Constructor Summary
LinkedDataSail(org.openrdf.sail.Sail baseSail)
           
LinkedDataSail(org.openrdf.sail.Sail baseSail, LinkedDataCache cache)
           
 
Method Summary
 void addSailChangedListener(org.openrdf.sail.SailChangedListener listener)
           
 org.openrdf.sail.Sail getBaseSail()
           
 LinkedDataCache getCache()
           
 org.openrdf.sail.NotifyingSailConnection getConnection()
           
protected  org.openrdf.sail.SailConnection getConnectionInternal()
           
 File getDataDir()
           
 org.openrdf.model.ValueFactory getValueFactory()
           
 void initialize()
           
 boolean isWritable()
           
 void removeSailChangedListener(org.openrdf.sail.SailChangedListener listener)
           
 void setBaseSail(org.openrdf.sail.Sail baseSail)
           
 void setDataDir(File dataDir)
           
protected  void shutDownInternal()
           
 
Methods inherited from class org.openrdf.sail.helpers.SailBase
connectionClosed, debugEnabled, initializeInternal, isInitialized, shutDown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openrdf.sail.Sail
shutDown
 

Field Detail

CACHE_LIFETIME

public static final String CACHE_LIFETIME
See Also:
Constant Field Values

DATATYPE_HANDLING_POLICY

public static final String DATATYPE_HANDLING_POLICY
See Also:
Constant Field Values

MEMORY_CACHE_CAPACITY

public static final String MEMORY_CACHE_CAPACITY
See Also:
Constant Field Values
Constructor Detail

LinkedDataSail

public LinkedDataSail(org.openrdf.sail.Sail baseSail,
                      LinkedDataCache cache)
               throws RippleException
Parameters:
baseSail - base Sail which provides a storage layer for aggregated RDF data (Note: the base Sail should be initialized before this Sail is used)
cache - a custom WebClosure providing an RDF-document-level view of the Web
Throws:
RippleException - if there is a configuration error

LinkedDataSail

public LinkedDataSail(org.openrdf.sail.Sail baseSail)
               throws RippleException
Parameters:
baseSail - base Sail which provides a storage layer for aggregated RDF data (Note: the base Sail should be initialized before this Sail is used)
Throws:
RippleException - if there is a configuration error
Method Detail

addSailChangedListener

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

getConnection

public org.openrdf.sail.NotifyingSailConnection getConnection()
                                                       throws org.openrdf.sail.SailException
Specified by:
getConnection in interface org.openrdf.sail.NotifyingSail
Specified by:
getConnection in interface org.openrdf.sail.Sail
Overrides:
getConnection in class org.openrdf.sail.helpers.SailBase
Throws:
org.openrdf.sail.SailException

getConnectionInternal

protected org.openrdf.sail.SailConnection getConnectionInternal()
                                                         throws org.openrdf.sail.SailException
Specified by:
getConnectionInternal in class org.openrdf.sail.helpers.SailBase
Throws:
org.openrdf.sail.SailException

getDataDir

public File getDataDir()
Specified by:
getDataDir in interface org.openrdf.sail.Sail
Overrides:
getDataDir in class org.openrdf.sail.helpers.SailBase

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
Overrides:
initialize in class org.openrdf.sail.helpers.SailBase
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.NotifyingSail

setDataDir

public void setDataDir(File dataDir)
Specified by:
setDataDir in interface org.openrdf.sail.Sail
Overrides:
setDataDir in class org.openrdf.sail.helpers.SailBase

shutDownInternal

protected void shutDownInternal()
                         throws org.openrdf.sail.SailException
Specified by:
shutDownInternal in class org.openrdf.sail.helpers.SailBase
Throws:
org.openrdf.sail.SailException

getBaseSail

public org.openrdf.sail.Sail getBaseSail()
Specified by:
getBaseSail in interface org.openrdf.sail.StackableSail

setBaseSail

public void setBaseSail(org.openrdf.sail.Sail baseSail)
Specified by:
setBaseSail in interface org.openrdf.sail.StackableSail

getCache

public LinkedDataCache getCache()
Returns:
this LinkedDataSail's cache manager


Copyright © 2007-2014. All Rights Reserved.