Commit 400a82b4 authored by Daniel Eggert's avatar Daniel Eggert
Browse files

added version info access method

parent 69c3b7a2
......@@ -756,8 +756,8 @@ public class SceneDatabase {
* @param polygon
* @return
*/
public void getCompactSceneCountFromIndex(final Timestamp start, final Timestamp end, final int seasonCode, final byte maxCloudcover, final byte minProclevel,
final double[] polygon, ByteBuffer buffer) {
public void getCompactSceneCountFromIndex(final Timestamp start, final Timestamp end, final int seasonCode, final byte maxCloudcover,
final byte minProclevel, final double[] polygon, ByteBuffer buffer) {
if (spatialIndex == null) {
// no spatial index - use the database
// getCompactSceneCount(start, end, polygon, buffer);
......@@ -836,6 +836,23 @@ public class SceneDatabase {
}
}
/**
* Returns the version info of the connected spatial index mediator server
*
* @return
*/
public String getSpatialIndexVersionInfo() {
if (spatialIndex == null) {
return "unable to obtain version of spatial index: not connected";
} else {
return spatialIndex.getServerVersionInfo();
}
}
public String getVersionInfo() {
return Version.getVersionInfo();
}
/**
* Stores a compact representation of the resulting scene query in the given buffer. In contrast to the
* {@link #getCompactSceneListFromIndex(short, Timestamp, Timestamp, int, byte, byte, double[], ByteBuffer)} the scene bounds are omitted.<br>
......@@ -848,8 +865,8 @@ public class SceneDatabase {
* [long] timestamp<br>
* [byte] cloudcover
*/
public void getCompactSceneMetaDataListFromIndex(final short datasetid, final Timestamp start, final Timestamp end, final int seasonCode, final byte minCloudcover,
final byte maxCloudcover, final double[] polygon, final byte minProclevel, final byte maxProclevel, ByteBuffer buffer) {
public void getCompactSceneMetaDataListFromIndex(final short datasetid, final Timestamp start, final Timestamp end, final int seasonCode,
final byte minCloudcover, final byte maxCloudcover, final double[] polygon, final byte minProclevel, final byte maxProclevel, ByteBuffer buffer) {
if (spatialIndex == null) {
// no spatial index - use the database
// getCompactScenes(datasetid, start, end, polygon)
......@@ -869,8 +886,8 @@ public class SceneDatabase {
/**
* Stores a compact representation of the resulting scene query in the given buffer. Here only the scene bounds are stored in the buffer.
*/
public void getCompactSceneBoundsListFromIndex(final short datasetid, final Timestamp start, final Timestamp end, final int seasonCode, final byte minCloudcover,
final byte maxCloudcover, final double[] polygon, final byte minProclevel, final byte maxProclevel, ByteBuffer buffer) {
public void getCompactSceneBoundsListFromIndex(final short datasetid, final Timestamp start, final Timestamp end, final int seasonCode,
final byte minCloudcover, final byte maxCloudcover, final double[] polygon, final byte minProclevel, final byte maxProclevel, ByteBuffer buffer) {
if (spatialIndex == null) {
// no spatial index - use the database
// getCompactScenes(datasetid, start, end, polygon)
......@@ -1095,7 +1112,8 @@ public class SceneDatabase {
if (datasetid != 249 && affectedRows > 1) {
throw new IllegalStateException("More than one row (" + affectedRows + ") was affected by the filename update");
} else if (affectedRows == 0) {
throw new IllegalArgumentException("The update did not affect any row, wrong sceneid? (" + sceneid + " | " + filename + " | " + proc_level.name() + ")");
throw new IllegalArgumentException(
"The update did not affect any row, wrong sceneid? (" + sceneid + " | " + filename + " | " + proc_level.name() + ")");
}
} catch (SQLException e) {
e.printStackTrace();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment