Class Rdf4jStatement

java.lang.Object
cz.cvut.kbss.ontodriver.rdf4j.query.Rdf4jStatement
All Implemented Interfaces:
Statement, AutoCloseable
Direct Known Subclasses:
Rdf4jPreparedStatement

public class Rdf4jStatement extends Object implements Statement
  • Constructor Details

  • Method Details

    • executeQuery

      public ResultSet executeQuery(String sparql) throws OntoDriverException
      Description copied from interface: Statement
      Execute the specified SPARQL query.
      Specified by:
      executeQuery in interface Statement
      Parameters:
      sparql - The statement to execute
      Returns:
      ResultSet containing results of the query
      Throws:
      OntoDriverException - If an error occurs during query execution
    • executeUpdate

      public void executeUpdate(String sparql) throws OntoDriverException
      Description copied from interface: Statement
      Execute the specified SPARQL update query.
      Specified by:
      executeUpdate in interface Statement
      Parameters:
      sparql - The statement to execute
      Throws:
      OntoDriverException - If an error occurs during query execution
    • useOntology

      public void useOntology(Statement.StatementOntology ontology)
      Description copied from interface: Statement
      Sets which ontology is used to evaluate this statement.

      Statement.StatementOntology.TRANSACTIONAL ontology is the transactional version. It may contain uncommitted changes and thus the query results may differ from evaluation against Statement.StatementOntology.SHARED.

      Note that implementations may ignore this setting depending on their internal transaction management mechanisms.

      Specified by:
      useOntology in interface Statement
      Parameters:
      ontology - Which ontology to use
    • getStatementOntology

      public Statement.StatementOntology getStatementOntology()
      Description copied from interface: Statement
      Gets information about which ontology will be used to evaluate the statement.
      Specified by:
      getStatementOntology in interface Statement
      Returns:
      Which ontology will be used for evaluation
      See Also:
    • isOpen

      public boolean isOpen()
      Description copied from interface: Statement
      Whether this statement is still open.

      A Statement is closed if the method Statement.close() has been called on it.

      Specified by:
      isOpen in interface Statement
      Returns:
      Open status
    • close

      public void close() throws OntoDriverException
      Description copied from interface: Statement
      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 Statement object is closed, its current ResultSet object, if one exists, is also closed.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Statement
      Throws:
      OntoDriverException - If closing the statement fails
    • disableInference

      public void disableInference()
      Description copied from interface: Statement
      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.

      Specified by:
      disableInference in interface Statement
    • isInferenceDisabled

      public boolean isInferenceDisabled()
      Description copied from interface: Statement
      Checks whether inference is disabled for execution of this statement.
      Specified by:
      isInferenceDisabled in interface Statement
      Returns:
      Inference disabled status
      See Also: