Difference between revisions of "Biohub (extension point)"

From BioUML platform
Jump to: navigation, search
(Created page with "{{Extension point|biohub|ru.biosoft.access|registry=ru.biosoft.access.biohub.BioHubRegistry}} === Description === This extension point allows you to register a BioHub. ==...")
 

Latest revision as of 11:17, 20 May 2013

Identifier
ru.biosoft.access.biohub
Plugin
ru.biosoft.access
Registry
BioHubRegistry

[edit] Description

This extension point allows you to register a BioHub.

[edit] Configuration Markup

<!ELEMENT hubItem (property)*>
<!ATTLIST hubItem
     name      CDATA #REQUIRED
     class     CDATA #REQUIRED
>
name
BioHub user-friendly name.
class
Fully-qualified name of class implementing BioHub interface.
<!ELEMENT property>
<!ATTLIST property
     name      CDATA #REQUIRED
     value     CDATA #REQUIRED
>
name
name of the property
value
value of the property

These properties will be passed to constructor.

[edit] Example

<extension id="GOhub" point="ru.biosoft.access.biohub"> 
   <hubItem name="GO" class="biouml.plugins.go.GOHub">
      <property name="jdbcDriverClass" value="org.gjt.mm.mysql.Driver"/>
      <property name="jdbcURL" value="jdbc:mysql://localhost:3306/go"/>
      <property name="jdbcUser" value="go"/>
      <property name="jdbcPassword" value="go"/>
   </hubItem> 
</extension>

This extension defines a hub "GO" implemented in GOHub class and passes database configuration properties.

[edit] Module BioHub registration

When BioHub is associated with some module in the repository, it's strongly recommended to register it in the module instead. You should add the following line to the module configuration file:

bioHub.<hubId>=<BioHub_class>[;<name>=<value>[;<name>=<value>[;...]]]

Where <hubId> is the internal BioHub id; <BioHub_class> is the fully-qualified name of class implementing BioHub interface and any custom properties are defined in <name>=<value> pairs. Example:

bioHub.functional=biouml.plugins.gtrd.TFClassificationFunctionalHub;name=TF classification

[edit] Notes

  • Any BioHub implementation must have a constructor which accepts single parameter of type Properties. Upon BioHub instantiation the Properties object will be passed which include:
    • All properties defined inside hubItem extension point or in BioHub definition line in the module configuration;
    • For BioHubs defined as extensions: property "name" having value of BioHub name;
    • For BioHubs defined in the modules: properties "completeName" and "moduleName" containing full path to the module. It's recommended to use "completeName" property; the "moduleName" property is passed for the legacy reasons.
  • When you're implementing BioHub, in many cases it's convenient to extend abstract class BioHubSupport.
Personal tools
Namespaces

Variants
Actions
BioUML platform
Community
Modelling
Analysis & Workflows
Collaborative research
Development
Virtual biology
Wiki
Toolbox