Class DataModel

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

public final class DataModel extends Object implements AutoCloseable
A data model is a collection of types that forms a logical entity.

Conceptually this is similar to a UML package or an XML schema.

A data model is identified by its name. Two data models are considered to be equal if they have the same name and data types.

DataModel provides access to its types (see getDataTypes()).

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

Data models are created using a DataModel.Builder (see newBuilder()).

  • Method Details

    • finalize

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

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

      @NotNull public static DataModel getCoreDataModel()
      Returns the data model containing the core DataProperty value types.
      Returns:
      the data model containing the core DataProperty value types.
    • newBuilder

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

      @NotNull public String getName()
      Returns the name of this data model.
      Returns:
      the name of this data model.
    • getDataTypes

      @NotNull public List<@NotNull DataType> getDataTypes()
      Returns the data types of this data model.
      Returns:
      the data types of this data model.
    • findDataType

      @Nullable public DataType findDataType(@NotNull String name)
      Searches for a data type by name.
      Parameters:
      name - the name for a data type.
      Returns:
      the data type named name, if such a type exists in this data model.
    • 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