Search in sources :

Example 11 with ReferenceType

use of org.osate.aadl2.ReferenceType in project arctic-sea by 52North.

the class WmlTVPEncoderv20Test method shouldEncodeInterpolationTypeContinuousAsDefault.

@Test
public void shouldEncodeInterpolationTypeContinuousAsDefault() throws EncodingException, XmlException {
    XmlObject encodedElement = encoder.encode(mv);
    TVPDefaultMetadataPropertyType defaultPointMetadata = ((MeasurementTimeseriesDocument) encodedElement).getTimeseries().getDefaultPointMetadataArray(0);
    DefaultTVPMeasurementMetadataDocument tvpMeasurementMetadataDocument = DefaultTVPMeasurementMetadataDocument.Factory.parse(defaultPointMetadata.xmlText());
    ReferenceType interpolationType = tvpMeasurementMetadataDocument.getDefaultTVPMeasurementMetadata().getInterpolationType();
    assertThat(interpolationType.getHref(), Is.is(WaterMLConstants.InterpolationType.Continuous.getIdentifier()));
    assertThat(interpolationType.getTitle(), Is.is(WaterMLConstants.InterpolationType.Continuous.getTitle()));
}
Also used : TVPDefaultMetadataPropertyType(net.opengis.waterml.x20.TVPDefaultMetadataPropertyType) XmlObject(org.apache.xmlbeans.XmlObject) DefaultTVPMeasurementMetadataDocument(net.opengis.waterml.x20.DefaultTVPMeasurementMetadataDocument) ReferenceType(net.opengis.gml.x32.ReferenceType) Test(org.junit.jupiter.api.Test)

Aggregations

ReferenceType (net.opengis.gml.x32.ReferenceType)6 XmlObject (org.apache.xmlbeans.XmlObject)4 Test (org.junit.jupiter.api.Test)4 ContainedNamedElement (org.osate.aadl2.ContainedNamedElement)3 ContainmentPathElement (org.osate.aadl2.ContainmentPathElement)3 PointMetadataDocument (net.opengis.tsml.x10.PointMetadataDocument)2 TimeseriesTVPType (net.opengis.tsml.x10.TimeseriesTVPType)2 DefaultTVPMeasurementMetadataDocument (net.opengis.waterml.x20.DefaultTVPMeasurementMetadataDocument)2 TVPDefaultMetadataPropertyType (net.opengis.waterml.x20.TVPDefaultMetadataPropertyType)2 DefaultPointMetadata (org.n52.shetland.ogc.om.series.DefaultPointMetadata)2 AadlBoolean (org.osate.aadl2.AadlBoolean)2 AadlInteger (org.osate.aadl2.AadlInteger)2 AadlReal (org.osate.aadl2.AadlReal)2 AadlString (org.osate.aadl2.AadlString)2 BooleanLiteral (org.osate.aadl2.BooleanLiteral)2 ClassifierType (org.osate.aadl2.ClassifierType)2 ClassifierValue (org.osate.aadl2.ClassifierValue)2 EnumerationLiteral (org.osate.aadl2.EnumerationLiteral)2 EnumerationType (org.osate.aadl2.EnumerationType)2 IntegerLiteral (org.osate.aadl2.IntegerLiteral)2