I want to set up a rule to display data in give interval with a certain
color:
I set up the filter as follows:

LogicFilter lf = filterFactory.createLogicFilter(FilterType.LOGIC_AND);

CompareFilter cf =
filterFactory.createCompareFilter(Filter.COMPARE_GREATER_THAN_EQUAL);

cf.addLeftValue(filterFactory.createAttributeExpression(at.getName()));
//AttributeType Name

cf.addRightValue(filterFactory.createLiteralExpression(Double.toString(min)));
// lowerbound
    lf.addFilter(cf);
    cf = filterFactory.createCompareFilter(Filter.COMPARE_LESS_THAN);
    cf.addLeftValue(filterFactory.createAttributeExpression(at.getName()));

cf.addRightValue(filterFactory.createLiteralExpression(Double.toString(max)));
//upper bound

    lf.addFilter(cf);

It does not work. I suspect I am not supposed to use a literal here....
Thanx
Gaby

-- 
***************************************************************
**     Gabriella Turek               [EMAIL PROTECTED]      **
** National Institute of Water & Atmospheric Research (NIWA) **
** PO Box 8602 Christchurch New Zealand    +64-3-343-8067    **
***************************************************************

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to