Search in sources :

Example 6 with InsertResultTemplateDocument

use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.

the class InsertResultTemplateRequestEncoderTest method shouldEncodeResultEncoding.

@Test
public void shouldEncodeResultEncoding() throws EncodingException, DecodingException {
    ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
    XmlHelper.validateDocument(template);
    Assert.assertThat(template.getResultEncoding(), Matchers.notNullValue());
    Assert.assertThat(template.getResultEncoding().getAbstractEncoding(), Matchers.notNullValue());
    AbstractEncodingType resultEncoding = template.getResultEncoding().getAbstractEncoding();
    Assert.assertThat(resultEncoding, Matchers.instanceOf(TextEncodingType.class));
    TextEncodingType xbTextEncoding = (TextEncodingType) resultEncoding;
    Assert.assertThat(xbTextEncoding.getBlockSeparator(), Is.is(blockSeparator));
    Assert.assertThat(xbTextEncoding.getTokenSeparator(), Is.is(tokenSeparator));
}
Also used : TextEncodingType(net.opengis.swe.x20.TextEncodingType) AbstractEncodingType(net.opengis.swe.x20.AbstractEncodingType) ResultTemplateType(net.opengis.sos.x20.ResultTemplateType) InsertResultTemplateType(net.opengis.sos.x20.InsertResultTemplateType) InsertResultTemplateDocument(net.opengis.sos.x20.InsertResultTemplateDocument) Test(org.junit.Test)

Example 7 with InsertResultTemplateDocument

use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.

the class InsertResultTemplateRequestEncoderTest method shouldSetObservationTemplate.

@Test
public void shouldSetObservationTemplate() throws EncodingException {
    ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
    Assert.assertThat(template.getObservationTemplate(), Matchers.notNullValue());
}
Also used : ResultTemplateType(net.opengis.sos.x20.ResultTemplateType) InsertResultTemplateType(net.opengis.sos.x20.InsertResultTemplateType) InsertResultTemplateDocument(net.opengis.sos.x20.InsertResultTemplateDocument) Test(org.junit.Test)

Example 8 with InsertResultTemplateDocument

use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.

the class InsertResultTemplateRequestEncoderTest method shouldSetOffering.

@Test
public void shouldSetOffering() throws EncodingException {
    ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
    Assert.assertThat(template.getOffering(), Matchers.notNullValue());
    Assert.assertThat(template.getOffering(), Is.is(offering));
}
Also used : ResultTemplateType(net.opengis.sos.x20.ResultTemplateType) InsertResultTemplateType(net.opengis.sos.x20.InsertResultTemplateType) InsertResultTemplateDocument(net.opengis.sos.x20.InsertResultTemplateDocument) Test(org.junit.Test)

Example 9 with InsertResultTemplateDocument

use of net.opengis.sos.x20.InsertResultTemplateDocument in project arctic-sea by 52North.

the class InsertResultTemplateRequestEncoderTest method shouldSetOptionalIdentifier.

@Test
public void shouldSetOptionalIdentifier() throws EncodingException {
    ResultTemplateType template = ((InsertResultTemplateDocument) encoder.create(request)).getInsertResultTemplate().getProposedTemplate().getResultTemplate();
    Assert.assertThat(template.isSetIdentifier(), Is.is(true));
    Assert.assertThat(template.getIdentifier(), Is.is(templateIdentifier));
}
Also used : ResultTemplateType(net.opengis.sos.x20.ResultTemplateType) InsertResultTemplateType(net.opengis.sos.x20.InsertResultTemplateType) InsertResultTemplateDocument(net.opengis.sos.x20.InsertResultTemplateDocument) Test(org.junit.Test)

Aggregations

InsertResultTemplateType (net.opengis.sos.x20.InsertResultTemplateType)9 InsertResultTemplateDocument (net.opengis.sos.x20.InsertResultTemplateDocument)8 ResultTemplateType (net.opengis.sos.x20.ResultTemplateType)8 Test (org.junit.Test)7 OMObservationType (net.opengis.om.x20.OMObservationType)1 SFSamplingFeatureDocument (net.opengis.sampling.x20.SFSamplingFeatureDocument)1 SFSamplingFeatureType (net.opengis.sampling.x20.SFSamplingFeatureType)1 GetResultTemplateType (net.opengis.sos.x20.GetResultTemplateType)1 ObservationTemplate (net.opengis.sos.x20.ResultTemplateType.ObservationTemplate)1 AbstractDataComponentType (net.opengis.swe.x20.AbstractDataComponentType)1 AbstractEncodingType (net.opengis.swe.x20.AbstractEncodingType)1 DataRecordType (net.opengis.swe.x20.DataRecordType)1 Field (net.opengis.swe.x20.DataRecordType.Field)1 TextEncodingType (net.opengis.swe.x20.TextEncodingType)1 TimeType (net.opengis.swe.x20.TimeType)1 XmlException (org.apache.xmlbeans.XmlException)1 XmlObject (org.apache.xmlbeans.XmlObject)1 OmObservationConstellation (org.n52.shetland.ogc.om.OmObservationConstellation)1 InsertResultTemplateRequest (org.n52.shetland.ogc.sos.request.InsertResultTemplateRequest)1 SweField (org.n52.shetland.ogc.swe.SweField)1