Package nzilbb.labbcat.model
Class SystemAttribute
java.lang.Object
nzilbb.labbcat.model.SystemAttribute
system_attribute record.
- Author:
- Robert Fromont robert@fromont.net.nz
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SystemAttribute
(javax.json.JsonObject json) Constructor from JSON. -
Method Summary
Modifier and TypeMethodDescriptionGetter forattribute
: ID of the attribute.Getter fordescription
: User-facing (long) description of the attribute.getLabel()
Getter forlabel
: User-facing label for the attribute.Getter foroptions
: Iftype
is "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.getStyle()
Getter forstyle
: Style definition which depends ontype
- e.g.getType()
Getter fortype
: The type of the attribute - "string", "integer", "boolean", "select", etc.getValue()
Getter forvalue
: The value of the attribute.setAttribute
(String newAttribute) Setter forattribute
: ID of the attribute.setDescription
(String newDescription) Setter fordescription
: User-facing (long) description of the attribute.Setter forlabel
: User-facing label for the attribute.setOptions
(Map<String, String> newOptions) Setter foroptions
: Iftype
is "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.Setter forstyle
: Style definition which depends ontype
- e.g.Setter fortype
: The type of the attribute - "string", "integer", "boolean", "select", etc.Setter forvalue
: The value of the attribute.javax.json.JsonObject
toJson()
Serializes the object to JSON.
-
Constructor Details
-
SystemAttribute
public SystemAttribute()Default constructor. -
SystemAttribute
public SystemAttribute(javax.json.JsonObject json) Constructor from JSON.- Parameters:
json
- A JSON representation of the object to construct.
-
-
Method Details
-
getAttribute
Getter forattribute
: ID of the attribute.- Returns:
- ID of the attribute.
-
setAttribute
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
Getter fortype
: The type of the attribute - "string", "integer", "boolean", "select", etc.- Returns:
- The type of the attribute - "string", "integer", "boolean", "select", etc.
-
setType
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
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
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
Getter forlabel
: User-facing label for the attribute.- Returns:
- User-facing label for the attribute.
-
setLabel
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
Getter fordescription
: User-facing (long) description of the attribute.- Returns:
- User-facing (long) description of the attribute.
-
setDescription
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
Getter foroptions
: Iftype
is "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
type
is "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
Setter foroptions
: Iftype
is "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
- Iftype
is "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
Getter forvalue
: The value of the attribute.- Returns:
- The value of the attribute.
-
setValue
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.
-