Package omero.gateway.model
Class FileAnnotationData
- java.lang.Object
-
- omero.gateway.model.DataObject
-
- omero.gateway.model.AnnotationData
-
- omero.gateway.model.FileAnnotationData
-
public class FileAnnotationData extends AnnotationData
Annotation to upload files to the server.- Since:
- OME3.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBULK_ANNOTATIONS_NSThe name space used to indicate that theFileAnnotationis aBulk Annotationsfile.static java.lang.StringCOMPANION_FILE_NSThe name space used to indicate that theFileAnnotationis a companion file.static java.lang.StringCSVIdentifies theCSVfile formats.static java.lang.StringEXPERIMENTER_PHOTO_NSThe name space used to identify the experimenter photo.static java.lang.StringFLIM_NSIdentifies the FLIM namespace.static java.lang.StringHTMIdentifies theHTMfile formats.static java.lang.StringHTMLIdentifies theHTMLfile formats.static java.lang.StringLOG_FILE_NSThe name space used to indicate that theFileAnnotationis an import log file.static java.lang.StringMEASUREMENT_NSThe name space used to indicate that theFileAnnotationis aMeasurementfile.static java.lang.StringMOVIE_NSThe name space used to indicate that theFileAnnotationis a movie.static java.lang.StringMS_EXCELIdentifies theExcelfile formats.static java.lang.StringMS_POWER_POINTIdentifies thePower pointfile formats.static java.lang.StringMS_POWER_POINT_SHOWIdentifies thePower pointfile formats.static java.lang.StringMS_POWER_POINT_XIdentifies thePower pointfile formats.static java.lang.StringMS_WORDIdentifies theWordfile formats.static java.lang.StringMS_WORD_XIdentifies theWordfile formats.static java.lang.StringORIGINAL_METADATA_NAMEThe default name for the original metadata file.static java.lang.StringPDFIdentifies thePDFfile formats.static java.lang.StringRTFIdentifies theRTFfile formats.static java.lang.StringTEXTIdentifies theTextfile formats.static java.lang.StringUNKNOWNIndicates that the format is not recognized.static java.lang.StringXMLIdentifies theXMLfile formats.-
Fields inherited from class omero.gateway.model.AnnotationData
FILE_TRANSFER_NS
-
-
Constructor Summary
Constructors Constructor Description FileAnnotationData(java.io.File file)Creates a new instance.FileAnnotationData(omero.model.FileAnnotation annotation)Creates a new instance.
-
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.ObjectgetContent()Returns the original file.java.lang.StringgetContentAsString()Returns the absolute path to the filejava.lang.StringgetDescription()Returns the description of the annotation.omero.model.OriginalFilegetFile()Returns the original file if loaded,nullotherwise.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.voidsetContent(java.lang.Object content)Sets the text annotation.voidsetDescription(java.lang.String description)Sets the description of the annotation.-
Methods inherited from class omero.gateway.model.AnnotationData
getLastModified, getNameSpace, setNameSpace
-
Methods inherited from class omero.gateway.model.DataObject
asAnnotation, asChannel, asDataset, asExperimenter, asFolder, asGroup, asIAnnotated, asImage, asIObject, asPixels, asPlaneInfo, asPlate, asPojo, asPojos, asPojos, asProject, asScreen, asWell, asWellSample, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getDetails, getGroupId, getId, getOwner, getPermissions, getUpdated, getVersion, isDirty, isLoaded, nullDetails, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, setDirty, setId, setValue, setVersion, timeOfEvent, toString
-
-
-
-
Field Detail
-
FLIM_NS
public static final java.lang.String FLIM_NS
Identifies the FLIM namespace.- See Also:
- Constant Field Values
-
EXPERIMENTER_PHOTO_NS
public static final java.lang.String EXPERIMENTER_PHOTO_NS
The name space used to identify the experimenter photo.- See Also:
- Constant Field Values
-
COMPANION_FILE_NS
public static final java.lang.String COMPANION_FILE_NS
The name space used to indicate that theFileAnnotationis a companion file.- See Also:
- Constant Field Values
-
LOG_FILE_NS
public static final java.lang.String LOG_FILE_NS
The name space used to indicate that theFileAnnotationis an import log file.- See Also:
- Constant Field Values
-
MOVIE_NS
public static final java.lang.String MOVIE_NS
The name space used to indicate that theFileAnnotationis a movie.- See Also:
- Constant Field Values
-
MEASUREMENT_NS
public static final java.lang.String MEASUREMENT_NS
The name space used to indicate that theFileAnnotationis aMeasurementfile.- See Also:
- Constant Field Values
-
BULK_ANNOTATIONS_NS
public static final java.lang.String BULK_ANNOTATIONS_NS
The name space used to indicate that theFileAnnotationis aBulk Annotationsfile.- See Also:
- Constant Field Values
-
ORIGINAL_METADATA_NAME
public static final java.lang.String ORIGINAL_METADATA_NAME
The default name for the original metadata file.- See Also:
- Constant Field Values
-
PDF
public static final java.lang.String PDF
Identifies thePDFfile formats.- See Also:
- Constant Field Values
-
TEXT
public static final java.lang.String TEXT
Identifies theTextfile formats.- See Also:
- Constant Field Values
-
CSV
public static final java.lang.String CSV
Identifies theCSVfile formats.- See Also:
- Constant Field Values
-
XML
public static final java.lang.String XML
Identifies theXMLfile formats.- See Also:
- Constant Field Values
-
HTML
public static final java.lang.String HTML
Identifies theHTMLfile formats.- See Also:
- Constant Field Values
-
HTM
public static final java.lang.String HTM
Identifies theHTMfile formats.- See Also:
- Constant Field Values
-
MS_WORD
public static final java.lang.String MS_WORD
Identifies theWordfile formats.- See Also:
- Constant Field Values
-
MS_WORD_X
public static final java.lang.String MS_WORD_X
Identifies theWordfile formats.- See Also:
- Constant Field Values
-
MS_EXCEL
public static final java.lang.String MS_EXCEL
Identifies theExcelfile formats.- See Also:
- Constant Field Values
-
MS_POWER_POINT
public static final java.lang.String MS_POWER_POINT
Identifies thePower pointfile formats.- See Also:
- Constant Field Values
-
MS_POWER_POINT_X
public static final java.lang.String MS_POWER_POINT_X
Identifies thePower pointfile formats.- See Also:
- Constant Field Values
-
MS_POWER_POINT_SHOW
public static final java.lang.String MS_POWER_POINT_SHOW
Identifies thePower pointfile formats.- See Also:
- Constant Field Values
-
RTF
public static final java.lang.String RTF
Identifies theRTFfile formats.- See Also:
- Constant Field Values
-
UNKNOWN
public static final java.lang.String UNKNOWN
Indicates that the format is not recognized.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileAnnotationData
public FileAnnotationData(java.io.File file)
Creates a new instance.- Parameters:
file- The file to attach.
-
FileAnnotationData
public FileAnnotationData(omero.model.FileAnnotation annotation)
Creates a new instance.- Parameters:
annotation- The annotation to wrap.
-
-
Method Detail
-
getFile
public omero.model.OriginalFile getFile()
Returns the original file if loaded,nullotherwise.- Returns:
- See above.
-
getOriginalMimetype
public java.lang.String getOriginalMimetype()
Returns the format of the original file.- Returns:
- See above.
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of the annotation.- Overrides:
setDescriptionin classAnnotationData- Parameters:
description- The value to set.
-
getDescription
public java.lang.String getDescription()
Returns the description of the annotation.- Overrides:
getDescriptionin classAnnotationData- 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.
-
getContent
public java.lang.Object getContent()
Returns the original file.- Specified by:
getContentin classAnnotationData- Returns:
- See above.
- See Also:
AnnotationData.getContent()
-
getContentAsString
public java.lang.String getContentAsString()
Returns the absolute path to the file- Specified by:
getContentAsStringin classAnnotationData- Returns:
- See above
- See Also:
AnnotationData.getContentAsString()
-
isMovieFile
public boolean isMovieFile()
Returnstrueif it is a movie file.falseotherwise.- Returns:
- See above.
-
setContent
public void setContent(java.lang.Object content)
Sets the text annotation.- Specified by:
setContentin classAnnotationData- Parameters:
content- The value to set.- See Also:
AnnotationData.setContent(Object)
-
-