Class Field

java.lang.Object
com.genologics.ri.configuration.Field
All Implemented Interfaces:
Linkable<Field>, Locatable, Serializable

public class Field extends Object implements Linkable<Field>, Serializable
The detailed representation of the configuration of a user-defined field.
See Also:
  • Field Details

    • name

      protected String name
      The name of the field.
    • attachToName

      protected String attachToName
      The name of the entity type this field is attached to.
    • precision

      protected Integer precision
      The display precision for numeric fields.
    • unitLabel

      protected String unitLabel
      The unit label for numeric fields.
    • typeDefinition

      protected TypeDefinition typeDefinition
      The type definition for complex types.
    • allowNonPresetValues

      protected Boolean allowNonPresetValues
      Whether values other than preset values are allowed.
    • firstPresetIsDefaultValue

      protected Boolean firstPresetIsDefaultValue
      Whether the first preset value is the default.
    • dynamicPresets

      protected Boolean dynamicPresets
      Whether this field uses dynamic presets.
      Since:
      2.34
    • showInTables

      protected Boolean showInTables
      Whether this field should be shown in tables.
    • editable

      protected Boolean editable
      Whether this field is editable.
    • deviation

      protected Boolean deviation
      Whether this field represents a deviation.
    • controlledVocabulary

      protected Boolean controlledVocabulary
      Whether this field uses a controlled vocabulary.
    • parentUri

      protected URI parentUri
      The URI of the parent field for hierarchical fields.
    • childUris

      protected List<String> childUris
      The URIs of child fields for hierarchical fields.
    • presets

      protected List<String> presets
      The list of preset values for this field.
    • minValue

      protected Double minValue
      The minimum value for numeric fields.
    • maxValue

      protected Double maxValue
      The maximum value for numeric fields.
    • required

      protected Boolean required
      Whether this field is required.
    • attachToCategory

      protected String attachToCategory
      The category this field is attached to.
    • type

      protected FieldType type
      The type of this field.
    • uri

      protected URI uri
      The URI of this field configuration.
  • Constructor Details

    • Field

      public Field()
      Constructor for creating an empty Field object.
  • Method Details

    • getId

      public String getId()
      Convenience method for getting the field's id from its URI.
      Returns:
      The fields id. Will be null if this object has no URI.
    • getChildUris

      public List<String> getChildUris()
      Gets the list of child URIs for hierarchical fields. Creates a new list if one doesn't exist.
      Returns:
      The list of child URIs.
    • getPresets

      public List<String> getPresets()
      Gets the list of preset values for this field. Creates a new list if one doesn't exist.
      Returns:
      The list of preset values.
    • getName

      public String getName()
      Gets the name of this field.
      Returns:
      The field name.
    • setName

      public void setName(String name)
      Sets the name of this field.
      Parameters:
      name - The field name.
    • getAttachToName

      public String getAttachToName()
      Gets the name of the entity type this field is attached to.
      Returns:
      The entity type name.
    • setAttachToName

      public void setAttachToName(String attachToName)
      Sets the name of the entity type this field is attached to.
      Parameters:
      attachToName - The entity type name.
    • getDisplayPrecision

      public Integer getDisplayPrecision()
      Gets the display precision for numeric fields.
      Returns:
      The display precision.
    • setDisplayPrecision

      public void setDisplayPrecision(Integer precision)
      Sets the display precision for numeric fields.
      Parameters:
      precision - The display precision.
    • getUnitLabel

      public String getUnitLabel()
      Gets the unit label for numeric fields.
      Returns:
      The unit label.
    • setUnitLabel

      public void setUnitLabel(String unit)
      Sets the unit label for numeric fields.
      Parameters:
      unit - The unit label.
    • getTypeDefinition

      public TypeDefinition getTypeDefinition()
      Gets the type definition for complex types.
      Returns:
      The type definition.
    • setTypeDefinition

      public void setTypeDefinition(TypeDefinition typeDefinition)
      Sets the type definition for complex types.
      Parameters:
      typeDefinition - The type definition.
    • isShowInLablink

      public boolean isShowInLablink()
      Checks if this field should be shown in Lablink.
      Returns:
      true if the field should be shown in Lablink, false otherwise.
    • setShowInLablink

      public void setShowInLablink(Boolean showInLablink)
      Sets whether this field should be shown in Lablink.
      Parameters:
      showInLablink - true to show in Lablink, false otherwise.
    • isAllowNonPresetValues

      public boolean isAllowNonPresetValues()
      Checks if values other than preset values are allowed.
      Returns:
      true if non-preset values are allowed, false otherwise.
    • setAllowNonPresetValues

      public void setAllowNonPresetValues(Boolean allowNonPresetValues)
      Sets whether values other than preset values are allowed.
      Parameters:
      allowNonPresetValues - true to allow non-preset values, false otherwise.
    • isFirstPresetDefaultValue

      public boolean isFirstPresetDefaultValue()
      Checks if the first preset value is the default.
      Returns:
      true if the first preset is the default, false otherwise.
    • setFirstPresetDefaultValue

      public void setFirstPresetDefaultValue(Boolean firstPresetIsDefaultValue)
      Sets whether the first preset value is the default.
      Parameters:
      firstPresetIsDefaultValue - true to make first preset the default, false otherwise.
    • isDynamicPresets

      public boolean isDynamicPresets()
      Checks if this field uses dynamic presets.
      Returns:
      true if dynamic presets are used, false otherwise.
    • setDynamicPresets

      public void setDynamicPresets(Boolean isDynamicPresets)
      Sets whether this field uses dynamic presets.
      Parameters:
      isDynamicPresets - true to use dynamic presets, false otherwise.
    • isShowInTables

      public boolean isShowInTables()
      Checks if this field should be shown in tables.
      Returns:
      true if the field should be shown in tables, false otherwise.
    • setShowInTables

      public void setShowInTables(Boolean showInTables)
      Sets whether this field should be shown in tables.
      Parameters:
      showInTables - true to show in tables, false otherwise.
    • isEditable

      public boolean isEditable()
      Checks if this field is editable.
      Returns:
      true if the field is editable, false otherwise.
    • setEditable

      public void setEditable(Boolean editable)
      Sets whether this field is editable.
      Parameters:
      editable - true to make the field editable, false otherwise.
    • isDeviation

      public boolean isDeviation()
      Checks if this field represents a deviation.
      Returns:
      true if this is a deviation field, false otherwise.
    • setDeviation

      public void setDeviation(Boolean deviation)
      Sets whether this field represents a deviation.
      Parameters:
      deviation - true to mark as deviation, false otherwise.
    • isControlledVocabulary

      public boolean isControlledVocabulary()
      Checks if this field uses a controlled vocabulary.
      Returns:
      true if controlled vocabulary is used, false otherwise.
    • setControlledVocabulary

      public void setControlledVocabulary(Boolean controlledVocabulary)
      Sets whether this field uses a controlled vocabulary.
      Parameters:
      controlledVocabulary - true to use controlled vocabulary, false otherwise.
    • getParentUri

      public URI getParentUri()
      Gets the URI of the parent field for hierarchical fields.
      Returns:
      The parent URI.
    • setParentUri

      public void setParentUri(URI parentUri)
      Sets the URI of the parent field for hierarchical fields.
      Parameters:
      parentUri - The parent URI.
    • getMinValue

      public Double getMinValue()
      Gets the minimum value for numeric fields.
      Returns:
      The minimum value.
    • setMinValue

      public void setMinValue(Double minValue)
      Sets the minimum value for numeric fields.
      Parameters:
      minValue - The minimum value.
    • getMaxValue

      public Double getMaxValue()
      Gets the maximum value for numeric fields.
      Returns:
      The maximum value.
    • setMaxValue

      public void setMaxValue(Double maxValue)
      Sets the maximum value for numeric fields.
      Parameters:
      maxValue - The maximum value.
    • isRequired

      public boolean isRequired()
      Checks if this field is required.
      Returns:
      true if the field is required, false otherwise.
    • setRequired

      public void setRequired(Boolean required)
      Sets whether this field is required.
      Parameters:
      required - true to make the field required, false otherwise.
    • getAttachToCategory

      public String getAttachToCategory()
      Gets the category this field is attached to.
      Returns:
      The category name.
    • setAttachToCategory

      public void setAttachToCategory(String attachToCategory)
      Sets the category this field is attached to.
      Parameters:
      attachToCategory - The category name.
    • getType

      public FieldType getType()
      Gets the type of this field.
      Returns:
      The field type.
    • setType

      public void setType(FieldType type)
      Sets the type of this field.
      Parameters:
      type - The field type.
    • getUri

      public URI getUri()
      Gets the URI of this field configuration.
      Specified by:
      getUri in interface Locatable
      Returns:
      The URI.
    • setUri

      public void setUri(URI uri)
      Sets the URI of this field configuration.
      Specified by:
      setUri in interface Locatable
      Parameters:
      uri - The URI.
    • getLink

      public LimsLink<Field> getLink()
      Get a concrete link object to this Linkable thing.
      Specified by:
      getLink in interface Linkable<Field>
      Returns:
      A LimsLink to this object.