Search in sources :

Example 1 with GetObservationRequest

use of org.n52.shetland.ogc.sos.request.GetObservationRequest in project arctic-sea by 52North.

the class GetObservationRequestDecoderTest method hasProcedures.

@Test
public void hasProcedures() throws IOException, DecodingException {
    final GetObservationRequest req = loadMultiple();
    assertThat(req.getProcedures(), is(notNullValue()));
    assertThat(req.getProcedures(), hasSize(2));
    assertThat(req.getProcedures().get(0), is(notNullValue()));
    assertThat(req.getProcedures().get(0), is(equalTo("procedure1")));
    assertThat(req.getProcedures().get(1), is(notNullValue()));
    assertThat(req.getProcedures().get(1), is(equalTo("procedure2")));
}
Also used : GetObservationRequest(org.n52.shetland.ogc.sos.request.GetObservationRequest) Test(org.junit.Test)

Example 2 with GetObservationRequest

use of org.n52.shetland.ogc.sos.request.GetObservationRequest in project arctic-sea by 52North.

the class GetObservationRequestDecoderTest method loadMergeIntoArray.

protected GetObservationRequest loadMergeIntoArray() throws DecodingException, IOException {
    final JsonNode json = JsonLoader.fromResource("/examples/sos/GetObservationRequest-merge-into-array.json");
    final GetObservationRequest req = decoder.decodeJSON(json, true);
    assertThat(req, is(notNullValue()));
    return req;
}
Also used : GetObservationRequest(org.n52.shetland.ogc.sos.request.GetObservationRequest) JsonNode(com.fasterxml.jackson.databind.JsonNode)

Example 3 with GetObservationRequest

use of org.n52.shetland.ogc.sos.request.GetObservationRequest in project arctic-sea by 52North.

the class GetObservationRequestDecoderTest method loadSingle.

protected GetObservationRequest loadSingle() throws DecodingException, IOException {
    final JsonNode json = JsonLoader.fromResource("/examples/sos/GetObservationRequest-single.json");
    final GetObservationRequest req = decoder.decodeJSON(json, true);
    assertThat(req, is(notNullValue()));
    return req;
}
Also used : GetObservationRequest(org.n52.shetland.ogc.sos.request.GetObservationRequest) JsonNode(com.fasterxml.jackson.databind.JsonNode)

Example 4 with GetObservationRequest

use of org.n52.shetland.ogc.sos.request.GetObservationRequest in project arctic-sea by 52North.

the class GetObservationRequestDecoderTest method loadNoFilters.

protected GetObservationRequest loadNoFilters() throws DecodingException, IOException {
    final JsonNode json = JsonLoader.fromResource("/examples/sos/GetObservationRequest-no-filters.json");
    final GetObservationRequest req = decoder.decodeJSON(json, true);
    assertThat(req, is(notNullValue()));
    return req;
}
Also used : GetObservationRequest(org.n52.shetland.ogc.sos.request.GetObservationRequest) JsonNode(com.fasterxml.jackson.databind.JsonNode)

Example 5 with GetObservationRequest

use of org.n52.shetland.ogc.sos.request.GetObservationRequest in project arctic-sea by 52North.

the class GetObservationRequestDecoderTest method hasOfferings.

@Test
public void hasOfferings() throws IOException, DecodingException {
    final GetObservationRequest req = loadMultiple();
    assertThat(req.getOfferings(), is(notNullValue()));
    assertThat(req.getOfferings(), hasSize(2));
    assertThat(req.getOfferings().get(0), is(notNullValue()));
    assertThat(req.getOfferings().get(0), is(equalTo("offering1")));
    assertThat(req.getOfferings().get(1), is(notNullValue()));
    assertThat(req.getOfferings().get(1), is(equalTo("offering2")));
}
Also used : GetObservationRequest(org.n52.shetland.ogc.sos.request.GetObservationRequest) Test(org.junit.Test)

Aggregations

GetObservationRequest (org.n52.shetland.ogc.sos.request.GetObservationRequest)22 Test (org.junit.Test)15 JsonNode (com.fasterxml.jackson.databind.JsonNode)4 OwsServiceCommunicationObject (org.n52.shetland.ogc.ows.service.OwsServiceCommunicationObject)3 GetObservationDocument (net.opengis.sos.x20.GetObservationDocument)2 DateTime (org.joda.time.DateTime)2 TimePeriod (org.n52.shetland.ogc.gml.time.TimePeriod)2 DecodingException (org.n52.svalbard.decode.exception.DecodingException)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 TRUE (java.lang.Boolean.TRUE)1 Arrays (java.util.Arrays)1 Set (java.util.Set)1 GetFeatureOfInterest (net.opengis.sos.x10.GetFeatureOfInterestDocument.GetFeatureOfInterest)1 GetObservation (net.opengis.sos.x10.GetObservationDocument.GetObservation)1 FeatureOfInterest (net.opengis.sos.x10.GetObservationDocument.GetObservation.FeatureOfInterest)1 GetObservationType (net.opengis.sos.x20.GetObservationType)1 InsertResultTemplateDocument (net.opengis.sos.x20.InsertResultTemplateDocument)1 XmlException (org.apache.xmlbeans.XmlException)1 XmlObject (org.apache.xmlbeans.XmlObject)1 XmlOptions (org.apache.xmlbeans.XmlOptions)1