com.bloomberglp.blpapi
Class SchemaElementDefinition

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

public abstract class SchemaElementDefinition
extends java.lang.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.

Author:
Chao Yao(cyao3)

Field Summary
static int UNBOUNDED
          Indicates that an array element has an unbounded number of values
 
Constructor Summary
SchemaElementDefinition()
           
 
Method Summary
abstract  ConstraintsList constraints()
           
abstract  java.lang.String description()
          Return a String containing a human readable description of this item
abstract  Name getAlternateName(int index)
          Return the alternate name for this item at the specified index
abstract  int maxValues()
          Return the maximum number of occurences of the this item.
abstract  int minValues()
          Return the minimum number of occurences of this item.
abstract  Name name()
          Return the name of this item
abstract  int numAlternateNames()
          Return the number of alternate names for this item
abstract  void setUserData(java.lang.Object userData)
          Set the user data associated with this object to the specified userData.
abstract  Schema.Status status()
          Return the status of this SchemaElementDefinition
abstract  SchemaTypeDefinition typeDefinition()
          Return the SchemaTypeDefinition of this item
abstract  java.lang.Object userData()
          Return the user data associated with this ElementDefinition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNBOUNDED

public static final int UNBOUNDED
Indicates that an array element has an unbounded number of values

See Also:
Constant Field Values
Constructor Detail

SchemaElementDefinition

public SchemaElementDefinition()
Method Detail

setUserData

public abstract void setUserData(java.lang.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:
java.lang.IndexOutOfBoundsException - if index >= numAlternateNames()

description

public abstract java.lang.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 java.lang.Object userData()
Return the user data associated with this ElementDefinition



Copyright © 2015 Bloomberg L.P.. All Rights Reserved.