Interface ResultsPostProcessor


public interface ResultsPostProcessor
Interface for results post processors, post processors have the ability to modify the raw SPARQL results or the JDBC results metadata before it is provided for consumption to the caller of the JDBC APIs
  • Method Details

    • initialize

      void initialize(Properties props) throws SQLException
      Initializes the post-processor

      Called when the post-processor is first created, properties object provides access to all connection configuration parameters except password

      Parameters:
      props - Connection properties
      Throws:
      SQLException - Thrown if there is a problem initializing the post-processor
    • postProcessResults

      ResultSet postProcessResults(ResultSet results) throws SQLException
      Post-process incoming SELECT results

      This is invoked after Jena JDBC has executed the SELECT query but before it gets wrapped in a JDBC result set. This allows an application to do manipulations on the results before they get presented through the JDBC API.

      Parameters:
      results - Incoming results
      Returns:
      Processed results
      Throws:
      SQLException - Thrown if there is a problem applying the post-processor
    • postProcessResults

      Iterator<Triple> postProcessResults(Iterator<Triple> triples) throws SQLException
      Post-process incoming CONSTRUCT/DESCRIBE results

      This is invoked after Jena JDBC has executed a CONSTRUCT/DESCRIBE query but before it gets wrapped in a JDBC result set. This allows an application to do manipulations on the results before they get presented through the JDBC API.

      Parameters:
      triples - Incoming results
      Returns:
      Processed results
      Throws:
      SQLException - Thrown if there is a problem applying the post-processor
    • postProcessResults

      boolean postProcessResults(boolean result) throws SQLException
      Post-process incoming ASK results

      This is invoked after Jena JDBC has executed an ASK query but before it gets wrapped in a JDBC result set. This allows an application to do manipulations on the results before they get presented through the JDBC API.

      Parameters:
      result - Incoming results
      Returns:
      Processed results
      Throws:
      SQLException - Thrown if there is a problem applying the post-processor
    • postProcessResultsMetadata

      SelectResultsMetadata postProcessResultsMetadata(SelectResultsMetadata metadata) throws SQLException
      Post-process SELECT results metadata

      This is invoked after Jena JDBC has wrapped SELECT query results in a JDBC result set and calculated metadata for the results but before that metadata is presented through the JDBC API. This allows an application to make adjustments to the metadata such as changing detected column types in order to be work better with certain tools or to override the default type mappings that Jena JDBC makes.

      Parameters:
      metadata - Calculated metadata
      Returns:
      Processed metadata
      Throws:
      SQLException - Thrown if there is a problem applying the post-processor
    • postProcessResultsMetadata

      TripleResultsMetadata postProcessResultsMetadata(TripleResultsMetadata metadata) throws SQLException
      Post-process CONSTRUCT/DESCRIBE results metadata

      This is invoked after Jena JDBC has wrapped CONSTRUCT/DESCRIBE query results in a JDBC result set and calculated metadata for the results but before that metadata is presented through the JDBC API. This allows an application to make adjustments to the metadata such as changing detected column types in order to be work better with certain tools or to override the default type mappings that Jena JDBC makes.

      Parameters:
      metadata - Calculated metadata
      Returns:
      Processed metadata
      Throws:
      SQLException - Thrown if there is a problem applying the post-processor
    • postProcessResultsMetadata

      AskResultsMetadata postProcessResultsMetadata(AskResultsMetadata metadata) throws SQLException
      Post-process ASK results metadata

      This is invoked after Jena JDBC has wrapped ASK query results in a JDBC result set and calculated metadata for the results but before that metadata is presented through the JDBC API. This allows an application to make adjustments to the metadata such as changing detected column types in order to be work better with certain tools or to override the default type mappings that Jena JDBC makes.

      Parameters:
      metadata - Calculated metadata
      Returns:
      Processed metadata
      Throws:
      SQLException - Thrown if there is a problem applying the post-processor