Examples of Citation


Examples of org.opengis.metadata.citation.Citation

     *
     * @throws JAXBException Should never happen.
     */
    @Test
    public void testIdentification() throws JAXBException {
        final Citation citation = (Citation) XML.unmarshal(IDENTIFIED_XML);
        assertEquals("title", "My data", citation.getTitle().toString());
        /*
         * Programmatic verification of the Series properties,
         * which is the main object of interest in this test.
         */
        final Series series = citation.getSeries();
        assertFalse("Unexpected proxy", Proxy.isProxyClass(series.getClass()));
        assertInstanceOf("Expected IdentifiedObject", IdentifiedObject.class, series);
        final IdentifierMap map = ((IdentifiedObject) series).getIdentifierMap();
        assertEquals("series", "My aggregate dataset",  series.getName().toString());
        assertNull  ("href", map.get(IdentifierSpace.HREF));
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

     *
     * @throws JAXBException Should never happen.
     */
    @Test
    public void testReference() throws JAXBException {
        final Citation citation = (Citation) XML.unmarshal(REFERENCED_XML_WITH_BODY);
        assertEquals("Citation.title""My data", citation.getTitle().toString());
        /*
         * Programmatic verification of the Series properties,
         * which is the main object of interest in this test.
         */
        final Series series = citation.getSeries();
        assertInstanceOf("Citation.series", IdentifiedObject.class, series);
        assertFalse     ("Citation.series.isProxy", Proxy.isProxyClass(series.getClass()));
        assertEquals    ("Citation.series.name", "My aggregate dataset", series.getName().toString());
        final IdentifierMap map = ((IdentifiedObject) series).getIdentifierMap();
        assertNull  ("href",             map.get(IdentifierSpace.HREF));
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

     * @throws JAXBException Should never happen.
     */
    @Test
    @DependsOnMethod("testReference")
    public void testReferenceInEmptyObject() throws JAXBException {
        final Citation citation = (Citation) XML.unmarshal(REFERENCED_XML);
        assertEquals("Citation.title""My data", citation.getTitle().toString());
        /*
         * Programmatic verification of the Series properties,
         * which is the main object of interest in this test.
         */
        final Series series = citation.getSeries();
        assertInstanceOf("Citation.series", IdentifiedObject.class, series);
        assertNull      ("Citation.series.name", series.getName());
        assertTrue      ("Citation.series.isProxy", Proxy.isProxyClass(series.getClass()));
        assertInstanceOf("Citation.series", NilObject.class, series);
        assertEquals    ("Series[{gco:uuid=“" + UUID_VALUE + "”}]", series.toString());
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

     *               or {@code null} if none.
     */
    public static <T extends Identifier> void replace(final Collection<T> identifiers, final Collection<T> oldIds) {
        if (oldIds != null && identifiers != null) {
            for (final T old : oldIds) {
                final Citation authority = old.getAuthority();
                for (final Iterator<T> it=identifiers.iterator(); it.hasNext();) {
                    final T id = it.next();
                    if (id == null || id.getAuthority() == authority) {
                        it.remove();
                    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

     * Returns a pseudo-WKT representation for debugging purpose.
     */
    @Override
    public String toString() {
        final String code, codespace;
        final Citation authority;
        final ReferenceIdentifier id = referenceSystemIdentifier;
        if (id != null) {
            code      = id.getCode();
            codespace = id.getCodeSpace();
            authority = id.getAuthority();
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

            final Iterator<? extends Identifier> it = identifiers;
            if (it != null) {
                while (it.hasNext()) {
                    final Identifier identifier = it.next();
                    if (identifier != null) {
                        final Citation authority = identifier.getAuthority();
                        final Boolean state = put(authority, Boolean.FALSE);
                        if (state == null) {
                            if (identifier instanceof IdentifierMapEntry) {
                                next = (IdentifierMapEntry) identifier;
                            } else {
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

    protected void setUp() throws Exception {
        super.setUp();
        factory = new EPSGCRSAuthorityFactory();
    }
    public void testAuthority(){
        Citation authority = factory.getAuthority();

        assertNotNull( authority );
        assertEquals( "European Petroleum Survey Group", authority.getTitle().toString() );
        assertTrue( Citations.identifierMatches(authority, "EPSG" ) );
    }
View Full Code Here

Examples of org.opengis.metadata.citation.Citation

        assertEquals( "European Petroleum Survey Group", authority.getTitle().toString() );
        assertTrue( Citations.identifierMatches(authority, "EPSG" ) );
    }

    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

    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

     *
     * @throws FactoryException if the database's metadata can't be fetched.
     */
    @Override
    public synchronized String getBackingStoreDescription() throws FactoryException {
        final Citation   authority = getAuthority();
        final TableWriter    table = new TableWriter(null, " ");
        final Vocabulary resources = Vocabulary.getResources(null);
        CharSequence cs;
        if ((cs=authority.getEdition()) != null) {
            table.write(resources.getString(VocabularyKeys.VERSION_OF_$1, "EPSG"));
            table.write(':');
            table.nextColumn();
            table.write(cs.toString());
            table.nextLine();
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.