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
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 Summary
Fields Modifier and Type Field Description private Set<AnnotationData>
annotations
private Set<AnnotationTypeCategoryData>
categories
private UnitData
defaultUnit
private String
defaultValue
private boolean
disableInheritance
private boolean
disableLogOfValues
private Date
entryDate
private ParameterValueData<?>
enumerationValues
private Set<ExperimentData>
experiments
private String
externalId
private int
height
private boolean
isEnumeration
private boolean
isIdentifier
private boolean
isProtocolParameter
private Set<Integer>
itemTypes
static int
MAX_DEFAULT_VALUE_LENGTH
static int
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external id that can be stored in the database.static int
MAX_OPTION_LENGTH
private int
multiplicity
private Map<String,String>
options
private boolean
projectAnnotations
private Set<ProtocolData>
protocols
private QuantityData
quantity
private boolean
requiredForMiame
private Set<UnitData>
usableUnits
private int
valueType
private int
width
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
Constructors Constructor Description AnnotationTypeData()
-
Method Summary
Modifier and Type Method Description (package private) Set<AnnotationData>
getAnnotations()
This is the inverse end.Set<AnnotationTypeCategoryData>
getCategories()
Get the set that manages the categories of this annotation type.UnitData
getDefaultUnit()
Get the unit used to store annotation values for this type.String
getDefaultValue()
The default value of new annotations.boolean
getDisableInheritance()
If this flag is set, annotation of this type can't be inherited.boolean
getDisableLogOfValues()
If this flag is set, logging of actual annotation values should not be done in the change history.Date
getEntryDate()
Get the date this item was added to the database.ParameterValueData<?>
getEnumerationValues()
The allowed values if this is an enumeration.(package private) Set<ExperimentData>
getExperiments()
This is the inverse end.String
getExternalId()
Get the external id for the biomaterialint
getHeight()
The recommended height (lines) to display input fields for this annotation in client applications.Set<Integer>
getItemTypes()
The item code for all items this annotation type can be applied to.int
getMultiplicity()
How many values are allowed for this annotations of this type. 0 = no limitMap<String,String>
getOptions()
Additional options depending on the value type.boolean
getProjectAnnotations()
If this flag is set, annotation values can be set per project.(package private) Set<ProtocolData>
getProtocols()
This is the inverse end.QuantityData
getQuantity()
Get the quantity this annotation type uses.Set<UnitData>
getUsableUnits()
The units that it makes sense to use with this annotation type.int
getValueType()
The code for the value type.int
getWidth()
The recommended width (characters) to display input fields for this annotation in client applications.boolean
isEnumeration()
If this annotation type defines a list of allowed values or not.boolean
isIdentifier()
If this flag is set, annotation values can be used as identifiers to items.boolean
isProtocolParameter()
If this annotation type is intended to be used as a protocol parameter or as a regular annotation.boolean
isRequiredForMiame()
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:
setExternalId(String)
, Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
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
-
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
-
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
-
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
-