Class Location

All Implemented Interfaces:
LimsEntityLink<Container>, LimsEntityLinkable<Container>, LimsLink<Container>, Linkable<Container>, Locatable, Serializable, Comparable<Location>

public class Location extends LimsEntityLinkBase<Container> implements Comparable<Location>

Location provides a URI linking to the detailed representation of a Container along with the well location within that Container.

Location is used by representations to describe their location within a Container. For example Artifact and reagent use location to describe which Container they are located in.

See Also:
  • Field Details

    • WELL_POSITION_SPLITTER

      public static final Pattern WELL_POSITION_SPLITTER
      Pattern for splitting well position strings.
  • Constructor Details

    • Location

      public Location()
      Default constructor.
    • Location

      public Location(LimsEntityLinkable<Container> container, String position)
      Constructor with container and position.
      Parameters:
      container - The container link.
      position - The well position.
    • Location

      public Location(Linkable<Container> container, String position)
      Constructor with container and position.
      Parameters:
      container - The linkable container.
      position - The well position.
  • Method Details

    • getContainer

      public ContainerLink getContainer()
      Gets the container link.
      Returns:
      The container link.
    • setContainer

      public ContainerLink setContainer(LimsEntityLinkable<Container> link)
      Sets the container from a LIMS entity linkable.
      Parameters:
      link - The LIMS entity linkable container.
      Returns:
      The new container link.
    • getWellPosition

      public String getWellPosition()
      Gets the well position.
      Returns:
      The well position.
    • setWellPosition

      public void setWellPosition(String wellPosition)
      Sets the well position.
      Parameters:
      wellPosition - The well position.
    • hashCode

      public int hashCode()
      Computes a hash code for this location.
      Overrides:
      hashCode in class LimsLinkBase<Container>
      Returns:
      The hash code.
      See Also:
    • equals

      public boolean equals(Object obj)
      Compares this location with another object for equality.
      Overrides:
      equals in class LimsLinkBase<Container>
      Parameters:
      obj - The object to compare with.
      Returns:
      true if the objects are equal, false otherwise.
      See Also:
    • compareTo

      public int compareTo(Location o)
      Compares this location with another location.
      Specified by:
      compareTo in interface Comparable<Location>
      Parameters:
      o - The location to compare with.
      Returns:
      A negative integer, zero, or a positive integer as this location is less than, equal to, or greater than the specified location.
    • toString

      public String toString()
      Returns a string representation of this location.
      Overrides:
      toString in class LimsLinkBase<Container>
      Returns:
      The container and well position as a string.
      See Also:
    • getLimsid

      public String getLimsid()
      Gets the LIMS id of the container.
      Specified by:
      getLimsid in interface LimsEntityLinkable<Container>
      Returns:
      The LIMS id.
    • setLimsid

      public void setLimsid(String id)
      Sets the LIMS id of the container.
      Specified by:
      setLimsid in interface LimsEntityLinkable<Container>
      Parameters:
      id - The LIMS id.
    • getUri

      public URI getUri()
      Gets the URI of the container.
      Specified by:
      getUri in interface LimsLink<Container>
      Specified by:
      getUri in interface Locatable
      Returns:
      The URI.
    • setUri

      public void setUri(URI uri)
      Sets the URI of the container.
      Specified by:
      setUri in interface Locatable
      Parameters:
      uri - The URI.
    • getEntityClass

      public Class<Container> getEntityClass()
      Gets the entity class for this link.
      Specified by:
      getEntityClass in interface LimsLink<Container>
      Returns:
      The Container class.