-
Notifications
You must be signed in to change notification settings - Fork 6
Spls plugin development
SPLs plugin is designed to enable the creation and curation of annotations on sentence sequences in the text sections of drug product labeling. Our initial work focuses on marking up clinical pharmacogenomics statements, and providing manual annotation of the information provided by the sentences. The SPLs plugin 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 MPharmgx.java which is Plain Old Java Object for the basic elements of a pharmacogenomics annotation (quote: add Antibody into class diagram to show hierarchy of inheritence of classes)
Class diagram for MSPLsAnnotation.java which inheritence from MAnnotation.java to follows standard of Open Annotation Data Model
-
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 UI (form, card and tile)
- serialization: contains the serializer components that converting from RDF to JSON-LD:
Class diagram for Serialization
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.