Search in sources :

Example 1 with SamplingFeatureType

use of org.geotoolkit.sampling.xml.v100.SamplingFeatureType in project geotoolkit by Geomatys.

the class MeasurementType method getTemporaryTemplate.

/**
 * Construit un nouveau template temporaire d'observation a partir d'un template fournit en argument.
 * On y rajoute un samplingTime et un id temporaire.
 */
@Override
public MeasurementType getTemporaryTemplate(final String temporaryName, TemporalGeometricPrimitive time) {
    if (time == null) {
        TimePositionType begin = new TimePositionType("1900-01-01T00:00:00");
        time = new TimePeriodType(begin);
    }
    PhenomenonType pheno = null;
    if (getObservedProperty() != null) {
        pheno = (PhenomenonType) getObservedProperty();
    }
    SamplingFeatureType foi = null;
    if (getFeatureOfInterest() != null) {
        foi = (SamplingFeatureType) getFeatureOfInterest();
    }
    final MeasureType res = (MeasureType) getResult();
    res.setValue(0);
    return new MeasurementType(temporaryName, getDefinition(), foi, pheno, getProcedure().getHref(), res, (AbstractTimeGeometricPrimitiveType) time);
}
Also used : SamplingFeatureType(org.geotoolkit.sampling.xml.v100.SamplingFeatureType) TimePeriodType(org.geotoolkit.gml.xml.v311.TimePeriodType) PhenomenonType(org.geotoolkit.swe.xml.v101.PhenomenonType) TimePositionType(org.geotoolkit.gml.xml.v311.TimePositionType)

Aggregations

TimePeriodType (org.geotoolkit.gml.xml.v311.TimePeriodType)1 TimePositionType (org.geotoolkit.gml.xml.v311.TimePositionType)1 SamplingFeatureType (org.geotoolkit.sampling.xml.v100.SamplingFeatureType)1 PhenomenonType (org.geotoolkit.swe.xml.v101.PhenomenonType)1