Class PlateIdentifier
- java.lang.Object
-
- ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.PermanentIdentifier
-
- ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.PlateIdentifier
-
- All Implemented Interfaces:
IPermanentIdentifier
,java.io.Serializable
- Direct Known Subclasses:
Plate
,PlateMetadata
@JsonObject("PlateIdentifier") public class PlateIdentifier extends PermanentIdentifier
Contains data which uniquely define a plate.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PlateIdentifier(java.lang.String plateCode, java.lang.String spaceCodeOrNull)
An empty spaceCode is interpreted as the home space, anull
spaceCode is interpreted as 'no space', i.e.PlateIdentifier(java.lang.String plateCode, java.lang.String spaceCodeOrNull, java.lang.String permId)
PlateIdentifier(java.lang.String plateCode, java.lang.String spaceCodeOrNull, java.lang.String projectCodeOrNull, java.lang.String permId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PlateIdentifier
createFromAugmentedCode(java.lang.String augmentedCode)
Creates aPlateIdentifier
from the given augmentedCode.static PlateIdentifier
createFromPermId(java.lang.String permId)
Creates aPlateIdentifier
from the given permId.boolean
equals(java.lang.Object obj)
java.lang.String
getAugmentedCode()
Returns the augmented (full) code of this plate.java.lang.String
getPlateCode()
A code of the plate.int
hashCode()
boolean
isSharedPlate()
java.lang.String
toString()
java.lang.String
tryGetProjectCode()
java.lang.String
tryGetSpaceCode()
A code of the space to which the plate belongs ornull
if it is a shared plate.-
Methods inherited from class ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.PermanentIdentifier
getPermId
-
-
-
-
Constructor Detail
-
PlateIdentifier
protected PlateIdentifier(java.lang.String plateCode, java.lang.String spaceCodeOrNull)
An empty spaceCode is interpreted as the home space, anull
spaceCode is interpreted as 'no space', i.e. identifies a shared sample.
-
PlateIdentifier
public PlateIdentifier(java.lang.String plateCode, java.lang.String spaceCodeOrNull, java.lang.String permId)
-
PlateIdentifier
public PlateIdentifier(java.lang.String plateCode, java.lang.String spaceCodeOrNull, java.lang.String projectCodeOrNull, java.lang.String permId)
-
-
Method Detail
-
createFromAugmentedCode
public static PlateIdentifier createFromAugmentedCode(java.lang.String augmentedCode) throws java.lang.IllegalArgumentException
Creates aPlateIdentifier
from the given augmentedCode.- Parameters:
augmentedCode
- The augmentedCode in the form/SPACE/PROJECT/EXPERIMENT
- Returns:
- A plate identifier corresponding to augmentedCode. Note that this plate identifier has no perm id set.
- Throws:
java.lang.IllegalArgumentException
- If the augmentedCode is not in one of the forms/SPACE/PLATE', /PLATE or PLATE
.
-
createFromPermId
public static PlateIdentifier createFromPermId(java.lang.String permId) throws java.lang.IllegalArgumentException
Creates aPlateIdentifier
from the given permId.- Parameters:
permId
- The permId- Returns:
- A plate identifier corresponding to permId. Note that this plate identifier has no code or space set.
- Throws:
java.lang.IllegalArgumentException
- If the augmentedCode is not in one of the forms/SPACE/PLATE', /PLATE or PLATE
.
-
getPlateCode
public java.lang.String getPlateCode()
A code of the plate.
-
tryGetSpaceCode
public java.lang.String tryGetSpaceCode()
A code of the space to which the plate belongs ornull
if it is a shared plate.
-
tryGetProjectCode
public java.lang.String tryGetProjectCode()
-
getAugmentedCode
public java.lang.String getAugmentedCode()
Returns the augmented (full) code of this plate.
-
isSharedPlate
public boolean isSharedPlate()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPermanentIdentifier
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classPermanentIdentifier
-
toString
public java.lang.String toString()
- Overrides:
toString
in classPermanentIdentifier
-
-