Overview | Package | Class | Use | Tree | Help
| HEADER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## biouml.modules.genenet.access
Class DiagramTransformer

    ru.biosoft.access.AbstractTransformer
      |
      +--biouml.modules.genenet.access.DiagramTransformer

public class DiagramTransformer
extends AbstractTransformer

The definition of compartment for the GeneNet database.

For formalized hierarchical description of the compartment structure the special format is used in the GeneNet database.

The fromEntry function is used for parsing of this format, and the toEntry function is used for generation of formalized description of the compartment structure.

The Backus-Naur form of the compartment description.

    compartment ::= compartment
    {
    <id>;
    <alias>;
    <size>;
    <color>;
    <shape>;
    entities
    {
    <entity_list>
    }
    relations
    {
    <relation_list>
    }
    }

    id     ::= <string>
    alias  ::= alias=<string>
    size   ::= size=(<number>;<number>)
    color  ::= (<number>,<number>,<number>);
    shape  ::= shape= rectangle|round_rectangle|oval

    entity_list ::= <entity_description>|
    <entity_list>;<entity_description>
    entity_description ::= <coordinate><entity_type>
    <entity_id>|<equalence_group>|<compartment>
    coordinate  ::= (<number>,<number>)
    entity_type ::= ?<?cell|gene|protein|process|substance?>?
    entity_id   ::= <string>

    equalence_group ::= (<entity_id_list>)
    entity_id_list  ::= <entity_id>|<entyty_id_list>,<entity_id>

    relation_list ::= <relation_id>|<relation_list>;<relation_id>

This a simple example of formalized herarchical decription of the compartent which consists from 2 objects and 1 other compartment inside of it.

    compartment
    {
    id=cell;
    alias=cell;
    size=(4,5);
    color=128,128,128;
    shape=rectangle;
    entities
    {
    (0,1)<protein>Hs:Ifn-gamma;
    (0,1)<protein>(Hs:Irf-1,Mm:Irf-1)
    (1,1)compartment
    {
    id=nucleus;
    alias=nucleus;
    color=255,128,128;
    shape=ellipse;
    entities
    {
    (0,0)<gene>(Hs:Irf-1,Mm:Irf-1)
    }
    relations
    {
    }
    }
    }
    relations
    {
    (R000001,R000002);
    R000003;
    }
    }

todo transform "Diagram -> GeneNet entry".

Method Summary
`static String` | `getArgument(String where, String var)` Returns the argument for required variable.
`Class` | `getInputType()`
`Class` | `getOutputType()`
`static int` | `getSection(String str, int fromIndex)` Returns the position where the section is ended, that is the position of reqired '}'.
`synchronized DataElement` | `transformInput(DataElement input)` Parse the textual description of GeneNet diagram.
`DataElement` | `transformOutput(DataElement output)`

Methods inherited from class ru.biosoft.access.AbstractTransformer
`getPrimaryCollection, getTransformedCollection, init, isInputType, isOutputType`

Method Detail

### getArgument

    public static String getArgument(String where, String var)

  Returns the argument for required variable.
  Parameters:
    var - the varable (id, alias, size, color or shape).
    where - string containing the variable

### getInputType

    public Class getInputType()

### getOutputType

    public Class getOutputType()

### getSection

    public static int getSection(String str, int fromIndex)

  Returns the position where the section is ended, that is the position of reqired '}'.
  Parameters:
    str - the string cintaining required section
    fromIndex - - the index to start the search from

### transformInput

    public synchronized DataElement transformInput(DataElement input)
                                             throws java.lang.Exception

  Parse the textual description of GeneNet diagram.
  pending shape creation for main compartment (not null case), initialize module variable NOT ising Module.getActiveInstance()

### transformOutput

    public DataElement transformOutput(DataElement output)
                                 throws java.lang.Exception

  pending todo

Association Links

to Class org.apache.log4j.Category

Overview | Package | Class | Use | Tree | Help
| FOOTER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

BOTTOM