public abstract static class DocumentFileImporter.ImportCallback extends Object
| Constructor and Description |
|---|
DocumentFileImporter.ImportCallback() |
| Modifier and Type | Method and Description |
|---|---|
abstract AnnotatedPluginDocument |
addDocument(AnnotatedPluginDocument annotatedDocument)
Report back one imported AnnotatedPluginDocument.
|
AnnotatedPluginDocument |
addDocument(AnnotatedPluginDocument annotatedDocument,
ProgressListener progress)
Report back one imported AnnotatedPluginDocument.
|
AnnotatedPluginDocument |
addDocument(AnnotatedPluginDocument annotatedDocument,
ProgressListener progress,
String subFolderPath)
Report back one imported AnnotatedPluginDocument.
|
abstract AnnotatedPluginDocument |
addDocument(PluginDocument document)
Report back one imported PluginDocument.
|
boolean |
addNucleotideSequenceNameOnFirstPass(String sequenceName)
To improve import performance on nextgen sized sequence lists, an importer may optionally
make a first pass of the nucleotide sequences and call this method with each sequence name during the first
pass.
|
public abstract AnnotatedPluginDocument addDocument(PluginDocument document)
document - imported documentpublic abstract AnnotatedPluginDocument addDocument(AnnotatedPluginDocument annotatedDocument)
addDocument(com.biomatters.geneious.publicapi.documents.PluginDocument)
for importers that generate AnnotatedPluginDocuments instead.
It is better to use addDocument(PluginDocument doc) when possible since it reduces overhead
in some cases.
In the implementation of this method used by Geneious to import documents, if the document passed in is already present in the database,
it will not be added again, but it will be selected along with any imported documents.annotatedDocument - imported documentpublic AnnotatedPluginDocument addDocument(AnnotatedPluginDocument annotatedDocument, ProgressListener progress)
addDocument(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument)
for importers that want to want to receive progress on how the callback has handled
the document. For example, in most situations the given document is saved
to the user's local database during the callback, which may take some time on huge documents.
The default implementation just ignores the progress listener and calls addDocument(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument).annotatedDocument - imported documentprogress - a progress listener to receive progress updates on how the document has been handled. This should not be the progressListener passed to the imported. Instead the importer should construct a CompositeProgressListener to split the progress into sections for reading the file, and then calling this callback method.public AnnotatedPluginDocument addDocument(AnnotatedPluginDocument annotatedDocument, ProgressListener progress, String subFolderPath)
addDocument(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument)
for importers that want to want to receive progress on how the callback has handled
the document. For example, in most situations the given document is saved
to the user's local database during the callback, which may take some time on huge documents.
The default implementation just ignores the progress listener and subFolderPath and calls
addDocument(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument).annotatedDocument - imported documentprogress - a progress listener to receive progress updates on how the document has been handled. This
should not be the progressListener passed to the imported. Instead the importer should construct a
CompositeProgressListener to split the progress into sections for reading the file, and
then calling this callback method.subFolderPath - a path relative to the import target folder which the document should be added to. If
null or empty string, the document will be placed in the target folder. If a non-empty string is specified
then the document will be placed in a subfolder with the this String as the name. To create nested subfolders
sepearate the folders by File.separator in the String. If the string begins with a
File.separator then the path will be relative to the root "Local" folder. The program will create any folders if they don't
already exist. FileUtilities.isFileNameAllowed(String)
must return true for any folder names used.FileUtilities.getLegalFileName(String, String)public boolean addNucleotideSequenceNameOnFirstPass(String sequenceName)
addDocument(com.biomatters.geneious.publicapi.documents.PluginDocument)
must use the same names.sequenceName - the name of a nucleotide sequence