Class DocumentSelectionOption.FolderOrDocuments
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.DocumentSelectionOption.FolderOrDocuments
-
- Enclosing class:
- DocumentSelectionOption
public static class DocumentSelectionOption.FolderOrDocuments extends java.lang.Object
The value type for DocumentSelectionOption which represents either a list of selected documents or a single selected folder which contains some documents of the correct type. To get the selected documents regardless of whether a folder is selected useDocumentSelectionOption.getDocuments()
.
-
-
Field Summary
Fields Modifier and Type Field Description static DocumentSelectionOption.FolderOrDocuments
EMPTY
Represents an empty selection
-
Constructor Summary
Constructors Constructor Description FolderOrDocuments(WritableDatabaseService folder)
Create a FolderOrDocuments for a folder selectionFolderOrDocuments(AnnotatedPluginDocument document)
Create a FolderOrDocuments for a selection of one documentFolderOrDocuments(java.util.List<AnnotatedPluginDocument> documents)
Create a FolderOrDocuments for a selection of documents
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.List<AnnotatedPluginDocument>
getDocuments()
Get the selected documents or null if documents are not selected (a folder is selected).WritableDatabaseService
getFolder()
Get the selected folder or null if a folder was not selected (documents are selected).int
hashCode()
-
-
-
Field Detail
-
EMPTY
public static final DocumentSelectionOption.FolderOrDocuments EMPTY
Represents an empty selection
-
-
Constructor Detail
-
FolderOrDocuments
public FolderOrDocuments(WritableDatabaseService folder)
Create a FolderOrDocuments for a folder selection- Parameters:
folder
- the selected folder
-
FolderOrDocuments
public FolderOrDocuments(java.util.List<AnnotatedPluginDocument> documents)
Create a FolderOrDocuments for a selection of documents- Parameters:
documents
- the selected documents
-
FolderOrDocuments
public FolderOrDocuments(AnnotatedPluginDocument document)
Create a FolderOrDocuments for a selection of one document- Parameters:
document
- the selected document
-
-
Method Detail
-
getFolder
public WritableDatabaseService getFolder()
Get the selected folder or null if a folder was not selected (documents are selected). OfgetFolder()
andgetDocuments()
, one will always return a non-null value while the other will return null. To get the selected documents regardless of whether a folder is selected useDocumentSelectionOption.getDocuments()
.- Returns:
- the selected folder or null if a folder is not selected (documents are selected)
-
getDocuments
public java.util.List<AnnotatedPluginDocument> getDocuments()
Get the selected documents or null if documents are not selected (a folder is selected). OfgetFolder()
andgetDocuments()
, one will always return a non-null value while the other will return null. To get the selected documents regardless of whether a folder is selected useDocumentSelectionOption.getDocuments()
.- Returns:
- the selected documents or null if documents are not selected (a folder is selected)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-