Revision 44043 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/vectorial/SpatialEvaluatorsFactory.java

View differences:

SpatialEvaluatorsFactory.java
1 1
package org.gvsig.fmap.mapcontext.layers.vectorial;
2 2

  
3 3
import org.cresques.cts.IProjection;
4
import org.gvsig.fmap.dal.DALLocator;
5
import org.gvsig.fmap.dal.DataManager;
4
import org.gvsig.expressionevaluator.ExpressionBuilder;
6 5
import org.gvsig.fmap.dal.exception.DataException;
7 6
import org.gvsig.fmap.dal.feature.FeatureStore;
8 7
import org.gvsig.fmap.dal.feature.FeatureType;
9
import org.gvsig.fmap.dal.ExpressionBuilder;
10 8
import org.gvsig.fmap.geom.Geometry;
11 9
import org.gvsig.fmap.geom.primitive.Envelope;
12 10
import org.gvsig.tools.evaluator.Evaluator;
......
23 21
        
24 22
    }
25 23
    
26
    public ExpressionBuilder createBuilder() {
27
        DataManager manager = DALLocator.getDataManager();
28
        ExpressionBuilder builder = manager.createExpressionBuilder();
29
        return builder;
30
    }
24
//    public ExpressionBuilder createBuilder() {
25
//        DataManager manager = DALLocator.getDataManager();
26
//        ExpressionBuilder builder = manager.createSQLBuilder();
27
//        return builder;
28
//    }
31 29
    
32
    public Evaluator intersects(
30
    private Evaluator intersects(
33 31
            Geometry geometry,
34 32
            IProjection projection, 
35 33
            FeatureType featureType,
......
39 37
        return new IntersectsGeometryEvaluator(geometry, projection, featureType, geomName, builder);
40 38
    }
41 39
    
42
    public Evaluator intersects(
40
    private Evaluator intersects(
43 41
            Envelope envelope,
44 42
            IProjection projection, 
45 43
            FeatureType featureType,
......
57 55
        try {
58 56
            FeatureType featureType = store.getDefaultFeatureType();
59 57
            String geomName = featureType.getDefaultGeometryAttributeName();
60
            ExpressionBuilder builder = store.createExpressionBuilder();
58
            ExpressionBuilder builder = (ExpressionBuilder) store.createExpressionBuilder();
61 59
            return intersects(geometry, projection, featureType, geomName,builder);
62 60
        } catch (DataException ex) {
63 61
            throw new RuntimeException("Can't create intersects evaluator.",ex);
......
79 77
        }
80 78
    }
81 79

  
82
    public Evaluator contains(
80
    private Evaluator contains(
83 81
            Envelope envelope,
84 82
            IProjection projection, 
85 83
            FeatureType featureType,
......
89 87
        return new ContainsEnvelopeEvaluator(envelope, projection, featureType, geomName, builder);
90 88
    }
91 89

  
92
    public Evaluator contains(
90
    private Evaluator contains(
93 91
            Geometry geometry,
94 92
            IProjection projection, 
95 93
            FeatureType featureType,
......
129 127
        }
130 128
    }
131 129

  
132
    public Evaluator not_contains(
130
    private Evaluator not_contains(
133 131
            Geometry geometry,
134 132
            IProjection projection, 
135 133
            FeatureType featureType,
......
164 162
        return new CrossesGeometryEvaluator(geometry, projection, featureType, geomName, builder);
165 163
    }
166 164

  
167
    public Evaluator crosses(
165
    private Evaluator crosses(
168 166
            Envelope envelope,
169 167
            IProjection projection, 
170 168
            FeatureType featureType,
......
204 202
        }
205 203
    }
206 204

  
207
    public Evaluator disjoint(
205
    private Evaluator disjoint(
208 206
            Geometry geometry,
209 207
            IProjection projection, 
210 208
            FeatureType featureType,
......
229 227
        }
230 228
    }
231 229
    
232
    public Evaluator overlaps(
230
    private Evaluator overlaps(
233 231
            Geometry geometry,
234 232
            IProjection projection, 
235 233
            FeatureType featureType,
......
254 252
        }
255 253
    }
256 254
    
257
    public Evaluator touches(
255
    private Evaluator touches(
258 256
            Geometry geometry,
259 257
            IProjection projection, 
260 258
            FeatureType featureType,
......
279 277
        }
280 278
    }
281 279
    
282
    public Evaluator within(
280
    private Evaluator within(
283 281
            Geometry geometry,
284 282
            IProjection projection, 
285 283
            FeatureType featureType,
......
304 302
        }
305 303
    }
306 304
    
307
    public Evaluator equals(
305
    private Evaluator equals(
308 306
            Geometry geometry,
309 307
            IProjection projection, 
310 308
            FeatureType featureType,

Also available in: Unified diff