Class ClarityFile

java.lang.Object
com.genologics.ri.file.ClarityFile
All Implemented Interfaces:
LimsEntity<ClarityFile>, LimsEntityLink<ClarityFile>, LimsEntityLinkable<ClarityFile>, LimsLink<ClarityFile>, Linkable<ClarityFile>, Locatable, Serializable

public class ClarityFile extends Object implements LimsEntity<ClarityFile>, LimsEntityLink<ClarityFile>, Serializable
The file element contains information about a file in the system. These are rather strange as the link to a file is just a file object with only the URI set. So they are both entities and links.
See Also:
  • Field Details

    • attachedTo

      protected URI attachedTo
    • contentLocation

      protected URI contentLocation
    • originalLocation

      protected String originalLocation
    • originalName

      protected String originalName
      Since:
      2.26
    • published

      protected Boolean published
    • limsid

      protected String limsid
    • uri

      protected URI uri
  • Constructor Details

    • ClarityFile

      public ClarityFile()
    • ClarityFile

      public ClarityFile(URI uri)
    • ClarityFile

      public ClarityFile(URI uri, String limsid)
    • ClarityFile

      public ClarityFile(ClarityFile original)
  • Method Details

    • getAttachedTo

      public URI getAttachedTo()
      This element contains a URI that identifies and links to further information about the resource that the file is attached to, such as a project, sample, process, or file-based artifact.
      Returns:
      The URI of the entity the file is attached to.
    • setAttachedTo

      public void setAttachedTo(Linkable<?> link)
    • getContentLocation

      public URI getContentLocation()
      This element contains a URI that identifies and links to the network location of the file, which can be used to retrieve the file and process its contents.
      Returns:
      The file's location.
    • setContentLocation

      public void setContentLocation(URI contentLocation)
    • getOriginalLocation

      public String getOriginalLocation()
      This element provides the original name and location of the file before it was imported into the system. Note: If the file was uploaded from the Clarity web interface, the original-location element will not contain the full file path due to browser security limitations. Only the original file name will be available.
      Returns:
      The original file location.
    • setOriginalLocation

      public void setOriginalLocation(String originalLocation)
    • getOriginalName

      public String getOriginalName()
      This element provides the original name of the file before it was imported into the system. This is calculated from the original-location.
      Returns:
      The original file name.
      Since:
      2.26
    • setOriginalName

      public void setOriginalName(String originalName)
    • isPublished

      public boolean isPublished()
      This element specifies whether the file is displayed in LabLink.
      Returns:
      true to be visible in Lablink, false to be invisible.
    • setPublished

      public void setPublished(Boolean published)
    • getLimsid

      public String getLimsid()
      Description copied from interface: LimsEntityLinkable
      Get the LIMS id for this object.
      Specified by:
      getLimsid in interface LimsEntityLinkable<ClarityFile>
      Returns:
      The LIMS id.
    • setLimsid

      public void setLimsid(String limsid)
      Description copied from interface: LimsEntityLinkable
      Set the LIMS id for this object.
      Specified by:
      setLimsid in interface LimsEntityLinkable<ClarityFile>
      Parameters:
      limsid - The new LIMS id.
    • getUri

      public URI getUri()
      Description copied from interface: Locatable
      Get the URI of this object.
      Specified by:
      getUri in interface LimsLink<ClarityFile>
      Specified by:
      getUri in interface Locatable
      Returns:
      The URI.
    • setUri

      public void setUri(URI uri)
      Description copied from interface: Locatable
      Set the URI of this object.
      Specified by:
      setUri in interface Locatable
      Parameters:
      uri - The new URI.
    • clearDetailFields

      public void clearDetailFields()
      Helper method to clear the detail fields (attachedTo, contentLocation, originalLocation and published). This may be necessary if a new file is created with these values set and that object then set on, say, an artifact that needs to be updated. Internally, the link will have been set on the server.
    • getEntityClass

      public Class<ClarityFile> getEntityClass()
      Description copied from interface: LimsLink
      Get the class of the true, full LIMS entity this object links to.
      Specified by:
      getEntityClass in interface LimsLink<ClarityFile>
      Returns:
      The real object class.
    • toString

      public String toString()
      Overrides:
      toString in class Object