Package net.sf.basedb.core.data
Class AnnotationTypeData
java.lang.Object
net.sf.basedb.core.data.BasicData
net.sf.basedb.core.data.OwnedData
net.sf.basedb.core.data.SharedData
net.sf.basedb.core.data.CommonData
net.sf.basedb.core.data.AnnotationTypeData
- All Implemented Interfaces:
IdentifiableData
,LoggableData
,NameableData
,OwnableData
,RegisteredData
,RemovableData
,ShareableData
This class holds information about an annotation type.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2019-03-01 14:19:42 +0100 (fre, 01 mars 2019) $
- Hibernate: class
- table="`AnnotationTypes`" lazy="false"
-
Field Summary
Modifier and TypeFieldDescriptionprivate Set<AnnotationData>
private Set<AnnotationTypeCategoryData>
private UnitData
private String
private boolean
private boolean
private Date
private ParameterValueData<?>
private Set<ExperimentData>
private String
private int
private boolean
private boolean
private boolean
static final int
static final int
The maximum length of the external id that can be stored in the database.static final int
private int
private boolean
private Set<ProtocolData>
private QuantityData
private boolean
private int
private int
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) Set<AnnotationData>
This is the inverse end.Get the set that manages the categories of this annotation type.Get the unit used to store annotation values for this type.The default value of new annotations.boolean
If this flag is set, annotation of this type can't be inherited.boolean
If this flag is set, logging of actual annotation values should not be done in the change history.Get the date this item was added to the database.The allowed values if this is an enumeration.(package private) Set<ExperimentData>
This is the inverse end.Get the external id for the biomaterialint
The recommended height (lines) to display input fields for this annotation in client applications.The item code for all items this annotation type can be applied to.int
How many values are allowed for this annotations of this type. 0 = no limitAdditional options depending on the value type.boolean
If this flag is set, annotation values can be set per project.(package private) Set<ProtocolData>
This is the inverse end.Get the quantity this annotation type uses.The units that it makes sense to use with this annotation type.int
The code for the value type.int
getWidth()
The recommended width (characters) to display input fields for this annotation in client applications.boolean
If this annotation type defines a list of allowed values or not.boolean
If this flag is set, annotation values can be used as identifiers to items.boolean
If this annotation type is intended to be used as a protocol parameter or as a regular annotation.boolean
If an annotation of this type must be present for an annotatable item to be compliant with MIAME.(package private) void
setAnnotations
(Set<AnnotationData> annotations) (package private) void
setCategories
(Set<AnnotationTypeCategoryData> categories) void
setDefaultUnit
(UnitData defaultUnit) void
setDefaultValue
(String defaultValue) void
setDisableInheritance
(boolean disableInheritance) void
setDisableLogOfValues
(boolean disableLogOfValues) void
setEntryDate
(Date entryDate) void
setEnumeration
(boolean isEnumeration) void
setEnumerationValues
(ParameterValueData<?> enumerationValues) (package private) void
setExperiments
(Set<ExperimentData> experiments) void
setExternalId
(String externalId) void
setHeight
(int height) void
setIdentifier
(boolean isIdentifier) (package private) void
setItemTypes
(Set<Integer> itemTypes) void
setMultiplicity
(int multiplicity) (package private) void
setOptions
(Map<String, String> options) void
setProjectAnnotations
(boolean projectAnnotations) void
setProtocolParameter
(boolean isProtocolParameter) (package private) void
setProtocols
(Set<ProtocolData> protocols) void
setQuantity
(QuantityData quantity) void
setRequiredForMiame
(boolean requiredForMiame) (package private) void
setUsableUnits
(Set<UnitData> usableUnits) void
setValueType
(int valueType) void
setWidth
(int width) Methods inherited from class net.sf.basedb.core.data.CommonData
getDescription, getName, getRemovedBy, setDescription, setName, setRemovedBy
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
Methods inherited from interface net.sf.basedb.core.data.OwnableData
getOwner, setOwner
-
Field Details
-
entryDate
-
quantity
-
defaultUnit
-
usableUnits
-
MAX_EXTERNAL_ID_LENGTH
public static final int MAX_EXTERNAL_ID_LENGTHThe maximum length of the external id that can be stored in the database.- Since:
- 2.2
- See Also:
-
externalId
-
multiplicity
private int multiplicity -
requiredForMiame
private boolean requiredForMiame -
isEnumeration
private boolean isEnumeration -
height
private int height -
width
private int width -
defaultValue
-
MAX_DEFAULT_VALUE_LENGTH
public static final int MAX_DEFAULT_VALUE_LENGTH- See Also:
-
valueType
private int valueType -
disableLogOfValues
private boolean disableLogOfValues -
disableInheritance
private boolean disableInheritance -
projectAnnotations
private boolean projectAnnotations -
isIdentifier
private boolean isIdentifier -
itemTypes
-
MAX_OPTION_LENGTH
public static final int MAX_OPTION_LENGTH- See Also:
-
options
-
enumerationValues
-
experiments
-
annotations
-
isProtocolParameter
private boolean isProtocolParameter -
protocols
-
categories
-
-
Constructor Details
-
AnnotationTypeData
public AnnotationTypeData()
-
-
Method Details
-
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 interfaceRegisteredData
-
setEntryDate
-
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
- Since:
- 2.9
-
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
- Since:
- 2.9
-
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
- Since:
- 2.9
-
getExternalId
Get the external id for the biomaterial- Since:
- 2.2
- Hibernate: property
- column="`external_id`" type="string" length="255" not-null="false"
-
setExternalId
-
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
The default value of new annotations.- Hibernate: property
- column="`default_value`" type="string" length="255" not-null="false"
-
setDefaultValue
-
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
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
-
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
-
getEnumerationValues
The allowed values if this is an enumeration.- Hibernate: many-to-one
- column="`enumerationvalues_id`" not-null="false" cascade="all" unique="true"
-
setEnumerationValues
-
getExperiments
Set<ExperimentData> getExperiments()This is the inverse end.- See Also:
- 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
-
getAnnotations
Set<AnnotationData> getAnnotations()This is the inverse end.- Since:
- 2.15
- See Also:
- 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
-
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:
- 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
-
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
-