Version: 1.1.1

org.biomoby.service.dashboard.renderers
Class AbstractMobyRenderer

java.lang.Object
  extended by org.biomoby.service.dashboard.renderers.AbstractRenderer
      extended by org.biomoby.service.dashboard.renderers.AbstractMobyRenderer
All Implemented Interfaces:
Renderer
Direct Known Subclasses:
Base64Image, ICISPedigreeTree

public abstract class AbstractMobyRenderer
extends AbstractRenderer

A class containing common utilities for renderers that process Biomoby data types.

A common feature for renderers rendering Biomoby data types is that they often have a list of data types they can deal with, together with method names that can extract data from such data types. Important is that the renderers must be able to render also for those Biomoby data types that are not explicitly named in such lists but inheriting from those who are named there. For finding these relationship, we have here common utilities isSubclassOfKnown (used usually in AbstractRenderer.canHandle(java.lang.String, java.lang.Object), getMethodOfKnown and traverseToString.

The available renderers and how they map with Biomoby data types and their methods are stored in a renderers configuration XML file "rendereres.conf.xml". Here is an example of such file:

<renderers>
  <renderer name="org.biomoby.service.dashboard.renderers.Base64Image">
    <moby_type name="Image_PNG" method="get_imagedata"/>
    <moby_type name="b64_encoded_gif" method="get_content"/>
    <moby_type name="b64_Encoded_PNG" method="get_content"/>
    <moby_type name="b64_encoded_jpeg" method="get_content"/>
    <moby_type name="NCBI_Blast_XML_Gif" method="getMoby_hitGraph"/>
  </renderer>
  <renderer name="org.biomoby.service.dashboard.renderers.Base64Image">
    <moby_type name="GCP_GermplasmPedigreeTree" method="get_pedigree_xml"/>
  </renderer>
</renderers>
Note that information from this file is used recursively, until a proper value is found. For example, above the data type "NCBI_Blast_XML_Gif" has method "getMoby_hitGraph" that returns an object representing Biomoby data "b64_encoded_jpeg" that will be again looked for in the same file (its method "get_content" already returns type String).

Version:
$Id: AbstractMobyRenderer.java,v 1.4 2006/06/28 16:28:30 senger Exp $
Author:
Martin Senger

Field Summary
 
Fields inherited from interface org.biomoby.service.dashboard.renderers.Renderer
CLASS, CLASS_NAME, DATA, DATA_CONTAINER, MIME_TYPE, MOBY_TYPE
 
Constructor Summary
AbstractMobyRenderer(String name)
           
AbstractMobyRenderer(String name, String iconName)
           
 
Method Summary
 
Methods inherited from class org.biomoby.service.dashboard.renderers.AbstractRenderer
canHandle, getComponent, getIcon, getName, save2File
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMobyRenderer

public AbstractMobyRenderer(String name)

AbstractMobyRenderer

public AbstractMobyRenderer(String name,
                            String iconName)

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010