Class DataProperty

java.lang.Object
com.luciad.datamodels.DataProperty
All Implemented Interfaces:
AutoCloseable

public final class DataProperty extends Object implements AutoCloseable
Represents a property of a DataType.

A property has a name, a value type and a collection type. The value type indicates whether the value is a simple primitive or another data object. The collection type indicates whether the property holds a single value or a list of values of the value type (see DataCollectionKind).

Additional metadata can be attached to a property in the form of a DataAnnotation (see getAnnotations()).

New properties can be defined using a DataProperty.Builder (see newBuilder()).

Instances of this class are thread-safe. Once an instance has been created, there is no public API to modify it.

  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • newBuilder

      @NotNull public static DataProperty.Builder newBuilder()
      Creates a new DataProperty builder.
      Returns:
      a new DataProperty builder.
    • getName

      @NotNull public String getName()
      Returns the name of the data property.
      Returns:
      the name of the data property.
    • getValueType

      @NotNull public DataType getValueType()
      Returns the type of the value of this data property.

      For a list-typed property (see getCollectionKind()), this is the type of the elements in the list.

      Returns:
      the type of the value of this data property.
    • getCollectionKind

      @NotNull public DataCollectionKind getCollectionKind()
      Returns the collection type of this data property.

      Defaults to DataCollectionKind#Scalar. A property built with DataCollectionKind#List holds a list of values of getValueType() rather than a single value.

      Returns:
      the collection type of this data property.
      Since:
      2026.1
    • getAnnotations

      @NotNull public List<@NotNull DataAnnotation> getAnnotations()
      Returns the annotations attached to this data property.
      Returns:
      the annotations attached to this data property.
      Since:
      2026.1
    • toString

      @NotNull public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Returns the hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code.
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object