Class OwlapiStatement
- All Implemented Interfaces:
Statement,AutoCloseable
- Direct Known Subclasses:
OwlapiPreparedStatement
-
Nested Class Summary
Nested classes/interfaces inherited from interface cz.cvut.kbss.ontodriver.Statement
Statement.StatementOntology -
Constructor Summary
ConstructorsConstructorDescriptionOwlapiStatement(StatementExecutorFactory executorFactory, OwlapiConnection connection) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this statement, releasing any resources it has hold.voidDisables inference for execution of this statement.executeQuery(String sparql) Execute the specified SPARQL query.voidexecuteUpdate(String sparql) Execute the specified SPARQL update query.Gets information about which ontology will be used to evaluate the statement.booleanChecks whether inference is disabled for execution of this statement.booleanisOpen()Whether this statement is still open.voiduseOntology(Statement.StatementOntology ontology) Sets which ontology is used to evaluate this statement.
-
Constructor Details
-
OwlapiStatement
-
-
Method Details
-
executeQuery
Description copied from interface:StatementExecute the specified SPARQL query.- Specified by:
executeQueryin interfaceStatement- Parameters:
sparql- The statement to execute- Returns:
ResultSetcontaining results of the query- Throws:
OntoDriverException- If an error occurs during query execution
-
executeUpdate
Description copied from interface:StatementExecute the specified SPARQL update query.- Specified by:
executeUpdatein interfaceStatement- Parameters:
sparql- The statement to execute- Throws:
OntoDriverException- If an error occurs during query execution
-
useOntology
Description copied from interface:StatementSets which ontology is used to evaluate this statement.Statement.StatementOntology.TRANSACTIONALontology is the transactional version. It may contain uncommitted changes and thus the query results may differ from evaluation againstStatement.StatementOntology.SHARED.Note that implementations may ignore this setting depending on their internal transaction management mechanisms.
- Specified by:
useOntologyin interfaceStatement- Parameters:
ontology- Which ontology to use
-
getStatementOntology
Description copied from interface:StatementGets information about which ontology will be used to evaluate the statement.- Specified by:
getStatementOntologyin interfaceStatement- Returns:
- Which ontology will be used for evaluation
- See Also:
-
isOpen
public boolean isOpen()Description copied from interface:StatementWhether this statement is still open.A
Statementis closed if the methodStatement.close()has been called on it. -
close
Description copied from interface:StatementCloses this statement, releasing any resources it has hold.Calling the method close on a Statement object that is already closed has no effect.
Note: When a
Statementobject is closed, its currentResultSetobject, if one exists, is also closed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
OntoDriverException- If closing the statement fails
-
disableInference
public void disableInference()Description copied from interface:StatementDisables inference for execution of this statement.Note that by default, inference is enabled for execution of all statements (depending on whether the underlying storage supports inference at all). Also note that in case the underlying repository does not support disabling inference, this configuration may be silently ignored.
- Specified by:
disableInferencein interfaceStatement
-
isInferenceDisabled
public boolean isInferenceDisabled()Description copied from interface:StatementChecks whether inference is disabled for execution of this statement.- Specified by:
isInferenceDisabledin interfaceStatement- Returns:
- Inference disabled status
- See Also:
-