001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2006-2023 Open Geospatial Consortium, Inc.
004 *    http://www.geoapi.org
005 *
006 *    Licensed under the Apache License, Version 2.0 (the "License");
007 *    you may not use this file except in compliance with the License.
008 *    You may obtain a copy of the License at
009 *
010 *        http://www.apache.org/licenses/LICENSE-2.0
011 *
012 *    Unless required by applicable law or agreed to in writing, software
013 *    distributed under the License is distributed on an "AS IS" BASIS,
014 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 *    See the License for the specific language governing permissions and
016 *    limitations under the License.
017 */
018package org.opengis.util;
019
020import org.opengis.annotation.UML;
021
022import static org.opengis.annotation.Obligation.*;
023import static org.opengis.annotation.Specification.*;
024
025
026/**
027 * A name that references either an attribute slot in a record, an attribute, operation,
028 * or association role in an object instance or a type description in some schema.
029 * In a {@code Record} containing an arbitrary number of attributes:
030 *
031 * <ul>
032 *   <li>{@code MemberName} is the name of an attribute. It is similar the name of a field in a Java class.</li>
033 *   <li>{@link TypeName} is the name of the attribute definition.
034 *       It is similar to the name of a {@link Class}.</li>
035 * </ul>
036 *
037 * @author  Bryce Nordgren (USDA)
038 * @author  Martin Desruisseaux (IRD)
039 * @version 3.0
040 * @since   2.1
041 */
042@UML(identifier="MemberName", specification=ISO_19103)
043public interface MemberName extends LocalName {
044    /**
045     * Returns the type of the data associated with the member or record field.
046     *
047     * <h4>Comparison with the Java language</h4>
048     * {@code MemberName} is similar to the name of a field in a Java class,
049     * while the returned {@code TypeName} is similar to the name of the
050     * Java {@link Class} used for representing a value in this field.
051     *
052     * @return the type of the data associated with the member.
053     */
054    @UML(identifier="attributeType", obligation=MANDATORY, specification=ISO_19103)
055    TypeName getAttributeType();
056
057    /**
058     * Returns the name of the member.
059     * Member names typically use a {@code '.'} navigation separator,
060     * so that their {@linkplain #toFullyQualifiedName() fully qualified name} is of the form
061     * {@code "[schema].[type].[member]"}.
062     */
063    @Override
064    @UML(identifier="aName", obligation=MANDATORY, specification=ISO_19103)
065    String toString();
066}