Package com.complexible.stardog.spatial
Interface GeospatialIndex
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface GeospatialIndex extends java.lang.AutoCloseableA spatial index
- Since:
- 4.0
- Version:
- 4.0
- Author:
- Michael Grove
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this index.MetadatagetMetadata()Return metadata describing this index.org.locationtech.spatial4j.context.SpatialContextgetSpatialContext()Return theSpatialContextused by this indexlongnumFeatures()Return the number of feature in the spatial indexGeospatialIndexConnectionopenConnection()Open a connection to the indexbooleansetMetadata(Metadata theMetadata)Persist changes to the provided metadata.
-
-
-
Method Detail
-
close
void close()
Close this index. This will close allopen connections.- Specified by:
closein 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 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
-
-