Examples of Citation


Examples of org.opengis.metadata.citation.Citation

     */
    private Map<String,Object> createProperties(final String name, final String code, String remarks)
            throws SQLException, FactoryException
    {
        properties.clear();
        final Citation authority = getAuthority();
        if (name != null) {
            properties.put(IdentifiedObject.NAME_KEY,
                           new NamedIdentifier(authority, name.trim()));
        }
        if (code != null) {
            final InternationalString edition = authority.getEdition();
            final String version = (edition!=null) ? edition.toString() : null;
            properties.put(IdentifiedObject.IDENTIFIERS_KEY,
                           new NamedIdentifier(authority, code.trim(), version));
        }
        if (remarks!=null && (remarks=remarks.trim()).length()!=0) {
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the authority code.
     */
    public void testAuthority() {
        Citation authority = factory.getAuthority();
        assertNotNull(authority);
        assertEquals("ESRI", authority.getTitle().toString());
        assertTrue(factory instanceof EsriExtension);
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the vendor.
     */
    public void testVendor() {
        Citation vendor = factory.getVendor();       
        assertNotNull(vendor);
        assertEquals("Geotools", vendor.getTitle().toString());
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the authority code.
     */
    public void testAuthority(){
        final Citation authority = factory.getAuthority();
        assertNotNull(authority);
        assertEquals("European Petroleum Survey Group", authority.getTitle().toString());
        assertTrue (Citations.identifierMatches(authority, "EPSG"));
        assertFalse(Citations.identifierMatches(authority, "ESRI"));
        assertTrue(factory instanceof UnnamedExtension);
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the vendor.
     */
    public void testVendor(){
        final Citation vendor = factory.getVendor();
        assertNotNull(vendor);
        assertEquals("Geotools", vendor.getTitle().toString());
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    final Set<? extends Identifier> identifiers = obj.getIdentifiers();
    final Iterator<? extends Identifier> it = identifiers.iterator();
    String code = "";
    while (it.hasNext()) {
      final Identifier identifier = it.next();
      final Citation cite = identifier.getAuthority();
      if (Citations.identifierMatches(cite, "EPSG")) {
        code = identifier.getCode();
        break;
      }
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Makes sure that the authority factory has the proper name.
     */
    public void testAuthority() {
        CRSAuthorityFactory factory;
        Citation authority;

        // Tests the official factory.
        factory   = ReferencingFactoryFinder.getCRSAuthorityFactory("EPSG", null);
        authority = factory.getAuthority();
        assertNotNull(authority);
        assertEquals("European Petroleum Survey Group", authority.getTitle().toString(Locale.US));
        assertTrue(Citations.identifierMatches(authority, "EPSG"));

        // Tests the modified factory.
        factory   = new OrderedAxisAuthorityFactory("EPSG", null, null);
        authority = factory.getAuthority();
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the vendor name.
     */
    public void testVendor() {
        CRSAuthorityFactory factory;
        Citation vendor;

        factory = new OrderedAxisAuthorityFactory("EPSG", null, null);
        vendor  = factory.getVendor();
        assertNotNull(vendor);
        assertEquals("Geotools", vendor.getTitle().toString(Locale.US));
        assertFalse(Citations.identifierMatches(vendor, "EPSG"));
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Checks the authority names.
     */
    @Test
    public void testAuthority() {
        final Citation authority = factory.getAuthority();
        assertTrue (Citations.identifierMatches(authority, "CRS"));
        assertFalse(Citations.identifierMatches(authority, "EPSG"));
        assertFalse(Citations.identifierMatches(authority, "AUTO"));
        assertFalse(Citations.identifierMatches(authority, "AUTO2"));
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    /**
     * Tests the authority code.
     */
    @Test
    public void testAuthority(){
        final Citation authority = factory.getAuthority();
        assertNotNull(authority);
        assertEquals("European Petroleum Survey Group", authority.getTitle().toString());
        assertTrue (Citations.identifierMatches(authority, "EPSG"));
        assertFalse(Citations.identifierMatches(authority, "ESRI"));
        assertTrue(factory instanceof FactoryUsingWKT);
    }
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.