Class TabularDataDescriptor

All Implemented Interfaces:
Serializable

public final class TabularDataDescriptor extends CompositeDataDescriptor
This subclass of DataDescriptor is used to describe objects of type TabularData.
See Also:
  • Constructor Details

    • TabularDataDescriptor

      public TabularDataDescriptor(String name, String desc, DataDescriptor[] elementDescriptors, String[] indexNames)
      Constructs a TabularDataDescriptor.

      Note that a type parameter is not required as in DataDescriptor, it is implicitly the TabularData type.

      Parameters:
      name - The name of the data parameter being described. It must be a non-null, non-empty alpha numeric string.
      desc - A description of the parameter being described
      elementDescriptors - can not be null or empty array. The array can not contain null elements. It must contain DataDescriptor objects that describe open data types. All elements must have unique names. Each descriptor describes a single column in the table, its name is the column's name and its type describes the type of the data the column will hold.
      indexNames - Identifies those columns of the table that can be used as a unique index for each row. Must identify at least one index column. All index names must be non-null and non-empty strings. No two array entries may contain the same string. All index names identified by this array must have a corresponding DataDescriptor in the array specified by the elementDescriptors parameter.
  • Method Details

    • getIndexNames

      public String[] getIndexNames()
      Returns an array of the index names used to construct this table descriptor. They identify which columns can be used to uniquely index each row.
      Returns:
      The index names.
    • getColumnNames

      public String[] getColumnNames()
      Returns an array of the column names derived from the DataDescriptor elements used to construct this descriptor.
      Returns:
      The column names.
    • getColumnTypes

      public String[] getColumnTypes()
      Returns an array of column types derived from the DataDescriptor elements used to construct this descriptor. The type names in this array correspond to the columns identified in the array returned by getColumnNames() at the same array index.
      Returns:
      The column types.
    • isOpenData

      public boolean isOpenData()
      Returns true if this descriptor describes an open data type.

      This overridden method will always return true for this subclass of DataDescriptor because the constructor insures that only the open data type TabularData may be described.

      Overrides:
      isOpenData in class CompositeDataDescriptor
      Returns:
      True if this descriptor describes an open data type.
      See Also:
    • equals

      public boolean equals(Object obj)
      Compares this object against the specified object.

      Two descriptors are equal if their name, type, description, index names and DataDescriptor elements are equal.

      Overrides:
      equals in class CompositeDataDescriptor
      Returns:
      true if the two objects are equal.
    • toString

      public String toString()
      Returns a string representation of this descriptor.
      Overrides:
      toString in class CompositeDataDescriptor