Patch to fix Deserialisation failure of BoundingBox
Hi,
I might report it previously, the Java web service client code fails to deserialise Dataset because of BoundingBox code. org.gbif.api.model.registry.eml.geospatial.BoundingBox does not have setGlobalCoverage(boolean) method while JSON response has globalCoverage of boolean.
Here is a fix patch.
James
--- org/gbif/api/model/registry/eml/geospatial/BoundingBox.java.orig 2014-06-27 00:00:00.000000000 +0900 +++ org/gbif/api/model/registry/eml/geospatial/BoundingBox.java 2015-07-30 23:22:18.962696356 +0900 @@ -18,6 +18,7 @@ import java.io.Serializable; import java.util.Locale;
+import org.codehaus.jackson.annotate.JsonIgnore;
/** * Geographic coverage geometry in the form of 4 sided bounding box. @@ -103,6 +104,15 @@ }
/** + * Set whether this binding box represents global coverage or not. + * + * @param globalCoverage global coverage status to set + */ + public void setGlobalCoverage(boolean globalCoverage) { + isGlobalCoverage = globalCoverage; + } + + /** * Set whether this binding box represents global coverage or not. Setter ensures all 4 required params are provided. * * @param minLatitude min latitude @@ -110,6 +120,7 @@ * @param minLongitude min longitude * @param maxLongitude max longitude */ + @JsonIgnore public void setGlobalCoverage(double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) { isGlobalCoverage = checkIsGlobalCoverage(minLatitude, maxLatitude, minLongitude, maxLongitude); }
participants (1)
-
Nozomi James Ytow