Hi,
I have a question with respect to org.opengis.filter.Filter.
My simple feature has a property XXX which is a JAVA class.
In a filter expression I want to compare one of the java bean
properties of this java class against a literal.
Example
=======
class A
{
boolean selected = ...
public boolean isSelected() { return selected; }
}
// building features
{
SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
...
builder.nillable(false).add("XXX", A.class);
SimpleFeatureType type = builder.buildFeatureType();
SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(type);
...
featureBuilder.add(new A());
}
// filtering
{
FilterFactory2 filterFactory = CommonFactoryFinder.getFilterFactory2();
// this doesn't work
Filter filter = filterFactory.equals
( filterFactory.property("XXX")
, filterFactory.literal(true)));
// this doesn't work too
Filter filter = filterFactory.equals
( filterFactory.property("XXX.selected")
, filterFactory.literal(true)));
}
What is the right way to filter for all features which have a property "XXX"
whose value "selected" is "true"?
Thank you
Michael
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users