Search in sources :

Example 1 with OmObservationConstellation

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

the class MeasurementDecodingTest method testProcedure.

@Test
public void testProcedure() {
    assertThat(observation, is(notNullValue()));
    final OmObservationConstellation oc = observation.getObservationConstellation();
    assertThat(oc, is(notNullValue()));
    final AbstractFeature p = oc.getProcedure();
    assertThat(p, is(notNullValue()));
    assertThat(p.getIdentifier(), is(equalTo(PROCEDURE)));
}
Also used : AbstractFeature(org.n52.shetland.ogc.gml.AbstractFeature) OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) Test(org.junit.Test)

Example 2 with OmObservationConstellation

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

the class MeasurementDecodingTest method testObservationConstellation.

@Test
public void testObservationConstellation() {
    assertThat(observation, is(notNullValue()));
    final OmObservationConstellation oc = observation.getObservationConstellation();
    assertThat(oc, is(notNullValue()));
}
Also used : OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) Test(org.junit.Test)

Example 3 with OmObservationConstellation

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

the class MeasurementDecodingTest method testObservationType.

@Test
public void testObservationType() {
    assertThat(observation, is(notNullValue()));
    final OmObservationConstellation oc = observation.getObservationConstellation();
    assertThat(oc, is(notNullValue()));
    assertThat(oc.getObservationType(), is(equalTo(OmConstants.OBS_TYPE_MEASUREMENT)));
}
Also used : OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) Test(org.junit.Test)

Example 4 with OmObservationConstellation

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

the class MeasurementDecodingTest method testFeatureOfInterest.

@Test
public void testFeatureOfInterest() {
    assertThat(observation, is(notNullValue()));
    final OmObservationConstellation oc = observation.getObservationConstellation();
    assertThat(oc, is(notNullValue()));
    final AbstractFeature foi = oc.getFeatureOfInterest();
    assertThat(foi, is(notNullValue()));
}
Also used : AbstractFeature(org.n52.shetland.ogc.gml.AbstractFeature) OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) Test(org.junit.Test)

Example 5 with OmObservationConstellation

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

the class MeasurementDecodingTest method testFeatureOfInterestSampledFeatures.

@Test
public void testFeatureOfInterestSampledFeatures() {
    assertThat(observation, is(notNullValue()));
    final OmObservationConstellation oc = observation.getObservationConstellation();
    assertThat(oc, is(notNullValue()));
    final AbstractFeature foi = oc.getFeatureOfInterest();
    assertThat(foi, is(notNullValue()));
    assertThat(foi, is(instanceOf(SamplingFeature.class)));
    SamplingFeature sf = (SamplingFeature) foi;
    assertThat(sf.getSampledFeatures(), is(notNullValue()));
    assertThat(sf.getSampledFeatures().size(), is(3));
    final AbstractFeature af1 = sf.getSampledFeatures().get(0);
    assertThat(af1, is(notNullValue()));
    assertThat(af1.getIdentifierCodeWithAuthority(), is(notNullValue()));
    assertThat(af1.getIdentifierCodeWithAuthority().getValue(), is(equalTo("sampledFeature1")));
    final AbstractFeature af2 = sf.getSampledFeatures().get(1);
    assertThat(af2, is(notNullValue()));
    assertThat(af2.getIdentifierCodeWithAuthority(), is(notNullValue()));
    assertThat(af2.getIdentifierCodeWithAuthority().getValue(), is(equalTo("sampledFeature2")));
    assertThat(af2.getName(), is(notNullValue()));
    assertThat(af2.getName().size(), is(1));
    assertThat(af2.getName().get(0), is(not(nullValue())));
    assertThat(af2.getName().get(0).isSetCodeSpace(), is(false));
    assertThat(af2.getName().get(0).getValue(), is(equalTo("sampledFeature2")));
    assertThat(af2, is(instanceOf(SamplingFeature.class)));
    SamplingFeature sf2 = (SamplingFeature) af2;
    assertThat(sf2.getGeometry(), is(notNullValue()));
    assertThat(sf2.getGeometry().getCoordinate().x, is(51.0));
    assertThat(sf2.getGeometry().getCoordinate().y, is(8.0));
    final AbstractFeature af3 = sf.getSampledFeatures().get(2);
    assertThat(af3, is(notNullValue()));
    assertThat(af3.getIdentifierCodeWithAuthority(), is(notNullValue()));
    assertThat(af3.getIdentifierCodeWithAuthority().getValue(), is(equalTo("sampledFeature3")));
}
Also used : AbstractFeature(org.n52.shetland.ogc.gml.AbstractFeature) SamplingFeature(org.n52.shetland.ogc.om.features.samplingFeatures.SamplingFeature) OmObservationConstellation(org.n52.shetland.ogc.om.OmObservationConstellation) Test(org.junit.Test)

Aggregations

OmObservationConstellation (org.n52.shetland.ogc.om.OmObservationConstellation)28 Test (org.junit.Test)18 OmObservableProperty (org.n52.shetland.ogc.om.OmObservableProperty)8 AbstractFeature (org.n52.shetland.ogc.gml.AbstractFeature)7 SamplingFeature (org.n52.shetland.ogc.om.features.samplingFeatures.SamplingFeature)7 InsertResultTemplateRequest (org.n52.shetland.ogc.sos.request.InsertResultTemplateRequest)6 CodeWithAuthority (org.n52.shetland.ogc.gml.CodeWithAuthority)5 OMObservationType (net.opengis.om.x20.OMObservationType)4 CodeType (org.n52.shetland.ogc.gml.CodeType)4 Matchers.containsString (org.hamcrest.Matchers.containsString)3 TimeInstant (org.n52.shetland.ogc.gml.time.TimeInstant)3 OmObservation (org.n52.shetland.ogc.om.OmObservation)3 SweDataRecord (org.n52.shetland.ogc.swe.SweDataRecord)3 DateTime (org.joda.time.DateTime)2 SensorML (org.n52.shetland.ogc.sensorML.SensorML)2 SosResultStructure (org.n52.shetland.ogc.sos.SosResultStructure)2 SweField (org.n52.shetland.ogc.swe.SweField)2 Date (java.util.Date)1 SFSamplingFeatureDocument (net.opengis.sampling.x20.SFSamplingFeatureDocument)1 SFSamplingFeatureType (net.opengis.sampling.x20.SFSamplingFeatureType)1