2191: Geo Utility enhancements: update json parser to retrieve z-axis property
Task-Url: https://support.d4science.org/issues/2191 Added List<Long> for ZAxis instead of List<Integer> git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/spatial-data/geo-utility@124043 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
129051f8fd
commit
aa7b96a1d3
|
@ -25,7 +25,7 @@ public class LayerZAxis implements Serializable{
|
|||
|
||||
private String units;
|
||||
private boolean positive;
|
||||
private List<Integer> values;
|
||||
private List<Long> values;
|
||||
|
||||
/**
|
||||
* Instantiates a new layer z axis.
|
||||
|
@ -40,7 +40,7 @@ public class LayerZAxis implements Serializable{
|
|||
* @param positive the positive
|
||||
* @param values the values
|
||||
*/
|
||||
public LayerZAxis(String units, boolean positive, List<Integer> values) {
|
||||
public LayerZAxis(String units, boolean positive, List<Long> values) {
|
||||
this.units = units;
|
||||
this.positive = positive;
|
||||
this.values = values;
|
||||
|
@ -74,7 +74,7 @@ public class LayerZAxis implements Serializable{
|
|||
*
|
||||
* @return the values
|
||||
*/
|
||||
public List<Integer> getValues() {
|
||||
public List<Long> getValues() {
|
||||
|
||||
return values;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class LayerZAxis implements Serializable{
|
|||
*
|
||||
* @param values the values to set
|
||||
*/
|
||||
public void setValues(List<Integer> values) {
|
||||
public void setValues(List<Long> values) {
|
||||
|
||||
this.values = values;
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ import java.util.List;
|
|||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.gcube.spatial.data.geoutility.bean.NcWmsLayerMetadata;
|
||||
import org.gcube.spatial.data.geoutility.bean.LayerZAxis;
|
||||
import org.gcube.spatial.data.geoutility.bean.NcWmsLayerMetadata;
|
||||
import org.gcube.spatial.data.geoutility.bean.NcWmsLayerMetadata.METADATA;
|
||||
import org.gcube.spatial.data.geoutility.bean.WmsParameters;
|
||||
import org.gcube.spatial.data.geoutility.util.UrlEncoderUtil;
|
||||
|
@ -210,9 +210,9 @@ public class NcWmsGetMetadata {
|
|||
JSONArray values = zaxis.getJSONArray(LayerZAxis.VALUES);
|
||||
System.out.println(values);
|
||||
if(values!=null){
|
||||
List<Integer> s = new ArrayList<Integer>(values.length());
|
||||
List<Long> s = new ArrayList<Long>(values.length());
|
||||
for (int i=0; i<values.length(); i++) {
|
||||
s.add(values.getInt(i));
|
||||
s.add(values.getLong(i));
|
||||
}
|
||||
zAxis.setValues(s);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue