com.bigdata.rdf.sail
Class BigdataSailRepositoryConnection

java.lang.Object
  extended by org.openrdf.repository.base.RepositoryConnectionBase
      extended by org.openrdf.repository.sail.SailRepositoryConnection
          extended by com.bigdata.rdf.sail.BigdataSailRepositoryConnection
All Implemented Interfaces:
org.openrdf.repository.RepositoryConnection

public class BigdataSailRepositoryConnection
extends org.openrdf.repository.sail.SailRepositoryConnection


Field Summary
protected  org.apache.log4j.Logger log
           
 
Fields inherited from class org.openrdf.repository.base.RepositoryConnectionBase
logger
 
Constructor Summary
BigdataSailRepositoryConnection(BigdataSailRepository repository, org.openrdf.sail.SailConnection sailConnection)
           
 
Method Summary
 void commit()
          Note: auto-commit is an EXTREMELY bad idea.
 void computeClosure()
          Computes the closure of the triple store for RDF(S)+ entailments.
 void flush()
          Flush the statement buffers.
 AbstractTripleStore getTripleStore()
          Return the backing AbstractTripleStore object.
 org.openrdf.repository.sail.SailGraphQuery prepareGraphQuery(org.openrdf.query.QueryLanguage ql, String queryString, String baseURI)
           
 void removeAllEntailments()
          Removes all "inferred" statements from the database (does NOT commit the database).
 
Methods inherited from class org.openrdf.repository.sail.SailRepositoryConnection
addWithoutCommit, clear, clearNamespaces, close, createRepositoryResult, exportStatements, getContextIDs, getNamespace, getNamespaces, getSailConnection, getStatements, prepareBooleanQuery, prepareQuery, prepareTupleQuery, removeNamespace, removeWithoutCommit, rollback, setNamespace, size
 
Methods inherited from class org.openrdf.repository.base.RepositoryConnectionBase
add, add, add, add, add, add, add, add, addInputStreamOrReader, addWithoutCommit, autoCommit, export, getRepository, getValueFactory, hasStatement, hasStatement, isAutoCommit, isEmpty, isOpen, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, remove, remove, remove, remove, removeWithoutCommit, setAutoCommit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.log4j.Logger log
Constructor Detail

BigdataSailRepositoryConnection

public BigdataSailRepositoryConnection(BigdataSailRepository repository,
                                       org.openrdf.sail.SailConnection sailConnection)
Method Detail

prepareGraphQuery

public org.openrdf.repository.sail.SailGraphQuery prepareGraphQuery(org.openrdf.query.QueryLanguage ql,
                                                                    String queryString,
                                                                    String baseURI)
                                                             throws org.openrdf.query.MalformedQueryException
Specified by:
prepareGraphQuery in interface org.openrdf.repository.RepositoryConnection
Overrides:
prepareGraphQuery in class org.openrdf.repository.sail.SailRepositoryConnection
Throws:
org.openrdf.query.MalformedQueryException

commit

public void commit()
            throws org.openrdf.repository.RepositoryException
Note: auto-commit is an EXTREMELY bad idea. Performance will be terrible. The database will swell to an outrageous size. TURN OFF AUTO COMMIT.

Specified by:
commit in interface org.openrdf.repository.RepositoryConnection
Overrides:
commit in class org.openrdf.repository.sail.SailRepositoryConnection
Throws:
org.openrdf.repository.RepositoryException

flush

public void flush()
           throws org.openrdf.repository.RepositoryException
Flush the statement buffers. The BigdataSail.BigdataSailConnection heavily buffers assertions and retractions. Either a flush() or a commit() is required before executing any operations directly against the backing AbstractTripleStore so that the buffered assertions or retractions will be written onto the KB and become visible to other methods. This is not a transaction issue -- just a buffer issue. The public methods on the BigdataSail.BigdataSailConnection all flush the buffers before performing any queries against the underlying AbstractTripleStore.

Throws:
org.openrdf.repository.RepositoryException

getTripleStore

public AbstractTripleStore getTripleStore()
Return the backing AbstractTripleStore object. Caution MUST be used when accessing this object as the access goes around the SAIL API.


computeClosure

public void computeClosure()
                    throws org.openrdf.repository.RepositoryException
Computes the closure of the triple store for RDF(S)+ entailments.

This computes the closure of the database. This can be used if you do NOT enable truth maintenance and choose instead to load up all of your data first and then compute the closure of the database. Note that some rules may be computed by eager closure while others are computed at query time.

Note: If there are already entailments in the database AND you have retracted statements since the last time the closure was computed then you MUST delete all entailments from the database before re-computing the closure.

Note: This method does NOT commit the database. See ITripleStore#commit() and getTripleStore().

Throws:
org.openrdf.repository.RepositoryException
See Also:
removeAllEntailments()

removeAllEntailments

public void removeAllEntailments()
                          throws org.openrdf.sail.SailException,
                                 org.openrdf.repository.RepositoryException
Removes all "inferred" statements from the database (does NOT commit the database).

Throws:
org.openrdf.repository.RepositoryException
org.openrdf.sail.SailException


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.