|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.repository.base.RepositoryConnectionBase
org.openrdf.repository.sail.SailRepositoryConnection
com.bigdata.rdf.sail.BigdataSailRepositoryConnection
public class BigdataSailRepositoryConnection
Class with support for a variety of bigdata specific extensions,
| Field Summary |
|---|
| Fields inherited from class org.openrdf.repository.base.RepositoryConnectionBase |
|---|
logger |
| Constructor Summary | |
|---|---|
BigdataSailRepositoryConnection(BigdataSailRepository repository,
SailConnection sailConnection)
|
|
| Method Summary | |
|---|---|
void |
addChangeLog(IChangeLog log)
Set the change log on the SAIL connection. |
void |
commit()
|
long |
commit2()
Commit, returning the timestamp associated with the new commit point. |
void |
computeClosure()
Computes the closure of the triple store for RDF(S)+ entailments. |
void |
flush()
Flush the statement buffers. |
BigdataSailRepository |
getRepository()
|
BigdataSail.BigdataSailConnection |
getSailConnection()
|
AbstractTripleStore |
getTripleStore()
Return the backing AbstractTripleStore object. |
BigdataValueFactory |
getValueFactory()
|
boolean |
isReadOnly()
Return true if the connection does not permit mutation. |
boolean |
isUnisolated()
Return true if this is the ITx.UNISOLATED
connection. |
BigdataSailBooleanQuery |
prepareBooleanQuery(QueryLanguage ql,
String qs,
String baseURI)
|
BigdataSailGraphQuery |
prepareGraphQuery(QueryLanguage ql,
String qs,
String baseURI)
|
BigdataSailQuery |
prepareNativeSPARQLQuery(QueryLanguage ql,
String queryStr,
String baseURI)
Parse a SPARQL query |
BigdataSailUpdate |
prepareNativeSPARQLUpdate(QueryLanguage ql,
String updateStr,
String baseURI)
Parse a SPARQL UPDATE request. |
SailQuery |
prepareQuery(QueryLanguage ql,
String qs,
String baseURI)
|
BigdataSailTupleQuery |
prepareTupleQuery(QueryLanguage ql,
String qs,
String baseURI)
|
Update |
prepareUpdate(QueryLanguage ql,
String update,
String baseURI)
|
void |
removeAllEntailments()
Removes all "inferred" statements from the database (does NOT commit the database). |
String |
toString()
|
| Methods inherited from class org.openrdf.repository.sail.SailRepositoryConnection |
|---|
addWithoutCommit, autoCommit, clear, clearNamespaces, close, createRepositoryResult, exportStatements, getContextIDs, getNamespace, getNamespaces, getStatements, isEmpty, removeNamespace, removeWithoutCommit, rollback, setNamespace, size |
| Methods inherited from class org.openrdf.repository.base.RepositoryConnectionBase |
|---|
add, add, add, add, add, add, add, add, addInputStreamOrReader, addWithoutCommit, export, getParserConfig, hasStatement, hasStatement, isAutoCommit, isOpen, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, prepareUpdate, remove, remove, remove, remove, removeWithoutCommit, setAutoCommit, setParserConfig |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BigdataSailRepositoryConnection(BigdataSailRepository repository,
SailConnection sailConnection)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic BigdataSailRepository getRepository()
getRepository in interface RepositoryConnectiongetRepository in class RepositoryConnectionBasepublic BigdataSail.BigdataSailConnection getSailConnection()
getSailConnection in class SailRepositoryConnectionpublic BigdataValueFactory getValueFactory()
getValueFactory in interface RepositoryConnectiongetValueFactory in class RepositoryConnectionBase
public BigdataSailGraphQuery prepareGraphQuery(QueryLanguage ql,
String qs,
String baseURI)
throws MalformedQueryException
prepareGraphQuery in interface RepositoryConnectionprepareGraphQuery in class SailRepositoryConnectionMalformedQueryException
public BigdataSailTupleQuery prepareTupleQuery(QueryLanguage ql,
String qs,
String baseURI)
throws MalformedQueryException
prepareTupleQuery in interface RepositoryConnectionprepareTupleQuery in class SailRepositoryConnectionMalformedQueryException
public BigdataSailBooleanQuery prepareBooleanQuery(QueryLanguage ql,
String qs,
String baseURI)
throws MalformedQueryException
prepareBooleanQuery in interface RepositoryConnectionprepareBooleanQuery in class SailRepositoryConnectionMalformedQueryException
public SailQuery prepareQuery(QueryLanguage ql,
String qs,
String baseURI)
throws MalformedQueryException
prepareQuery in interface RepositoryConnectionprepareQuery in class SailRepositoryConnectionMalformedQueryException
public Update prepareUpdate(QueryLanguage ql,
String update,
String baseURI)
throws RepositoryException,
MalformedQueryException
prepareUpdate in interface RepositoryConnectionprepareUpdate in class SailRepositoryConnectionRepositoryException
MalformedQueryException
public BigdataSailQuery prepareNativeSPARQLQuery(QueryLanguage ql,
String queryStr,
String baseURI)
throws MalformedQueryException
ql - The QueryLanguage.queryStr - The query.baseURI - The base URI.
MalformedQueryException
UnsupportedOperationException - if the query language is not SPARQL.
public BigdataSailUpdate prepareNativeSPARQLUpdate(QueryLanguage ql,
String updateStr,
String baseURI)
throws MalformedQueryException
ql - The QueryLanguage.updateStr - The update request.baseURI - The base URI.
MalformedQueryException
UnsupportedOperationException - if the QueryLanguage is not SPARQL.public final boolean isReadOnly()
true if the connection does not permit mutation.
public final boolean isUnisolated()
true if this is the ITx.UNISOLATED
connection.
public long commit2()
throws 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.
0L if the write set was empty such that nothing was
committed.
RepositoryExceptionBigdataSail.Options.ALLOW_AUTO_COMMIT
public void commit()
throws 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.
commit in interface RepositoryConnectioncommit in class SailRepositoryConnectionRepositoryExceptionBigdataSail.Options.ALLOW_AUTO_COMMIT
public void flush()
throws RepositoryException
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.
RepositoryExceptionpublic AbstractTripleStore getTripleStore()
AbstractTripleStore object. Caution MUST be
used when accessing this object as the access goes around the SAIL API.
public void computeClosure()
throws RepositoryException
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
AbstractTripleStore.commit() and getTripleStore().
RepositoryExceptionremoveAllEntailments()
public void removeAllEntailments()
throws SailException,
RepositoryException
RepositoryException
SailExceptionpublic void addChangeLog(IChangeLog log)
IChangeLog and
IChangeRecord.
log - the change log
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||