Skip to main content

Getting at the "GenbankSequenceDocument" class

Comments

3 comments

  • Geneious Team

    Unfortunately GenbankSequenceDocument is part of the NCBI plugin and is not part of the Geneious public API so you are unable to extend it from your own plugin. We've designed the Geneious plugin system so that plugins may not directly depend on each other which means different plugins can be developed and changed without worrying about the effect that changes may have on other plugins.

    I suggest you extend DefaultSequenceDocument instead or preferably just use DefaultSequenceDocument without extending it if possible. If you can you explain why you think it is best for your plugin to extend GenbankSequenceDocument I may be able to suggest an alternative solution.

    Best regards,
    Matt.

    0
  • Lmccarthy

    Hi Matt,

     

    Essentially, the input for what I'm developing is going to be genbank files, I want all the fields, the viewer, and all the tools that work on genbank files I would like to work on these files. I just want to add a few additional fields and functionality on top of what genbank already has.

     

    I could certainly extend DefaultSequenceDocument, but then I'd have to write my own viewer from the ground up, including the "text" display for the flatfile information. It just seems redundant when an existing class have 90% of what I want to use, and no "conflicting" functionality.

     

    I can understand your desire for "plugin encapsulation", but certainly basic genbank support is pretty ubiquitous. I don't really need the "functionality" of the class, just its implementations of the "PluginDocument" interface like "toHtml(), getDisplayableFields" and so on, and the "class definition" so that anything that accepts GenbankSequenceDocument will also accept my class.

    0
  • Geneious Team

    One option would be to create a GenbankSequenceDocument by importing from a genbank format file using PluginUtilities.importDocuments and then set your own custom fields on it using setFieldValue. You could make your own viewer only show up on documents that have your custom fields.

     

    Alternatively you could create your own class that extends DefaultSequeceDocument that delegates functionality to the GenbankSequenceDocument returned from PluginUtilities.importDocuments.

     

    Would either of those solutions work for you? If not can you explain a bit more about the additional functionality you require and I might be able to suggest something else.

     

    Best regards,

    Matt.

    0

Please sign in to leave a comment.