Skip to content

Instantly share code, notes, and snippets.

@thpoiani
Created May 19, 2016 02:20
Show Gist options
  • Save thpoiani/e6ad06f9470c6ffe8fce7756695a3a1f to your computer and use it in GitHub Desktop.
Save thpoiani/e6ad06f9470c6ffe8fce7756695a3a1f to your computer and use it in GitHub Desktop.
52North SOS - GetObservationById to POJO
public class FeatureOfInterest {
private Identifier identifier;
private Geometry geometry;
public Identifier getIdentifier() {
return identifier;
}
public void setIdentifier(Identifier identifier) {
this.identifier = identifier;
}
public Geometry getGeometry() {
return geometry;
}
public void setGeometry(Geometry geometry) {
this.geometry = geometry;
}
}
public class Geometry {
private String type;
private String[] coordinates;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String[] getCoordinates() {
return coordinates;
}
public void setCoordinates(String[] coordinates) {
this.coordinates = coordinates;
}
}
public class GetObservationById {
private String request;
private String service;
private Observations[] observations;
private String version;
public String getRequest() {
return request;
}
public void setRequest(String request) {
this.request = request;
}
public String getService() {
return service;
}
public void setService(String service) {
this.service = service;
}
public Observations[] getObservations() {
return observations;
}
public void setObservations(Observations[] observations) {
this.observations = observations;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}
{
"request": "GetObservationById",
"version": "2.0.0",
"service": "SOS",
"observations": [
{
"type": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
"identifier": {
"codespace": "http://www.opengis.net/def/nil/OGC/0/unknown",
"value": "http://www.52north.org/test/observation/9"
},
"procedure": "http://www.52north.org/test/procedure/9",
"offering": "http://www.52north.org/test/offering/9",
"observableProperty": "http://www.52north.org/test/observableProperty/9_3",
"featureOfInterest": {
"identifier": {
"codespace": "http://www.opengis.net/def/nil/OGC/0/unknown",
"value": "http://www.52north.org/test/featureOfInterest/9"
},
"geometry": {
"type": "Point",
"coordinates": [
51.935101100104916,
7.651968812254194
]
}
},
"phenomenonTime": "2012-11-19T17:45:15.000Z",
"resultTime": "2012-11-19T17:45:15.000Z",
"result": {
"uom": "test_unit_9_3",
"value": 0.28
}
}
]
}
public class Identifier {
private String value;
private String codespace;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getCodespace() {
return codespace;
}
public void setCodespace(String codespace) {
this.codespace = codespace;
}
}
public class Observations {
private Result result;
private String observableProperty;
private FeatureOfInterest featureOfInterest;
private String phenomenonTime;
private String offering;
private String type;
private Identifier identifier;
private String procedure;
private String resultTime;
public Result getResult() {
return result;
}
public void setResult(Result result) {
this.result = result;
}
public String getObservableProperty() {
return observableProperty;
}
public void setObservableProperty(String observableProperty) {
this.observableProperty = observableProperty;
}
public FeatureOfInterest getFeatureOfInterest() {
return featureOfInterest;
}
public void setFeatureOfInterest(FeatureOfInterest featureOfInterest) {
this.featureOfInterest = featureOfInterest;
}
public String getPhenomenonTime() {
return phenomenonTime;
}
public void setPhenomenonTime(String phenomenonTime) {
this.phenomenonTime = phenomenonTime;
}
public String getOffering() {
return offering;
}
public void setOffering(String offering) {
this.offering = offering;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Identifier getIdentifier() {
return identifier;
}
public void setIdentifier(Identifier identifier) {
this.identifier = identifier;
}
public String getProcedure() {
return procedure;
}
public void setProcedure(String procedure) {
this.procedure = procedure;
}
public String getResultTime() {
return resultTime;
}
public void setResultTime(String resultTime) {
this.resultTime = resultTime;
}
}
public class Result {
private String uom;
private String value;
public String getUom() {
return uom;
}
public void setUom(String uom) {
this.uom = uom;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment