Transformer (extension point)

From BioUML platform
Revision as of 17:55, 13 May 2013 by Tagir Valeev (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Identifier
ru.biosoft.access.transformer
Plugin
ru.biosoft.access
Registry
TransformerRegistry

Description

Transformer classes should be registered if you want transformed items to be compatible with GenericDataCollection.

Configuration Markup

<!ELEMENT transformer>
<!ATTLIST transformer
     inputClass        CDATA #REQUIRED
     outputClass       CDATA #REQUIRED
     transformerClass  CDATA #REQUIRED
>
inputClass
Fully-qualified name of input class accepted by transformer. Currently only FileDataElement and Entry are supported.
outputClass
Fully-qualified name of output class accepted by transformer. Must implement DataElement interface.
transformerClass
Fully-qualified name of the transformer class. Must implement Transformer interface. Transformer.getInputType() must return inputClass and Transformer.getOutputType() must return outputClass. In many cases it's easier to inherit AbstractTransformer class.

Example

<extension id="image file transformer" point="ru.biosoft.access.transformer"> 
   <transformer 
      inputClass="ru.biosoft.access.FileDataElement" 
      outputClass="ru.biosoft.access.ImageDataElement" 
      transformerClass="ru.biosoft.access.support.FileImageTransformer"/> 
</extension>

This extension allows ImageDataElement objects to be converted to FileDataElement and vice-versa via FileImageTransformer. Thanks to this extension you can put ImageDataElement objects to GenericDataCollection collections.

Personal tools
Namespaces

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