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 Deprecated Methods Modifier and Type Method Description FileAnnotationDataasFileAnnotationData()Deprecated.Gets the FileAnnotationData contained.java.io.FilegetAttachedFile()Returns the file to upload to the server.java.lang.StringgetContentAsString()Returns the absolute path to the filejava.io.FilegetFile(Client client, java.lang.String path)Returns the original file.java.lang.StringgetFileFormat()Returns the format of the uploaded file.longgetFileID()Returns the id of the file.java.lang.StringgetFileKind()Returns a user readable description of the file.java.lang.StringgetFileName()Returns the name of the file.java.lang.StringgetFilePath()Returns the absolute path to the file.longgetFileSize()Returns the size of the file.java.lang.StringgetOriginalMimetype()Returns the format of the original file.java.lang.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, getFolders, getImages, getLastModified, getNameSpace, getPlateAcquisitions, getPlates, getProjects, getScreens, getWells, setDescription, setNameSpace
-
Methods inherited from class fr.igred.omero.GenericObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, flatten, 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 java.lang.String getOriginalMimetype()
Returns the format of the original file.- Returns:
- See above.
-
getServerFileMimetype
public java.lang.String getServerFileMimetype()
Returns the file format as defined by the specification, corresponding to the file extension.- Returns:
- See above.
-
getFileFormat
public java.lang.String getFileFormat()
Returns the format of the uploaded file.- Returns:
- See above.
-
getFileKind
public java.lang.String getFileKind()
Returns a user readable description of the file.- Returns:
- See above.
-
getAttachedFile
public java.io.File getAttachedFile()
Returns the file to upload to the server.- Returns:
- See above.
-
getFileName
public java.lang.String getFileName()
Returns the name of the file.- Returns:
- See above.
-
getFilePath
public java.lang.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 java.io.File getFile(Client client, java.lang.String path) throws java.io.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.java.io.IOException- Cannot write to the file.OMEROServerError- Server error.
-
getContentAsString
public java.lang.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
@Deprecated public FileAnnotationData asFileAnnotationData()
Deprecated.Gets the FileAnnotationData contained.- Returns:
- the
FileAnnotationDatacontained. UseGenericObjectWrapper.asDataObject()instead.
-
-