Class SampleBase

java.lang.Object
com.genologics.ri.sample.SampleBase
All Implemented Interfaces:
UDFHolder, Serializable
Direct Known Subclasses:
Sample, SampleCreation

public class SampleBase extends Object implements UDFHolder, Serializable

The base representation of a Sample, defining common elements for both Sample and Sample creation.

See Also:
  • Field Details

    • name

      protected String name
      The name of the sample.
    • dateReceived

      protected Date dateReceived
      The date the sample was received.
    • dateCompleted

      protected Date dateCompleted
      The date the sample was completed.
    • project

      protected ProjectLink project
      The project associated with this sample.
    • controlType

      protected ControlTypeLink controlType
      The control type associated with this sample.
    • submitter

      protected Submitter submitter
      The submitter of this sample.
    • artifact

      protected ArtifactLink artifact
      The artifact associated with this sample.
    • bioSource

      @Deprecated protected BioSource bioSource
      Deprecated.
      Biosource is not supported in Clarity.
      The biosource of this sample.
    • type

      protected UDT type
      The user-defined type of this sample.
    • fields

      protected List<UDF> fields
      The user-defined fields for this sample.
    • externalIds

      protected List<ExternalId> externalIds
      The external identifiers for this sample.
    • files

      protected List<ClarityFile> files
      The files associated with this sample.
    • limsid

      protected String limsid
      The LIMS id of this sample.
    • uri

      protected URI uri
      The URI of this sample.
  • Constructor Details

    • SampleBase

      protected SampleBase()
      Constructor for an empty sample base.
    • SampleBase

      protected SampleBase(SampleBase other)
      Copy constructor for a sample base.
      Parameters:
      other - The sample base to copy from.
  • Method Details

    • getName

      public String getName()
      Gets the name of the sample.
      Returns:
      The sample name.
    • setName

      public void setName(String value)
      Sets the name of the sample.
      Parameters:
      value - The sample name.
    • getDateReceived

      public Date getDateReceived()
      Gets the date the sample was received.
      Returns:
      The date received.
    • setDateReceived

      public void setDateReceived(Date value)
      Sets the date the sample was received.
      Parameters:
      value - The date received.
    • getDateCompleted

      public Date getDateCompleted()
      Gets the date the sample was completed.
      Returns:
      The date completed.
    • setDateCompleted

      public void setDateCompleted(Date value)
      Sets the date the sample was completed.
      Parameters:
      value - The date completed.
    • getProject

      public ProjectLink getProject()
      Gets the project link for this sample.
      Returns:
      The project link.
    • setProject

      public void setProject(LimsEntityLinkable<Project> project)
      Sets the project for this sample.
      Parameters:
      project - The project linkable object.
    • getControlType

      public ControlTypeLink getControlType()
      Gets the control type link for this sample.
      Returns:
      The control type link.
    • setControlType

      public void setControlType(Linkable<ControlType> controlType)
      Sets the control type for this sample.
      Parameters:
      controlType - The control type linkable object.
    • isControlSample

      public boolean isControlSample()
      Checks if this sample is a control sample.
      Returns:
      true if this sample has a control type, false otherwise.
    • getSubmitter

      public Submitter getSubmitter()
      Gets the submitter of this sample.
      Returns:
      The submitter.
    • setSubmitter

      public Submitter setSubmitter(Linkable<Researcher> link)
      Sets the submitter for this sample.
      Parameters:
      link - The researcher linkable object.
      Returns:
      The created submitter.
    • getArtifact

      public ArtifactLink getArtifact()
      Gets the artifact link for this sample.
      Returns:
      The artifact link.
    • setArtifact

      public void setArtifact(LimsEntityLinkable<Artifact> artifact)
      Sets the artifact for this sample.
      Parameters:
      artifact - The artifact linkable object.
    • getBioSource

      @Deprecated public BioSource getBioSource()
      Deprecated.
      Biosource is not supported in Clarity.
      Gets the biosource of this sample.
      Returns:
      The biosource.
    • setBioSource

      @Deprecated public void setBioSource(BioSource bioSource)
      Deprecated.
      Biosource is not supported in Clarity.
      Sets the biosource for this sample.
      Parameters:
      bioSource - The biosource.
    • getUserDefinedType

      public UDT getUserDefinedType()
      Gets the user-defined type of this sample.
      Returns:
      The user-defined type.
    • setUserDefinedType

      public UDT setUserDefinedType(UDT value)
      Sets the user-defined type for this sample.
      Parameters:
      value - The user-defined type.
      Returns:
      The set user-defined type.
    • setUserDefinedType

      public UDT setUserDefinedType(String type)
      Sets the user-defined type for this sample by type name.
      Parameters:
      type - The type name.
      Returns:
      The created user-defined type.
    • getUserDefinedFields

      public List<UDF> getUserDefinedFields()
      Gets the list of user-defined fields for this sample.

      This accessor method returns a reference to the live list, not a snapshot. Any modification to the returned list will be reflected in the object.

      Specified by:
      getUserDefinedFields in interface UDFHolder
      Returns:
      The list of user-defined fields.
    • getExternalIds

      public List<ExternalId> getExternalIds()
      Gets the list of external identifiers for this sample.

      This accessor method returns a reference to the live list, not a snapshot. Any modification to the returned list will be reflected in the object.

      Returns:
      The list of external identifiers.
    • getFiles

      public List<ClarityFile> getFiles()
      Gets the list of files associated with this sample.

      This accessor method returns a reference to the live list, not a snapshot. Any modification to the returned list will be reflected in the object.

      Returns:
      The list of files.
    • addFile

      public ClarityFile addFile(ClarityFile f)
      Adds a file to this sample.
      Parameters:
      f - The file to add.
      Returns:
      The added file, or null if the file parameter was null.
    • getLimsid

      public String getLimsid()
      Gets the LIMS id of this sample.
      Returns:
      The LIMS id.
    • setLimsid

      public void setLimsid(String value)
      Sets the LIMS id for this sample.
      Parameters:
      value - The LIMS id.
    • getUri

      public URI getUri()
      Gets the URI of this sample.
      Returns:
      The sample URI.
    • setUri

      public void setUri(URI value)
      Sets the URI for this sample.
      Parameters:
      value - The sample URI.
    • toString

      public String toString()
      Returns a string representation of this sample.
      Overrides:
      toString in class Object
      Returns:
      A string containing the LIMS id and name.