java.lang.Object
com.genologics.ri.configuration.Field
- All Implemented Interfaces:
Linkable<Field>,Locatable,Serializable
The detailed representation of the configuration of a user-defined field.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BooleanWhether values other than preset values are allowed.protected StringThe category this field is attached to.protected StringThe name of the entity type this field is attached to.The URIs of child fields for hierarchical fields.protected BooleanWhether this field uses a controlled vocabulary.protected BooleanWhether this field represents a deviation.protected BooleanWhether this field uses dynamic presets.protected BooleanWhether this field is editable.protected BooleanWhether the first preset value is the default.protected DoubleThe maximum value for numeric fields.protected DoubleThe minimum value for numeric fields.protected StringThe name of the field.protected URIThe URI of the parent field for hierarchical fields.protected IntegerThe display precision for numeric fields.The list of preset values for this field.protected BooleanWhether this field is required.protected BooleanWhether this field should be shown in Lablink.protected BooleanWhether this field should be shown in tables.protected FieldTypeThe type of this field.protected TypeDefinitionThe type definition for complex types.protected StringThe unit label for numeric fields.protected URIThe URI of this field configuration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the category this field is attached to.Gets the name of the entity type this field is attached to.Gets the list of child URIs for hierarchical fields.Gets the display precision for numeric fields.getId()Convenience method for getting the field's id from its URI.getLink()Get a concrete link object to thisLinkablething.Gets the maximum value for numeric fields.Gets the minimum value for numeric fields.getName()Gets the name of this field.Gets the URI of the parent field for hierarchical fields.Gets the list of preset values for this field.getType()Gets the type of this field.Gets the type definition for complex types.Gets the unit label for numeric fields.getUri()Gets the URI of this field configuration.booleanChecks if values other than preset values are allowed.booleanChecks if this field uses a controlled vocabulary.booleanChecks if this field represents a deviation.booleanChecks if this field uses dynamic presets.booleanChecks if this field is editable.booleanChecks if the first preset value is the default.booleanChecks if this field is required.booleanChecks if this field should be shown in Lablink.booleanChecks if this field should be shown in tables.voidsetAllowNonPresetValues(Boolean allowNonPresetValues) Sets whether values other than preset values are allowed.voidsetAttachToCategory(String attachToCategory) Sets the category this field is attached to.voidsetAttachToName(String attachToName) Sets the name of the entity type this field is attached to.voidsetControlledVocabulary(Boolean controlledVocabulary) Sets whether this field uses a controlled vocabulary.voidsetDeviation(Boolean deviation) Sets whether this field represents a deviation.voidsetDisplayPrecision(Integer precision) Sets the display precision for numeric fields.voidsetDynamicPresets(Boolean isDynamicPresets) Sets whether this field uses dynamic presets.voidsetEditable(Boolean editable) Sets whether this field is editable.voidsetFirstPresetDefaultValue(Boolean firstPresetIsDefaultValue) Sets whether the first preset value is the default.voidsetMaxValue(Double maxValue) Sets the maximum value for numeric fields.voidsetMinValue(Double minValue) Sets the minimum value for numeric fields.voidSets the name of this field.voidsetParentUri(URI parentUri) Sets the URI of the parent field for hierarchical fields.voidsetRequired(Boolean required) Sets whether this field is required.voidsetShowInLablink(Boolean showInLablink) Sets whether this field should be shown in Lablink.voidsetShowInTables(Boolean showInTables) Sets whether this field should be shown in tables.voidSets the type of this field.voidsetTypeDefinition(TypeDefinition typeDefinition) Sets the type definition for complex types.voidsetUnitLabel(String unit) Sets the unit label for numeric fields.voidSets the URI of this field configuration.
-
Field Details
-
name
The name of the field. -
attachToName
The name of the entity type this field is attached to. -
precision
The display precision for numeric fields. -
unitLabel
The unit label for numeric fields. -
typeDefinition
The type definition for complex types. -
showInLablink
Whether this field should be shown in Lablink. -
allowNonPresetValues
Whether values other than preset values are allowed. -
firstPresetIsDefaultValue
Whether the first preset value is the default. -
dynamicPresets
Whether this field uses dynamic presets.- Since:
- 2.34
-
showInTables
Whether this field should be shown in tables. -
editable
Whether this field is editable. -
deviation
Whether this field represents a deviation. -
controlledVocabulary
Whether this field uses a controlled vocabulary. -
parentUri
The URI of the parent field for hierarchical fields. -
childUris
The URIs of child fields for hierarchical fields. -
presets
The list of preset values for this field. -
minValue
The minimum value for numeric fields. -
maxValue
The maximum value for numeric fields. -
required
Whether this field is required. -
attachToCategory
The category this field is attached to. -
type
The type of this field. -
uri
The URI of this field configuration.
-
-
Constructor Details
-
Field
public Field()Constructor for creating an empty Field object.
-
-
Method Details
-
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
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
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
Gets the name of this field.- Returns:
- The field name.
-
setName
Sets the name of this field.- Parameters:
name- The field name.
-
getAttachToName
Gets the name of the entity type this field is attached to.- Returns:
- The entity type name.
-
setAttachToName
Sets the name of the entity type this field is attached to.- Parameters:
attachToName- The entity type name.
-
getDisplayPrecision
Gets the display precision for numeric fields.- Returns:
- The display precision.
-
setDisplayPrecision
Sets the display precision for numeric fields.- Parameters:
precision- The display precision.
-
getUnitLabel
Gets the unit label for numeric fields.- Returns:
- The unit label.
-
setUnitLabel
Sets the unit label for numeric fields.- Parameters:
unit- The unit label.
-
getTypeDefinition
Gets the type definition for complex types.- Returns:
- The type definition.
-
setTypeDefinition
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:
trueif the field should be shown in Lablink,falseotherwise.
-
setShowInLablink
Sets whether this field should be shown in Lablink.- Parameters:
showInLablink-trueto show in Lablink,falseotherwise.
-
isAllowNonPresetValues
public boolean isAllowNonPresetValues()Checks if values other than preset values are allowed.- Returns:
trueif non-preset values are allowed,falseotherwise.
-
setAllowNonPresetValues
Sets whether values other than preset values are allowed.- Parameters:
allowNonPresetValues-trueto allow non-preset values,falseotherwise.
-
isFirstPresetDefaultValue
public boolean isFirstPresetDefaultValue()Checks if the first preset value is the default.- Returns:
trueif the first preset is the default,falseotherwise.
-
setFirstPresetDefaultValue
Sets whether the first preset value is the default.- Parameters:
firstPresetIsDefaultValue-trueto make first preset the default,falseotherwise.
-
isDynamicPresets
public boolean isDynamicPresets()Checks if this field uses dynamic presets.- Returns:
trueif dynamic presets are used,falseotherwise.
-
setDynamicPresets
Sets whether this field uses dynamic presets.- Parameters:
isDynamicPresets-trueto use dynamic presets,falseotherwise.
-
isShowInTables
public boolean isShowInTables()Checks if this field should be shown in tables.- Returns:
trueif the field should be shown in tables,falseotherwise.
-
setShowInTables
Sets whether this field should be shown in tables.- Parameters:
showInTables-trueto show in tables,falseotherwise.
-
isEditable
public boolean isEditable()Checks if this field is editable.- Returns:
trueif the field is editable,falseotherwise.
-
setEditable
Sets whether this field is editable.- Parameters:
editable-trueto make the field editable,falseotherwise.
-
isDeviation
public boolean isDeviation()Checks if this field represents a deviation.- Returns:
trueif this is a deviation field,falseotherwise.
-
setDeviation
Sets whether this field represents a deviation.- Parameters:
deviation-trueto mark as deviation,falseotherwise.
-
isControlledVocabulary
public boolean isControlledVocabulary()Checks if this field uses a controlled vocabulary.- Returns:
trueif controlled vocabulary is used,falseotherwise.
-
setControlledVocabulary
Sets whether this field uses a controlled vocabulary.- Parameters:
controlledVocabulary-trueto use controlled vocabulary,falseotherwise.
-
getParentUri
Gets the URI of the parent field for hierarchical fields.- Returns:
- The parent URI.
-
setParentUri
Sets the URI of the parent field for hierarchical fields.- Parameters:
parentUri- The parent URI.
-
getMinValue
Gets the minimum value for numeric fields.- Returns:
- The minimum value.
-
setMinValue
Sets the minimum value for numeric fields.- Parameters:
minValue- The minimum value.
-
getMaxValue
Gets the maximum value for numeric fields.- Returns:
- The maximum value.
-
setMaxValue
Sets the maximum value for numeric fields.- Parameters:
maxValue- The maximum value.
-
isRequired
public boolean isRequired()Checks if this field is required.- Returns:
trueif the field is required,falseotherwise.
-
setRequired
Sets whether this field is required.- Parameters:
required-trueto make the field required,falseotherwise.
-
getAttachToCategory
Gets the category this field is attached to.- Returns:
- The category name.
-
setAttachToCategory
Sets the category this field is attached to.- Parameters:
attachToCategory- The category name.
-
getType
Gets the type of this field.- Returns:
- The field type.
-
setType
Sets the type of this field.- Parameters:
type- The field type.
-
getUri
Gets the URI of this field configuration. -
setUri
Sets the URI of this field configuration. -
getLink
Get a concrete link object to thisLinkablething.
-