|
Cytoscape 3.1.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EquationParser
Parser for a string representing an equation.
Module: equations-api
To use this in your app, include the following dependency in your POM:
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>equations-api</artifactId>
</dependency>| Method Summary | |
|---|---|
Map<String,Object> |
getDefaultVariableValues()
Returns a map of variable names to their default values, if any. |
String |
getErrorMsg()
If parse() failed, this will return the last error messages. |
Function |
getFunction(String functionName)
Returns the function associated with the name "functionName" or null if no such function exists. |
TreeNode |
getParseTree()
Returns the parse tree. |
Set<Function> |
getRegisteredFunctions()
Returns the set of currently registered functions. |
Class<?> |
getType()
Returns the result type of the parsed equation if the parse succeeded, otherwise null. |
Set<String> |
getVariableReferences()
Returns all the variable names that have been detected in the most recently parsed equation. |
boolean |
parse(String eqn,
Map<String,Class<?>> attribNameToTypeMap)
Returns true if the parse succeeded otherwise false |
void |
registerFunction(Function func)
After registering an attribute function "func" it can be used in attribute equations. |
| Method Detail |
|---|
void registerFunction(Function func)
throws IllegalArgumentException
func - the function that will be registered
IllegalArgumentException - will be thrown if "func" is null or the function has previously been registeredFunction getFunction(String functionName)
functionName - the name of the function to get.
Set<Function> getRegisteredFunctions()
boolean parse(String eqn,
Map<String,Class<?>> attribNameToTypeMap)
eqn - a valid attribute equation which must start with an equal signattribNameToTypeMap - a list of existing attribute names and their types
Class<?> getType()
String getErrorMsg()
Set<String> getVariableReferences()
Map<String,Object> getDefaultVariableValues()
TreeNode getParseTree()
|
Cytoscape 3.1.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||