Skip to content

AppBase configuration of query transformers

Chris Dollin edited this page Dec 15, 2015 · 6 revisions

Query transforms

To deal with allowing different implementations of GeoQuery (and Text) searches, lib's QueryShape can be configured to run query transforms to generate the appropriate graph patterns from the abstract spec.

To configure these transforms from an app.conf takes three pieces of configuration;

(a) the transform declarations eg:

spatial = com.epimorphics.sparql.geo.GeoTransformByJenaSpatial

(b) the transform registry:

apptransforms = com.epimorphics.simpleAPI.queryTransforms.AppTransforms

(c) and registering the transform:

apptransforms.include = $spatial

usesGeoQuery is not referred to elsewhere; this just forces LoadGeoQuery to load, which further loads GeoQuery. (GeoQuery does not have or need a no-argument constructor and so is not a suitable Component.)

This sets the default GeoQuery transform for all components of this app. To change the transform for a particular app, add a transform property to the endpoint spec with the transform name as its value.

Clone this wiki locally