Search in sources :

Example 1 with Extensions

use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.

the class SwesExtensionsTest method containsExtension_for_string_created_with_enum_schould_return_true.

@Test
public void containsExtension_for_string_created_with_enum_schould_return_true() {
    final Extensions extensions = new Extensions();
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(new SweText()));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(new SweText()));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(new SweText()));
    assertThat(extensions.containsExtension(DEFINITION_1), is(TRUE));
    assertThat(extensions.containsExtension(DEFINITION_2), is(TRUE));
    assertThat(extensions.containsExtension(DEFINITION_3), is(TRUE));
}
Also used : SweText(org.n52.shetland.ogc.swe.simpleType.SweText) Extensions(org.n52.shetland.ogc.ows.extension.Extensions) Test(org.junit.Test)

Example 2 with Extensions

use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.

the class SwesExtensionsTest method getExtension_for_enum_schould_return_true.

@Test
public void getExtension_for_enum_schould_return_true() {
    final Extensions extensions = new Extensions();
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(VALUE_1));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(VALUE_2));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(VALUE_3));
    assertThat(extensions.getExtension(DEFINITION_1).orElse(null).getValue(), instanceOf(VALUE_1.getClass()));
    assertThat(extensions.getExtension(DEFINITION_2).orElse(null).getValue(), instanceOf(VALUE_2.getClass()));
    assertThat(extensions.getExtension(DEFINITION_3).orElse(null).getValue(), instanceOf(VALUE_3.getClass()));
}
Also used : Extensions(org.n52.shetland.ogc.ows.extension.Extensions) Test(org.junit.Test)

Example 3 with Extensions

use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.

the class SwesExtensionsTest method containsExtension_for_string_schould_return_true.

@Test
public void containsExtension_for_string_schould_return_true() {
    final Extensions extensions = new Extensions();
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(new SweText()));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(new SweText()));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(new SweText()));
    assertThat(extensions.containsExtension(DEFINITION_1), is(TRUE));
    assertThat(extensions.containsExtension(DEFINITION_2), is(TRUE));
    assertThat(extensions.containsExtension(DEFINITION_3), is(TRUE));
}
Also used : SweText(org.n52.shetland.ogc.swe.simpleType.SweText) Extensions(org.n52.shetland.ogc.ows.extension.Extensions) Test(org.junit.Test)

Example 4 with Extensions

use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.

the class SwesExtensionsTest method getExtension_for_string_schould_return_true.

@Test
public void getExtension_for_string_schould_return_true() {
    final Extensions extensions = new Extensions();
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(VALUE_1));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(VALUE_2));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(VALUE_3));
    assertThat(extensions.getExtension(DEFINITION_1).orElse(null).getValue(), instanceOf(VALUE_1.getClass()));
    assertThat(extensions.getExtension(DEFINITION_2).orElse(null).getValue(), instanceOf(VALUE_2.getClass()));
    assertThat(extensions.getExtension(DEFINITION_3).orElse(null).getValue(), instanceOf(VALUE_3.getClass()));
}
Also used : Extensions(org.n52.shetland.ogc.ows.extension.Extensions) Test(org.junit.Test)

Example 5 with Extensions

use of org.n52.shetland.ogc.ows.extension.Extensions in project arctic-sea by 52North.

the class SwesExtensionsTest method containsExtension_for_enum_created_with_string_schould_return_true.

@Test
public void containsExtension_for_enum_created_with_string_schould_return_true() {
    final Extensions extensions = new Extensions();
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_1).setValue(new SweText()));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_2).setValue(new SweText()));
    extensions.addExtension(new SwesExtension<>().setDefinition(DEFINITION_3).setValue(new SweText()));
    assertThat(extensions.containsExtension(DEFINITION_1), is(TRUE));
    assertThat(extensions.containsExtension(DEFINITION_2), is(TRUE));
    assertThat(extensions.containsExtension(DEFINITION_3), is(TRUE));
}
Also used : SweText(org.n52.shetland.ogc.swe.simpleType.SweText) Extensions(org.n52.shetland.ogc.ows.extension.Extensions) Test(org.junit.Test)

Aggregations

Extensions (org.n52.shetland.ogc.ows.extension.Extensions)11 Test (org.junit.Test)10 SweText (org.n52.shetland.ogc.swe.simpleType.SweText)4 XmlObject (org.apache.xmlbeans.XmlObject)3 DecodingException (org.n52.svalbard.decode.exception.DecodingException)3 XmlException (org.apache.xmlbeans.XmlException)2 AbstractFeature (org.n52.shetland.ogc.gml.AbstractFeature)2 OwsCapabilities (org.n52.shetland.ogc.ows.OwsCapabilities)2 OwsCapabilitiesExtension (org.n52.shetland.ogc.ows.OwsCapabilitiesExtension)2 OwsOperationsMetadata (org.n52.shetland.ogc.ows.OwsOperationsMetadata)2 OwsServiceIdentification (org.n52.shetland.ogc.ows.OwsServiceIdentification)2 OwsServiceProvider (org.n52.shetland.ogc.ows.OwsServiceProvider)2 OwsServiceCommunicationObject (org.n52.shetland.ogc.ows.service.OwsServiceCommunicationObject)2 SosProcedureDescription (org.n52.shetland.ogc.sos.SosProcedureDescription)2 Locale (java.util.Locale)1 GetFeatureOfInterestType (net.opengis.sos.x20.GetFeatureOfInterestType)1 DeleteSensorType (net.opengis.swes.x20.DeleteSensorType)1 DescribeSensorType (net.opengis.swes.x20.DescribeSensorType)1 InsertSensorType (net.opengis.swes.x20.InsertSensorType)1 SensorDescriptionType (net.opengis.swes.x20.SensorDescriptionType)1