Class FileLink

All Implemented Interfaces:
LimsLink<ClarityFile>, Linkable<ClarityFile>, Locatable, Serializable

public class FileLink extends LimsLinkBase<ClarityFile>
The file-link type provides a URI that links to information about a file in the system.

Elements of this type are used for lists of files, or by resources that have attached files to identify and link to further information about the file.

See Also:
  • Field Details

    • uri

      protected URI uri
      The URI of the file resource.
    • limsid

      protected String limsid
      The LIMS id of the file.
  • Constructor Details

    • FileLink

      public FileLink()
      Creates a new, empty FileLink.
    • FileLink

      public FileLink(URI uri)
      Creates a new FileLink with the specified URI.
      Parameters:
      uri - The URI of the file resource.
    • FileLink

      public FileLink(URI uri, String limsid)
      Creates a new FileLink with the specified URI and LIMS id.
      Parameters:
      uri - The URI of the file resource.
      limsid - The LIMS id of the file.
    • FileLink

      public FileLink(LimsEntityLinkable<ClarityFile> link)
      Creates a new FileLink from a linkable entity that references a ClarityFile, copying its URI and LIMS id.
      Parameters:
      link - The linkable entity to create a link from.
      Throws:
      NullPointerException - if link is null.
  • Method Details

    • getEntityClass

      public Class<ClarityFile> getEntityClass()
      Gets the entity class that this link references.
      Returns:
      The ClarityFile class.
    • getUri

      public URI getUri()
      Gets the URI of the file resource.
      Returns:
      The URI.
    • setUri

      public void setUri(URI uri)
      Sets the URI of the file resource.
      Parameters:
      uri - The URI to set.
    • getLimsid

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

      public void setLimsid(String limsid)
      Sets the LIMS id of the file.
      Parameters:
      limsid - The LIMS id to set.