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);
}
Aggregations