net.fortytwo.sesametools
Class SingleContextSail

java.lang.Object
  extended by net.fortytwo.sesametools.SingleContextSail
All Implemented Interfaces:
org.openrdf.sail.Sail, org.openrdf.sail.StackableSail

public class SingleContextSail
extends Object
implements org.openrdf.sail.StackableSail

A Sail which treats the wildcard context as a single, specific context, and disallows read and write access to all other contexts, including the default context. Namespaces may be set and retrieved without restriction.

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

Constructor Summary
SingleContextSail(org.openrdf.sail.Sail baseSail, org.openrdf.model.Resource context)
          Construct a Sail which is restricted to a single graph context.
 
Method Summary
 org.openrdf.sail.Sail getBaseSail()
           
 org.openrdf.sail.SailConnection getConnection()
           
 File getDataDir()
           
 org.openrdf.model.ValueFactory getValueFactory()
           
 void initialize()
           
 boolean isWritable()
           
 void setBaseSail(org.openrdf.sail.Sail baseSail)
           
 void setDataDir(File dir)
           
 void shutDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleContextSail

public SingleContextSail(org.openrdf.sail.Sail baseSail,
                         org.openrdf.model.Resource context)
Construct a Sail which is restricted to a single graph context.

Parameters:
baseSail - a base Sail for storage
context - a single, non-null graph context
Method Detail

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

getConnection

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

getDataDir

public 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

setDataDir

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

shutDown

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


Copyright © 2013. All Rights Reserved.