Interface Statement
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
PreparedStatement
- All Known Implementing Classes:
JenaPreparedStatement,JenaStatement,OwlapiPreparedStatement,OwlapiStatement,Rdf4jPreparedStatement,Rdf4jStatement
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies which ontology is used for statement evaluation. -
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.
-
Method Details
-
executeQuery
Execute the specified SPARQL query.- Parameters:
sparql- The statement to execute- Returns:
ResultSetcontaining results of the query- Throws:
OntoDriverException- If an error occurs during query execution
-
executeUpdate
Execute the specified SPARQL update query.- Parameters:
sparql- The statement to execute- Throws:
OntoDriverException- If an error occurs during query execution
-
useOntology
Sets 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.
- Parameters:
ontology- Which ontology to use
-
getStatementOntology
Statement.StatementOntology getStatementOntology()Gets information about which ontology will be used to evaluate the statement.- Returns:
- Which ontology will be used for evaluation
- See Also:
-
isOpen
boolean isOpen()Whether this statement is still open.A
Statementis closed if the methodclose()has been called on it.- Returns:
- Open status
-
close
Closes 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- Throws:
OntoDriverException- If closing the statement fails
-
disableInference
void disableInference()Disables 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.
-
isInferenceDisabled
boolean isInferenceDisabled()Checks whether inference is disabled for execution of this statement.- Returns:
- Inference disabled status
- See Also:
-