Package org.opengis.metadata.identification

Examples of org.opengis.metadata.identification.DataIdentification


    public void testLanguageCode() throws JAXBException {
        final Marshaller   marshaller   = pool.acquireMarshaller();
        final Unmarshaller unmarshaller = pool.acquireUnmarshaller();

        final String xml = getDataIdentificationXML(true);
        final DataIdentification id = (DataIdentification) unmarshal(unmarshaller, xml);
        assertEquals(Locale.FRENCH, getSingleton(id.getLanguages()));
        /*
         * Reformat and test against the original XML.
         */
        assertXmlEquals(xml, marshal(marshaller, id), "xmlns:*");
        pool.recycle(unmarshaller);
View Full Code Here


    public void testCharacterString() throws JAXBException {
        final Marshaller   marshaller   = pool.acquireMarshaller();
        final Unmarshaller unmarshaller = pool.acquireUnmarshaller();

        final String xml = getDataIdentificationXML(false);
        final DataIdentification id = (DataIdentification) unmarshal(unmarshaller, xml);
        assertEquals(Locale.FRENCH, getSingleton(id.getLanguages()));
        /*
         * Reformat and test against the expected XML.
         */
        assertXmlEquals(getDataIdentificationXML(true), marshal(marshaller, id), "xmlns:*");
        pool.recycle(unmarshaller);
View Full Code Here

        /*
         * <gmd:identificationInfo>
         *   <gmd:MD_DataIdentification>
         *     …
         */
        final DataIdentification identification = (DataIdentification) getSingleton(metadata.getIdentificationInfo());
        final Citation citation = identification.getCitation();
        assertInstanceOf("citation", NilObject.class, citation);
        assertEquals("nilReason", NilReason.MISSING, ((NilObject) citation).getNilReason());
        assertEquals("abstract", "SIS test", identification.getAbstract().toString());
        assertEquals("language", Locale.ENGLISH, getSingleton(identification.getLanguages()));
        /*
         * <gmd:geographicElement>
         *   <gmd:EX_GeographicBoundingBox>
         *     …
         *   </gmd:EX_GeographicBoundingBox>
         * </gmd:geographicElement>
         */
        final Extent extent = getSingleton(identification.getExtents());
        final GeographicBoundingBox bbox = (GeographicBoundingBox) getSingleton(extent.getGeographicElements());
        assertEquals("extentTypeCode", Boolean.TRUE, bbox.getInclusion());
        assertEquals("westBoundLongitude"4.55, bbox.getWestBoundLongitude(), STRICT);
        assertEquals("eastBoundLongitude"4.55, bbox.getEastBoundLongitude(), STRICT);
        assertEquals("southBoundLatitude", 44.22, bbox.getSouthBoundLatitude(), STRICT);
View Full Code Here

TOP

Related Classes of org.opengis.metadata.identification.DataIdentification

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.