Difference between revisions of "Export (extension point)"

From BioUML platform
Jump to: navigation, search
(Template used)
m ({{Class}})
 
Line 1: Line 1:
{{Extension point|export|ru.biosoft.access|since=0.8.7}}
+
{{Extension point|export|ru.biosoft.access|since=0.8.7|registry=ru.biosoft.access.DataElementExporterRegistry}}
 
=== Description ===
 
=== Description ===
 
Using this extension point plug-in can provide data elements exporters in different formats.  
 
Using this extension point plug-in can provide data elements exporters in different formats.  
Line 22: Line 22:
 
:display name of format, for example "PNG".
 
:display name of format, for example "PNG".
 
;exporter
 
;exporter
:the fully-qualified name of a class which implements ru.biosoft.access.DataElementExporter interface.
+
:the fully-qualified name of a class which implements {{Class|ru.biosoft.access.DataElementExporter}} interface.
 
;suffix
 
;suffix
 
:file suffix (extension) for the specified format.
 
:file suffix (extension) for the specified format.
Line 45: Line 45:
  
 
=== API Information ===
 
=== API Information ===
The value of the exporter attribute must represent an implementer of ru.biosoft.access.DataElementExporter interface.
+
The value of the exporter attribute must represent an implementer of {{Class|ru.biosoft.access.DataElementExporter}} interface.
  
 
Pending: some formats support depends from JVM version, for example BMP and WBMP formats are supported only in Java 1.5. Additionally, the same exporter can support several formats. For this purpose DiagramExporter has special method, that returns true if the exporter was initialised successfully for the specified format and false otherwise:
 
Pending: some formats support depends from JVM version, for example BMP and WBMP formats are supported only in Java 1.5. Additionally, the same exporter can support several formats. For this purpose DiagramExporter has special method, that returns true if the exporter was initialised successfully for the specified format and false otherwise:
  
 
  boolean init(String format, String suffix)
 
  boolean init(String format, String suffix)

Latest revision as of 15:51, 13 May 2013

Identifier
ru.biosoft.access.export
Plugin
ru.biosoft.access
Since
0.8.7
Registry
DataElementExporterRegistry

[edit] Description

Using this extension point plug-in can provide data elements exporters in different formats.

Format combo box in Data element export dialog shows all formats suitable for selected element.

List of suitable formats depends from data element type, for example semantic network diagram can not be exported in SBML format. DataElementExporterRegistry is used to select suitable formats for the specified data element.

Diagram-export-dialog.png

[edit] Configuration Markup

<!ELEMENT export>
  <!ATTLIST export
     format             CDATA    #REQUIRED
     exporter           CDATA    #REQUIRED
     suffix             CDATA    #IMPLIED
     contentType        CDATA  
     description        CDATA
  >
format
display name of format, for example "PNG".
exporter
the fully-qualified name of a class which implements DataElementExporter interface.
suffix
file suffix (extension) for the specified format.
contentType
content type is used in Web edition requests.
description
format description. It can be plain or html text.

[edit] Examples

Following example demonstrates definition of export of all diagram types in PNG format:

<extension id="SvgExport" point="ru.biosoft.access.export"> 
   <export 
      format="Scalable Vector Graphics(*.svg)"
      suffix="svg"
      contentType="image/svg+xml"
      exporter="biouml.plugins.svg.SvgDiagramExporter"
      description="%DiagramExport-SVG"
   /> 
</extension>

[edit] API Information

The value of the exporter attribute must represent an implementer of DataElementExporter interface.

Pending: some formats support depends from JVM version, for example BMP and WBMP formats are supported only in Java 1.5. Additionally, the same exporter can support several formats. For this purpose DiagramExporter has special method, that returns true if the exporter was initialised successfully for the specified format and false otherwise:

boolean init(String format, String suffix)
Personal tools
Namespaces

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