java.lang.Object
org.apache.jena.geosparql.spatial.index.v1.SpatialIndexV1

@Deprecated(forRemoval=true) public class SpatialIndexV1 extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
SpatialIndex for testing bounding box collisions between geometries within a Dataset.
Queries must be performed using the same SRS URI as the SpatialIndex.
The SpatialIndex is added to the Dataset Context when it is built.
QueryRewriteIndex is also stored in the SpatialIndex as its content is Dataset specific.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpatialIndexV1(int capacity, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Unbuilt Spatial Index with provided capacity.
    SpatialIndexV1(Collection<SpatialIndexItem> spatialIndexItems, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Built Spatial Index with provided capacity.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build the Spatial Index.
    buildSpatialIndex(org.apache.jena.query.Dataset dataset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build Spatial Index from all graphs in Dataset.
    Dataset contains SpatialIndex in Context.
    SRS URI based on most frequent found in Dataset.
    buildSpatialIndex(org.apache.jena.query.Dataset dataset, File spatialIndexFile)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build Spatial Index from all graphs in Dataset.
    Dataset contains SpatialIndex in Context.
    SRS URI based on most frequent found in Dataset.
    Spatial Index written to file.
    buildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build Spatial Index from all graphs in Dataset.
    Dataset contains SpatialIndex in Context.
    buildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, File spatialIndexFile)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build Spatial Index from all graphs in Dataset.
    Dataset contains SpatialIndex in Context.
    Spatial Index written to file.
    findSpatialIndexItems(org.apache.jena.query.Dataset dataset, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Find Spatial Index Items from all graphs in Dataset.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    getSpatialIndexItems(org.apache.jena.rdf.model.Model model, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Find items from the Model transformed to the SRS URI.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final void
    insertItem(org.locationtech.jts.geom.Envelope envelope, org.apache.jena.rdf.model.Resource item)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Item to add to an unbuilt Spatial Index.
    final void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Items to add to an unbuilt Spatial Index.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final boolean
    isDefined(org.apache.jena.sparql.engine.ExecutionContext execCxt)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final SpatialIndexV1
    load(File spatialIndexFile)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Load a SpatialIndex from file.
    Index will be built and empty if file does not exist or is null.
    HashSet<org.apache.jena.rdf.model.Resource>
    query(org.locationtech.jts.geom.Envelope searchEnvelope)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final SpatialIndexV1
    retrieve(org.apache.jena.sparql.engine.ExecutionContext execCxt)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retrieve the SpatialIndex from the Context.
    static final void
    save(File spatialIndexFile, Collection<SpatialIndexItem> spatialIndexItems, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Save SpatialIndex contents to file.
    static final void
    save(String spatialIndexFileURI, Collection<SpatialIndexItem> spatialIndexItems, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Save SpatialIndex contents to file.
    void
    setLocation(File location)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final void
    setSpatialIndex(org.apache.jena.query.Dataset dataset, SpatialIndexV1 spatialIndex)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the SpatialIndex into the Context of the Dataset for later retrieval and use in spatial functions.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final org.apache.jena.query.Dataset
    wrapModel(org.apache.jena.rdf.model.Model model)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Wrap Model in a Dataset and build SpatialIndex.
    static final org.apache.jena.query.Dataset
    wrapModel(org.apache.jena.rdf.model.Model model, String srsURI)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Wrap Model in a Dataset and build SpatialIndex.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SpatialIndexV1

      public SpatialIndexV1(int capacity, String srsURI)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Unbuilt Spatial Index with provided capacity.
      Parameters:
      capacity -
      srsURI -
    • SpatialIndexV1

      public SpatialIndexV1(Collection<SpatialIndexItem> spatialIndexItems, String srsURI) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Built Spatial Index with provided capacity.
      Parameters:
      spatialIndexItems -
      srsURI -
      Throws:
      SpatialIndexException
  • Method Details

    • getLocation

      public File getLocation()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setLocation

      public void setLocation(File location)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getSrsInfo

      public SRSInfo getSrsInfo()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      Information about the SRS used by the SpatialIndex.
    • isEmpty

      public boolean isEmpty()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      True if the SpatialIndex is empty.
    • isBuilt

      public boolean isBuilt()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      True if the SpatialIndex has been built.
    • build

      public void build()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build the Spatial Index. No more items can be added.
    • insertItems

      public final void insertItems(Collection<SpatialIndexItem> indexItems) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Items to add to an unbuilt Spatial Index.
      Parameters:
      indexItems -
      Throws:
      SpatialIndexException
    • insertItem

      public final void insertItem(org.locationtech.jts.geom.Envelope envelope, org.apache.jena.rdf.model.Resource item) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Item to add to an unbuilt Spatial Index.
      Parameters:
      envelope -
      item -
      Throws:
      SpatialIndexException
    • query

      public HashSet<org.apache.jena.rdf.model.Resource> query(org.locationtech.jts.geom.Envelope searchEnvelope)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • retrieve

      public static final SpatialIndexV1 retrieve(org.apache.jena.sparql.engine.ExecutionContext execCxt) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieve the SpatialIndex from the Context.
      Parameters:
      execCxt -
      Returns:
      SpatialIndex contained in the Context.
      Throws:
      SpatialIndexException
    • isDefined

      public static final boolean isDefined(org.apache.jena.sparql.engine.ExecutionContext execCxt)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      execCxt -
      Returns:
      True if a SpatialIndex is defined in the ExecutionContext.
    • setSpatialIndex

      public static final void setSpatialIndex(org.apache.jena.query.Dataset dataset, SpatialIndexV1 spatialIndex)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the SpatialIndex into the Context of the Dataset for later retrieval and use in spatial functions.
      Parameters:
      dataset -
      spatialIndex -
    • buildSpatialIndex

      public static SpatialIndexV1 buildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, File spatialIndexFile) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build Spatial Index from all graphs in Dataset.
      Dataset contains SpatialIndex in Context.
      Spatial Index written to file.
      Parameters:
      dataset -
      srsURI -
      spatialIndexFile -
      Returns:
      SpatialIndex constructed.
      Throws:
      SpatialIndexException
    • buildSpatialIndex

      public static SpatialIndexV1 buildSpatialIndex(org.apache.jena.query.Dataset dataset, File spatialIndexFile) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build Spatial Index from all graphs in Dataset.
      Dataset contains SpatialIndex in Context.
      SRS URI based on most frequent found in Dataset.
      Spatial Index written to file.
      Parameters:
      dataset -
      spatialIndexFile -
      Returns:
      SpatialIndex constructed.
      Throws:
      SpatialIndexException
    • buildSpatialIndex

      public static SpatialIndexV1 buildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build Spatial Index from all graphs in Dataset.
      Dataset contains SpatialIndex in Context.
      Parameters:
      dataset -
      srsURI -
      Returns:
      SpatialIndex constructed.
      Throws:
      SpatialIndexException
    • findSpatialIndexItems

      public static Collection<SpatialIndexItem> findSpatialIndexItems(org.apache.jena.query.Dataset dataset, String srsURI) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Find Spatial Index Items from all graphs in Dataset.
      Parameters:
      dataset -
      srsURI -
      Returns:
      SpatialIndexItems found.
      Throws:
      SpatialIndexException
    • buildSpatialIndex

      public static SpatialIndexV1 buildSpatialIndex(org.apache.jena.query.Dataset dataset) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build Spatial Index from all graphs in Dataset.
      Dataset contains SpatialIndex in Context.
      SRS URI based on most frequent found in Dataset.
      Parameters:
      dataset -
      Returns:
      SpatialIndex constructed.
      Throws:
      SpatialIndexException
    • wrapModel

      public static final org.apache.jena.query.Dataset wrapModel(org.apache.jena.rdf.model.Model model, String srsURI) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Wrap Model in a Dataset and build SpatialIndex.
      Parameters:
      model -
      srsURI -
      Returns:
      Dataset with default Model and SpatialIndex in Context.
      Throws:
      SpatialIndexException
    • wrapModel

      public static final org.apache.jena.query.Dataset wrapModel(org.apache.jena.rdf.model.Model model) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Wrap Model in a Dataset and build SpatialIndex.
      Parameters:
      model -
      Returns:
      Dataset with default Model and SpatialIndex in Context.
      Throws:
      SpatialIndexException
    • getSpatialIndexItems

      public static final Collection<SpatialIndexItem> getSpatialIndexItems(org.apache.jena.rdf.model.Model model, String srsURI) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Find items from the Model transformed to the SRS URI.
      Parameters:
      model -
      srsURI -
      Returns:
      Items found in the Model in the SRS URI.
      Throws:
      SpatialIndexException
    • load

      public static final SpatialIndexV1 load(File spatialIndexFile) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Load a SpatialIndex from file.
      Index will be built and empty if file does not exist or is null.
      Parameters:
      spatialIndexFile -
      Returns:
      Built Spatial Index.
      Throws:
      SpatialIndexException
    • save

      public static final void save(String spatialIndexFileURI, Collection<SpatialIndexItem> spatialIndexItems, String srsURI) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Save SpatialIndex contents to file.
      Parameters:
      spatialIndexFileURI -
      spatialIndexItems -
      srsURI -
      Throws:
      SpatialIndexException
    • save

      public static final void save(File spatialIndexFile, Collection<SpatialIndexItem> spatialIndexItems, String srsURI) throws SpatialIndexException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Save SpatialIndex contents to file.
      Parameters:
      spatialIndexFile -
      spatialIndexItems -
      srsURI -
      Throws:
      SpatialIndexException