Package nzilbb.labbcat.model
Class SystemAttribute
- java.lang.Object
-
- nzilbb.labbcat.model.SystemAttribute
-
public class SystemAttribute extends Object
system_attribute record.- Author:
- Robert Fromont robert@fromont.net.nz
-
-
Constructor Summary
Constructors Constructor Description SystemAttribute()Default constructor.SystemAttribute(javax.json.JsonObject json)Constructor from JSON.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttribute()Getter forattribute: ID of the attribute.StringgetDescription()Getter fordescription: User-facing (long) description of the attribute.StringgetLabel()Getter forlabel: User-facing label for the attribute.Map<String,String>getOptions()Getter foroptions: Iftypeis "select", these are the valid options for the attribute, where the map key is the attribute value and the map value is the user-facing label for the option.StringgetStyle()Getter forstyle: Style definition which depends ontype- e.g.StringgetType()Getter fortype: The type of the attribute - "string", "integer", "boolean", "select", etc.StringgetValue()Getter forvalue: The value of the attribute.SystemAttributesetAttribute(String newAttribute)Setter forattribute: ID of the attribute.SystemAttributesetDescription(String newDescription)Setter fordescription: User-facing (long) description of the attribute.SystemAttributesetLabel(String newLabel)Setter forlabel: User-facing label for the attribute.SystemAttributesetOptions(Map<String,String> newOptions)Setter foroptions: Iftypeis "select", these are the valid options for the attribute, where the map key is the attribute value and the map value is the user-facing label for the option.SystemAttributesetStyle(String newStyle)Setter forstyle: Style definition which depends ontype- e.g.SystemAttributesetType(String newType)Setter fortype: The type of the attribute - "string", "integer", "boolean", "select", etc.SystemAttributesetValue(String newValue)Setter forvalue: The value of the attribute.javax.json.JsonObjecttoJson()Serializes the object to JSON.
-
-
-
Method Detail
-
getAttribute
public String getAttribute()
Getter forattribute: ID of the attribute.- Returns:
- ID of the attribute.
-
setAttribute
public SystemAttribute setAttribute(String newAttribute)
Setter forattribute: ID of the attribute.- Parameters:
newAttribute- ID of the attribute.- Returns:
- A reference to this object, so that setters can be chained.
-
getType
public String getType()
Getter fortype: The type of the attribute - "string", "integer", "boolean", "select", etc.- Returns:
- The type of the attribute - "string", "integer", "boolean", "select", etc.
-
setType
public SystemAttribute setType(String newType)
Setter fortype: The type of the attribute - "string", "integer", "boolean", "select", etc.- Parameters:
newType- The type of the attribute - "string", "integer", "boolean", "select", etc.- Returns:
- A reference to this object, so that setters can be chained.
-
getStyle
public String getStyle()
Getter forstyle: Style definition which depends ontype- e.g. whether the "boolean" is shown as a checkbox or radio buttons, etc.- Returns:
- Style definition which depends on
type- e.g. whether the "boolean" is shown as a checkbox or radio buttons, etc.
-
setStyle
public SystemAttribute setStyle(String newStyle)
Setter forstyle: Style definition which depends ontype- e.g. whether the "boolean" is shown as a checkbox or radio buttons, etc.- Parameters:
newStyle- Style definition which depends ontype- e.g. whether the "boolean" is shown as a checkbox or radio buttons, etc.- Returns:
- A reference to this object, so that setters can be chained.
-
getLabel
public String getLabel()
Getter forlabel: User-facing label for the attribute.- Returns:
- User-facing label for the attribute.
-
setLabel
public SystemAttribute setLabel(String newLabel)
Setter forlabel: User-facing label for the attribute.- Parameters:
newLabel- User-facing label for the attribute.- Returns:
- A reference to this object, so that setters can be chained.
-
getDescription
public String getDescription()
Getter fordescription: User-facing (long) description of the attribute.- Returns:
- User-facing (long) description of the attribute.
-
setDescription
public SystemAttribute setDescription(String newDescription)
Setter fordescription: User-facing (long) description of the attribute.- Parameters:
newDescription- User-facing (long) description of the attribute.- Returns:
- A reference to this object, so that setters can be chained.
-
getOptions
public Map<String,String> getOptions()
Getter foroptions: Iftypeis "select", these are the valid options for the attribute, where the map key is the attribute value and the map value is the user-facing label for the option.- Returns:
- If
typeis "select", these are the valid options for the attribute, where the map key is the attribute value and the map value is the user-facing label for the option.
-
setOptions
public SystemAttribute setOptions(Map<String,String> newOptions)
Setter foroptions: Iftypeis "select", these are the valid options for the attribute, where the map key is the attribute value and the map value is the user-facing label for the option.- Parameters:
newOptions- Iftypeis "select", these are the valid options for the attribute, where the map key is the attribute value and the map value is the user-facing label for the option.- Returns:
- A reference to this object, so that setters can be chained.
-
getValue
public String getValue()
Getter forvalue: The value of the attribute.- Returns:
- The value of the attribute.
-
setValue
public SystemAttribute setValue(String newValue)
Setter forvalue: The value of the attribute.- Parameters:
newValue- The value of the attribute.- Returns:
- A reference to this object, so that setters can be chained.
-
toJson
public javax.json.JsonObject toJson()
Serializes the object to JSON.- Returns:
- A JSON serialization of the object.
-
-