public abstract class GeneiousPlugin extends Object
getServices()getDocumentOperations()getDocumentFileImporters()getDocumentFileExporters()getDocumentViewerFactories()getDocumentActions()getSequenceAnnotationGenerators()getSequenceGraphFactories()return new DocumentOperation[] {new DocumentOperation{ public void methodName(){} ... }}| Constructor and Description |
|---|
GeneiousPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPluginChangedListener(SimpleListener listener)
Adds a listener to be notified when this plugin changes any of the
functionality (services, operations, importers etc) that it provides.
|
protected void |
firePluginChangedListeners()
Sub-classes should use this method to notify all listeners added using
addPluginChangedListener(org.virion.jam.util.SimpleListener)
that they have change their provided operations, services etc. |
AlignmentOperation[] |
getAlignmentOperations()
A
AlignmentOperation takes two or more existing sequences and aligns them. |
Assembler[] |
getAssemblers()
A
Assembler takes two or more existing sequences and assembles them. |
abstract String |
getAuthors()
A list of the authors of this module.
|
abstract String |
getDescription()
A short description of the plugins purpose.
|
DocumentAction[] |
getDocumentActions()
A
DocumentAction is similar to a DocumentOperation,
but it cannot create new documents. |
DocumentFileExporter[] |
getDocumentFileExporters()
get the exporters provided by this plugin.
|
DocumentFileImporter[] |
getDocumentFileImporters()
get the importers provided by this plugin.
|
DocumentOperation[] |
getDocumentOperations()
A
DocumentOperation takes one or more existing documents and uses them to create a set of new documents. |
DocumentType[] |
getDocumentTypes()
get possible document types.
|
DocumentViewerFactory[] |
getDocumentViewerFactories()
A document viewer displays a set of documents in some graphically interesting way.
|
String |
getEmailAddressForCrashes()
Returns an email address that any crashes that Geneious thinks are likely to be caused by this plugin should be sent to.
|
abstract String |
getHelp()
Help for this plugin in the form of HTML or plain text.
|
Icons |
getIcons()
get plugin icons set.
|
abstract int |
getMaximumApiVersion()
Get the maximum major API version number (for example 4)
which this plugin is known to work with.
|
abstract String |
getMinimumApiVersion()
Get the minimum required Geneious API version required
for this plugin to operate.
|
abstract String |
getName()
Name of the plugin suitable for usage in user interface or logs.
|
List<License.PluginLicense> |
getPluginLicenses()
Provides a list of all the plugin licenses that are known to be used in this plugin.
|
List<PluginPreferences> |
getPluginPreferences()
Get a list of tabs to appear in the Geneious preferences window.
|
GeneiousPreferences |
getPreferences()
Deprecated.
GeneiousPreferences are the old style way of providing preferences. Use
getPluginPreferences() instead which is more powerful and more consistent with other areas of the Geneious API. |
SequenceAnnotationGenerator[] |
getSequenceAnnotationGenerators()
A
SequenceAnnotationGenerator generates annotations on a sequence, set of sequences, or an alignment. |
SequenceGraphFactory[] |
getSequenceGraphFactories()
A sequence graph displays a graph in the sequence viewer.
|
SequenceViewerExtension.Factory[] |
getSequenceViewerExtensionFactories()
A
SequenceViewerExtension
is used for creating a custom extensions to the sequence viewer. |
GeneiousService[] |
getServices()
A plugin may provides a set of services.
|
TreeViewerExtension.Factory[] |
getTreeViewerExtensionFactories()
A
TreeViewerExtension
is used for creating a custom controls section in the tree viewer. |
abstract String |
getVersion()
Version number of this plugin.
|
void |
initialize(File pluginUserDirectory,
File pluginDirectory)
An initialization method which plugins should override to obtain the
plugin's installation directory and a user writable directory.
|
void |
removePluginChangedListener(SimpleListener listener)
Remove a listener previously added using
addPluginChangedListener(org.virion.jam.util.SimpleListener). |
public abstract String getName()
public abstract String getDescription()
public abstract String getHelp()
public abstract String getAuthors()
public String getEmailAddressForCrashes()
public abstract String getVersion()
public void initialize(File pluginUserDirectory, File pluginDirectory)
pluginDirectory at runtime. For example, Geneious and various plugins could have been
installed for all users on the machine, and individual users don't (and shouldn't) have write access
to the plugin data files. The pluginUserDirectory is guaranteed to be writable and unique for
each user.pluginUserDirectory - A user writable per plugin directory where the plugin can store data that will persist after restarting Geneious. This directory will not necessarily exist. A plugin should create it if necessary using File.mkdir(). If a plugin needs to create temporary files it should use FileUtilities.createTempFile instead.pluginDirectory - Location (Directory) where plugin jar file is located. Used by plugins requiring
access to additional files (executables, data) which are external to the java code. This is null for internal plugins which have no such directory.GeneiousService.initializeService(GeneiousServiceListener)public GeneiousService[] getServices()
public DocumentOperation[] getDocumentOperations()
DocumentOperation takes one or more existing documents and uses them to create a set of new documents.
A plugin may provide a number of document operations to Geneious, and each can have their own name and description.
public AlignmentOperation[] getAlignmentOperations()
AlignmentOperation takes two or more existing sequences and aligns them.
A plugin may provide a number of alignment operations to Geneious, and each can have their own name and description.public Assembler[] getAssemblers()
Assembler takes two or more existing sequences and assembles them.
A plugin may provide a number of assembly algorithms to Geneious, and each can have their own name and description.public SequenceAnnotationGenerator[] getSequenceAnnotationGenerators()
SequenceAnnotationGenerator generates annotations on a sequence, set of sequences, or an alignment.
public DocumentFileImporter[] getDocumentFileImporters()
public DocumentFileExporter[] getDocumentFileExporters()
public DocumentViewerFactory[] getDocumentViewerFactories()
public SequenceGraphFactory[] getSequenceGraphFactories()
public DocumentAction[] getDocumentActions()
DocumentAction is similar to a DocumentOperation,
but it cannot create new documents. It is recommended that you use DocumentOperations instead of DocumentActions.
public DocumentType[] getDocumentTypes()
public TreeViewerExtension.Factory[] getTreeViewerExtensionFactories()
TreeViewerExtension
is used for creating a custom controls section in the tree viewer.
The extension is able to interact with the tree by providing feedback based on selected nodes
and is itself able to modify the selected nodes and/or the tree itself.public SequenceViewerExtension.Factory[] getSequenceViewerExtensionFactories()
SequenceViewerExtension
is used for creating a custom extensions to the sequence viewer. For example statistics, custom components or custom actions.@Deprecated public GeneiousPreferences getPreferences()
getPluginPreferences() instead which is more powerful and more consistent with other areas of the Geneious API.public List<PluginPreferences> getPluginPreferences()
public Icons getIcons()
public abstract String getMinimumApiVersion()
Geneious.getApiVersion()
and is currently the version mentioned in the javadoc above ("4.14" as at 2010-08-16).
You should only return something lower than this if you have tested
with previous versions of Geneious.public abstract int getMaximumApiVersion()
public final void addPluginChangedListener(SimpleListener listener)
getDocumentOperations(), getServices() etc
and call these methods again.
This implementation is final. Sub-classes should use firePluginChangedListeners()
to notify all listeners when they change their provided operations, services etc.listener - the listener to be notified; must not be nullNullPointerException - if listener is nullremovePluginChangedListener(org.virion.jam.util.SimpleListener),
firePluginChangedListeners()public final void removePluginChangedListener(SimpleListener listener)
addPluginChangedListener(org.virion.jam.util.SimpleListener).listener - the listener to no longer be notifiedNullPointerException - if listener is nulladdPluginChangedListener(org.virion.jam.util.SimpleListener),
firePluginChangedListeners()protected final void firePluginChangedListeners()
addPluginChangedListener(org.virion.jam.util.SimpleListener)
that they have change their provided operations, services etc.public List<License.PluginLicense> getPluginLicenses()
License.PluginLicense
that is passed in to License.isPluginLicenseActive(GeneiousPlugin, com.biomatters.geneious.publicapi.plugin.License.PluginLicense, boolean))}
must also be returned from this method.
The default implementation returns an empty list.