Interface CommandPreProcessor
Pre-processors provide an extension point within Jena JDBC which allows for arbitrary manipulation of the incoming command text and the parsed SPARQL queries and updates to be carried out. The intention of this is to provide a mechanism by which users can modify the behavior of the module to deal with any peculiarities in behavior that particular JDBC based tools may exhibit when attempting to use them with Jena JDBC drivers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(Properties props) Initializes the pre-processorpreProcessCommandText
(String text) Pre-process incoming command textPre-process a queryPre-process an update
-
Method Details
-
initialize
Initializes the pre-processorCalled when the pre-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 pre-processor
-
preProcessCommandText
Pre-process incoming command textThis is invoked before Jena JDBC has attempted to determine whether the text is a query/update. This allows an application to do textual clean up/alteration of the incoming command if it so desires.
- Parameters:
text
- Command Text- Returns:
- Command Text which may have been altered
- Throws:
SQLException
- Thrown if pre-processing encounters an issue
-
preProcessQuery
Pre-process a queryThis is invoked during query execution prior to Jena JDBC making any of its own manipulations on the query e.g. using
Statement.setMaxRows(int)
to add aLIMIT
clause.- Parameters:
q
- Query- Returns:
- Query which may have been altered
- Throws:
SQLException
- Thrown if pre-processing encounters an issue
-
preProcessUpdate
Pre-process an updateThis is invoked during update execution prior to Jena JDBC making any of its own manipulations on the update.
- Parameters:
u
- Update- Returns:
- Update which may have been altered
- Throws:
SQLException
- Thrown if pre-processing encounters an issue
-