Search in sources :

Example 1 with SweText

use of org.n52.shetland.ogc.swe.simpleType.SweText in project arctic-sea by 52North.

the class HasExtension method addSweTextExtension.

default void addSweTextExtension(String name, String value) {
    SweText sweText = new SweText();
    sweText.setValue(value);
    sweText.setIdentifier(name);
    addSwesExtension(name, sweText);
}
Also used : SweText(org.n52.shetland.ogc.swe.simpleType.SweText)

Example 2 with SweText

use of org.n52.shetland.ogc.swe.simpleType.SweText 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 3 with SweText

use of org.n52.shetland.ogc.swe.simpleType.SweText 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 SweText

use of org.n52.shetland.ogc.swe.simpleType.SweText 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)

Example 5 with SweText

use of org.n52.shetland.ogc.swe.simpleType.SweText in project arctic-sea by 52North.

the class SwesExtensionsTest method containsExtension_for_enum_schould_return_true.

@Test
public void containsExtension_for_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)

Aggregations

SweText (org.n52.shetland.ogc.swe.simpleType.SweText)23 Test (org.junit.Test)13 XmlObject (org.apache.xmlbeans.XmlObject)10 SweCount (org.n52.shetland.ogc.swe.simpleType.SweCount)10 SweCategory (org.n52.shetland.ogc.swe.simpleType.SweCategory)9 SweQuantity (org.n52.shetland.ogc.swe.simpleType.SweQuantity)9 SweField (org.n52.shetland.ogc.swe.SweField)8 SweBoolean (org.n52.shetland.ogc.swe.simpleType.SweBoolean)8 SweDataRecord (org.n52.shetland.ogc.swe.SweDataRecord)6 SimpleDataRecordType (net.opengis.swe.x101.SimpleDataRecordType)5 EncodingException (org.n52.svalbard.encode.exception.EncodingException)5 NotYetSupportedEncodingException (org.n52.svalbard.encode.exception.NotYetSupportedEncodingException)5 Extensions (org.n52.shetland.ogc.ows.extension.Extensions)4 SweQuantityRange (org.n52.shetland.ogc.swe.simpleType.SweQuantityRange)4 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)3 AnyScalarPropertyType (net.opengis.swe.x101.AnyScalarPropertyType)3 DataComponentPropertyType (net.opengis.swe.x101.DataComponentPropertyType)3 DataRecordType (net.opengis.swe.x101.DataRecordType)3 XmlException (org.apache.xmlbeans.XmlException)3 SweTime (org.n52.shetland.ogc.swe.simpleType.SweTime)3