- All Implemented Interfaces:
LimsEntity<ClarityFile>,LimsEntityLink<ClarityFile>,LimsEntityLinkable<ClarityFile>,LimsLink<ClarityFile>,Linkable<ClarityFile>,Locatable,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 Summary
FieldsModifier and TypeFieldDescriptionprotected URIThe URI of the resource that this file is attached to (e.g., a project, sample, process, or artifact).protected URIThe network location URI where the file content can be retrieved.protected StringThe LIMS id of the file.protected StringThe original name and location of the file before it was imported into the system.protected StringThe original name of the file before it was imported into the system.protected BooleanIndicates whether the file is displayed in LabLink.protected URIThe URI of the file resource. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new, empty ClarityFile.ClarityFile(ClarityFile file) Creates a new ClarityFile as a copy of another ClarityFile, copying its URI and LIMS id.ClarityFile(URI uri) Creates a new ClarityFile with the specified URI.ClarityFile(URI uri, String limsid) Creates a new ClarityFile with the specified URI and LIMS id. -
Method Summary
Modifier and TypeMethodDescriptionvoidHelper method to clear the detail fields (attachedTo, contentLocation, originalLocation and published).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.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.Gets the entity class for this file.Gets the LIMS id of this file.This element provides the original name and location of the file before it was imported into the system.This element provides the original name of the file before it was imported into the system.getUri()Gets the URI of this file resource.booleanThis element specifies whether the file is displayed in LabLink.voidsetAttachedTo(Linkable<?> link) Sets the resource that this file is attached to.voidsetContentLocation(URI contentLocation) Sets the network location URI where the file content can be retrieved.voidSets the LIMS id of this file.voidsetOriginalLocation(String originalLocation) Sets the original name and location of the file before it was imported into the system.voidsetOriginalName(String originalName) Sets the original name of the file before it was imported into the system.voidsetPublished(Boolean published) Sets whether the file should be displayed in LabLink.voidSets the URI of this file resource.Methods inherited from class com.genologics.ri.LimsLinkBase
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.genologics.ri.LimsEntityLink
getLinkMethods inherited from interface com.genologics.ri.LimsEntityLinkable
getLimsId, getLink, setLimsId
-
Field Details
-
attachedTo
The URI of the resource that this file is attached to (e.g., a project, sample, process, or artifact). -
contentLocation
The network location URI where the file content can be retrieved. -
originalLocation
The original name and location of the file before it was imported into the system. -
originalName
The original name of the file before it was imported into the system.- Since:
- 2.26
-
published
Indicates whether the file is displayed in LabLink. -
limsid
The LIMS id of the file. -
uri
The URI of the file resource.
-
-
Constructor Details
-
ClarityFile
public ClarityFile()Creates a new, empty ClarityFile. -
ClarityFile
Creates a new ClarityFile with the specified URI.- Parameters:
uri- The URI of the file resource.
-
ClarityFile
Creates a new ClarityFile with the specified URI and LIMS id.- Parameters:
uri- The URI of the file resource.limsid- The LIMS id of the file.
-
ClarityFile
Creates a new ClarityFile as a copy of another ClarityFile, copying its URI and LIMS id.- Parameters:
file- The file to copy from.- Throws:
NullPointerException- if file is null.
-
-
Method Details
-
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
Sets the resource that this file is attached to.- Parameters:
link- The linkable entity to attach this file to, or null to clear the attachment.
-
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
Sets the network location URI where the file content can be retrieved.- Parameters:
contentLocation- The URI of the file content location.
-
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
Sets the original name and location of the file before it was imported into the system.- Parameters:
originalLocation- The original file location 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
Sets the original name of the file before it was imported into the system.- Parameters:
originalName- The original file name.- Since:
- 2.26
-
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
Sets whether the file should be displayed in LabLink.- Parameters:
published- true to make the file visible in Lablink, false to make it invisible.
-
getLimsid
Gets the LIMS id of this file.- Specified by:
getLimsidin interfaceLimsEntityLinkable<ClarityFile>- Returns:
- The LIMS id.
-
setLimsid
Sets the LIMS id of this file.- Specified by:
setLimsidin interfaceLimsEntityLinkable<ClarityFile>- Parameters:
limsid- The LIMS id to set.
-
getUri
Gets the URI of this file resource.- Specified by:
getUriin interfaceLimsLink<ClarityFile>- Specified by:
getUriin interfaceLocatable- Returns:
- The URI.
-
setUri
Sets the URI of this file resource. -
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
Gets the entity class for this file.- Specified by:
getEntityClassin interfaceLimsLink<ClarityFile>- Returns:
- The ClarityFile class.
-