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 SummaryConstructorsConstructorDescriptionSpatialIndexV1(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 SummaryModifier and TypeMethodDescriptionvoidbuild()Deprecated, for removal: This API element is subject to removal in a future version.Build the Spatial Index.static SpatialIndexV1buildSpatialIndex(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 SpatialIndexV1buildSpatialIndex(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 SpatialIndexV1buildSpatialIndex(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 SpatialIndexV1buildSpatialIndex(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 voidinsertItem(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 voidinsertItems(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.booleanisBuilt()Deprecated, for removal: This API element is subject to removal in a future version.static final booleanisDefined(org.apache.jena.sparql.engine.ExecutionContext execCxt) Deprecated, for removal: This API element is subject to removal in a future version.booleanisEmpty()Deprecated, for removal: This API element is subject to removal in a future version.static final SpatialIndexV1Deprecated, 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 SpatialIndexV1retrieve(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 voidsave(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 voidsave(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.voidsetLocation(File location) Deprecated, for removal: This API element is subject to removal in a future version.static final voidsetSpatialIndex(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.DatasetwrapModel(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.DatasetDeprecated, for removal: This API element is subject to removal in a future version.Wrap Model in a Dataset and build SpatialIndex.
- 
Constructor Details- 
SpatialIndexV1Deprecated, for removal: This API element is subject to removal in a future version.Unbuilt Spatial Index with provided capacity.- Parameters:
- capacity-
- srsURI-
 
- 
SpatialIndexV1public 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- 
getLocationDeprecated, for removal: This API element is subject to removal in a future version.
- 
setLocationDeprecated, for removal: This API element is subject to removal in a future version.
- 
getSrsInfoDeprecated, for removal: This API element is subject to removal in a future version.- Returns:
- Information about the SRS used by the SpatialIndex.
 
- 
isEmptypublic boolean isEmpty()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- True if the SpatialIndex is empty.
 
- 
isBuiltpublic boolean isBuilt()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- True if the SpatialIndex has been built.
 
- 
buildpublic 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.
- 
insertItemsDeprecated, 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
 
- 
insertItempublic 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
 
- 
querypublic 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.
- 
toStringDeprecated, for removal: This API element is subject to removal in a future version.
- 
retrievepublic 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
 
- 
isDefinedpublic 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.
 
- 
setSpatialIndexpublic 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-
 
- 
buildSpatialIndexpublic 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
 
- 
buildSpatialIndexpublic 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
 
- 
buildSpatialIndexpublic 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
 
- 
findSpatialIndexItemspublic 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
 
- 
buildSpatialIndexpublic 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
 
- 
wrapModelpublic 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
 
- 
wrapModelpublic 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
 
- 
getSpatialIndexItemspublic 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
 
- 
loadDeprecated, 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
 
- 
savepublic 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
 
- 
savepublic 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
 
 
-