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.FilegetAttachedFile()Returns the file to upload to the server.java.lang.StringgetContentAsString()Returns the absolute path to the filejava.io.FilegetFile(ConnectionHandler 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.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:
getOriginalMimetypein 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:
getServerFileMimetypein interfaceFileAnnotation- Returns:
- See above.
-
getFileFormat
public java.lang.String getFileFormat()
Returns the format of the uploaded file.- Specified by:
getFileFormatin interfaceFileAnnotation- Returns:
- See above.
-
getFileKind
public java.lang.String getFileKind()
Returns a user readable description of the file.- Specified by:
getFileKindin interfaceFileAnnotation- Returns:
- See above.
-
getAttachedFile
public java.io.File getAttachedFile()
Returns the file to upload to the server.- Specified by:
getAttachedFilein interfaceFileAnnotation- Returns:
- See above.
-
getFileName
public java.lang.String getFileName()
Returns the name of the file.- Specified by:
getFileNamein interfaceFileAnnotation- Returns:
- See above.
-
getFilePath
public java.lang.String getFilePath()
Returns the absolute path to the file.- Specified by:
getFilePathin interfaceFileAnnotation- Returns:
- See above.
-
getFileSize
public long getFileSize()
Returns the size of the file.- Specified by:
getFileSizein interfaceFileAnnotation- Returns:
- See above.
-
getFileID
public long getFileID()
Returns the ID of the file.- Specified by:
getFileIDin 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:
getFilein 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:
getContentAsStringin interfaceFileAnnotation- Returns:
- See above.
- See Also:
AnnotationData.getContentAsString()
-
isMovieFile
public boolean isMovieFile()
Returnstrueif it is a movie file.falseotherwise.- Specified by:
isMovieFilein interfaceFileAnnotation- Returns:
- See above.
-
-