Hello,

since I changed from geotools 2.2.1 to 2.3.0 the following
classes/interfaces I use are marked as deprecated:
- FilterFactory
- GeometryFilter
- LiteralExpression
- AttributeExpression.

I use these classes/interfaces to build a query:
                DefaultQuery query;
            // Get the Schema of the FeatureType to retrieve
            // The FeatureType should exist since [EMAIL PROTECTED] getWFS} 
checks it
            FeatureType featureType;
            try {
                featureType = wfs.getSchema(featureTypeName);
            } catch (IOException e1) {
                throw new FeatureTypeNotFoundException(featureTypeName);
            }
            // Get the default geometry for this featureType
            GeometryAttributeType gat =  featureType.getDefaultGeometry();
            // Get the name of the FeatureType for the Default Geometry
            String geomFeatureName = gat.getName();
            // Create the filter using the geometry feature name and the
given
            // Envelope
            FilterFactory ff = FilterFactoryFinder.createFilterFactory();
            GeometryFilter filter;
            try {
                LiteralExpression bbox = ff.createBBoxExpression( envelope
);
                AttributeExpression geometry = 
                    ff.createAttributeExpression( geomFeatureName );
                filter =
ff.createGeometryFilter(AbstractFilter.GEOMETRY_BBOX);
                filter.addLeftGeometry( geometry );
                filter.addRightGeometry( bbox );
            } catch (IllegalFilterException e) {
                throw new IllegalArgumentException(
                        "No filter could be created with the given envelope:
" 
                        + envelope);
            }
            query = new DefaultQuery(featureTypeName, filter);

The dead end I found was, that there are no methods
BinarySpatialOperator.setExpression1(expr) and
BinarySpatialOperator.setExpression2(expr) as hinted in the javadoc... How
can I replace the deprecated code?

Thanks in advance,
Kerstin



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to