wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Boolean Expression Evaluation Framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Boolean Expression Evaluation Framework" Watch "Boolean Expression Evaluation Framework" New topic
Author

Boolean Expression Evaluation Framework

Priyanka Dandekar
Ranch Hand

Joined: Aug 06, 2008
Posts: 52
We are looking for an expression evaluation framework where we can provide input as boolean conditions like this

(MyData1 = 'A') AND (MyData2 = 'B' OR MyData2 = 'C' OR MyData2 = 'D')


I would be getting a String expression and would provide the data to that expression to find what will be the result.

Any suggestions of pointers would be appreciated.


Priya - Mockup Tool | Java | Struts2 | Lucene
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
I don't recall if it supports exactly this syntax, but check out the JEP library. Version 2.4 was released under the GPL, so you may be able to use it for free.


Ping & DNS - updated with new look and Ping home screen widget
Sachin Joshi
Ranch Hand

Joined: Aug 06, 2008
Posts: 83

JEP is a good Java library, and its 2.4.1 version was GPL.

The Boolean expressions are supported but it does not give direct boolean result.

The results of a boolean expression would be returned to you as a Double object where 1.0 = TRUE and 0.0 is FALSE.


The Boolean Expression Evaluation Example code can be used as a Utility in your application for Boolean expression evaluation.
[ September 22, 2008: Message edited by: Sachin Joshi ]

Web Development Tips and Tutorials - By Sachin
Priyanka Dandekar
Ranch Hand

Joined: Aug 06, 2008
Posts: 52
Ulf and Sachin, thanks a lot for your responses. This is definitely useful for me.

Sachin I am using your util class for implementation, it looks handy.
mohan pusarla
Greenhorn

Joined: Jan 31, 2008
Posts: 2
Hi ,
If i can understand you correctly Your system always get the expression at the Run time and the values to be replaced in the expression also comes in run time. Recently i was also in search of looking for a similar framework approach. I found cayenne framework..you can use it very easily.Reply me back if you have any queries.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
mohan,
can you provide a link to this "cayenne" framework? The only Java project with that name I can find is an ORM tool, and I don't think that would be applicable here.
Gupta Mohit Gupta
Greenhorn

Joined: Mar 21, 2010
Posts: 1
Check http://code.google.com/p/xpressionengine/. It may cater the requirements.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Boolean Expression Evaluation Framework
 
Similar Threads
please assist me with this code
about this question
short-circuit logical operator mystery
What is happening here? Devakas Practice exam 1 Q 11
Why its not incrementing???