Post

2 followers Follow
0
Avatar

Delayed document indexing makes plugin behaviour unpredictable

This post relates to my previous post - to recapitulate:

I am writing a plugin for Geneious. This plugin creates placeholder documents for yet-to-be imported ab1/fasta sequences. These placeholder documents become obsolete the moment we receive the real sequences.

I have a DocumentAction class that creates the placeholder documents and a DocumentOperation class that imports/creates the real ab1/fasta sequences.

The problem is: if the user executes them in quick succession the AnnotatedPluginDocuments created by first operation will still be invisible to the second. Presumably because the Geneious is still busy indexing them.

How can I circumvent this visibility / deleayed indexing problem?

Informatiemanagement

Please sign in to leave a comment.

4 comments

0
Avatar

DocumentAction is not intended for generating new documents - it is for modifying existing documents. (see https://assets.geneious.com/developer/geneious/javadoc/latest/index.html )

I would recommend creating a DocumentOperation instead and doing all the importing during performOperation and only returning the final document once it is completely ready. You will not have to deal with complicated placeholder documents then.

Richard Moir 0 votes
Comment actions Permalink
0
Avatar

Unfortunately I can't. The placeholder documents are created from spread sheets containing all sort of info regarding the dna samples, BOLD and our collection mgmt system. The requirement is that the sequences and the extraneious info must be importable in arbitrary order. So I create dummy sequence documents with a dummy sequence (that's legacy, I might as well have used you TextDocument class).

Informatiemanagement 0 votes
Comment actions Permalink
0
Avatar

Can you import the spreadsheet AND all ab1/fasta files all in the single operation so that sequence documents can be created immediately?

Alternatively you could wrap your spreadsheet with a subclass of DatabaseService so the user can search/browse using the retrieve method. Then you can either just import ab1/fasta files for sequences that match their queries or you could make it return a subclass of SummaryDocument (https://assets.geneious.com/developer/geneious/javadoc/latest/com/biomatters/geneious/publicapi/documents/SummaryDocument.html) which is a special kind of dummy document that Geneious will handle nicely.

Richard Moir 0 votes
Comment actions Permalink
0
Avatar

Hi,

 

Thanks for the suggestion! No, there may be days or weeks between importing the spreadsheet(s) and the fasta/ab1 sequences. But maybe your alternative is something we could go for

Informatiemanagement 0 votes
Comment actions Permalink