Class SchemaElementDefinition

java.lang.Object
com.bloomberglp.blpapi.SchemaElementDefinition

public abstract class SchemaElementDefinition extends Object
The definition of an item in a data schema.

SchemaElementDefinition are returned by Service objects and Operation objects to define the content of requests, replies and events. The SchemaTypeDefinition returned by typeDefinition() may itself return SchemaElementDefinition objects when the schema contains complex items. SchemaElementDefinition objects are read-only and always created by the API, never by the application. The SchemaElementDefinition defines the symbolic name any constraints on this item and the SchemaTypeDefinition which represents instances of this item.

An item which is optional in the schema has minValues()== 0.

An item which is mandatory in the schema has minValues() >= 1.

An item which is a single value has maxValues() == 1.

An item which is an array has maxValues() > 1.

An item which is an unbounded array has maxValues() == UNBOUNDED.

As well as the symbolic name, array constraints and other constraints this class also provides access to the description and status of the item.

  • Field Details

    • UNBOUNDED

      public static final int UNBOUNDED
      Indicates that an array element has an unbounded number of values
      See Also:
  • Constructor Details

    • SchemaElementDefinition

      public SchemaElementDefinition()
  • Method Details

    • setUserData

      public abstract void setUserData(Object userData)
      Set the user data associated with this object to the specified userData.
    • name

      public abstract Name name()
      Return the name of this item
    • numAlternateNames

      public abstract int numAlternateNames()
      Return the number of alternate names for this item
    • getAlternateName

      public abstract Name getAlternateName(int index)
      Return the alternate name for this item at the specified index
      Throws:
      IndexOutOfBoundsException - if index >= numAlternateNames()
    • description

      public abstract String description()
      Return a String containing a human readable description of this item
    • status

      public abstract Schema.Status status()
      Return the status of this SchemaElementDefinition
    • typeDefinition

      public abstract SchemaTypeDefinition typeDefinition()
      Return the SchemaTypeDefinition of this item
    • minValues

      public abstract int minValues()
      Return the minimum number of occurences of this item. This value is always >= 0.
    • maxValues

      public abstract int maxValues()
      Return the maximum number of occurences of the this item. This value may be UNBOUNDED (-1) or any value >= 1.
    • constraints

      public abstract ConstraintsList constraints()
    • userData

      public abstract Object userData()
      Return the user data associated with this ElementDefinition