Examples of CitationDate


Examples of org.opengis.metadata.citation.CitationDate

        /*
         * First, test using the French locale.
         */
        marshaller.setProperty(XML.LOCALE, Locale.FRENCH);
        String expected = getCitationXML("http://schemas.opengis.net/iso/19139/20070417/", "fra", "Création");
        CitationDate ci = (CitationDate) XML.unmarshal(expected);
        assertEquals(DateType.CREATION, ci.getDateType());
        String actual = marshal(marshaller, ci);
        assertXmlEquals(expected, actual, "xmlns:*");
        /*
         * Tests again using the Englisg locale.
         */
        marshaller.setProperty(XML.LOCALE, Locale.ENGLISH);
        expected = getCitationXML("http://schemas.opengis.net/iso/19139/20070417/", "eng", "Creation");
        ci = (CitationDate) XML.unmarshal(expected);
        assertEquals(DateType.CREATION, ci.getDateType());
        actual = marshal(marshaller, ci);
        assertXmlEquals(expected, actual, "xmlns:*");

        pool.recycle(marshaller);
    }
View Full Code Here

Examples of org.opengis.metadata.citation.CitationDate

     *
     * @see <a href="http://jira.geotoolkit.org/browse/GEOTK-170">GEOTK-170</a>
     */
    @Test
    public void testCopyConstructor() {
        final CitationDate original = new CitationDate() {
            @Override public Date     getDate()     {return new Date(1305716658508L);}
            @Override public DateType getDateType() {return DateType.CREATION;}
        };
        final DefaultCitationDate copy = new DefaultCitationDate(original);
        assertEquals(new Date(1305716658508L), copy.getDate());
View Full Code Here

Examples of org.opengis.metadata.citation.CitationDate

        /*
         * First, test using the French locale.
         */
        marshaller.setProperty(XML.LOCALE, Locale.FRENCH);
        String expected = getCitationXML(Schemas.METADATA_ROOT, "fra", "Création");
        CitationDate ci = (CitationDate) XML.unmarshal(expected);
        assertEquals(DateType.CREATION, ci.getDateType());
        String actual = marshal(marshaller, ci);
        assertXmlEquals(expected, actual, "xmlns:*");
        /*
         * Tests again using the English locale.
         */
        marshaller.setProperty(XML.LOCALE, Locale.ENGLISH);
        expected = getCitationXML(Schemas.METADATA_ROOT, "eng", "Creation");
        ci = (CitationDate) XML.unmarshal(expected);
        assertEquals(DateType.CREATION, ci.getDateType());
        actual = marshal(marshaller, ci);
        assertXmlEquals(expected, actual, "xmlns:*");

        pool.recycle(marshaller);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.