use of org.n52.shetland.ogc.swe.SweField in project arctic-sea by 52North.
the class FieldEncoder method encodeSweCategoryField.
private ObjectNode encodeSweCategoryField(SweField field) {
ObjectNode jfield = createField(field);
jfield.put(JSONConstants.TYPE, JSONConstants.CATEGORY_TYPE);
SweCategory sweCategory = (SweCategory) field.getElement();
jfield.put(JSONConstants.CODESPACE, sweCategory.getCodeSpace());
if (sweCategory.isSetValue()) {
jfield.put(JSONConstants.VALUE, sweCategory.getValue());
}
return jfield;
}
use of org.n52.shetland.ogc.swe.SweField in project arctic-sea by 52North.
the class FieldEncoder method encodeSweCountField.
private ObjectNode encodeSweCountField(SweField field) {
ObjectNode jfield = createField(field);
jfield.put(JSONConstants.TYPE, JSONConstants.COUNT_TYPE);
SweCount sweCount = (SweCount) field.getElement();
if (sweCount.isSetValue()) {
jfield.put(JSONConstants.VALUE, sweCount.getValue());
}
return jfield;
}
use of org.n52.shetland.ogc.swe.SweField in project arctic-sea by 52North.
the class FieldEncoder method encodeSweTimeField.
private ObjectNode encodeSweTimeField(SweField field) {
ObjectNode jfield = createField(field);
jfield.put(JSONConstants.TYPE, JSONConstants.TIME_TYPE);
SweTime sweTime = (SweTime) field.getElement();
jfield.put(JSONConstants.UOM, sweTime.getUom());
if (sweTime.isSetValue()) {
jfield.put(JSONConstants.VALUE, DateTimeHelper.formatDateTime2IsoString(sweTime.getValue()));
}
return jfield;
}
use of org.n52.shetland.ogc.swe.SweField in project arctic-sea by 52North.
the class FieldEncoder method encodeSweBooleanField.
private ObjectNode encodeSweBooleanField(SweField field) {
ObjectNode jfield = createField(field);
jfield.put(JSONConstants.TYPE, JSONConstants.BOOLEAN_TYPE);
SweBoolean sweBoolean = (SweBoolean) field.getElement();
if (sweBoolean.isSetValue()) {
jfield.put(JSONConstants.VALUE, sweBoolean.getValue());
}
return jfield;
}
use of org.n52.shetland.ogc.swe.SweField in project arctic-sea by 52North.
the class FieldEncoder method encodeSweQuantityField.
private ObjectNode encodeSweQuantityField(SweField field) {
ObjectNode jfield = createField(field);
jfield.put(JSONConstants.TYPE, JSONConstants.QUANTITY_TYPE);
SweQuantity sweQuantity = (SweQuantity) field.getElement();
if (sweQuantity.isSetValue()) {
jfield.put(JSONConstants.VALUE, sweQuantity.getValue());
}
jfield.put(JSONConstants.UOM, sweQuantity.getUom());
return jfield;
}
Aggregations