use of org.n52.shetland.ogc.swe.simpleType.SweObservableProperty in project arctic-sea by 52North.
the class SensorMLDecoderV20 method parseObservableProperty.
/**
* Parse {@link ObservablePropertyType}
*
* @param opt
* Object to parse
* @return Parsed {@link SweObservableProperty}
*/
private SweObservableProperty parseObservableProperty(ObservablePropertyType opt) {
SweObservableProperty observableProperty = new SweObservableProperty();
observableProperty.setDefinition(opt.getDefinition());
if (opt.isSetDescription()) {
observableProperty.setDescription(opt.getDescription());
}
if (opt.isSetIdentifier()) {
observableProperty.setIdentifier(opt.getIdentifier());
}
if (opt.isSetLabel()) {
observableProperty.setLabel(opt.getLabel());
}
return observableProperty;
}
use of org.n52.shetland.ogc.swe.simpleType.SweObservableProperty in project arctic-sea by 52North.
the class SweCommonEncoderv101 method createSimpleType.
private AbstractDataComponentType createSimpleType(SweAbstractSimpleType<?> sosSimpleType, EncodingContext additionalValues) throws EncodingException {
AbstractDataComponentType abstractDataComponentType = null;
if (sosSimpleType instanceof SweBoolean) {
abstractDataComponentType = createBoolean((SweBoolean) sosSimpleType);
} else if (sosSimpleType instanceof SweCategory) {
abstractDataComponentType = createCategory((SweCategory) sosSimpleType);
} else if (sosSimpleType instanceof SweCount) {
abstractDataComponentType = createCount((SweCount) sosSimpleType);
} else if (sosSimpleType instanceof SweCountRange) {
abstractDataComponentType = createCountRange((SweCountRange) sosSimpleType);
} else if (sosSimpleType instanceof SweObservableProperty) {
abstractDataComponentType = createObservableProperty((SweObservableProperty) sosSimpleType);
} else if (sosSimpleType instanceof SweQuantity) {
abstractDataComponentType = createQuantity((SweQuantity) sosSimpleType);
} else if (sosSimpleType instanceof SweQuantityRange) {
abstractDataComponentType = createQuantityRange((SweQuantityRange) sosSimpleType);
} else if (sosSimpleType instanceof SweText) {
abstractDataComponentType = createText((SweText) sosSimpleType);
} else if (sosSimpleType instanceof SweTimeRange) {
abstractDataComponentType = createTimeRange((SweTimeRange) sosSimpleType);
} else if (sosSimpleType instanceof SweTime) {
abstractDataComponentType = createTime((SweTime) sosSimpleType);
} else {
throw new NotYetSupportedEncodingException(SweAbstractSimpleType.class.getSimpleName(), sosSimpleType);
}
addAbstractDataComponentValues(abstractDataComponentType, sosSimpleType);
return abstractDataComponentType;
}
Aggregations