Search in sources :

Example 1 with RepresentativeFraction

use of org.opengis.metadata.identification.RepresentativeFraction in project sis by apache.

the class DefaultRepresentativeFractionTest method roundtrip.

/**
 * Verifies that marshalling the given metadata produces the expected XML document,
 * then verifies that unmarshalling that document gives back the original metadata object.
 * If {@link #legacy} is {@code true}, then this method will use ISO 19139:2007 schema.
 */
private void roundtrip(final RepresentativeFraction browse, String expected) throws JAXBException {
    final String actual;
    final Version version;
    if (legacy) {
        expected = toLegacyXML(expected);
        version = VERSION_2007;
    } else {
        version = VERSION_2014;
    }
    actual = marshal(browse, version);
    assertXmlEquals(expected, actual, "xmlns:*");
    assertEquals(browse, unmarshal(RepresentativeFraction.class, actual));
}
Also used : Version(org.apache.sis.util.Version) RepresentativeFraction(org.opengis.metadata.identification.RepresentativeFraction)

Aggregations

Version (org.apache.sis.util.Version)1 RepresentativeFraction (org.opengis.metadata.identification.RepresentativeFraction)1