Package com.complexible.stardog.spatial
Interface GeospatialIndex
- All Superinterfaces:
AutoCloseable
A spatial index
- Since:
- 4.0
- Version:
- 4.0
- Author:
- Michael Grove
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this index.Return metadata describing this index.org.locationtech.spatial4j.context.SpatialContextReturn theSpatialContextused by this indexlongReturn the number of feature in the spatial indexOpen a connection to the indexbooleansetMetadata(Metadata theMetadata) Persist changes to the provided metadata.
-
Method Details
-
close
void close()Close this index. This will close allopen connections.- Specified by:
closein interfaceAutoCloseable
-
openConnection
Open a connection to the index- Returns:
- the new connection
- Throws:
GeoException- if there was an error while opening the connection
-
getMetadata
Metadata getMetadata()Return metadata describing this index. This is a read-only view of the metadata. Changes to the metadata should usesetMetadata(com.complexible.stardog.metadata.Metadata).- Returns:
- the metadata
-
setMetadata
Persist changes to the provided metadata. The provided metadata is not the complete set ofoptions, only the options which have been updated.- Parameters:
theMetadata- the updated metadata- Returns:
- true if the operation was successful, false otherwise
- Throws:
GeoException- if there is an error persisting the metadata
-
getSpatialContext
org.locationtech.spatial4j.context.SpatialContext getSpatialContext()Return theSpatialContextused by this index- Returns:
- the spatial context
-
numFeatures
long numFeatures()Return the number of feature in the spatial index- Returns:
- the number of docs
-