public class NotInReporterListFunction extends Object implements JepRestrictionFunction
notInList(reporterListId)
function to a
JEP expression parser. The function will check if a reporter doesn't 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 |
---|
NotInReporterListFunction(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.isNotPartOf(ReporterList) method to create a
restriction checking that a reporter isn't found in the reporter list. |
private DbControl dc
private int numParameters
public NotInReporterListFunction(DbControl dc)
Restriction
:s.dc
- Open DbControl to use when accessing database and checking permissions.Jep.formulaToRestriction(String, JepFunction[])
public String getFunctionName()
JepFunction
JEP
parser.getFunctionName
in interface JepFunction
JEP.addFunction(String, PostfixMathCommandI)
public Restriction toRestriction(Node node)
Dynamic.isNotPartOf(ReporterList)
method to create a
restriction checking that a reporter isn't 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