biouml.plugins.sbml
Class SbmlSemanticController

java.lang.Object
  extended bybiouml.model.DefaultSemanticController
      extended bybiouml.standard.diagram.PathwaySemanticController
          extended bybiouml.standard.diagram.PathwaySimulationSemanticController
              extended bybiouml.plugins.sbml.SbmlSemanticController
All Implemented Interfaces:
SemanticController

public class SbmlSemanticController
extends PathwaySimulationSemanticController


Field Summary
static java.lang.String[] RESERVED_KEY_WORDS
          Array of reserves key words.
 
Fields inherited from class biouml.standard.diagram.PathwaySemanticController
log
 
Fields inherited from interface biouml.model.SemanticController
ERROR_CAN_NOT_CLONE_NODE, ERROR_NODE_IS_DUPLICATED
 
Constructor Summary
SbmlSemanticController()
           
 
Method Summary
 DiagramElement createInstance(Compartment parent, java.lang.Class type, java.awt.Point point, ViewEditorPane viewEditor)
          Creates diagram element for the specified kernel type, parent compartment and location.
protected static void fillNameMap(Compartment compartment, java.util.HashMap map)
           
 java.lang.String generateReactionName(Diagram diagram)
          Generates unique reaction name for the specified diagram.
static boolean isReservedKeyWord(java.lang.String str)
          Returns true if the specified string is reserved SBML key word.
static java.lang.Object resolveName(Diagram diagram, java.lang.String sname)
          Search SBML model element with the specified name.
static java.lang.String validateSName(java.lang.String name)
          Checks whether the name is valid SBML SName and replaces all invalid chaacters by '_'.
 
Methods inherited from class biouml.standard.diagram.PathwaySimulationSemanticController
createRule
 
Methods inherited from class biouml.standard.diagram.PathwaySemanticController
createDiagramElement, getNode, remove
 
Methods inherited from class biouml.model.DefaultSemanticController
canAccept, canAccept, findNewNode, isResizable, move, moveEdge, moveEdges, moveEdges, moveNode, remapEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESERVED_KEY_WORDS

public static final java.lang.String[] RESERVED_KEY_WORDS
Array of reserves key words.

Constructor Detail

SbmlSemanticController

public SbmlSemanticController()
Method Detail

isReservedKeyWord

public static boolean isReservedKeyWord(java.lang.String str)
Returns true if the specified string is reserved SBML key word.


resolveName

public static java.lang.Object resolveName(Diagram diagram,
                                           java.lang.String sname)
Search SBML model element with the specified name. Generally this method is used to check whether sname is unique. Note: this the rather slow method while it parse all model and put the elements into hash map: sname - object.

Returns:
Object with the specified name or null of no object was found.
Pendung:
process rules and units

fillNameMap

protected static void fillNameMap(Compartment compartment,
                                  java.util.HashMap map)

validateSName

public static java.lang.String validateSName(java.lang.String name)
Checks whether the name is valid SBML SName and replaces all invalid chaacters by '_'.

Returns:
valid SBML SName.

generateReactionName

public java.lang.String generateReactionName(Diagram diagram)
                                      throws java.lang.Exception
Generates unique reaction name for the specified diagram.

Overrides:
generateReactionName in class PathwaySemanticController
Throws:
java.lang.Exception
Pendung:
verify that nhere is no parameter, rule or unit with the same name.

createInstance

public DiagramElement createInstance(Compartment parent,
                                     java.lang.Class type,
                                     java.awt.Point point,
                                     ViewEditorPane viewEditor)
Creates diagram element for the specified kernel type, parent compartment and location. The created diagram element can be compartment, specie node or reaction node.

Specified by:
createInstance in interface SemanticController
Overrides:
createInstance in class PathwaySimulationSemanticController
Parameters:
parent - compartment where new diagram element should be located
type - kernel type
point - diagram element location
viewEditor - diagram view editor.


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.