Class GeoSPARQLConfig


  • public class GeoSPARQLConfig
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      GeoSPARQLConfig()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Boolean isFunctionRegistered()  
      static java.lang.Boolean isQueryRewriteEnabled()  
      static void reset()
      Empty all indexes and registries currently in use.
      static void setCalculationPrecision​(int decimalPlaces)
      Set the number of decimal places precision used in calculations and coordinate transformations.
      static void setPrecisionModelScaleFactor​(int scaleFactor)
      Set the scale factor of the precision model used to create coordinate sequences used in Geometries.
      static void setup​(IndexConfiguration.IndexOption indexOption)
      Initialise all GeoSPARQL property and filter functions.
      static void setup​(IndexConfiguration.IndexOption indexOption, java.lang.Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions.
      static void setupMemoryIndex()
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      static void setupMemoryIndex​(java.lang.Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      static void setupMemoryIndex​(java.lang.Integer geometryLiteralIndex, java.lang.Integer geometryTransformIndex, java.lang.Integer queryRewriteIndex, java.lang.Long geometryLiteralIndexExpiry, java.lang.Long geometryTransformIndexExpiry, java.lang.Long queryRewriteIndexExpiry, java.lang.Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      static void setupMemoryIndexExpiry​(java.lang.Long geometryLiteralIndex, java.lang.Long geometryTransformIndex, java.lang.Long queryRewriteIndex)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      static void setupMemoryIndexSize​(java.lang.Integer geometryLiteralIndex, java.lang.Integer geometryTransformIndex, java.lang.Integer queryRewriteIndex)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      static void setupNoIndex()
      Initialise all GeoSPARQL property and filter functions with no indexing.
      static void setupNoIndex​(java.lang.Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with no indexing.
      static void setupQueryRewriteIndex​(Dataset dataset, java.lang.String queryRewriteLabel, int maxSize, long expiryInterval)
      Setup Query Rewrite Index using Dataset.
      The index will be set active.
      static void setupSpatialIndex​(Dataset dataset)
      Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
      static void setupSpatialIndex​(Dataset dataset, java.io.File spatialIndexFile)
      Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
      Spatial Index written to file once created.
      static void setupSpatialIndex​(Dataset dataset, java.lang.String srsURI, java.io.File spatialIndexFile)
      Setup Spatial Index using Dataset using provided SRS URI.
      Spatial Index written to file once created.
      • Methods inherited from class java.lang.Object

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

      • 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.
    • Constructor Detail

      • GeoSPARQLConfig

        public GeoSPARQLConfig()
    • Method Detail

      • 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​(java.lang.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 -
      • setupMemoryIndexSize

        public static final void setupMemoryIndexSize​(java.lang.Integer geometryLiteralIndex,
                                                      java.lang.Integer geometryTransformIndex,
                                                      java.lang.Integer queryRewriteIndex)
        Initialise all GeoSPARQL property and filter functions with memory indexing.
        Use this for in-memory indexing GeoSPARQL setup and to control the index sizes. Expiry is defaulted to 5,000 milliseconds.
        This does not affect the use of Spatial Indexes for Datasets.
        Parameters:
        geometryLiteralIndex -
        geometryTransformIndex -
        queryRewriteIndex -
      • setupMemoryIndexExpiry

        public static final void setupMemoryIndexExpiry​(java.lang.Long geometryLiteralIndex,
                                                        java.lang.Long geometryTransformIndex,
                                                        java.lang.Long queryRewriteIndex)
        Initialise all GeoSPARQL property and filter functions with memory indexing.
        Use this for in-memory indexing GeoSPARQL setup and to control the index expiry rate (milliseconds). Size is defaulted to unlimited.
        This does not affect the use of Spatial Indexes for Datasets.
        Parameters:
        geometryLiteralIndex -
        geometryTransformIndex -
        queryRewriteIndex -
      • setupMemoryIndex

        public static final void setupMemoryIndex​(java.lang.Integer geometryLiteralIndex,
                                                  java.lang.Integer geometryTransformIndex,
                                                  java.lang.Integer queryRewriteIndex,
                                                  java.lang.Long geometryLiteralIndexExpiry,
                                                  java.lang.Long geometryTransformIndexExpiry,
                                                  java.lang.Long queryRewriteIndexExpiry,
                                                  java.lang.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​(java.lang.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,
                                       java.lang.Boolean isQueryRewriteEnabled)
        Initialise all GeoSPARQL property and filter functions.
        This does not affect the use of Spatial Indexes for Datasets.
        Parameters:
        indexOption -
        isQueryRewriteEnabled -
      • isFunctionRegistered

        public static final java.lang.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 java.lang.Boolean isQueryRewriteEnabled()
        Returns:
        True if query rewrite enabled.
      • setupQueryRewriteIndex

        public static final void setupQueryRewriteIndex​(Dataset dataset,
                                                        java.lang.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​(Dataset dataset,
                                                   java.io.File 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​(Dataset dataset,
                                                   java.lang.String srsURI,
                                                   java.io.File 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 -