-
Notifications
You must be signed in to change notification settings - Fork 6
Spls plugin development
SPLs plugin allows to create pharmacogenomics annotation which involves marking up specific sentence sequences in the text of drug product labels that discuss a drug’s pharmacacogenomics, and providing manual annotation of information provided by the sentences. It is similar the Antibody plugin but does not currently use a resource plugin (i.e., NCBO or NIF services)
In order to link a plugin to the GWT codebase it is necessary to add in the Domeo.gwt.xml file a line specifying the inheritance. The name of the module to inherit has to contain the full package name:
<inherits name="org.mindinformatics.gwt.domeo.plugins.annotation.spls.SPLs" />
The plugin project needs to include in the root a .gwt.xml file. The file would be in the directory and would be named 'SPLs.gwt.xml':
src>org>mindinformatics>gwt>domeo>plugins>annotation>spls>SPLs.gwt.xml
The file contains the dependencies and specifies the sub-directories
SPLs Plugin contains following directories:
-
info: contains the plugin and resources descriptors.
-
model: contains the classes that encode the annotation and domain model.
Class Diagram for spls/model (quotes Antibody to clarifies hierarchy of associations)
-
search: contains the implementation of the interfaces for enabling annotation search within the client.
-
ui: contains the ui components that can be of different kind:
- forms
- viewers
- tiles
- cards.
Class Diagram for spls/ui
Register SPLs plugin in Domeo by adding code as below in Domeo.java main file.
// SPLs
// Registers the plugin
pluginsManager.registerPlugin(SPLsPlugin.getInstance(), true);
// Domeo supports profiles, the annotation creator form gets loaded only if that plugin is enabled.
if (_profileManager.getUserCurrentProfile().isPluginEnabled(
SPLsPlugin.getInstance().getPluginName())) {
// Registers the UI annotation creation form
annotationFormsManager
.registerAnnotationForm(MSPLsAnnotation.class.getName(),
new SPLsFormProvider(this));
}
// Registers the UI tile component
annotationTailsManager.registerAnnotationTile(
MSPLsAnnotation.class.getName(), new SPLsTileProvider(this));
// Registers the UI card component
annotationCardsManager.registerAnnotationCard(
MSPLsAnnotation.class.getName(), new SPLsCardProvider(this));
pluginsManager.registerPlugin(PostitPlugin.getInstance(), true);
The conditional statement will make sure the plugin is active for the current profile before registering the annotation creation form. All the other UI components are currently always active (don't belong to the conditional block) to make sure that when an annotation is loaded it always have a proper set of UI components that could render it.
Note: Domeo provides ways for defining profiles. Every profile details which plugins are activated or disactivated. This will be addressed elsewhere in the wiki.

