Package fr.igred.omero.annotations
Class FileAnnotationWrapper
- java.lang.Object
-
- fr.igred.omero.GenericObjectWrapper<T>
-
- fr.igred.omero.annotations.GenericAnnotationWrapper<FileAnnotationData>
-
- fr.igred.omero.annotations.FileAnnotationWrapper
-
public class FileAnnotationWrapper extends GenericAnnotationWrapper<FileAnnotationData>
Class containing a FileAnnotationData object.Wraps function calls to the FileAnnotationData contained.
-
-
Field Summary
-
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description FileAnnotationWrapper(FileAnnotationData annotation)Constructor of the GenericAnnotationWrapper class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileAnnotationDataasFileAnnotationData()Gets the FileAnnotationData contained.FilegetAttachedFile()Returns the file to upload to the server.StringgetContentAsString()Returns the absolute path to the fileFilegetFile(Client client, String path)Returns the original file.StringgetFileFormat()Returns the format of the uploaded file.longgetFileID()Returns the id of the file.StringgetFileKind()Returns a user readable description of the file.StringgetFileName()Returns the name of the file.StringgetFilePath()Returns the absolute path to the file.longgetFileSize()Returns the size of the file.StringgetOriginalMimetype()Returns the format of the original file.StringgetServerFileMimetype()Returns the file format as defined by the specification, corresponding to the file extension.booleanisMovieFile()Returnstrueif it is a movie file.-
Methods inherited from class fr.igred.omero.annotations.GenericAnnotationWrapper
countAnnotationLinks, getDatasets, getDescription, getImages, getLastModified, getNameSpace, getPlates, getProjects, getScreens, getWells, setDescription, setNameSpace
-
Methods inherited from class fr.igred.omero.GenericObjectWrapper
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
-
-
-
Constructor Detail
-
FileAnnotationWrapper
public FileAnnotationWrapper(FileAnnotationData annotation)
Constructor of the GenericAnnotationWrapper class.- Parameters:
annotation- Annotation to be contained.
-
-
Method Detail
-
getOriginalMimetype
public String getOriginalMimetype()
Returns the format of the original file.- Returns:
- See above.
-
getServerFileMimetype
public String getServerFileMimetype()
Returns the file format as defined by the specification, corresponding to the file extension.- Returns:
- See above.
-
getFileFormat
public String getFileFormat()
Returns the format of the uploaded file.- Returns:
- See above.
-
getFileKind
public String getFileKind()
Returns a user readable description of the file.- Returns:
- See above.
-
getAttachedFile
public File getAttachedFile()
Returns the file to upload to the server.- Returns:
- See above.
-
getFileName
public String getFileName()
Returns the name of the file.- Returns:
- See above.
-
getFilePath
public String getFilePath()
Returns the absolute path to the file.- Returns:
- See above.
-
getFileSize
public long getFileSize()
Returns the size of the file.- Returns:
- See above.
-
getFileID
public long getFileID()
Returns the id of the file.- Returns:
- See above.
-
getFile
public File getFile(Client client, String path) throws IOException, ServiceException, OMEROServerError
Returns the original file.- Parameters:
client- The client handling the connection.path- The path where the file will be saved.- Returns:
- See above.
- Throws:
ServiceException- Cannot connect to OMERO.IOException- Cannot write to the file.OMEROServerError- Server error.
-
getContentAsString
public String getContentAsString()
Returns the absolute path to the file- Returns:
- See above.
- See Also:
AnnotationData.getContentAsString()
-
isMovieFile
public boolean isMovieFile()
Returnstrueif it is a movie file.falseotherwise.- Returns:
- See above.
-
asFileAnnotationData
public FileAnnotationData asFileAnnotationData()
Gets the FileAnnotationData contained.- Returns:
- the
FileAnnotationDatacontained.
-
-