Cytoscape 2.8.0 API

org.cytoscape.equations
Interface EqnParser


public interface EqnParser


Method Summary
 String getErrorMsg()
          If parse() failed, this will return the last error messages.
 Function getFunction(String functionName)
           
 Node getParseTree()
           
 Set<Function> getRegisteredFunctions()
           
 Class getType()
           
 Set<String> getVariableReferences()
           
 boolean parse(String eqn, Map<String,Class> attribNameToTypeMap)
           
 void registerFunction(Function func)
          After registering an attribute function "func" it can be used in attribute equations.
 

Method Detail

registerFunction

void registerFunction(Function func)
                      throws IllegalArgumentException
After registering an attribute function "func" it can be used in attribute equations.

Parameters:
func - the function that will be registered
Throws:
IllegalArgumentException - will be thrown if "func" is null or the function has previously been registered

getFunction

Function getFunction(String functionName)
Returns:
the function associated with the name "functionName" or null if no such function exists

getRegisteredFunctions

Set<Function> getRegisteredFunctions()
Returns:
the set of currently registered functions

parse

boolean parse(String eqn,
              Map<String,Class> attribNameToTypeMap)
Parameters:
eqn - a valid attribute equation which must start with an equal sign
attribNameToTypeMap - a list of existing attribute names and their types
Returns:
true if the parse succeeded otherwise false

getType

Class getType()
Returns:
the result type of the parsed equation if the parse succeeded, otherwise null

getErrorMsg

String getErrorMsg()
If parse() failed, this will return the last error messages.

Returns:
the last error message of null

getVariableReferences

Set<String> getVariableReferences()
Returns:
all the variable names that have been detected in the most recently parsed equation

getParseTree

Node getParseTree()
Returns:
the parse tree. Must only be called if parse() returns true!

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.