Interface DataStoreConnection
- All Superinterfaces:
- java.lang.AutoCloseable
public interface DataStoreConnection
extends java.lang.AutoCloseable
Encapsulates a connection to an RDFox data store. All instances of this
 class are single-threaded — that is, no method should be called simultaneously on several threads. However, please note that there is no
 thread affinity — that is, methods on one connection can be called from different threads as long as the calls are serialised externally.
 The 
interrupt(), duplicate(), and checkPassword(String password) methods are exceptions: they can be invoked in
 parallel with any other method apart from close(). Calling close() in parallel with any other method will almost certainly
 crash the JVM. Multiple connections to the same data store should be used to access a data store concurrently. A data store connection uses
 transactions to coordinate how concurrent accesses interact. A connection must be closed after use to release the resources associated with it.- 
Field SummaryFields Modifier and Type Field Description static longWAIT_FOREVERSpecifies that the system should wait forever when it needs to acquire a lock on a data store (seesetLockTimeout(long)).
- 
Method SummaryModifier and Type Method Description longaddRule(Rule rule)Adds a rule to the data store.longaddRules(java.util.Collection<Rule> datalogProgram)Adds a collection of rules to the data store.voidbegin(TransactionType transactionType)Deprecated.voidbeginTransaction(TransactionType transactionType)Starts a new transaction on this connection.voidcheckPassword(java.lang.String password)Checks whether the supplied password is valid for the role associated with this connection.voidclear()Clears the content of this data store -- that is, it clears all data and rules so the logical state of the data store is the same as after initialisation.voidclearFactsKeepRulesAxioms()Clears all facts, while keeping all the currently loaded rules and axioms.voidclearRulesAxiomsExplicateFacts()Clears all rules and turns all facts in the data store into EDB facts.voidclose()Closes the data store connection by freeing all resources associated with it.voidcommit()Deprecated.voidcommitTransaction()Commits the transaction associated with this connection.voidcompact()Compact the data in the data store.booleancontainsDataSource(java.lang.String dataSourceName)Checks whether the data store contains a data source with the specified name.booleancontainsDataSourceTable(java.lang.String dataSourceName, java.lang.String dataSourceTableName)Checks whether the specified data source in the data store contains a data source table with the specified name.booleancontainsStatistics(java.lang.String statisticsName)Checks whether the data store contains the statistics with the specified name.booleancontainsTupleTable(java.lang.String tupleTableName)Checks whether the data store contains a tuple table with the specified name.CursorcreateCursor(Query query, java.util.Map<java.lang.String,java.lang.String> compilationParameters)Creates a cursor over the results of the given query with the default fetch window size of 100.CursorcreateCursor(Query query, java.util.Map<java.lang.String,java.lang.String> compilationParameters, int fetchWindowSize)Creates a cursor over the results of the given query.CursorcreateCursor(Prefixes prefixes, java.lang.String queryText, java.util.Map<java.lang.String,java.lang.String> compilationParameters)Creates a cursor over the results of the given query with the default fetch window size of 100.CursorcreateCursor(Prefixes prefixes, java.lang.String queryText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, int fetchWindowSize)Creates a cursor over the results of the given query.voidcreateStatistics(java.lang.String statisticsName, java.util.Map<java.lang.String,java.lang.String> statisticsParameters)Creates the statistics in a data store.voidcreateTupleTable(java.lang.String tupleTableName, java.util.Map<java.lang.String,java.lang.String> tupleTableParameters)Creates a tuple table in a data store.longdeleteRule(Rule rule)Deletes a rule to the data store.longdeleteRules(java.util.Collection<Rule> datalogProgram)Deletes a collection of rules to the data store.voiddeleteStatistics(java.lang.String statisticsName)Deletes the data store statistics with the specified name from the data store.voiddeleteTupleTable(java.lang.String tupleTableName)Deletes the tuple table with the specified name from the data store.voidderegisterDataSource(java.lang.String dataSourceName)Deregisters the data source table with the specified name from the data store.DataSourceInfodescribeDataSource(java.lang.String dataSourceName)Returns information about the data source with the given name.DataSourceTableInfodescribeDataSourceTable(java.lang.String dataSourceName, java.lang.String dataSourceTableName)Returns information about the data source table of the specified data source in the data store.StatisticsInfodescribeStatistics(java.lang.String statisticsName)Returns information about the specific statistics of the data store.TupleTableInfodescribeTupleTable(java.lang.String tupleTableName)Returns information about the tuple table with the given name.DataStoreConnectionduplicate()Creates a new connection to the same data store.StatementResultevaluateQuery(Query query, java.util.Map<java.lang.String,java.lang.String> compilationParameters, QueryAnswerMonitor queryAnswerMonitor)Evaluates a query and calls the suppliedQueryAnswerMonitorinstance for each tuple in the result.StatementResultevaluateQuery(Prefixes prefixes, java.lang.String queryText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, QueryAnswerMonitor queryAnswerMonitor)Evaluates a query and calls the suppliedQueryAnswerMonitorinstance for each tuple in the result.StatementResultevaluateStatement(Prefixes prefixes, java.lang.String statementText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.File file, java.lang.String queryAnswerFormatName)Evaluates a statement and serialises the result to the supplied file using the specified format.StatementResultevaluateStatement(Prefixes prefixes, java.lang.String statementText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.OutputStream outputStream, java.lang.String queryAnswerFormatName)Evaluates a statement and serialises the result to the supplied output stream using the specified format.StatementResultevaluateStatement(Prefixes prefixes, Query statement, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.File file, java.lang.String queryAnswerFormatName)Evaluates a statement and serialises the result to the supplied file using the specified format.StatementResultevaluateStatement(Prefixes prefixes, Query statement, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.OutputStream outputStream, java.lang.String queryAnswerFormatName)Evaluates a statement and serialises the result to the supplied output stream using the specified format.StatementResultevaluateUpdate(Update update, java.util.Map<java.lang.String,java.lang.String> compilationParameters)Evaluates an update.StatementResultevaluateUpdate(Prefixes prefixes, java.lang.String updateText, java.util.Map<java.lang.String,java.lang.String> compilationParameters)Evaluates an update.voidexportData(Prefixes prefixes, java.io.File file, java.lang.String formatName, java.util.Map<java.lang.String,java.lang.String> parameters)Exports the data in the data store using the given format.voidexportData(Prefixes prefixes, java.io.OutputStream outputStream, java.lang.String formatName, java.util.Map<java.lang.String,java.lang.String> parameters)Exports the data in the data store using the given format.ComponentInfogetComponentInfo(boolean extended)Returns diagnostic information about the data store as a tree of objects each providing detailed information about the data store.ResourceValue[][]getDataSourceTableData(java.lang.String dataSourceName, java.lang.String dataSourceTableName, int numberOfRows)Returns a sample of the data from the specified data source table.longgetDataStoreVersion()Returns the version of the data store, which is an number that is incremented every time the data store is updated.longgetDictionaryVersion()Returns the version of the data store dictionary, which is an number that is incremented every time the data store dictionary is cleared.longgetEndResourceID()Returns the one plus the maximum resource ID that can be stored in tuple tables of this data store.EqualityAxiomatizationgetEqualityAxiomatization()Returns a flag that determines how the data store deals with equality reasoning.intgetID()Returns an integer that uniquely identifies the data store within the server.longgetLastTransactionDataStoreVersion()Returns the version that the data store had after the last transaction on this connection.longgetLockTimeout()Returns the time in milliseconds that the system will wait for when it needs to acquire a lock on a data store.java.lang.StringgetName()Returns the name of the data store inside the server.java.util.Map<java.lang.String,java.lang.String>getParameters()Returns the parameters that the data store was created with.ResourcegetResource(long resourceID)Looks up the resource with the given IDs.booleangetResources(long[] resourceIDs, int startIndex, int endIndex, Resource[] resources)Looks up the resources with the given IDs.ResourceValuegetResourceValue(long resourceID)Looks up the resource with the given ID.booleangetResourceValues(long[] resourceIDs, int startIndex, int endIndex, ResourceValue[] resourceValues)Looks up the resources with the given IDs.java.lang.StringgetRoleName()Returns the name of the role currently associated with this connection.longgetTransactionMustMatchDataStoreVersion()Returns the data store version that the next operation on this connection should expect.longgetTransactionMustNotMatchDataStoreVersion()Returns the data store version that the next operation on this connection should not expect.TransactionStategetTransactionState()Returns the state of the transaction associated with this connection.java.lang.StringgetUniqueID()Returns a string that uniquely identifies the data store.ImportResultimportAxiomsFromTriples(java.lang.String sourceGraphName, boolean translateAssertions, java.lang.String destinationGraphName, UpdateType updateType)Parses the given source graph into OWL axioms, and imports the axioms into the destination graph.ImportResultimportAxiomsFromTriples(java.lang.String sourceGraphName, boolean translateAssertions, java.lang.String destinationGraphName, UpdateType updateType, ImportNotificationMonitor importNotificationMonitor)Parses the given source graph into OWL axioms, and imports the axioms into the destination graph.ImportResultimportData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.io.File file)Imports the data from the given file into the current data store.ImportResultimportData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.io.InputStream inputStream)Imports the data from the given input stream into the current data store.ImportResultimportData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.lang.String content)Imports the data from the given string into the current data store.ImportResultimportData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.util.Collection<InputSourceFactory> inputSourceFactories, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor)Imports the data described by the given input source factories into the current data store.ImportResultimportData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, InputSourceFactory inputSourceFactory, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor)Imports the data described by the given input source factory into the current data store.ImportResultimportData(UpdateType updateType, Prefixes prefixes, java.io.File file)Imports the data from the given file into the current data store.ImportResultimportData(UpdateType updateType, Prefixes prefixes, java.io.InputStream inputStream)Imports the data from the given input stream into the current data store.ImportResultimportData(UpdateType updateType, Prefixes prefixes, java.lang.String content)Imports the data from the given string into the current data store.ImportResultimportData(UpdateType updateType, Prefixes prefixes, java.util.Collection<InputSourceFactory> inputSourceFactories, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor)Imports the data described by the given input source factories into the current data store.ImportResultimportData(UpdateType updateType, Prefixes prefixes, InputSourceFactory inputSourceFactory, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor)Imports the data described by the given input source factory into the current data store.voidinterrupt()Tries to interrupt an operation that is running in parallel on this connection.booleanisConcurrent()Returnstrueif the data store supports concurrent access.booleanisPersistent()Returnstrueif the data store is persistent.java.util.List<DataSourceInfo>listDataSources()Returns information about the data sources currently present in the data store.java.util.List<DataSourceTableInfo>listDataSourceTables(java.lang.String dataSourceName)Returns information about the data source tables of the specified data source in the data store.java.util.List<RuleInfo>listRules()Returns the information about the rules currently loaded into the data store.java.util.List<StatisticsInfo>listStatistics()Returns information about all statistics currently managed by the data store.java.util.List<TupleTableInfo>listTupleTables()Returns information about the tuple tables currently present in the data store.voidrecompileRules()Recompiles the rules using the currently available statistics.voidrecomputeMaterialization()Recomputes the materialization from scratch — that is, deletes all derived facts and applies all rules as if the data had just been freshly imported.voidregisterDataSource(java.lang.String dataSourceName, java.util.Map<java.lang.String,java.lang.String> dataSourceParameters)Registers a data source with a data store.booleanrequiresIncrementalReasoning()Returnstrueif the next data store update must be performed using incremental reasoning (rather than standard using the standard datalog materialization "from scratch" algorithm).voidrollback()Deprecated.voidrollbackTransaction()Rolls back the transaction associated with this connection.voidsetLockTimeout(long timeout)Sets the time in milliseconds that the system will wait for when it needs to acquire a lock on a data store.voidsetTransactionMustMatchDataStoreVersion(long dataStoreVersion)Configures this connection so that the next operation is accepted only if the data store has the given version before the operation commences.voidsetTransactionMustNotMatchDataStoreVersion(long dataStoreVersion)Configures this connection so that the next operation is accepted only if the data store does not have the given version before the operation commences.booleantransactionRequiresRollback()Returnstrueif a transaction is active on this connection and this transaction must be rolled back (i.e., it cannot be committed).voidupdateMaterialization()Updates the materialization so that all and only the consequences of the explicitly stated facts and the rules are derived.voidupdateStatistics()Updates all statistics that the data store uses to plan queries and rules.voidupdateStatistics(java.lang.String statisticsName)Updates the statistics with the given name that the data store uses to plan queries and rules.
- 
Field Details- 
WAIT_FOREVERstatic final long WAIT_FOREVERSpecifies that the system should wait forever when it needs to acquire a lock on a data store (seesetLockTimeout(long)).- See Also:
- Constant Field Values
 
 
- 
- 
Method Details- 
closevoid close()Closes the data store connection by freeing all resources associated with it. Once a connection is closed, it cannot be used any further. Calling this method in parallel with any other method runs a very high risk of crashing the JVM.- Specified by:
- closein interface- java.lang.AutoCloseable
 
- 
getLockTimeoutReturns the time in milliseconds that the system will wait for when it needs to acquire a lock on a data store. SeesetLockTimeout(long)for more detail.- Returns:
- the current timeout value
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
setLockTimeoutSets the time in milliseconds that the system will wait for when it needs to acquire a lock on a data store. The value ofWAIT_FOREVERspecifies that the system should wait indefinitely. When successful completion of an operation (e.g., adding data to a data store) requires locking a store and the lock cannot be acquired within the timeout period, aLockTimeoutExceptionis thrown.- Parameters:
- timeout- the new timeout value
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
duplicateCreates a new connection to the same data store. The new connection inherits the role name and the lock timeout from this one. Regardless of whether a transaction is active on this connection, the new connection will not have an active transaction. The main use of this method is to avoid having to specify the user credentials again.- Returns:
- a new connection to the same data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
interruptTries to interrupt an operation that is running in parallel on this connection. RDFox will make a best effort to interrupt an operation, but there are no guarantees that the operation will indeed be interrupted. An operation will throw anOperationInterruptedExceptionexception. This method can be called concurrently with any other method apart fromclose().- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getRoleNameReturns the name of the role currently associated with this connection.- Returns:
- the name of the role currently associated with this connection
- Throws:
- JRDFoxException- thrown if there is an error
 
- 
checkPasswordChecks whether the supplied password is valid for the role associated with this connection. On failure, an exception is thrown and the connection remains valid.- Parameters:
- password- the password of the new user
- Throws:
- JRDFoxException- thrown if there is an error
 
- 
getNameReturns the name of the data store inside the server.- Returns:
- the name of the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getIDReturns an integer that uniquely identifies the data store within the server. This number will be as low as possible, thus allowing for easy indexing of data stores using arrays. When a data store is deleted and a new data store is created, the same ID can be assigned to the new data store.- Returns:
- an integer that uniquely identifies this data store within the server
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getUniqueIDReturns a string that uniquely identifies the data store. Each time a data store is created, a fresh random string is associated to the data store. This string aims to be unique across servers and data stores.- Returns:
- a string that uniquely identifies this data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getDataStoreVersionReturns the version of the data store, which is an number that is incremented every time the data store is updated. Hence, by recording the value of this counter and checking it later again, clients can detect whether the data store changed in between.- Returns:
- the generation counter of the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getParametersReturns the parameters that the data store was created with.- Returns:
- the parameters of the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getEndResourceIDReturns the one plus the maximum resource ID that can be stored in tuple tables of this data store. In some data stores this number can be larger than 263 - 1, in which case this method returns 263 - 1 (i.e., the maximum signed long integer).- Returns:
- the maximum resource ID that can be stored in tuple tables of this data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
isConcurrentReturnstrueif the data store supports concurrent access. If not, then all access to the data store will be serialised.- Returns:
- trueif the data store supports concurrent access
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
isPersistentReturnstrueif the data store is persistent.- Returns:
- trueif the data store is persistent
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getEqualityAxiomatizationReturns a flag that determines how the data store deals with equality reasoning.- Returns:
- determines the way in which equality is handled by the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getComponentInfoReturns diagnostic information about the data store as a tree of objects each providing detailed information about the data store. Note: This information should be used for diagnostics purposes only. The content ofComponentInfois subject to change in future version. Callers should not rely on named property or a specific subcomponent being present.- Parameters:
- extended- if- true, returns extensive information about various subcomponents about the data store (mainly used for troubleshooting)
- Returns:
- information about the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
listTupleTablesReturns information about the tuple tables currently present in the data store.- Returns:
- information about the tuple tables currently present in the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
containsTupleTableChecks whether the data store contains a tuple table with the specified name.- Parameters:
- tupleTableName- the name of the tuple table to be checked
- Returns:
- trueif the data store contains a tuple table with the given name
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
createTupleTablevoid createTupleTable(java.lang.String tupleTableName, java.util.Map<java.lang.String,java.lang.String> tupleTableParameters) throws JRDFoxExceptionCreates a tuple table in a data store. The type of the tuple table is described by the supplied parameters. By using appropriate parameters, this method can be used to mount a tuple table from a data source. This operation can be invoked only if no transaction is active on the connection.- Parameters:
- tupleTableName- the name of the tuple table to be created
- tupleTableParameters- the key-value pairs that describe the tuple table to be created
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
deleteTupleTableDeletes the tuple table with the specified name from the data store. A tuple table can be deleted only if it is not used in the body or head of any rule currently loaded in the data store. This operation can be invoked only if no transaction is active on the connection.- Parameters:
- tupleTableName- the name of the tuple table to be deleted
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
describeTupleTableReturns information about the tuple table with the given name.- Parameters:
- tupleTableName- the name of the tuple table whose information is to be returned
- Returns:
- information about the tuple table
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
listDataSourcesReturns information about the data sources currently present in the data store.- Returns:
- information about the tuple tables currently present in the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
containsDataSourceChecks whether the data store contains a data source with the specified name.- Parameters:
- dataSourceName- the name of the data source to be checked
- Returns:
- trueif the data store contains a data source with the given name
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
registerDataSourcevoid registerDataSource(java.lang.String dataSourceName, java.util.Map<java.lang.String,java.lang.String> dataSourceParameters) throws JRDFoxExceptionRegisters a data source with a data store. The new data source is described using the supplied key-value pairs. This operation can be invoked only if no transaction is active on the connection.- Parameters:
- dataSourceName- the name of the data source to be created
- dataSourceParameters- the key-value pairs that describe the data source to be created
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
deregisterDataSourceDeregisters the data source table with the specified name from the data store. This operation can be invoked only if no transaction is active on the connection.- Parameters:
- dataSourceName- the name of the data source to be deleted
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
describeDataSourceReturns information about the data source with the given name.- Parameters:
- dataSourceName- the name of the data source whose information is to be returned
- Returns:
- information about the data source
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
listDataSourceTablesjava.util.List<DataSourceTableInfo> listDataSourceTables(java.lang.String dataSourceName) throws JRDFoxExceptionReturns information about the data source tables of the specified data source in the data store.- Parameters:
- dataSourceName- the name of the data source whose tables are to be listed
- Returns:
- information about the data source tables of the specified data source
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
containsDataSourceTableboolean containsDataSourceTable(java.lang.String dataSourceName, java.lang.String dataSourceTableName) throws JRDFoxExceptionChecks whether the specified data source in the data store contains a data source table with the specified name.- Parameters:
- dataSourceName- the name of the data source
- dataSourceTableName- the name of the data source table
- Returns:
- trueif the specified data source contains the specified data source table
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
describeDataSourceTableDataSourceTableInfo describeDataSourceTable(java.lang.String dataSourceName, java.lang.String dataSourceTableName) throws JRDFoxExceptionReturns information about the data source table of the specified data source in the data store.- Parameters:
- dataSourceName- the name of the data source
- dataSourceTableName- the name of the data source table
- Returns:
- information about the data source table
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getDataSourceTableDataResourceValue[][] getDataSourceTableData(java.lang.String dataSourceName, java.lang.String dataSourceTableName, int numberOfRows) throws JRDFoxExceptionReturns a sample of the data from the specified data source table. This method is not designed for efficient importation of data from a data source. Rather, its main purpose is to allow applications to view the data in the source before mounting an appropriate tuple table.- Parameters:
- dataSourceName- the name of the data source
- dataSourceTableName- the name of the data source table
- numberOfRows- the maximum number of rows to be returned
- Returns:
- a sample of the data from the data source table
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
listStatisticsReturns information about all statistics currently managed by the data store.- Returns:
- information about all statistics that the data store currently manages
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
containsStatisticsChecks whether the data store contains the statistics with the specified name.- Parameters:
- statisticsName- the name of the statistics
- Returns:
- trueif the data store contains the specified statistics
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
createStatisticsvoid createStatistics(java.lang.String statisticsName, java.util.Map<java.lang.String,java.lang.String> statisticsParameters) throws JRDFoxExceptionCreates the statistics in a data store. The name of the statistics determines their type; thus, a data store can contain at most one statistics of a particular type, and the type corresponds to the statistics name. The way in which the statistics are gathered is influenced by the the supplied key-value pairs. This operation can be invoked only if no transaction is active on the connection.- Parameters:
- statisticsName- the name of the data source to be created
- statisticsParameters- the key-value pairs that describe the statistics to be created
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
deleteStatisticsDeletes the data store statistics with the specified name from the data store. This operation can be invoked only if no transaction is active on the connection.- Parameters:
- statisticsName- the name of the data store statistics to be deleted
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
describeStatisticsReturns information about the specific statistics of the data store.- Parameters:
- statisticsName- the name of the statistics whose information should be returned
- Returns:
- information about the statistics
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
updateStatisticsUpdates all statistics that the data store uses to plan queries and rules. This operation should be invoked after large additions to the data store, or after a large number of facts has been derived. This operation can be invoked if either no transaction is active, or a read/write transaction is active. In the latter case, rolling back a transaction does not restore the statistics to their original state.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
setTransactionMustMatchDataStoreVersionConfigures this connection so that the next operation is accepted only if the data store has the given version before the operation commences. If the data store version does not match when the operation is invoked, the operation will throwDataStoreVersionDoesNotMatchException. Note that the version is not checked during this operation: this simply sets up the connection so that the next operation is checked. This mechanism can be used to make sure that each operation uses an expected version of the data.- Parameters:
- dataStoreVersion- the desired version (or 0 to not expect any specific data store version)
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getTransactionMustMatchDataStoreVersionReturns the data store version that the next operation on this connection should expect.- Returns:
- the desired data store version for the next operation (or 0 if any version can be accepted)
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
setTransactionMustNotMatchDataStoreVersionConfigures this connection so that the next operation is accepted only if the data store does not have the given version before the operation commences. If the data store version matches when the operation is invoked, the operation will throwDataStoreVersionMatchesException. Note that the version is not checked during this operation: this simply sets up the connection so that the next operation is checked. This mechanism can be used to make sure that the next operation succeeds only if the data store has changed.- Parameters:
- dataStoreVersion- the desired version (or 0 to not expect any specific data store version)
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getTransactionMustNotMatchDataStoreVersionReturns the data store version that the next operation on this connection should not expect.- Returns:
- the undesired data store version for the next operation (or 0 if any version can be accepted)
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getLastTransactionDataStoreVersionReturns the version that the data store had after the last transaction on this connection. If a transaction is active, the current data store version is returned. Note that rolling back a transaction does not restore the data store version.- Returns:
- the version that the data store had after the last transaction on this connection (or 0 if no transaction was performed on this connection)
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
updateStatisticsUpdates the statistics with the given name that the data store uses to plan queries and rules. This operation should be invoked after large additions to the data store, or after a large number of facts has been derived. This operation can be invoked if either no transaction is active, or a read/write transaction is active. In the latter case, rolling back a transaction does not restore the statistics to their original state.- Parameters:
- statisticsName- the name of the statistics that should be updated
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getTransactionStateReturns the state of the transaction associated with this connection.- Returns:
- the state of the transaction
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
transactionRequiresRollbackReturnstrueif a transaction is active on this connection and this transaction must be rolled back (i.e., it cannot be committed). This happens when certain operations invoked in a transaction result in an error.- Returns:
- trueif the currently active transaction must be committed
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
beginTransactionStarts a new transaction on this connection.- Parameters:
- transactionType- determines the type of the transaction (i.e., whether a read-only or a read/write transaction is requested)
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
commitTransactionCommits the transaction associated with this connection. If an exception is thrown during a commit operation,transactionRequiresRollback()will returntrue, and the transaction should be explicitly rolled back usingrollbackTransaction().- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
rollbackTransactionRolls back the transaction associated with this connection.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
clearClears the content of this data store -- that is, it clears all data and rules so the logical state of the data store is the same as after initialisation. This operation, however, does not clear the data store dictionary, so clients that have cached any resource IDs can still use them. This operation can be called inside a transaction, but, depending on the circumstances,requiresIncrementalReasoning()can subsequently returntrue, — that is, subsequent materialization will not be performed using the standard "from scratch" algorithm, which can affect efficiency. In contrast, if this operation is performed outside a transaction, then subsequent materialization will necessarily be performed using the standard "from scratch" algorithm.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
clearFactsKeepRulesAxiomsClears all facts, while keeping all the currently loaded rules and axioms. After this operation, the data store is in the same state as if all rules and used-defined axioms have been imported from a file. This operation can be invoked only if no transaction is active.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
clearRulesAxiomsExplicateFactsClears all rules and turns all facts in the data store into EDB facts. After this operation, the data store is in the same state as if all derived facts have been imported from a file. This operation can be invoked only if no transaction is active.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
compactCompact the data in the data store. This involves removing all deleted triples, and possibly sorting the data in order to facilitate faster access. This may result in reduced memory usage and/or disk usage for persisted data stores. This operation can be invoked only if no transaction is active.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
exportDatavoid exportData(Prefixes prefixes, java.io.OutputStream outputStream, java.lang.String formatName, java.util.Map<java.lang.String,java.lang.String> parameters) throws JRDFoxExceptionExports the data in the data store using the given format. The format determines which subset of the store data is to be exported; for example, the Turtle format can store triples, but not facts in other tuple tables or the rules.- Parameters:
- prefixes- the prefixes used to abbreviate IRIs in the output (provided that the output format supports IRI abbreviation)
- outputStream- receives the exported data
- formatName- the name of the output format
- parameters- key-value pairs that, depending on the format, customise the export process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
exportDatavoid exportData(Prefixes prefixes, java.io.File file, java.lang.String formatName, java.util.Map<java.lang.String,java.lang.String> parameters) throws JRDFoxExceptionExports the data in the data store using the given format. The format determines which subset of the store data is to be exported; for example, the Turtle format can store triples, but not facts in other tuple tables or the rules. This operation can be invoked either with no active transaction or in a read-only transaction.- Parameters:
- prefixes- the prefixes used to abbreviate IRIs in the output (provided that the output format supports IRI abbreviation)
- file- receives the exported data
- formatName- the name of the output format
- parameters- key-value pairs that, depending on the format, customise the export process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(UpdateType updateType, Prefixes prefixes, InputSourceFactory inputSourceFactory, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor) throws JRDFoxExceptionImports the data described by the given input source factory into the current data store.- Parameters:
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- inputSourceFactory- the content being imported
- formatName- the name of the format of the data
- importNotificationMonitor- receives errors/warnings encountered during import
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(UpdateType updateType, Prefixes prefixes, java.util.Collection<InputSourceFactory> inputSourceFactories, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor) throws JRDFoxExceptionImports the data described by the given input source factories into the current data store. If this server is configured to use more than one thread, then sources are parsed and imported in parallel.- Parameters:
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- inputSourceFactories- the content being imported
- formatName- the name of the format of the data
- importNotificationMonitor- receives errors/warnings encountered during import
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(UpdateType updateType, Prefixes prefixes, java.io.File file) throws JRDFoxExceptionImports the data from the given file into the current data store.- Parameters:
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- file- the content being imported
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(UpdateType updateType, Prefixes prefixes, java.lang.String content) throws JRDFoxExceptionImports the data from the given string into the current data store.- Parameters:
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- content- the content being imported
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(UpdateType updateType, Prefixes prefixes, java.io.InputStream inputStream) throws JRDFoxExceptionImports the data from the given input stream into the current data store.- Parameters:
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- inputStream- the content being imported
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, InputSourceFactory inputSourceFactory, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor) throws JRDFoxExceptionImports the data described by the given input source factory into the current data store. The graph with the specified name is used as a default graph.- Parameters:
- defaultGraphName- the name of the default graph
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- inputSourceFactory- the content being imported
- formatName- the name of the format of the data
- importNotificationMonitor- receives errors/warnings encountered during import
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.util.Collection<InputSourceFactory> inputSourceFactories, java.lang.String formatName, ImportNotificationMonitor importNotificationMonitor) throws JRDFoxExceptionImports the data described by the given input source factories into the current data store. If this server is configured to use more than one thread, then sources are parsed and imported in parallel. The graph with the specified name is used as a default graph.- Parameters:
- defaultGraphName- the name of the default graph
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- inputSourceFactories- the content being imported
- formatName- the name of the format of the data
- importNotificationMonitor- receives errors/warnings encountered during import
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.io.File file) throws JRDFoxExceptionImports the data from the given file into the current data store. The graph with the specified name is used as a default graph.- Parameters:
- defaultGraphName- the name of the default graph
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- file- the content being imported
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.lang.String content) throws JRDFoxExceptionImports the data from the given string into the current data store. The graph with the specified name is used as a default graph.- Parameters:
- defaultGraphName- the name of the default graph
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- content- the content being imported
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importDataImportResult importData(java.lang.String defaultGraphName, UpdateType updateType, Prefixes prefixes, java.io.InputStream inputStream) throws JRDFoxExceptionImports the data from the given input stream into the current data store.- Parameters:
- defaultGraphName- the name of the default graph
- updateType- specifies whether the imported data should be added or removed from the data store
- prefixes- used for expanding abbreviated IRIs in the input
- inputStream- the content being imported
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importAxiomsFromTriplesImportResult importAxiomsFromTriples(java.lang.String sourceGraphName, boolean translateAssertions, java.lang.String destinationGraphName, UpdateType updateType, ImportNotificationMonitor importNotificationMonitor) throws JRDFoxExceptionParses the given source graph into OWL axioms, and imports the axioms into the destination graph.- Parameters:
- sourceGraphName- the name of source graph
- translateAssertions- assertions are translated if this parameter is- true
- destinationGraphName- the name of destination graph
- updateType- specifies whether the imported data should be added or removed from the data store
- importNotificationMonitor- receives errors/warnings encountered during import
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
importAxiomsFromTriplesImportResult importAxiomsFromTriples(java.lang.String sourceGraphName, boolean translateAssertions, java.lang.String destinationGraphName, UpdateType updateType) throws JRDFoxExceptionParses the given source graph into OWL axioms, and imports the axioms into the destination graph.- Parameters:
- sourceGraphName- the name of source graph
- translateAssertions- assertions are translated if this parameter is- true
- destinationGraphName- the name of destination graph
- updateType- specifies whether the imported data should be added or removed from the data store
- Returns:
- provides information about the importation process
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
listRulesReturns the information about the rules currently loaded into the data store.- Returns:
- information about the rules currently loaded into the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
addRuleAdds a rule to the data store.- Parameters:
- rule- the rule to be added
- Returns:
- the number of rules that were changed
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
addRulesAdds a collection of rules to the data store.- Parameters:
- datalogProgram- the rules to be added
- Returns:
- the number of rules that were changed
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
deleteRuleDeletes a rule to the data store.- Parameters:
- rule- the rule to be deleted
- Returns:
- the number of rules that were changed
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
deleteRulesDeletes a collection of rules to the data store.- Parameters:
- datalogProgram- the rules to be deleted
- Returns:
- the number of rules that were changed
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
recompileRulesRecompiles the rules using the currently available statistics. This method should be called after bulk updates to a data store in order to ensure that the rules are evaluated using efficient query plans. TThis operation can be invoked if either no transaction is active, or a read/write transaction is active.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
requiresIncrementalReasoningReturnstrueif the next data store update must be performed using incremental reasoning (rather than standard using the standard datalog materialization "from scratch" algorithm).- Returns:
- trueif the next data store update must be performed using incremental reasoning
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
updateMaterializationUpdates the materialization so that all and only the consequences of the explicitly stated facts and the rules are derived. This operation is automatically applied internally so that all queries are always evaluated with respect to the updated materialization. However, requesting an update explicitly can be beneficial in some cases (e.g., when benchmarking reasoning algorithms). This operation can be invoked only if a read/write transaction is active.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
recomputeMaterializationRecomputes the materialization from scratch — that is, deletes all derived facts and applies all rules as if the data had just been freshly imported. This operation can be used when the data in a data source attached to a data store changes: since there is no way for an external data source to notify the data store of data changes, the only option is to recompute everything afresh. This operation can be invoked only if no transaction is active.- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
createCursorCursor createCursor(Prefixes prefixes, java.lang.String queryText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, int fetchWindowSize) throws JRDFoxExceptionCreates a cursor over the results of the given query. Since calling C++ from Java is expensive, JRDFox cursors have the option to retrieve answers in batches, and the batch size is governed by thefetchWindowSizeparameter. Please note that data store version checking is performed only on each access to the C++ cursor; thus, if the batch size is different from one, then a JRDFox cursor might detect a data store change with a delay.- Parameters:
- prefixes- used to expand IRIs in the query
- queryText- the query to be evaluated
- compilationParameters- the key-value pairs guiding query compilation
- fetchWindowSize- the number of answers that will be retrieved from C++ in each cursor operation
- Returns:
- the cursor over the query results
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
createCursorCursor createCursor(Prefixes prefixes, java.lang.String queryText, java.util.Map<java.lang.String,java.lang.String> compilationParameters) throws JRDFoxExceptionCreates a cursor over the results of the given query with the default fetch window size of 100.- Parameters:
- prefixes- used to expand IRIs in the query
- queryText- the query to be evaluated
- compilationParameters- the key-value pairs guiding query compilation
- Returns:
- the cursor over the query results
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
createCursorCursor createCursor(Query query, java.util.Map<java.lang.String,java.lang.String> compilationParameters, int fetchWindowSize) throws JRDFoxExceptionCreates a cursor over the results of the given query. Since calling C++ from Java is expensive, JRDFox cursors have the option to retrieve answers in batches, and the batch size is governed by thefetchWindowSizeparameter. Please note that data store version checking is performed only on each access to the C++ cursor; thus, if the batch size is different from one, then a JRDFox cursor might detect a data store change with a delay.- Parameters:
- query- the query to be evaluated
- compilationParameters- the key-value pairs guiding query compilation
- fetchWindowSize- the number of answers that will be retrieved from C++ in each cursor operation
- Returns:
- the cursor over the query results
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
createCursorCursor createCursor(Query query, java.util.Map<java.lang.String,java.lang.String> compilationParameters) throws JRDFoxExceptionCreates a cursor over the results of the given query with the default fetch window size of 100.- Parameters:
- query- the query to be evaluated
- compilationParameters- the key-value pairs guiding query compilation
- Returns:
- the cursor over the query results
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateQueryStatementResult evaluateQuery(Prefixes prefixes, java.lang.String queryText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, QueryAnswerMonitor queryAnswerMonitor) throws JRDFoxExceptionEvaluates a query and calls the suppliedQueryAnswerMonitorinstance for each tuple in the result.- Parameters:
- prefixes- used to expand IRIs in the query
- queryText- the query to be evaluated
- compilationParameters- the key-value pairs guiding query compilation
- queryAnswerMonitor- an interface containing a callback method that is called for each tuple in the result
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateQueryStatementResult evaluateQuery(Query query, java.util.Map<java.lang.String,java.lang.String> compilationParameters, QueryAnswerMonitor queryAnswerMonitor) throws JRDFoxExceptionEvaluates a query and calls the suppliedQueryAnswerMonitorinstance for each tuple in the result.- Parameters:
- query- the query to be evaluated
- compilationParameters- the key-value pairs guiding query compilation
- queryAnswerMonitor- an interface containing a callback method that is called for each tuple in the result
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateUpdateStatementResult evaluateUpdate(Prefixes prefixes, java.lang.String updateText, java.util.Map<java.lang.String,java.lang.String> compilationParameters) throws JRDFoxExceptionEvaluates an update. This operation can be called only if a read/write transaction is active.- Parameters:
- prefixes- used to expand IRIs in the query
- updateText- the update to be evaluated
- compilationParameters- the key-value pairs guiding statement compilation
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateUpdateStatementResult evaluateUpdate(Update update, java.util.Map<java.lang.String,java.lang.String> compilationParameters) throws JRDFoxExceptionEvaluates an update. This operation can be called only if a read/write transaction is active.- Parameters:
- update- the update to be evaluated
- compilationParameters- the key-value pairs guiding statement compilation
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateStatementStatementResult evaluateStatement(Prefixes prefixes, java.lang.String statementText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.OutputStream outputStream, java.lang.String queryAnswerFormatName) throws JRDFoxExceptionEvaluates a statement and serialises the result to the supplied output stream using the specified format.- Parameters:
- prefixes- used to expand IRIs in the statement and to abbreviate IRIs in the output
- statementText- the statement to be evaluated
- compilationParameters- the key-value pairs guiding statement compilation
- outputStream- receives the statement result
- queryAnswerFormatName- specifies the name of the answer format in case of a query
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateStatementStatementResult evaluateStatement(Prefixes prefixes, Query statement, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.OutputStream outputStream, java.lang.String queryAnswerFormatName) throws JRDFoxExceptionEvaluates a statement and serialises the result to the supplied output stream using the specified format.- Parameters:
- prefixes- used to abbreviate IRIs in the output
- statement- the statement to be evaluated
- compilationParameters- the key-value pairs guiding statement compilation
- outputStream- receives the query result
- queryAnswerFormatName- specifies the name of the answer format in case of a query
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateStatementStatementResult evaluateStatement(Prefixes prefixes, java.lang.String statementText, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.File file, java.lang.String queryAnswerFormatName) throws JRDFoxExceptionEvaluates a statement and serialises the result to the supplied file using the specified format.- Parameters:
- prefixes- used to expand IRIs in the statement and to abbreviate IRIs in the output
- statementText- the statement to be evaluated
- compilationParameters- the key-value pairs guiding statement compilation
- file- receives the query result
- queryAnswerFormatName- specifies the name of the answer format in case of a query
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
evaluateStatementStatementResult evaluateStatement(Prefixes prefixes, Query statement, java.util.Map<java.lang.String,java.lang.String> compilationParameters, java.io.File file, java.lang.String queryAnswerFormatName) throws JRDFoxExceptionEvaluates a statement and serialises the result to the supplied file using the specified format.- Parameters:
- prefixes- used to abbreviate IRIs in the output
- statement- the statement to be evaluated
- compilationParameters- the key-value pairs guiding statement compilation
- file- receives the query result
- queryAnswerFormatName- specifies the name of the answer format in case of a query
- Returns:
- provides information about the number of results produced
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getDictionaryVersionReturns the version of the data store dictionary, which is an number that is incremented every time the data store dictionary is cleared. By recording the value of this counter and checking it later again, clients can detect whether the resource IDs resolved earlier are still valid.- Returns:
- the generation counter of the data store
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getResourceValueLooks up the resource with the given ID.- Parameters:
- resourceID- the resource ID that should be looked up
- Returns:
- the resource term, or nullif the resource ID cannot be looked up
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getResourceValuesboolean getResourceValues(long[] resourceIDs, int startIndex, int endIndex, ResourceValue[] resourceValues) throws JRDFoxExceptionLooks up the resources with the given IDs. The length of theresourceValuesarray must be at leastendIndexso that each resource ID at some index inresourceIDscan be resolved to a resource at the same position inresources.- Parameters:
- resourceIDs- the resource IDs that should be looked up
- startIndex- the first index in- resourceIDsto look up
- endIndex- the index after the last in- resourceIDsto look up
- resourceValues- receives the information about the resources
- Returns:
- trueif all IDs were successfully looked up
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getResourceLooks up the resource with the given IDs.- Parameters:
- resourceID- the resource ID that should be looked up
- Returns:
- the resource, or nullif the resource ID cannot be looked up
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
getResourcesboolean getResources(long[] resourceIDs, int startIndex, int endIndex, Resource[] resources) throws JRDFoxExceptionLooks up the resources with the given IDs. The length of theresourcesarray must be at leastendIndexso that each resource ID at some index inresourceIDscan be resolved to a resource at the same position inresources.- Parameters:
- resourceIDs- the resource IDs that should be looked up
- startIndex- the first index in- resourceIDsto look up
- endIndex- the index after the last in- resourceIDsto look up
- resources- receives the resources
- Returns:
- trueif all IDs were successfully looked up
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
beginDeprecated.Starts a new transaction on this connection.- Parameters:
- transactionType- determines the type of the transaction (i.e., whether a read-only or a read/write transaction is requested)
- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
commitDeprecated.Commits the transaction associated with this connection. If an exception is thrown during a commit operation,transactionRequiresRollback()will returntrue, and the transaction should be explicitly rolled back usingrollbackTransaction().- Throws:
- JRDFoxException- thrown if an error is encountered
 
- 
rollbackDeprecated.Rolls back the transaction associated with this connection.- Throws:
- JRDFoxException- thrown if an error is encountered
 
 
-