org.cytoscape.equations
Interface EqnParser
public interface EqnParser
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 signattribNameToTypeMap
- 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!
Copyright 2010 Cytoscape Consortium. All rights reserved.