Package org.dspace.content.authority
Class Choice
- java.lang.Object
-
- org.dspace.content.authority.Choice
-
-
Field Summary
Fields Modifier and Type Field Description StringauthorityAuthority key for this valueMap<String,String>extrasStringlabelLabel to display for this value (e.g.booleanselectableA boolean representing if choice entry value can selected (usually true).StringvalueThe canonical text value to insert into MetadataValue's text field
-
Constructor Summary
Constructors Constructor Description Choice()Choice(String authority, String value, String label)Minimal constructor for this data object.Choice(String authority, String label, String value, boolean selectable)Constructor for common need of Hierarchical authorities that want to explicitely set the selectable flagChoice(String authority, String label, String value, Map<String,String> extras)Constructor to quickly setup the data object for basic authorities.
-
-
-
Field Detail
-
authority
public String authority
Authority key for this value
-
label
public String label
Label to display for this value (e.g. to present in UI menu)
-
value
public String value
The canonical text value to insert into MetadataValue's text field
-
selectable
public boolean selectable
A 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
-
-
Constructor Detail
-
Choice
public Choice()
-
Choice
public Choice(String authority, String value, String label)
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
public Choice(String authority, String label, String value, Map<String,String> extras)
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
public Choice(String authority, String label, String value, boolean selectable)
Constructor for common need of Hierarchical authorities that want to explicitely 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
-
-