Class DataPropertyPath

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

public final class DataPropertyPath extends Object implements AutoCloseable
Describes the path to a DataProperty in a DataType.

It can also describe paths to nested properties. The path is related to a specific DataType (its getOriginType) and is used to address values in data objects of that type.

A path may also address values in list-typed properties (see DataCollectionKind):

  • Without an index step, it addresses the list.
  • With a Builder#index step, it addresses a single list element.

getValueCollectionKind reports which shape the target property has.

Restrictions:

  • A path may cross at most one list (Builder#index can be called at most once on a builder).
  • After a list-typed property step, the path must either be terminated or followed by Builder#index. It cannot descend into the list's element type.
  • Builder#index is terminal: no further property or index step may be added after it. Multi-level access into composite list elements is done by retrieving the element as a separate object and building a new path on that.
  • 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 DataPropertyPath.Builder newBuilder()
      Creates a new builder.
      Returns:
      a new builder.
    • asBuilder

      @NotNull public DataPropertyPath.Builder asBuilder()
      Returns a builder with the current data property path.
      Returns:
      a builder with the current data property path.
    • getOriginType

      @NotNull public DataType getOriginType()
      Returns the type of data object that this path accesses.
      Returns:
      the type of data object that this path accesses.
    • getValueType

      @NotNull public DataType getValueType()
      Returns the value type of the property that this path points to.

      For a list-typed leaf (list or indexed element), this is the element type.

      Returns:
      the value type of the property that this path points to.
    • getValueCollectionKind

      @NotNull public DataCollectionKind getValueCollectionKind()
      Returns the collection kind of the value that this path points to.

      The result reflects the kind of value:

      • Scalar for a path that points to a scalar property (including an element inside a list).
      • List for a path that points to a list.

      Defaults to Scalar for empty paths (originType only).

      Returns:
      the collection kind of the value at this path.
      Since:
      2026.1
    • getTargetProperty

      @Nullable public DataProperty getTargetProperty()
      Returns the property that this path points to (the property at the end of the path).

      For a path with a terminal index step, this is the list property that the index applies to. For an empty path (origin type only, no property steps), this has no value.

      Returns:
      the target property, or no value if this path has no property steps.
      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