aspose file tools*
The moose likes Java in General and the fly likes Data Structure for logic tree 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 » Java » Java in General
Bookmark "Data Structure for logic tree" Watch "Data Structure for logic tree" New topic
Author

Data Structure for logic tree

Michael Arnett
Ranch Hand

Joined: Mar 22, 2001
Posts: 65
All,
I am attempting to design a solution for filtering messages. Essentially, I am looking for a data structure that I can map into a database schema which will allow users to define their own filters such as:

if ( c1 AND c2 ) OR ( c3 AND c4 AND ( c5 OR c6 ) ) OR c7 then filter message
Any suggestions would be greatly appreciated. Are there any existing standards, libraries, or design patterns to tackle this task? Seems like it would be a common problem albeit a complex one.
Thanks in advance,
-MLA


Sun Certified Programmer for the Java 2 Platform 1.4
Neil Laurance
Ranch Hand

Joined: Jul 18, 2002
Posts: 183
Perhaps use XML? Then you could use XSL to transform your structure to an SQL or other query to decide on the filtering:

Hope this helps
Neil Laurance
Ranch Hand

Joined: Jul 18, 2002
Posts: 183
And the XSL to transform this back to the original text:

Neil Laurance
Ranch Hand

Joined: Jul 18, 2002
Posts: 183
Don't you just love the way UBB formats your code sections :roll: :roll:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data Structure for logic tree
 
Similar Threads
Database Design
A recommended IO system
analitical question
add new method in Interface DB
GUI Planning & Design