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 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

      public String getAttribute()
      Getter for attribute: ID of the attribute.
      Returns:
      ID of the attribute.
    • setAttribute

      public SystemAttribute setAttribute(String newAttribute)
      Setter for attribute: 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 for type: 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 for type: 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 for style: Style definition which depends on type - 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 for style: Style definition which depends on type - e.g. whether the "boolean" is shown as a checkbox or radio buttons, etc.
      Parameters:
      newStyle - Style definition which depends on type - 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 for label: User-facing label for the attribute.
      Returns:
      User-facing label for the attribute.
    • setLabel

      public SystemAttribute setLabel(String newLabel)
      Setter for label: 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 for description: User-facing (long) description of the attribute.
      Returns:
      User-facing (long) description of the attribute.
    • setDescription

      public SystemAttribute setDescription(String newDescription)
      Setter for description: 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 for options: 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.
      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

      public SystemAttribute setOptions(Map<String,String> newOptions)
      Setter for options: 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.
      Parameters:
      newOptions - 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.
      Returns:
      A reference to this object, so that setters can be chained.
    • getValue

      public String getValue()
      Getter for value: The value of the attribute.
      Returns:
      The value of the attribute.
    • setValue

      public SystemAttribute setValue(String newValue)
      Setter for value: 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.