Package fr.igred.omero.annotations
Class FileAnnotationWrapper
- java.lang.Object
-
- fr.igred.omero.ObjectWrapper<T>
-
- fr.igred.omero.annotations.AnnotationWrapper<FileAnnotationData>
-
- fr.igred.omero.annotations.FileAnnotationWrapper
-
- All Implemented Interfaces:
Annotation
,FileAnnotation
,ContainerLinked
,HCSLinked
,ImageLinked
,RemoteObject
public class FileAnnotationWrapper extends AnnotationWrapper<FileAnnotationData> implements FileAnnotation
Class containing a FileAnnotationData object.Wraps function calls to the FileAnnotationData contained.
-
-
Field Summary
-
Fields inherited from class fr.igred.omero.ObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description FileAnnotationWrapper(FileAnnotationData annotation)
Constructor of the AnnotationWrapper class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getAttachedFile()
Returns the file to upload to the server.java.lang.String
getContentAsString()
Returns the absolute path to the filejava.io.File
getFile(ConnectionHandler client, java.lang.String path)
Returns the original file.java.lang.String
getFileFormat()
Returns the format of the uploaded file.long
getFileID()
Returns the ID of the file.java.lang.String
getFileKind()
Returns a user readable description of the file.java.lang.String
getFileName()
Returns the name of the file.java.lang.String
getFilePath()
Returns the absolute path to the file.long
getFileSize()
Returns the size of the file.java.lang.String
getOriginalMimetype()
Returns the format of the original file.java.lang.String
getServerFileMimetype()
Returns the file format as defined by the specification, corresponding to the file extension.boolean
isMovieFile()
Returnstrue
if it is a movie file.-
Methods inherited from class fr.igred.omero.annotations.AnnotationWrapper
getDatasets, getDescription, getFolders, getImages, getLastModified, getNameSpace, getPlateAcquisitions, getPlates, getProjects, getScreens, getWells, setDescription, setNameSpace
-
Methods inherited from class fr.igred.omero.ObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface fr.igred.omero.annotations.Annotation
countAnnotationLinks, getDescription, getFolders, getLastModified, getNameSpace, setDescription, setNameSpace
-
Methods inherited from interface fr.igred.omero.ContainerLinked
getDatasets, getProjects
-
Methods inherited from interface fr.igred.omero.annotations.FileAnnotation
asDataObject
-
Methods inherited from interface fr.igred.omero.HCSLinked
getPlateAcquisitions, getPlates, getScreens, getWells
-
Methods inherited from interface fr.igred.omero.ImageLinked
getImages
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
-
-
-
Constructor Detail
-
FileAnnotationWrapper
public FileAnnotationWrapper(FileAnnotationData annotation)
Constructor of the AnnotationWrapper class.- Parameters:
annotation
- FileAnnotationData to wrap.
-
-
Method Detail
-
getOriginalMimetype
public java.lang.String getOriginalMimetype()
Returns the format of the original file.- Specified by:
getOriginalMimetype
in interfaceFileAnnotation
- Returns:
- See above.
-
getServerFileMimetype
public java.lang.String getServerFileMimetype()
Returns the file format as defined by the specification, corresponding to the file extension.- Specified by:
getServerFileMimetype
in interfaceFileAnnotation
- Returns:
- See above.
-
getFileFormat
public java.lang.String getFileFormat()
Returns the format of the uploaded file.- Specified by:
getFileFormat
in interfaceFileAnnotation
- Returns:
- See above.
-
getFileKind
public java.lang.String getFileKind()
Returns a user readable description of the file.- Specified by:
getFileKind
in interfaceFileAnnotation
- Returns:
- See above.
-
getAttachedFile
public java.io.File getAttachedFile()
Returns the file to upload to the server.- Specified by:
getAttachedFile
in interfaceFileAnnotation
- Returns:
- See above.
-
getFileName
public java.lang.String getFileName()
Returns the name of the file.- Specified by:
getFileName
in interfaceFileAnnotation
- Returns:
- See above.
-
getFilePath
public java.lang.String getFilePath()
Returns the absolute path to the file.- Specified by:
getFilePath
in interfaceFileAnnotation
- Returns:
- See above.
-
getFileSize
public long getFileSize()
Returns the size of the file.- Specified by:
getFileSize
in interfaceFileAnnotation
- Returns:
- See above.
-
getFileID
public long getFileID()
Returns the ID of the file.- Specified by:
getFileID
in interfaceFileAnnotation
- Returns:
- See above.
-
getFile
public java.io.File getFile(ConnectionHandler client, java.lang.String path) throws java.io.IOException, ServiceException, ServerException
Returns the original file.- Specified by:
getFile
in interfaceFileAnnotation
- 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.java.io.IOException
- Cannot write to the file.ServerException
- Server error.
-
getContentAsString
public java.lang.String getContentAsString()
Returns the absolute path to the file- Specified by:
getContentAsString
in interfaceFileAnnotation
- Returns:
- See above.
- See Also:
AnnotationData.getContentAsString()
-
isMovieFile
public boolean isMovieFile()
Returnstrue
if it is a movie file.false
otherwise.- Specified by:
isMovieFile
in interfaceFileAnnotation
- Returns:
- See above.
-
-