Class Instrument

java.lang.Object
com.genologics.ri.instrument.Instrument
All Implemented Interfaces:
LimsEntity<Instrument>, LimsEntityLinkable<Instrument>, Linkable<Instrument>, Locatable, Serializable

public class Instrument extends Object implements LimsEntity<Instrument>, Serializable
The detailed representation of an instrument.

Since API version 2.25 this object has received an explicit limsid attribute from the server. Unfortunately this is broken in that the last part of the URI path is not the same as the LIMS id. The id on the path is just a number corresponding to the database id whereas the LIMS id has the prefix "55-", corresponding to the LUID.

To make this work without special cases elsewhere this object will work as it did for API 2.24 and before, and return the LIMS id as just the number from getLimsid(). This keeps things consistent.

This issue has been reported to Illumina but they are very reluctant to fix it (SFC# 02921030).

See Also:
  • Field Details

    • name

      protected String name
      The instrument name.
    • type

      protected String type
      The instrument type.
    • serialNumber

      protected String serialNumber
      The instrument serial number.
      Since:
      2.25
    • expiryDate

      protected String expiryDate
      The instrument expiry date.
      Since:
      2.25
    • archived

      protected Boolean archived
      Whether the instrument has been archived.
      Since:
      2.25
    • uri

      protected URI uri
      The URI of this instrument.
    • limsid

      protected String limsid
      The LIMS id of this instrument as provided by the server.
      Since:
      2.25
  • Constructor Details

    • Instrument

      public Instrument()
      Default constructor.
    • Instrument

      public Instrument(String name)
      Constructor with instrument name.
      Parameters:
      name - The instrument name.
    • Instrument

      public Instrument(String name, String type)
      Constructor with instrument name and type.
      Parameters:
      name - The instrument name.
      type - The instrument type.
  • Method Details

    • getUri

      public URI getUri()
      Get the URI of this object.
      Specified by:
      getUri in interface Locatable
      Returns:
      The URI.
    • setUri

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

      public String getLimsid()
      Get the LIMS id of this instrument. Due to the error described in the class description, this doesn't return the limsid value but takes the id from the path of the URI.
      Specified by:
      getLimsid in interface LimsEntityLinkable<Instrument>
      Returns:
      The LIMS id as recorded on the URI path.
    • setLimsid

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

      public String getName()
      Get the instrument name.
      Returns:
      The instrument name.
    • setName

      public void setName(String name)
      Set the instrument name.
      Parameters:
      name - The instrument name.
    • getType

      public String getType()
      Get the instrument type.
      Returns:
      The instrument type.
    • setType

      public void setType(String type)
      Set the instrument type.
      Parameters:
      type - The instrument type.
    • getSerialNumber

      public String getSerialNumber()
      Get the instrument serial number.
      Returns:
      The serial number.
    • setSerialNumber

      public void setSerialNumber(String serialNumber)
      Set the instrument serial number.
      Parameters:
      serialNumber - The serial number.
    • getExpiryDate

      public String getExpiryDate()
      Get the instrument expiry date.
      Returns:
      The expiry date.
    • setExpiryDate

      public void setExpiryDate(String expiryDate)
      Set the instrument expiry date.
      Parameters:
      expiryDate - The expiry date.
    • getArchived

      public Boolean getArchived()
      Get whether the instrument has been archived.
      Returns:
      True if archived, false otherwise.
    • setArchived

      public void setArchived(Boolean archived)
      Set whether the instrument has been archived.
      Parameters:
      archived - True if archived, false otherwise.
    • getLink

      public LimsEntityLink<Instrument> getLink()
      Get a concrete link object to this LimsEntityLinkable entity. This definition simply narrows the type of links returned by classes that implement this interface, as they should all have corresponding LimsEntityLink link classes available.
      Specified by:
      getLink in interface LimsEntityLinkable<Instrument>
      Specified by:
      getLink in interface Linkable<Instrument>
      Returns:
      A LimsEntityLink to this object.