Package org.opengis.metadata

Examples of org.opengis.metadata.Identifier


    {
        ArgumentChecks.ensureNonNull("authority", authority);
        T old = null;
        final Iterator<? extends Identifier> it = identifiers.iterator();
        while (it.hasNext()) {
            final Identifier identifier = it.next();
            if (identifier == null) {
                it.remove(); // Opportunist cleaning, but should not happen.
            } else if (Objects.equals(authority, identifier.getAuthority())) {
                if (identifier instanceof SpecializedIdentifier<?>) {
                    @SuppressWarnings("unchecked")
                    final SpecializedIdentifier<T> id = (SpecializedIdentifier<T>) identifier;
                    if (old == null) {
                        old = id.value;
View Full Code Here


         */
        private void toNext() {
            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 {
                                next = new IdentifierMapEntry.Immutable(authority, identifier.getCode());
                            }
                            this.authority = authority;
                            return;
                        }
                        if (state) {
View Full Code Here

     * @return The metadata to be marshalled.
     */
    @XmlElementRef
    public DefaultIdentifier getElement() {
        if (skip()) return null;
        final Identifier metadata = this.metadata;
        if (metadata instanceof ReferenceIdentifier) {
            return null;
        }
        return DefaultIdentifier.castOrCopy(metadata);
    }
View Full Code Here

     * @return The metadata to be marshalled.
     */
    @XmlElement(name = "RS_Identifier")
    public ImmutableIdentifier getReferenceIdentifier() {
        if (!skip()) {
            final Identifier metadata = this.metadata;
            if (metadata instanceof ReferenceIdentifier) {
                return ImmutableIdentifier.castOrCopy((ReferenceIdentifier) metadata);
            }
        }
        return null;
View Full Code Here

     *         or a {@linkplain GenericName#tip() name tip}), or {@code null} if no name matching the
     *         specified authority has been found.
     */
    private static String getName(final IdentifiedObject object, final Citation authority, final Collection<String> addTo) {
        if (object != null) {
            Identifier identifier = object.getName();
            if (authority == null) {
                if (identifier != null) {
                    final String name = identifier.getCode();
                    if (name != null) {
                        if (addTo == null) {
                            return name;
                        }
                        addTo.add(name);
                    }
                }
                final Iterator<GenericName> it = iterator(object.getAlias());
                if (it != null) while (it.hasNext()) {
                    final GenericName alias = it.next();
                    if (alias != null) {
                        final String name = (alias instanceof Identifier) ?
                                ((Identifier) alias).getCode() : alias.toString();
                        if (name != null) {
                            if (addTo == null) {
                                return name;
                            }
                            addTo.add(name);
                        }
                    }
                }
            } else {
                if (identifier != null) {
                    if (identifierMatches(authority, identifier.getAuthority())) {
                        final String name = identifier.getCode();
                        if (name != null) {
                            if (addTo == null) {
                                return name;
                            }
                            addTo.add(name);
                        }
                    }
                }
                final Iterator<GenericName> it = iterator(object.getAlias());
                if (it != null) while (it.hasNext()) {
                    final GenericName alias = it.next();
                    if (alias != null) {
                        if (alias instanceof Identifier) {
                            identifier = (Identifier) alias;
                            if (identifierMatches(authority, identifier.getAuthority())) {
                                final String name = identifier.getCode();
                                if (name != null) {
                                    if (addTo == null) {
                                        return name;
                                    }
                                    addTo.add(name);
View Full Code Here

     *
     * @return The metadata to be marshalled.
     */
    @XmlElementRef
    public DefaultIdentifier getElement() {
        final Identifier metadata = this.metadata;
        if (metadata instanceof ReferenceIdentifier) {
            return null;
        }
        return DefaultIdentifier.castOrCopy(metadata);
    }
View Full Code Here

     *
     * @return The metadata to be marshalled.
     */
    @XmlElement(name = "RS_Identifier")
    public ImmutableIdentifier getReferenceIdentifier() {
        final Identifier metadata = this.metadata;
        if (metadata instanceof ReferenceIdentifier) {
            return ImmutableIdentifier.castOrCopy((ReferenceIdentifier) metadata);
        }
        return null;
    }
View Full Code Here

     */
    public Metadata read() throws IOException {
        final DefaultMetadata metadata = new DefaultMetadata();
        metadata.setMetadataStandardName(MetadataUtilities.STANDARD_NAME_2);
        metadata.setMetadataStandardVersion(MetadataUtilities.STANDARD_VERSION_2);
        final Identifier identifier = getFileIdentifier();
        if (identifier != null) {
            String code = identifier.getCode();
            final Citation authority = identifier.getAuthority();
            if (authority != null) {
                final InternationalString title = authority.getTitle();
                if (title != null) {
                    code = title.toString() + DefaultNameSpace.DEFAULT_SEPARATOR + code;
                }
View Full Code Here

                    return titleMatches(c1, c2);
                }
                c1 = c2;
            }
            do {
                final Identifier id = iterator.next();
                if (id != null && identifierMatches(c1, id.getCode())) {
                    return true;
                }
            } while (iterator.hasNext());
        }
        return false;
View Full Code Here

            final Iterator<? extends Identifier> identifiers = iterator(citation.getIdentifiers());
            if (identifiers == null) {
                return titleMatches(citation, identifier);
            }
            while (identifiers.hasNext()) {
                final Identifier id = identifiers.next();
                if (id != null && equalsFiltered(identifier, id.getCode(), LETTERS_AND_DIGITS, true)) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

TOP

Related Classes of org.opengis.metadata.Identifier

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.