Module org.apache.jena.geosparql
Class SpatialIndexV1
java.lang.Object
org.apache.jena.geosparql.spatial.index.v1.SpatialIndexV1
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.
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
ConstructorsConstructorDescriptionSpatialIndexV1
(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 TypeMethodDescriptionvoid
build()
Deprecated, for removal: This API element is subject to removal in a future version.Build the Spatial Index.static SpatialIndexV1
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.static SpatialIndexV1
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.static SpatialIndexV1
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.static SpatialIndexV1
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.static Collection<SpatialIndexItem>
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.static final Collection<SpatialIndexItem>
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
insertItems
(Collection<SpatialIndexItem> indexItems) Deprecated, for removal: This API element is subject to removal in a future version.Items to add to an unbuilt Spatial Index.boolean
isBuilt()
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
isEmpty()
Deprecated, for removal: This API element is subject to removal in a future version.static final SpatialIndexV1
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.toString()
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
Deprecated, for removal: This API element is subject to removal in a future version.Wrap Model in a Dataset and build SpatialIndex.
-
Constructor Details
-
SpatialIndexV1
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
Deprecated, for removal: This API element is subject to removal in a future version. -
setLocation
Deprecated, for removal: This API element is subject to removal in a future version. -
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
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
Deprecated, for removal: This API element is subject to removal in a future version. -
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
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
-