2.17.2: 2011-06-17

net.sf.basedb.core.data
Class AnnotationTypeData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.OwnedData
          extended by net.sf.basedb.core.data.SharedData
              extended by net.sf.basedb.core.data.CommonData
                  extended by 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, Annotations overview
Last modified
$Date: 2010-04-20 10:02:16 +0200 (Tue, 20 Apr 2010) $
Hibernate: class
table="`AnnotationTypes`" lazy="false"

Field Summary
private  Set<AnnotationData> annotations
           
private  Set<AnnotationTypeCategoryData> categories
           
private  UnitData defaultUnit
           
private  String defaultValue
           
private  Date entryDate
           
private  ParameterValueData<?> enumerationValues
           
private  Set<ExperimentData> experiments
           
private  String externalId
           
private  int height
           
private  boolean isEnumeration
           
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  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
AnnotationTypeData()
           
 
Method Summary
(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.
 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 biomaterial
 int 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 limit
 Map<String,String> getOptions()
          Additional options depending on the value type.
(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 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 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)
           
(package private)  void setItemTypes(Set<Integer> itemTypes)
           
 void setMultiplicity(int multiplicity)
           
(package private)  void setOptions(Map<String,String> options)
           
 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, isRemoved, setDescription, setName, setRemoved
 
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
 
Methods inherited from class net.sf.basedb.core.data.OwnedData
getOwner, setOwner
 
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 Detail

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

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 Detail

AnnotationTypeData

public AnnotationTypeData()
Method Detail

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)

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)

2.17.2: 2011-06-17