Module org.apache.jena.geosparql
Class SpatialIndexIoKryo
java.lang.Object
org.apache.jena.geosparql.spatial.index.v2.SpatialIndexIoKryo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpatialIndexPerGraphbuildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, Path spatialIndexFile) static final SpatialIndexPerGraphLoad a SpatialIndex from file.
Index will be built and empty if file does not exist or is null.static SpatialIndexloadOrBuildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, Path spatialIndexFile) static SpatialIndexloadOrBuildSpatialIndex(org.apache.jena.query.Dataset dataset, Path spatialIndexFile) static SpatialIndexHeaderreadHeader(com.esotericsoftware.kryo.kryo5.io.Input input) Read a string from input and return it as JSON.static final voidsave(Path spatialIndexFile, SpatialIndexPerGraph index) Save SpatialIndex to file.static voidwriteHeader(com.esotericsoftware.kryo.kryo5.io.Output output, SpatialIndexHeader header) static voidwriteToOutputStream(OutputStream os, SpatialIndexPerGraph index) Write spatial index as Kryo serialization to given OutputStream.
-
Field Details
-
VERSION
The version of the index that is created by this class.- See Also:
-
-
Constructor Details
-
SpatialIndexIoKryo
public SpatialIndexIoKryo()
-
-
Method Details
-
loadOrBuildSpatialIndex
public static SpatialIndex loadOrBuildSpatialIndex(org.apache.jena.query.Dataset dataset, Path spatialIndexFile) throws SpatialIndexException - Throws:
SpatialIndexException
-
loadOrBuildSpatialIndex
public static SpatialIndex loadOrBuildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, Path spatialIndexFile) throws SpatialIndexException - Throws:
SpatialIndexException
-
buildSpatialIndex
public static SpatialIndexPerGraph buildSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, Path spatialIndexFile) throws SpatialIndexException - Throws:
SpatialIndexException
-
save
public static final void save(Path spatialIndexFile, SpatialIndexPerGraph index) throws SpatialIndexException Save SpatialIndex to file.- Parameters:
spatialIndexFile- the file being saved toindex- the spatial index- Throws:
SpatialIndexException
-
writeToOutputStream
Write spatial index as Kryo serialization to given OutputStream.- Parameters:
os- output streamindex- spatial index
-
writeHeader
public static void writeHeader(com.esotericsoftware.kryo.kryo5.io.Output output, SpatialIndexHeader header) -
readHeader
Read a string from input and return it as JSON. -
load
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
-