Question: I am having a String like "A AND B OR C AND ( D OR E)". I just want to parse the logical expression here, is there any Java Api for the same.

Here A,B,C... are in the form of string,string,string (i.e key,value,operator)

Answer: 
First you will need to fix the grammar of the expression that you are going to accept. What you have written:

> 
> "A AND B OR C AND ( D OR E)"
> 
> 
> 

is an example string of your language. So first you will need to define your language which can be defined using [BNF](http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form). This would give you complete understanding of the your own language.

And then any aribitrary expression that you input need to be parsed. You can create an [expression tree](http://en.wikipedia.org/wiki/Parse_tree)

And finally you will need to evaluate the expression tree.

A reasonable example of how it can be done is given in this [article](http://www.dreamincode.net/forums/topic/37428-converting-and-evaluating-infix-postfix-and-prefix-expressions-in-c/)
Use Spring Expression - supports AND OR NOT