Search in sources :

Example 16 with CategoryValue

use of org.n52.shetland.ogc.om.values.CategoryValue in project arctic-sea by 52North.

the class TrajectoryObservationTypeEncoderTest method getCategoricalObservation.

private OmObservation getCategoricalObservation() throws EncodingException, ParseException, DecodingException, XmlException, IOException {
    MultiObservationValues<List<TimeLocationValueTriple>> multiObservationValues = new MultiObservationValues<List<TimeLocationValueTriple>>();
    TLVTValue tlvtValue = new TLVTValue();
    tlvtValue.addValue(getTimeLocationValueTriple(new CategoryValue("test_1", "test_voc")));
    tlvtValue.addValue(getTimeLocationValueTriple(new CategoryValue("test_1", "test_voc")));
    tlvtValue.addValue(getTimeLocationValueTriple(new CategoryValue("test_3", "test_voc")));
    tlvtValue.addValue(getTimeLocationValueTriple(new CategoryValue("test_4", "test_voc")));
    multiObservationValues.setValue(tlvtValue);
    OmObservation observation = createObservation();
    observation.setValue(multiObservationValues);
    return observation;
}
Also used : OmObservation(org.n52.shetland.ogc.om.OmObservation) CategoryValue(org.n52.shetland.ogc.om.values.CategoryValue) List(java.util.List) TLVTValue(org.n52.shetland.ogc.om.values.TLVTValue) MultiObservationValues(org.n52.shetland.ogc.om.MultiObservationValues) TimeLocationValueTriple(org.n52.shetland.ogc.om.TimeLocationValueTriple)

Aggregations

CategoryValue (org.n52.shetland.ogc.om.values.CategoryValue)13 QuantityValue (org.n52.shetland.ogc.om.values.QuantityValue)8 TextValue (org.n52.shetland.ogc.om.values.TextValue)6 BooleanValue (org.n52.shetland.ogc.om.values.BooleanValue)5 CountValue (org.n52.shetland.ogc.om.values.CountValue)5 GeometryValue (org.n52.shetland.ogc.om.values.GeometryValue)4 SweCategory (org.n52.shetland.ogc.swe.simpleType.SweCategory)4 XmlBoolean (org.apache.xmlbeans.XmlBoolean)3 XmlInteger (org.apache.xmlbeans.XmlInteger)3 XmlObject (org.apache.xmlbeans.XmlObject)3 XmlString (org.apache.xmlbeans.XmlString)3 Test (org.junit.Test)3 Geometry (org.locationtech.jts.geom.Geometry)3 SweQuantity (org.n52.shetland.ogc.swe.simpleType.SweQuantity)3 BigDecimal (java.math.BigDecimal)2 XmlException (org.apache.xmlbeans.XmlException)2 AbstractGeometry (org.n52.shetland.ogc.gml.AbstractGeometry)2 CodeType (org.n52.shetland.ogc.gml.CodeType)2 GmlMeasureType (org.n52.shetland.ogc.gml.GmlMeasureType)2 SingleObservationValue (org.n52.shetland.ogc.om.SingleObservationValue)2