com.adactus.mpeg21.didl.entity
Class ChoiceType

java.lang.Object
  extended by com.adactus.mpeg21.didl.entity.DIDLBaseType
      extended by com.adactus.mpeg21.didl.entity.DIDLChildType
          extended by com.adactus.mpeg21.didl.entity.DIDLParentType
              extended by com.adactus.mpeg21.didl.entity.ChoiceType
All Implemented Interfaces:
Choice, java.io.Serializable, javolution.lang.Reusable

public class ChoiceType
extends DIDLParentType
implements Choice, javolution.lang.Reusable

See Also:
Serialized Form

Field Summary
static java.lang.String ELEMENT_NAME
           
 
Constructor Summary
ChoiceType()
           
 
Method Summary
 boolean add(ConditionType o)
           
 boolean add(DescriptorType o)
           
 boolean add(SelectionType o)
           
 java.lang.String getChoiceIdentifier()
          Get the identifier of this element.
 java.util.List<Condition> getConditions()
          Get the Conditions associated with this instance.
 java.lang.String getDefaultSelection()
           
 java.lang.String[] getDefaultSelections()
          Get default selections, which are used in the absence of info to make a more specific decision.
 java.util.List<Descriptor> getDescriptors()
          Get the Descriptors associated with this instance.
 java.lang.Integer getMaxSelections()
          Get the maximum number of selections of this choice.
 java.lang.Integer getMinSelections()
          Get the minimum number of selections of this choice.
 DIDLParentType getParent()
           
 java.util.List<Selection> getSelections()
          Get the Selections associated with this Choice..
 boolean hasMaxSelections()
           
 boolean hasMinSelections()
           
static ChoiceType newInstance()
           
static void recycle(ChoiceType type)
           
 boolean remove(ConditionType o)
           
 boolean remove(DescriptorType o)
           
 boolean remove(SelectionType o)
           
 void reset()
           
 void setChoiceIdentifier(java.lang.String choiceId)
           
 void setDefaultSelection(java.lang.String defaultSelection)
           
 void setMaxSelections(java.lang.Integer maxSelections)
           
 void setMinSelections(java.lang.Integer minSelections)
           
 void setParent(DIDLParentType parent)
           
 
Methods inherited from class com.adactus.mpeg21.didl.entity.DIDLParentType
getChildren, setChildren
 
Methods inherited from class com.adactus.mpeg21.didl.entity.DIDLChildType
getId, setId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_NAME

public static final java.lang.String ELEMENT_NAME
See Also:
Constant Field Values
Constructor Detail

ChoiceType

public ChoiceType()
Method Detail

add

public boolean add(ConditionType o)

add

public boolean add(DescriptorType o)

add

public boolean add(SelectionType o)

getChoiceIdentifier

public java.lang.String getChoiceIdentifier()
Description copied from interface: Choice
Get the identifier of this element. The identifier must be unique within a digital item.

Specified by:
getChoiceIdentifier in interface Choice
Returns:
an string value

getConditions

public java.util.List<Condition> getConditions()
Description copied from interface: Choice
Get the Conditions associated with this instance.

Specified by:
getConditions in interface Choice
Returns:
list of conditions

getDefaultSelection

public java.lang.String getDefaultSelection()

getDefaultSelections

public java.lang.String[] getDefaultSelections()
Description copied from interface: Choice
Get default selections, which are used in the absence of info to make a more specific decision.

Specified by:
getDefaultSelections in interface Choice
Returns:
an array of the selections which default to true

getDescriptors

public java.util.List<Descriptor> getDescriptors()
Description copied from interface: Choice
Get the Descriptors associated with this instance.

Specified by:
getDescriptors in interface Choice
Returns:
list of descriptors

getMaxSelections

public java.lang.Integer getMaxSelections()
Description copied from interface: Choice
Get the maximum number of selections of this choice. This number must be greater or equal to the minimum selections. If not present, there is no maximum.

Specified by:
getMaxSelections in interface Choice
Returns:
the max selections, or null if not set

getMinSelections

public java.lang.Integer getMinSelections()
Description copied from interface: Choice
Get the minimum number of selections of this choice. This number must be less or equal to the maximum selections. If not present, there is no minimum.

Specified by:
getMinSelections in interface Choice
Returns:
the min selections, or null if not set

getParent

public DIDLParentType getParent()

getSelections

public java.util.List<Selection> getSelections()
Description copied from interface: Choice
Get the Selections associated with this Choice..

Specified by:
getSelections in interface Choice
Returns:
list of selections

hasMaxSelections

public boolean hasMaxSelections()

hasMinSelections

public boolean hasMinSelections()

newInstance

public static ChoiceType newInstance()

recycle

public static void recycle(ChoiceType type)

remove

public boolean remove(ConditionType o)

remove

public boolean remove(DescriptorType o)

remove

public boolean remove(SelectionType o)

reset

public void reset()
Specified by:
reset in interface javolution.lang.Reusable

setChoiceIdentifier

public void setChoiceIdentifier(java.lang.String choiceId)

setDefaultSelection

public void setDefaultSelection(java.lang.String defaultSelection)

setMaxSelections

public void setMaxSelections(java.lang.Integer maxSelections)

setMinSelections

public void setMinSelections(java.lang.Integer minSelections)

setParent

public void setParent(DIDLParentType parent)