Difference between revisions of "Template (extension point)"

From BioUML platform
Jump to: navigation, search
(Created page with "{{Extension point|template|ru.biosoft.templates|since=0.8.7|registry=ru.biosoft.templates.TemplateRegistry}} === Description === Templates allows to get different view for dat...")
 
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{Extension point|template|ru.biosoft.templates|since=0.8.7|registry=ru.biosoft.templates.TemplateRegistry}}
 
{{Extension point|template|ru.biosoft.templates|since=0.8.7|registry=ru.biosoft.templates.TemplateRegistry}}
 
=== Description ===
 
=== Description ===
Templates allows to get different view for data element description.  
+
Templates allows to get different view for data element description in the [[information box]].  
 
[[BioUML]] supports [http://velocity.apache.org/ Apache Velocity] (.vm) templates for this purpose.
 
[[BioUML]] supports [http://velocity.apache.org/ Apache Velocity] (.vm) templates for this purpose.
  
Line 10: Line 10:
 
     file              CDATA    #REQUIRED
 
     file              CDATA    #REQUIRED
 
     description        CDATA
 
     description        CDATA
     isBrief         CDATA
+
     isBrief           CDATA
 
     order              CDATA
 
     order              CDATA
 
  >
 
  >
Line 41: Line 41:
 
  <extension id="Base template" point="ru.biosoft.templates.template">
 
  <extension id="Base template" point="ru.biosoft.templates.template">
 
     <template  
 
     <template  
name="Default"  
+
        name="Default"  
file="resources/beaninfotemplate.vm"  
+
        file="resources/beaninfotemplate.vm"  
description="Universal bean template"  
+
        description="Universal bean template"  
isBrief="no"  
+
        isBrief="no"  
order="1"
+
        order="1"
 
     />
 
     />
 
  </extension>
 
  </extension>

Latest revision as of 17:35, 13 May 2013

Identifier
ru.biosoft.templates.template
Plugin
ru.biosoft.templates
Since
0.8.7
Registry
TemplateRegistry

[edit] Description

Templates allows to get different view for data element description in the information box. BioUML supports Apache Velocity (.vm) templates for this purpose.

[edit] Configuration Markup

<!ELEMENT template (filter)*>
 <!ATTLIST template
    name               CDATA    #REQUIRED
    file               CDATA    #REQUIRED
    description        CDATA
    isBrief            CDATA	
    order              CDATA
>
name
name of template.
file
path to velocity(.vm) template.
description
template description.
isBrief
indicates whether template is brief
order
template order in templates list
<!ELEMENT filter>
<!ATTLIST filter
  class              CDATA    #REQUIRED
  subclasses         CDATA
>
class
data element class supported by this template
subclasses
indicates if template is allowed for subclasses

[edit] Examples

Base template description as example:

<extension id="Base template" point="ru.biosoft.templates.template">
   <template 
       name="Default" 
       file="resources/beaninfotemplate.vm" 
       description="Universal bean template" 
       isBrief="no" 
       order="1"
   />
</extension>
Personal tools
Namespaces

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