Search in sources :

Example 1 with AnyScalar

use of org.geotoolkit.swe.xml.AnyScalar in project geotoolkit by Geomatys.

the class OMUtils method getDataRecordTrajectory.

public static AbstractDataRecord getDataRecordTrajectory(final String version, final List<? extends Field> phenomenons) {
    final List<AnyScalar> fields = new ArrayList<>();
    fields.add(TIME_FIELD.get(version));
    fields.add(LATITUDE_FIELD.get(version));
    fields.add(LONGITUDE_FIELD.get(version));
    for (Field phenomenon : phenomenons) {
        final UomProperty uom = SOSXmlFactory.buildUomProperty(version, phenomenon.uom, null);
        final Quantity cat = SOSXmlFactory.buildQuantity(version, phenomenon.name, uom, null);
        fields.add(SOSXmlFactory.buildAnyScalar(version, null, phenomenon.name, cat));
    }
    return SOSXmlFactory.buildSimpleDatarecord(version, null, null, null, true, fields);
}
Also used : Field(org.geotoolkit.observation.model.Field) ArrayList(java.util.ArrayList) Quantity(org.geotoolkit.swe.xml.Quantity) UomProperty(org.geotoolkit.swe.xml.UomProperty) AnyScalar(org.geotoolkit.swe.xml.AnyScalar)

Example 2 with AnyScalar

use of org.geotoolkit.swe.xml.AnyScalar in project geotoolkit by Geomatys.

the class OMUtils method getDataRecordProfile.

public static AbstractDataRecord getDataRecordProfile(final String version, final List<? extends Field> phenomenons) {
    final List<AnyScalar> fields = new ArrayList<>();
    fields.add(PRESSION_FIELD.get(version));
    for (Field phenomenon : phenomenons) {
        final UomProperty uom = SOSXmlFactory.buildUomProperty(version, phenomenon.uom, null);
        final Quantity cat = SOSXmlFactory.buildQuantity(version, phenomenon.name, uom, null);
        fields.add(SOSXmlFactory.buildAnyScalar(version, null, phenomenon.name, cat));
    }
    return SOSXmlFactory.buildSimpleDatarecord(version, null, null, null, true, fields);
}
Also used : Field(org.geotoolkit.observation.model.Field) ArrayList(java.util.ArrayList) Quantity(org.geotoolkit.swe.xml.Quantity) UomProperty(org.geotoolkit.swe.xml.UomProperty) AnyScalar(org.geotoolkit.swe.xml.AnyScalar)

Example 3 with AnyScalar

use of org.geotoolkit.swe.xml.AnyScalar in project geotoolkit by Geomatys.

the class OMUtils method getDataRecordTimeSeries.

public static AbstractDataRecord getDataRecordTimeSeries(final String version, final List<? extends Field> phenomenons) {
    final List<AnyScalar> fields = new ArrayList<>();
    fields.add(TIME_FIELD.get(version));
    for (Field phenomenon : phenomenons) {
        final UomProperty uom = SOSXmlFactory.buildUomProperty(version, phenomenon.uom, null);
        final Quantity cat = SOSXmlFactory.buildQuantity(version, phenomenon.name, uom, null);
        fields.add(SOSXmlFactory.buildAnyScalar(version, null, phenomenon.name, cat));
    }
    return SOSXmlFactory.buildSimpleDatarecord(version, null, null, null, true, fields);
}
Also used : Field(org.geotoolkit.observation.model.Field) ArrayList(java.util.ArrayList) Quantity(org.geotoolkit.swe.xml.Quantity) UomProperty(org.geotoolkit.swe.xml.UomProperty) AnyScalar(org.geotoolkit.swe.xml.AnyScalar)

Aggregations

ArrayList (java.util.ArrayList)3 Field (org.geotoolkit.observation.model.Field)3 AnyScalar (org.geotoolkit.swe.xml.AnyScalar)3 Quantity (org.geotoolkit.swe.xml.Quantity)3 UomProperty (org.geotoolkit.swe.xml.UomProperty)3