Package com.complexible.stardog.spatial
Interface GeospatialIndex
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface GeospatialIndex extends java.lang.AutoCloseable
A spatial index
- Since:
- 4.0
- Version:
- 4.0
- Author:
- Michael Grove
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close this index.Metadata
getMetadata()
Return metadata describing this index.org.locationtech.spatial4j.context.SpatialContext
getSpatialContext()
Return theSpatialContext
used by this indexlong
numFeatures()
Return the number of feature in the spatial indexGeospatialIndexConnection
openConnection()
Open a connection to the indexboolean
setMetadata(Metadata theMetadata)
Persist changes to the provided metadata.
-
-
-
Method Detail
-
close
void close()
Close this index. This will close allopen connections
.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
openConnection
GeospatialIndexConnection openConnection() throws GeoException
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
boolean setMetadata(Metadata theMetadata) throws GeoException
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 theSpatialContext
used by this index- Returns:
- the spatial context
-
numFeatures
long numFeatures()
Return the number of feature in the spatial index- Returns:
- the number of docs
-
-