Class AnnotationTypeData

All Implemented Interfaces:
IdentifiableData, LoggableData, NameableData, OwnableData, RegisteredData, RemovableData, ShareableData

public class AnnotationTypeData
extends CommonData
implements RegisteredData, LoggableData
This class holds information about an annotation type.
Version:
2.0
Author:
Nicklas
See Also:
AnnotationType, Developer documentation: Annotations
Last modified
$Date: 2019-03-01 14:19:42 +0100 (fre, 01 mars 2019) $
Hibernate: class
table="`AnnotationTypes`" lazy="false"
  • Field Details

    • entryDate

      private Date entryDate
    • quantity

      private QuantityData quantity
    • defaultUnit

      private UnitData defaultUnit
    • usableUnits

      private Set<UnitData> usableUnits
    • MAX_EXTERNAL_ID_LENGTH

      public static final int MAX_EXTERNAL_ID_LENGTH
      The maximum length of the external id that can be stored in the database.
      Since:
      2.2
      See Also:
      setExternalId(String), Constant Field Values
    • externalId

      private String externalId
    • multiplicity

      private int multiplicity
    • requiredForMiame

      private boolean requiredForMiame
    • isEnumeration

      private boolean isEnumeration
    • height

      private int height
    • width

      private int width
    • defaultValue

      private String defaultValue
    • MAX_DEFAULT_VALUE_LENGTH

      public static final int MAX_DEFAULT_VALUE_LENGTH
      See Also:
      Constant Field Values
    • valueType

      private int valueType
    • disableLogOfValues

      private boolean disableLogOfValues
    • disableInheritance

      private boolean disableInheritance
    • projectAnnotations

      private boolean projectAnnotations
    • isIdentifier

      private boolean isIdentifier
    • itemTypes

      private Set<Integer> itemTypes
    • MAX_OPTION_LENGTH

      public static final int MAX_OPTION_LENGTH
      See Also:
      Constant Field Values
    • options

      private Map<String,​String> options
    • enumerationValues

      private ParameterValueData<?> enumerationValues
    • experiments

      private Set<ExperimentData> experiments
    • annotations

      private Set<AnnotationData> annotations
    • isProtocolParameter

      private boolean isProtocolParameter
    • protocols

      private Set<ProtocolData> protocols
    • categories

      private Set<AnnotationTypeCategoryData> categories
  • Constructor Details

    • AnnotationTypeData

      public AnnotationTypeData()
  • Method Details

    • getEntryDate

      public Date getEntryDate()
      Description copied from interface: RegisteredData
      Get the date this item was added to the database. The value is generated at creation time and can't be modified later.
      Specified by:
      getEntryDate in interface RegisteredData
    • setEntryDate

      public void setEntryDate​(Date entryDate)
    • getQuantity

      public QuantityData getQuantity()
      Get the quantity this annotation type uses. Can't be changed after creation.
      Since:
      2.9
      Hibernate: many-to-one
      column="`quantity_id`" not-null="false" outer-join="false"
    • setQuantity

      public void setQuantity​(QuantityData quantity)
      Since:
      2.9
    • getDefaultUnit

      public UnitData getDefaultUnit()
      Get the unit used to store annotation values for this type. NOTE! If the unit changes to another unit with a different reference factor all annotation values must be recalculated. NOTE! This value is always null if the quantity is null.
      Since:
      2.9
      Hibernate: many-to-one
      column="`default_unit_id`" not-null="false" outer-join="false"
    • setDefaultUnit

      public void setDefaultUnit​(UnitData defaultUnit)
      Since:
      2.9
    • getUsableUnits

      public Set<UnitData> getUsableUnits()
      The units that it makes sense to use with this annotation type. If empty, any unit for the given quantity can be used.
      Since:
      2.9
      Hibernate: set
      table="`AnnotationTypeUnits`" lazy="true"
      Hibernate: collection-key
      column="`annotationtype_id`"
      Hibernate: collection-many-to-many
      column="`unit_id`" class="net.sf.basedb.core.data.UnitData"
    • setUsableUnits

      void setUsableUnits​(Set<UnitData> usableUnits)
      Since:
      2.9
    • getExternalId

      public String getExternalId()
      Get the external id for the biomaterial
      Since:
      2.2
      Hibernate: property
      column="`external_id`" type="string" length="255" not-null="false"
    • setExternalId

      public void setExternalId​(String externalId)
    • getMultiplicity

      public int getMultiplicity()
      How many values are allowed for this annotations of this type. 0 = no limit
      Hibernate: property
      column="`multiplicity`" type="int" not-null="true"
    • setMultiplicity

      public void setMultiplicity​(int multiplicity)
    • isRequiredForMiame

      public boolean isRequiredForMiame()
      If an annotation of this type must be present for an annotatable item to be compliant with MIAME.
      Hibernate: property
      column="`required_for_miame`" type="boolean" not-null="true"
    • setRequiredForMiame

      public void setRequiredForMiame​(boolean requiredForMiame)
    • isEnumeration

      public boolean isEnumeration()
      If this annotation type defines a list of allowed values or not.
      Hibernate: property
      column="`is_enumeration`" type="boolean" not-null="true"
    • setEnumeration

      public void setEnumeration​(boolean isEnumeration)
    • getHeight

      public int getHeight()
      The recommended height (lines) to display input fields for this annotation in client applications.
      Hibernate: property
      column="`height`" type="int" not-null="true"
    • setHeight

      public void setHeight​(int height)
    • getWidth

      public int getWidth()
      The recommended width (characters) to display input fields for this annotation in client applications.
      Hibernate: property
      column="`width`" type="int" not-null="true"
    • setWidth

      public void setWidth​(int width)
    • getDefaultValue

      public String getDefaultValue()
      The default value of new annotations.
      Hibernate: property
      column="`default_value`" type="string" length="255" not-null="false"
    • setDefaultValue

      public void setDefaultValue​(String defaultValue)
    • getValueType

      public int getValueType()
      The code for the value type.
      Hibernate: property
      column="`value_type`" type="int" not-null="true" update="false"
    • setValueType

      public void setValueType​(int valueType)
    • getDisableLogOfValues

      public boolean getDisableLogOfValues()
      If this flag is set, logging of actual annotation values should not be done in the change history.
      Since:
      3.3
      Hibernate: property
      column="`disable_log`" type="boolean" not-null="true"
    • setDisableLogOfValues

      public void setDisableLogOfValues​(boolean disableLogOfValues)
    • getDisableInheritance

      public boolean getDisableInheritance()
      If this flag is set, annotation of this type can't be inherited.
      Since:
      3.5
      Hibernate: property
      column="`disable_inherit`" type="boolean" not-null="true"
    • setDisableInheritance

      public void setDisableInheritance​(boolean disableInheritance)
    • getProjectAnnotations

      public boolean getProjectAnnotations()
      If this flag is set, annotation values can be set per project.
      Since:
      3.10
      Hibernate: property
      column="`project_annotations`" type="boolean" not-null="true"
    • setProjectAnnotations

      public void setProjectAnnotations​(boolean projectAnnotations)
    • isIdentifier

      public boolean isIdentifier()
      If this flag is set, annotation values can be used as identifiers to items.
      Since:
      3.15
      Hibernate: property
      column="`is_identifier`" type="boolean" not-null="true"
    • setIdentifier

      public void setIdentifier​(boolean isIdentifier)
    • getItemTypes

      public Set<Integer> getItemTypes()
      The item code for all items this annotation type can be applied to.
      Hibernate: set
      table="`AnnotationTypeItems`" lazy="true"
      Hibernate: collection-key
      column="`annotationtype_id`"
      Hibernate: collection-element
      column="`item_type`" type="int"
    • setItemTypes

      void setItemTypes​(Set<Integer> itemTypes)
    • getOptions

      public Map<String,​String> getOptions()
      Additional options depending on the value type.
      Hibernate: map
      table="`AnnotationTypeOptions`" lazy="true"
      Hibernate: collection-key
      column="`annotationtype_id`"
      Hibernate: collection-index
      column="`name`" type="string" length="255" not-null="true"
      Hibernate: collection-element
      column="`value`" type="string" length="255" not-null="true"
    • setOptions

      void setOptions​(Map<String,​String> options)
    • getEnumerationValues

      public ParameterValueData<?> getEnumerationValues()
      The allowed values if this is an enumeration.
      Hibernate: many-to-one
      column="`enumerationvalues_id`" not-null="false" cascade="all" unique="true"
    • setEnumerationValues

      public void setEnumerationValues​(ParameterValueData<?> enumerationValues)
    • getExperiments

      Set<ExperimentData> getExperiments()
      This is the inverse end.
      See Also:
      ExperimentData.getExperimentalFactors()
      Hibernate: set
      table="`ExperimentalFactors`" lazy="true" inverse="true"
      Hibernate: collection-key
      column="`annotationtype_id`"
      Hibernate: collection-many-to-many
      column="`experiment_id`" class="net.sf.basedb.core.data.ExperimentData"
    • setExperiments

      void setExperiments​(Set<ExperimentData> experiments)
    • getAnnotations

      Set<AnnotationData> getAnnotations()
      This is the inverse end.
      Since:
      2.15
      See Also:
      AnnotationData.getAnnotationType()
      Hibernate: set
      lazy="true" inverse="true"
      Hibernate: collection-key
      column="`annotationtype_id`"
      Hibernate: collection-one-to-many
      column="`annotation_id`" class="net.sf.basedb.core.data.AnnotationData"
    • setAnnotations

      void setAnnotations​(Set<AnnotationData> annotations)
    • isProtocolParameter

      public boolean isProtocolParameter()
      If this annotation type is intended to be used as a protocol parameter or as a regular annotation.
      Since:
      2.2
      Hibernate: property
      column="`is_parameter`" type="boolean" not-null="true"
    • setProtocolParameter

      public void setProtocolParameter​(boolean isProtocolParameter)
    • getProtocols

      Set<ProtocolData> getProtocols()
      This is the inverse end.
      Since:
      2.2
      See Also:
      ProtocolData.getParameters()
      Hibernate: set
      table="`ProtocolParameters`" lazy="true" inverse="true"
      Hibernate: collection-key
      column="`annotationtype_id`"
      Hibernate: collection-many-to-many
      column="`protocol_id`" class="net.sf.basedb.core.data.ProtocolData"
    • setProtocols

      void setProtocols​(Set<ProtocolData> protocols)
    • getCategories

      public Set<AnnotationTypeCategoryData> getCategories()
      Get the set that manages the categories of this annotation type.
      Hibernate: set
      table="`CategorisedAnnotationTypes`" lazy="true"
      Hibernate: collection-key
      column="`annotationtype_id`"
      Hibernate: collection-many-to-many
      column="`category_id`" class="net.sf.basedb.core.data.AnnotationTypeCategoryData"
    • setCategories

      void setCategories​(Set<AnnotationTypeCategoryData> categories)