public class InReporterListFunction extends Object implements JepRestrictionFunction
inList(reporterListId)
function to a
JEP expression parser. The function will check if a reporter exists in the
reporter list with the ID given as an argument to this function.
To be able to use this function it must be registered with the JEP
parser and, before the expression is evaluated, a SqlResult
object
must be set.
Jep
,
BioAssaySetUtil.createJepRestriction(DbControl, String, DynamicQuery)
Modifier and Type | Field and Description |
---|---|
private DbControl |
dc |
private int |
numParameters |
Constructor and Description |
---|
InReporterListFunction(DbControl dc)
Create a new instance of this function.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkNumberOfParameters(int n) |
String |
getFunctionName()
Get the name of this function.
|
int |
getNumberOfParameters() |
void |
run(Stack stack) |
void |
setCurNumberOfParameters(int n) |
Restriction |
toRestriction(Node node)
Use the
Dynamic.isPartOf(ReporterList) method to create a
restriction checking that a reporter is found in the reporter list. |
private DbControl dc
private int numParameters
public InReporterListFunction(DbControl dc)
Restriction
:s.dc
- DbControl used to access database.Jep.formulaToRestriction(String, JepFunction[])
public String getFunctionName()
JepFunction
JEP
parser.getFunctionName
in interface JepFunction
JEP.addFunction(String, PostfixMathCommandI)
public Restriction toRestriction(Node node)
Dynamic.isPartOf(ReporterList)
method to create a
restriction checking that a reporter is found in the reporter list.toRestriction
in interface JepRestrictionFunction
node
- The node representing this functionRestriction
objectpublic int getNumberOfParameters()
getNumberOfParameters
in interface org.nfunk.jep.function.PostfixMathCommandI
public void setCurNumberOfParameters(int n)
setCurNumberOfParameters
in interface org.nfunk.jep.function.PostfixMathCommandI
public boolean checkNumberOfParameters(int n)
checkNumberOfParameters
in interface org.nfunk.jep.function.PostfixMathCommandI
public void run(Stack stack) throws ParseException
run
in interface org.nfunk.jep.function.PostfixMathCommandI
ParseException