Examples of ImmutableIdentifier


Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

        if (skip()) return null;
        final ReferenceIdentifier metadata = this.metadata;
        if (metadata instanceof ImmutableIdentifier) {
            return (ImmutableIdentifier) metadata;
        } else {
            return new ImmutableIdentifier(metadata);
        }
    }
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

    /**
     * Tests the {@link Code#Code(ReferenceIdentifier)} constructor with {@code "EPSG:4326"} identifier.
     */
    @Test
    public void testSimple() {
        final ReferenceIdentifier id = new ImmutableIdentifier(HardCodedCitations.OGP, "EPSG", "4326");
        final Code value = new Code(id);
        assertEquals("codeSpace", "EPSG", value.codeSpace);
        assertEquals("code",      "4326", value.code);
        /*
         * Reverse operation. Note that the authority is lost since there is no room for that in a
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

     * Tests the {@link Code#Code(ReferenceIdentifier)} constructor with {@code "EPSG:8.3:4326"} identifier.
     */
    @Test
    @DependsOnMethod("testSimple")
    public void testWithVersion() {
        final ReferenceIdentifier id = new ImmutableIdentifier(HardCodedCitations.OGP, "EPSG", "4326", "8.2", null);
        final Code value = new Code(id);
        assertEquals("codeSpace", "EPSG:8.2", value.codeSpace);
        assertEquals("code",      "4326",     value.code);
        /*
         * Reverse operation. Note that the authority is lost since there is no room for that in a
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

     * Tests {@link Code#forIdentifiedObject(Class, Iterable)}.
     */
    @Test
    @DependsOnMethod("testWithVersion")
    public void testForIdentifiedObject() {
        final ReferenceIdentifier id = new ImmutableIdentifier(HardCodedCitations.OGP, "EPSG", "4326", "8.2", null);
        final Code value = Code.forIdentifiedObject(GeographicCRS.class, Collections.singleton(id));
        assertNotNull(value);
        assertEquals("codeSpace", "OGP", value.codeSpace);
        assertEquals("code", "urn:ogc:def:crs:EPSG:8.2:4326", value.code);
    }
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

    public void testWKT() {
        final Map<String,Object> properties = new HashMap<String,Object>(8);
        assertNull(properties.put(NAME_KEY, "My “object”."));
        assertNull(properties.put(SCOPE_KEY, "Large scale topographic mapping and cadastre."));
        assertNull(properties.put(REMARKS_KEY, "注です。"));
        assertNull(properties.put(IDENTIFIERS_KEY, new ImmutableIdentifier(
                HardCodedCitations.OGP, "EPSG", "4326", "8.2", null)));
        assertNull(properties.put(DOMAIN_OF_VALIDITY_KEY, new DefaultExtent("Netherlands offshore.",
                new DefaultGeographicBoundingBox(2.54, 6.40, 51.43, 55.77),
                new DefaultVerticalExtent(10, 1000, VerticalCRSMock.DEPTH),
                new DefaultTemporalExtent()))); // TODO: needs sis-temporal module for testing that one.
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

     * </ul>
     */
    @Test
    @DependsOnMethod("testWithoutIdentifier")
    public void testWithSingleIdentifier() {
        final ReferenceIdentifier      identifier  = new ImmutableIdentifier(null, "EPSG", "7019");
        final Set<ReferenceIdentifier> identifiers = Collections.singleton(identifier);
        final AbstractIdentifiedObject object      = new AbstractIdentifiedObject(properties(identifiers));
        final ReferenceIdentifier      gmlId       = validate(object, identifiers, "epsg-7019");
        assertNotNull("gmlId",                   gmlId);
        assertEquals ("gmlId.codespace", "EPSG", gmlId.getCodeSpace());
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

     * with codespace.
     */
    @Test
    public void testIdentifiers() {
        // Expected values to be used later in the test.
        final ReferenceIdentifier id1 = new ImmutableIdentifier(OGP,     "EPSG",    "9804");
        final ReferenceIdentifier id2 = new ImmutableIdentifier(GEOTIFF, "GeoTIFF", "7");
        assertEquals("EPSG:9804", IdentifiedObjects.toString(id1));
        assertEquals("GeoTIFF:7", IdentifiedObjects.toString(id2));

        // The test.
        final BuilderMock builder = new BuilderMock();
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

        if (metadata == null) {
            return null;
        } else if (metadata instanceof ImmutableIdentifier) {
            return (ImmutableIdentifier) metadata;
        } else {
            return new ImmutableIdentifier(metadata);
        }
    }
View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

     */
    @Test
    public void testMarshalling() throws JAXBException {
        final Map<String,Object> properties = new HashMap<String,Object>(4);
        assertNull(properties.put(DefaultTemporalDatum.IDENTIFIERS_KEY,
                new ImmutableIdentifier(HardCodedCitations.SIS, "SIS", "MJ")));
        assertNull(properties.put(DefaultTemporalDatum.NAME_KEY, "Modified Julian"));
        assertNull(properties.put(DefaultTemporalDatum.SCOPE_KEY, "History."));
        assertNull(properties.put(DefaultTemporalDatum.REMARKS_KEY,
                "Time measured as days since November 17, 1858 at 00:00 UTC."));

View Full Code Here

Examples of org.apache.sis.metadata.iso.ImmutableIdentifier

     */
    @Test
    public void testReferenceSystemToAFNOR() {
        ReferenceSystem std, fra;

        std = new ReferenceSystemMetadata(new ImmutableIdentifier(null, "EPSG", "4326"));
        fra = FrenchProfile.toAFNOR(std, false);
        assertInstanceOf("Expected AFNOR instance.", DirectReferenceSystem.class, fra);
        assertSame("Already an AFNOR instance.", fra, FrenchProfile.toAFNOR(fra));

        fra = FrenchProfile.toAFNOR(std, true);
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.