Search in sources :

Example 1 with TrajectoryObservation

use of org.n52.shetland.inspire.omso.TrajectoryObservation in project arctic-sea by 52North.

the class TrajectoryObservation method cloneTemplate.

@Override
public OmObservation cloneTemplate() {
    SamplingFeature sf = new SamplingFeature(new CodeWithAuthority(""));
    sf.setFeatureType(SfConstants.SAMPLING_FEAT_TYPE_SF_SAMPLING_CURVE);
    getObservationConstellation().setFeatureOfInterest(sf);
    if (isSetSpatialFilteringProfileParameter()) {
        removeSpatialFilteringProfileParameter();
    }
    return cloneTemplate(new TrajectoryObservation());
}
Also used : SamplingFeature(org.n52.shetland.ogc.om.features.samplingFeatures.SamplingFeature) AbstractSamplingFeature(org.n52.shetland.ogc.om.features.samplingFeatures.AbstractSamplingFeature) CodeWithAuthority(org.n52.shetland.ogc.gml.CodeWithAuthority)

Example 2 with TrajectoryObservation

use of org.n52.shetland.inspire.omso.TrajectoryObservation in project arctic-sea by 52North.

the class TrajectoryObservationTypeEncoderTest method createObservation.

private OmObservation createObservation() throws DecodingException, XmlException, IOException {
    DateTime now = new DateTime(DateTimeZone.UTC);
    TimeInstant resultTime = new TimeInstant(now);
    TrajectoryObservation observation = new TrajectoryObservation();
    observation.setObservationID("123");
    OmObservationConstellation observationConstellation = new OmObservationConstellation();
    observationConstellation.setFeatureOfInterest(new SamplingFeature(new CodeWithAuthority("feature", CODE_SPACE)));
    OmObservableProperty observableProperty = new OmObservableProperty(OBSERVABLE_PROPERTY);
    observationConstellation.setObservableProperty(observableProperty);
    observationConstellation.addOffering(OFFERING);
    Process procedure = createProcessFromFile();
    observationConstellation.setProcedure(procedure);
    observation.setObservationConstellation(observationConstellation);
    observation.setResultTime(resultTime);
    return observation;
}
Also used : TrajectoryObservation(org.n52.shetland.inspire.omso.TrajectoryObservation) SamplingFeature(org.n52.shetland.ogc.om.features.samplingFeatures.SamplingFeature) Process(org.n52.shetland.inspire.ompr.Process) CodeWithAuthority(org.n52.shetland.ogc.gml.CodeWithAuthority) OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) DateTime(org.joda.time.DateTime) TimeInstant(org.n52.shetland.ogc.gml.time.TimeInstant) OmObservableProperty(org.n52.shetland.ogc.om.OmObservableProperty)

Aggregations

CodeWithAuthority (org.n52.shetland.ogc.gml.CodeWithAuthority)2 SamplingFeature (org.n52.shetland.ogc.om.features.samplingFeatures.SamplingFeature)2 DateTime (org.joda.time.DateTime)1 Process (org.n52.shetland.inspire.ompr.Process)1 TrajectoryObservation (org.n52.shetland.inspire.omso.TrajectoryObservation)1 TimeInstant (org.n52.shetland.ogc.gml.time.TimeInstant)1 OmObservableProperty (org.n52.shetland.ogc.om.OmObservableProperty)1 OmObservationConstellation (org.n52.shetland.ogc.om.OmObservationConstellation)1 AbstractSamplingFeature (org.n52.shetland.ogc.om.features.samplingFeatures.AbstractSamplingFeature)1