Package org.dspace.content.authority
Class Choice
java.lang.Object
org.dspace.content.authority.Choice
Record class to hold the data describing one option, or choice, for an
authority-controlled metadata value.
- Author:
- Larry Stone
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionAuthority key for this valueLabel to display for this value (e.g. to present in UI menu)booleanA boolean representing if choice entry value can selected (usually true).The canonical text value to insert into MetadataValue's text field -
Constructor Summary
ConstructorsConstructorDescriptionChoice()Minimal constructor for this data object.Constructor for common need of Hierarchical authorities that want to explicitly set the selectable flagConstructor to quickly setup the data object for basic authorities. -
Method Summary
-
Field Details
-
authority
Authority key for this value -
label
Label to display for this value (e.g. to present in UI menu) -
value
The canonical text value to insert into MetadataValue's text field -
selectable
public boolean selectableA boolean representing if choice entry value can selected (usually true). Hierarchical authority can flag some choice as not selectable to force the use to choice a more detailed terms in the tree, such a leaf or a deeper branch -
extras
-
-
Constructor Details
-
Choice
public Choice() -
Choice
Minimal constructor for this data object. It assumes an empty map of extras information and a selected choice- Parameters:
authority- the authority keyvalue- the text value to store in the metadatalabel- the value to display to the user
-
Choice
Constructor to quickly setup the data object for basic authorities. The choice is assumed to be selectable.- Parameters:
authority- the authority keyvalue- the text value to store in the metadatalabel- the value to display to the userextras- a key value map of extra information related to this choice
-
Choice
Constructor for common need of Hierarchical authorities that want to explicitly set the selectable flag- Parameters:
authority- the authority keyvalue- the text value to store in the metadatalabel- the value to display to the userselectable- true if the choice can be selected, false if the a more accurate choice should be preferred
-