Package org.apache.sis.metadata.iso.lineage

Examples of org.apache.sis.metadata.iso.lineage.DefaultSource


     * @throws JAXBException If an error occurred while marshalling the XML.
     */
    @Test
    public void testSource() throws JAXBException {
        final DefaultLineage lineage = new DefaultLineage();
        final DefaultSource source = new DefaultSource();
        source.setDescription(new SimpleInternationalString("Description of source data level."));
        lineage.setSources(Arrays.asList(source));
        /*
         * If this simpler case, only ISO 19115 elements are defined (no ISO 19115-2).
         * Consequently the XML name shall be "gmd:LI_Source".
         */
        String actual = XML.marshal(lineage);
        assertXmlEquals(
            "<gmd:LI_Lineage xmlns:gmd=\"" + Namespaces.GMD + "\">\n" +
            "  <gmd:source>\n" +
            "    <gmd:LI_Source>\n" +
            "      <gmd:description>\n" +
            "        <gco:CharacterString>Description of source data level.</gco:CharacterString>\n" +
            "      </gmd:description>\n" +
            "    </gmd:LI_Source>\n" +
            "  </gmd:source>\n" +
            "</gmd:LI_Lineage>", actual, "xmlns:*");
        /*
         * Now add a ISO 19115-2 specific property. The XML name shall become "gmi:LE_Source".
         */
        source.setProcessedLevel(new DefaultIdentifier("DummyLevel"));
        actual = XML.marshal(lineage);
        assertXmlEquals(
            "<gmd:LI_Lineage xmlns:gmd=\"" + Namespaces.GMD + "\">\n" +
            "  <gmd:source>\n" +
            "    <gmi:LE_Source>\n" +
View Full Code Here

TOP

Related Classes of org.apache.sis.metadata.iso.lineage.DefaultSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.