java.lang.Object
org.apache.jena.geosparql.configuration.GeoSPARQLConfig

public class GeoSPARQLConfig extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static boolean
    Option to dynamically transform GeometryLiteral SRS in calculations.
    static int
    Precision of calculations.
    static int
    Precision of created coordinates.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final void
    allowGeometrySRSTransformation(boolean allowTransformation)
    Sets whether transformation for mismatching Geometry SRS is allowed.
    static final Boolean
     
    static Boolean
     
    static final void
     
    static final void
    Empty all indexes and registries currently in use.
    static final void
    setCalculationPrecision(int decimalPlaces)
    Set the number of decimal places precision used in calculations and coordinate transformations.
    static final void
    Set the scale factor of the precision model used to create coordinate sequences used in Geometries.
    static final void
    Initialise all GeoSPARQL property and filter functions.
    static final void
    setup(IndexConfiguration.IndexOption indexOption, Boolean isQueryRewriteEnabled)
    Initialise all GeoSPARQL property and filter functions.
    static final void
    Initialise all GeoSPARQL property and filter functions with memory indexing.
    static final void
    setupMemoryIndex(Boolean isQueryRewriteEnabled)
    Initialise all GeoSPARQL property and filter functions with memory indexing.
    static final void
    setupMemoryIndex(Integer geometryLiteralIndex, Integer geometryTransformIndex, Integer queryRewriteIndex, Long geometryLiteralIndexExpiry, Long geometryTransformIndexExpiry, Long queryRewriteIndexExpiry, Boolean isQueryRewriteEnabled)
    Initialise all GeoSPARQL property and filter functions with memory indexing.
    static final void
    Initialise all GeoSPARQL property and filter functions with no indexing.
    static final void
    setupNoIndex(Boolean isQueryRewriteEnabled)
    Initialise all GeoSPARQL property and filter functions with no indexing.
    static final void
    setupPrecomputedSpatialIndex(org.apache.jena.query.Dataset dataset, Path spatialIndexFile)
    Setup the precomputed Spatial Index using Dataset Dataset.
    We assume that the spatial index was computed before and written to the given file.
    static final void
    setupQueryRewriteIndex(org.apache.jena.query.Dataset dataset, String queryRewriteLabel, int maxSize, long expiryInterval)
    Setup Query Rewrite Index using Dataset.
    The index will be set active.
    static final void
    setupSpatialIndex(org.apache.jena.query.Dataset dataset)
    Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
    static final void
    setupSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, Path spatialIndexFile)
    Setup Spatial Index using Dataset using provided SRS URI.
    Spatial Index written to file once created.
    static final void
    setupSpatialIndex(org.apache.jena.query.Dataset dataset, Path spatialIndexFile)
    Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
    Spatial Index written to file once created.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DECIMAL_PLACES_PRECISION

      public static int DECIMAL_PLACES_PRECISION
      Precision of calculations. Inaccuracies exist in these calculations and a higher value may not improve results.
    • PRECISION_MODEL_SCALE_FACTOR

      public static int PRECISION_MODEL_SCALE_FACTOR
      Precision of created coordinates. Determines the coordinates of certain JTS geometry calculations, e.g. buffer.
    • ALLOW_GEOMETRY_SRS_TRANSFORMATION

      public static boolean ALLOW_GEOMETRY_SRS_TRANSFORMATION
      Option to dynamically transform GeometryLiteral SRS in calculations.
  • Constructor Details

    • GeoSPARQLConfig

      public GeoSPARQLConfig()
  • Method Details

    • setupMemoryIndex

      public static final void setupMemoryIndex()
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      Use this for in-memory indexing GeoSPARQL setup. Query re-write enabled.
      This does not affect the use of Spatial Indexes for Datasets.
    • setupMemoryIndex

      public static final void setupMemoryIndex(Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      Use this for in-memory indexing GeoSPARQL setup. Query re-write optional.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      isQueryRewriteEnabled -
    • setupMemoryIndex

      public static final void setupMemoryIndex(Integer geometryLiteralIndex, Integer geometryTransformIndex, Integer queryRewriteIndex, Long geometryLiteralIndexExpiry, Long geometryTransformIndexExpiry, Long queryRewriteIndexExpiry, Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      Use this for in-memory indexing GeoSPARQL setup and to control the index sizes (default: unlimited) and expiry rate (default: 5,000 milliseconds).
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      geometryLiteralIndex -
      geometryTransformIndex -
      queryRewriteIndex -
      geometryLiteralIndexExpiry -
      geometryTransformIndexExpiry -
      queryRewriteIndexExpiry -
      isQueryRewriteEnabled -
    • setupNoIndex

      public static final void setupNoIndex()
      Initialise all GeoSPARQL property and filter functions with no indexing.
      Use this for no indexing GeoSPARQL setup.
      This does not affect the use of Spatial Indexes for Datasets.
    • setupNoIndex

      public static final void setupNoIndex(Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with no indexing.
      Use this for no indexing GeoSPARQL setup.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      isQueryRewriteEnabled -
    • setup

      public static final void setup(IndexConfiguration.IndexOption indexOption)
      Initialise all GeoSPARQL property and filter functions. Query rewrite enabled.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      indexOption -
    • setup

      public static final void setup(IndexConfiguration.IndexOption indexOption, Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      indexOption -
      isQueryRewriteEnabled -
    • loadFunctions

      public static final void loadFunctions()
    • isFunctionRegistered

      public static final Boolean isFunctionRegistered()
      Returns:
      True, if the GeoSPARQL functions have been registered.
    • reset

      public static final void reset()
      Empty all indexes and registries currently in use.
      This does not affect Spatial Indexes for Datasets.
    • isQueryRewriteEnabled

      public static Boolean isQueryRewriteEnabled()
      Returns:
      True if query rewrite enabled.
    • setupQueryRewriteIndex

      public static final void setupQueryRewriteIndex(org.apache.jena.query.Dataset dataset, String queryRewriteLabel, int maxSize, long expiryInterval)
      Setup Query Rewrite Index using Dataset.
      The index will be set active.
      Parameters:
      dataset -
      queryRewriteLabel -
      maxSize -
      expiryInterval -
    • setupSpatialIndex

      public static final void setupSpatialIndex(org.apache.jena.query.Dataset dataset) throws SpatialIndexException
      Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
      Parameters:
      dataset -
      Throws:
      SpatialIndexException
    • setupPrecomputedSpatialIndex

      public static final void setupPrecomputedSpatialIndex(org.apache.jena.query.Dataset dataset, Path spatialIndexFile) throws SpatialIndexException
      Setup the precomputed Spatial Index using Dataset Dataset.
      We assume that the spatial index was computed before and written to the given file.
      Parameters:
      dataset - the dataset
      spatialIndexFile - the file containing the serialized spatial index
      Throws:
      SpatialIndexException
    • setupSpatialIndex

      public static final void setupSpatialIndex(org.apache.jena.query.Dataset dataset, Path spatialIndexFile) throws SpatialIndexException
      Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
      Spatial Index written to file once created.
      Parameters:
      dataset -
      spatialIndexFile -
      Throws:
      SpatialIndexException
    • setupSpatialIndex

      public static final void setupSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, Path spatialIndexFile) throws SpatialIndexException
      Setup Spatial Index using Dataset using provided SRS URI.
      Spatial Index written to file once created.
      Parameters:
      dataset -
      srsURI -
      spatialIndexFile -
      Throws:
      SpatialIndexException
    • setCalculationPrecision

      public static final void setCalculationPrecision(int decimalPlaces)
      Set the number of decimal places precision used in calculations and coordinate transformations. Inaccuracies exist in these calculations and a higher value may not improve results.
      Parameters:
      decimalPlaces -
    • setPrecisionModelScaleFactor

      public static final void setPrecisionModelScaleFactor(int scaleFactor)
      Set the scale factor of the precision model used to create coordinate sequences used in Geometries. Default: 1000000 for 6 d.p. precision.
      Parameters:
      scaleFactor -
    • allowGeometrySRSTransformation

      public static final void allowGeometrySRSTransformation(boolean allowTransformation)
      Sets whether transformation for mismatching Geometry SRS is allowed.
      Parameters:
      allowTransformation -