Class SimpleAttributeType<V>

java.lang.Object
org.apache.sis.internal.simple.SimpleAttributeType<V>
Type Parameters:
V - the type of attribute value.
All Implemented Interfaces:
Serializable, org.opengis.util.Type

public final class SimpleAttributeType<V> extends Object implements org.opengis.util.Type, Serializable
A simple attribute type containing only a name and a class of values. Such simple type are suitable for use in ISO 19103 RecordType in addition to ISO 19109 org.opengis.feature.FeatureType.
Since:
0.5
Version:
0.5
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.opengis.util.TypeName
    The name for this attribute type.
    private static final long
    For cross-version compatibility.
    private final Class<V>
    The class of value for attributes of this type.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleAttributeType(org.opengis.util.TypeName name, Class<V> valueClass)
    Creates a new attribute type for the given name and class of values.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Compares this attribute type with the given object for equality.
    Not used for this simple attribute type.
    org.opengis.util.InternationalString
    Not used for this simple attribute type.
    org.opengis.util.InternationalString
    Not used for this simple attribute type.
    org.opengis.util.InternationalString
    Not used for this simple attribute type.
    int
    Returns 1 as of simple feature definition.
    int
    Returns 1 as of simple feature definition.
    org.opengis.util.GenericName
    Returns the name of this attribute type (ISO 19109).
    org.opengis.util.TypeName
    Returns the name of this attribute type (ISO 19103).
    Returns the class of value for attributes of this type.
    int
    Returns a hash code value for this type.
    Returns the type name.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • name

      private final org.opengis.util.TypeName name
      The name for this attribute type.
    • valueClass

      private final Class<V> valueClass
      The class of value for attributes of this type.
  • Constructor Details

    • SimpleAttributeType

      public SimpleAttributeType(org.opengis.util.TypeName name, Class<V> valueClass)
      Creates a new attribute type for the given name and class of values.
      Parameters:
      name - the name for this attribute type (shall not be null).
      valueClass - the class of value for attributes of this type (shall not be null).
  • Method Details

    • getName

      public org.opengis.util.GenericName getName()
      Returns the name of this attribute type (ISO 19109).
      Returns:
      the name of this attribute type.
    • getTypeName

      public org.opengis.util.TypeName getTypeName()
      Returns the name of this attribute type (ISO 19103).
      Specified by:
      getTypeName in interface org.opengis.util.Type
      Returns:
      the name of this attribute type.
    • getValueClass

      public Class<V> getValueClass()
      Returns the class of value for attributes of this type.
      Returns:
      the class of value for attributes of this type.
    • getMinimumOccurs

      public int getMinimumOccurs()
      Returns 1 as of simple feature definition.
      Returns:
      always 1.
    • getMaximumOccurs

      public int getMaximumOccurs()
      Returns 1 as of simple feature definition.
      Returns:
      always 1.
    • getDefaultValue

      public V getDefaultValue()
      Not used for this simple attribute type.
      Returns:
      always null.
    • getDefinition

      public org.opengis.util.InternationalString getDefinition()
      Not used for this simple attribute type.
      Returns:
      always null.
    • getDesignation

      public org.opengis.util.InternationalString getDesignation()
      Not used for this simple attribute type.
      Returns:
      always null.
    • getDescription

      public org.opengis.util.InternationalString getDescription()
      Not used for this simple attribute type.
      Returns:
      always null.
    • hashCode

      public int hashCode()
      Returns a hash code value for this type.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value.
    • equals

      public boolean equals(Object object)
      Compares this attribute type with the given object for equality.
      Overrides:
      equals in class Object
      Parameters:
      object - the object to compare with this attribute type.
      Returns:
      true if both objects are equal.
    • toString

      public String toString()
      Returns the type name.
      Overrides:
      toString in class Object
      Returns:
      the type name.