Class BioMaterial
- java.lang.Object
-
- ubic.gemma.model.common.AbstractIdentifiable
-
- ubic.gemma.model.common.AbstractDescribable
-
- ubic.gemma.model.expression.biomaterial.BioMaterial
-
- All Implemented Interfaces:
gemma.gsec.model.Securable
,gemma.gsec.model.SecuredChild
,Securable
,SecuredChild
,Describable
,Identifiable
@Indexed public class BioMaterial extends AbstractDescribable implements SecuredChild
In MAGE, BioMaterial is an abstract class that represents the important substances such as cells, tissues, DNA, proteins, etc... In MAGE, Biomaterial subclasses such as BioSample and BioSource can be related to other biomaterial through a directed acyclic graph (represented by treatment(s)). In our implementation, we don't care so much about the experimental procedures and we just lump all of the BioMaterial into one class.BioMaterial can be organized in a hierarchy via
getSourceBioMaterial()
. When that is the case, sub-biomaterials inherit characteristics, factors and treatments from their source biomaterials.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BioMaterial.Factory
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_NAME_LENGTH
-
Constructor Summary
Constructors Constructor Description BioMaterial()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Important note: Two objects with the same class and non-null ID must be considered equal.Set<BioAssay>
getAllBioAssaysUsedIn()
Obtain all the assays used in the hierarchy of biomaterials viagetSourceBioMaterial()
.Set<Characteristic>
getAllCharacteristics()
Obtain all theCharacteristic
associated to this biomaterial, including those inherited from its ancestors viagetSourceBioMaterial()
.Set<FactorValue>
getAllFactorValues()
Obtain all theFactorValue
associated to this biomaterial, including those inherited from its ancestors viagetSourceBioMaterial()
.Set<Treatment>
getAllTreatments()
Obtain all treatments, including those inherited from its ancestors viagetSourceBioMaterial()
.Set<BioAssay>
getBioAssaysUsedIn()
Set<Characteristic>
getCharacteristics()
DatabaseEntry
getExternalAccession()
Set<FactorValue>
getFactorValues()
Obtain the values that this BioAssay is associated with for the experiment.Long
getId()
String
getName()
Obtain the name of an object is a possibly ambiguous human-readable identifier that need not be an external database reference.Securable
getSecurityOwner()
BioMaterial
getSourceBioMaterial()
Parent biomaterial or null if this is a top-level biomaterial.Taxon
getSourceTaxon()
Set<Treatment>
getTreatments()
void
setBioAssaysUsedIn(Set<BioAssay> bioAssaysUsedIn)
void
setCharacteristics(Set<Characteristic> characteristics)
void
setExternalAccession(DatabaseEntry externalAccession)
void
setFactorValues(Set<FactorValue> factorValues)
void
setSourceBioMaterial(BioMaterial sourceBioMaterial)
void
setSourceTaxon(Taxon sourceTaxon)
void
setTreatments(Set<Treatment> treatments)
-
Methods inherited from class ubic.gemma.model.common.AbstractDescribable
getDescription, hashCode, setDescription, setName, toString
-
Methods inherited from class ubic.gemma.model.common.AbstractIdentifiable
setId
-
-
-
-
Field Detail
-
MAX_NAME_LENGTH
public static final int MAX_NAME_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
@DocumentId public Long getId()
- Specified by:
getId
in interfaceIdentifiable
- Specified by:
getId
in interfacegemma.gsec.model.Securable
- Overrides:
getId
in classAbstractIdentifiable
-
getName
@Field public String getName()
Description copied from interface:Describable
Obtain the name of an object is a possibly ambiguous human-readable identifier that need not be an external database reference.- Specified by:
getName
in interfaceDescribable
- Overrides:
getName
in classAbstractDescribable
-
getSourceBioMaterial
@Nullable public BioMaterial getSourceBioMaterial()
Parent biomaterial or null if this is a top-level biomaterial.This is used to represent a sample derived from another sample. For example, you could have a bulk tissue sample that has been sorted per cell type. Each cell type would constitute a biomaterial with the bulk tissue as parent.
-
setSourceBioMaterial
public void setSourceBioMaterial(@Nullable BioMaterial sourceBioMaterial)
-
getAllBioAssaysUsedIn
public Set<BioAssay> getAllBioAssaysUsedIn()
Obtain all the assays used in the hierarchy of biomaterials viagetSourceBioMaterial()
.- See Also:
getBioAssaysUsedIn()
-
getCharacteristics
@IndexedEmbedded public Set<Characteristic> getCharacteristics()
-
setCharacteristics
public void setCharacteristics(Set<Characteristic> characteristics)
-
getAllCharacteristics
public Set<Characteristic> getAllCharacteristics()
Obtain all theCharacteristic
associated to this biomaterial, including those inherited from its ancestors viagetSourceBioMaterial()
.- See Also:
getCharacteristics()
-
getExternalAccession
@Nullable @IndexedEmbedded public DatabaseEntry getExternalAccession()
- Returns:
- An optional external reference for this BioMaterial. In many cases this is the same as the accession for the related BioAssay. We store the information here to help make the data easier to trace. Note that more than one BioMaterial may reference a given external accession.
-
setExternalAccession
public void setExternalAccession(@Nullable DatabaseEntry externalAccession)
-
getFactorValues
public Set<FactorValue> getFactorValues()
Obtain the values that this BioAssay is associated with for the experiment.
-
setFactorValues
public void setFactorValues(Set<FactorValue> factorValues)
-
getAllFactorValues
public Set<FactorValue> getAllFactorValues()
Obtain all theFactorValue
associated to this biomaterial, including those inherited from its ancestors viagetSourceBioMaterial()
.
-
getSecurityOwner
public Securable getSecurityOwner()
- Specified by:
getSecurityOwner
in interfacegemma.gsec.model.SecuredChild
- Specified by:
getSecurityOwner
in interfaceSecuredChild
-
getSourceTaxon
public Taxon getSourceTaxon()
-
setSourceTaxon
public void setSourceTaxon(Taxon sourceTaxon)
-
getAllTreatments
public Set<Treatment> getAllTreatments()
Obtain all treatments, including those inherited from its ancestors viagetSourceBioMaterial()
.
-
equals
public boolean equals(Object object)
Description copied from class:AbstractIdentifiable
Important note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality.- Specified by:
equals
in classAbstractIdentifiable
-
-