Class BioMaterial

All Implemented Interfaces:
gemma.gsec.model.Securable, gemma.gsec.model.SecuredChild, Securable, SecuredChild<ExpressionExperiment>, Describable, Identifiable

@Indexed public class BioMaterial extends AbstractDescribable implements SecuredChild<ExpressionExperiment>
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.

  • Field Details

  • Constructor Details

    • BioMaterial

      public BioMaterial()
  • Method Details

    • getId

      @DocumentId public Long getId()
      Description copied from interface: Identifiable
      Obtain the identifier of the object.
      Specified by:
      getId in interface Identifiable
      Specified by:
      getId in interface gemma.gsec.model.Securable
      Overrides:
      getId in class AbstractIdentifiable
    • getName

      @Field public String getName()
      Description copied from interface: Describable
      Obtain the name of the object.

      It may be human-readable.

      It is case-insensitive and usually unique within a certain context (e.g. in a collection).

      It is non-null by default, but implementation may override this with a Nullable annotation. If null, it should not be treated as equal to other Describable objects (i.e. there can be multiple null-named describable within a given set).

      Specified by:
      getName in interface Describable
      Overrides:
      getName in class AbstractDescribable
    • 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)
    • getBioAssaysUsedIn

      @ContainedIn public Set<BioAssay> getBioAssaysUsedIn()
    • setBioAssaysUsedIn

      public void setBioAssaysUsedIn(Set<BioAssay> bioAssaysUsedIn)
    • getAllBioAssaysUsedIn

      public Set<BioAssay> getAllBioAssaysUsedIn()
      Obtain all the assays used in the hierarchy of biomaterials via getSourceBioMaterial().
      See Also:
    • getCharacteristics

      @IndexedEmbedded public Set<Characteristic> getCharacteristics()
    • setCharacteristics

      public void setCharacteristics(Set<Characteristic> characteristics)
    • getAllCharacteristics

      public Set<Characteristic> getAllCharacteristics()
      Obtain all the Characteristic associated to this biomaterial, including those inherited from its ancestors via getSourceBioMaterial().
      See Also:
    • 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 the FactorValue associated to this biomaterial, including those inherited from its ancestors via getSourceBioMaterial().
    • getSecurityOwner

      @Nullable public ExpressionExperiment getSecurityOwner()
      Description copied from interface: SecuredChild
      Obtain the security owner of this secured child.

      Secured children should always have an owner in the ACL table, but that relation is not always direct or mapped. A more robust way of checking is to look up the parent via AclObjectIdentity.getParentObject(). If the security owner cannot be determined, the implementation should define a setter so it can be temporarily assigned for creating the ACL identity.

      Specified by:
      getSecurityOwner in interface gemma.gsec.model.SecuredChild
      Specified by:
      getSecurityOwner in interface SecuredChild<ExpressionExperiment>
      Returns:
      the security owner, or null if not known.
    • setSecurityOwner

      public void setSecurityOwner(@Nullable ExpressionExperiment securityOwner)
    • getSourceTaxon

      public Taxon getSourceTaxon()
    • setSourceTaxon

      public void setSourceTaxon(Taxon sourceTaxon)
    • getTreatments

      public Set<Treatment> getTreatments()
    • setTreatments

      public void setTreatments(Set<Treatment> treatments)
    • getAllTreatments

      public Set<Treatment> getAllTreatments()
      Obtain all treatments, including those inherited from its ancestors via getSourceBioMaterial().
    • equals

      public boolean equals(Object object)
      Description copied from class: AbstractDescribable
      Important note: The name should be compared in a case-insensitive manner. You can use DescribableUtils.equalsByName(Describable, Describable) to get the correct behavior.

      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 class AbstractDescribable