I seem to have to be coming back to this issue again:
I'm developing a plugin for Naturalis that adds document notes to fasta and AB1 documents as it imports them. That works fine. The point is: when I import the exact same document again, the plugin should detect that because one of the document notes functions as a key. The plugin must still import the document, but another document note - the "document version" - must be incremented.
I know Geneious has a revision number itself, but these are the specifications for the plugin, so that's what I need to implement.
So the plugin first does a query on the note field functioning as the key, and then sets the "document version" for the new document as appropriate.
However, this never works. In the log file you can see Geneious executing the right query, but nothing ever comes back.
Attached are two images: the first is the log file (which is actually presented to the user via a Swing TextArea). You can see the query that Geneious executes (it's a toString() of your Query class) and it seems perfectly valid, but the next log messages says: "0 documents found".
The second is the Geneious GUI itself. It shows you the two identifical documents, but still with the same "document version" note. The "Extract ID" column is the key I'm searching on, and as you can see they are the same for the 2 documents.
Strangely, Geneious itself HAS detected the documents are the same - it has put a 2 after the last one's name.
Finally, here you can see the QueryUtils class that does the query (findByExtractID), and the enum, responsible for creating a query field from a DocumentNoteField:
Please sign in to leave a comment.