Revision 44259 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/expressionevaluator/DALSymbolTable.java

View differences:

DALSymbolTable.java
23 23
public class DALSymbolTable extends AbstractSymbolTable {
24 24

  
25 25
    public static final String FUNCTION_FEATURES = "FEATURES";
26
    
26

  
27 27
    public static class FeaturesFunction extends AbstractFunction {
28 28

  
29 29
        public FeaturesFunction() {
......
32 32
                    FUNCTION_FEATURES,
33 33
                    Range.between(1, 3),
34 34
                    "Return a list of the features selecteds with filter in the store.",
35
                    FUNCTION_FEATURES+"({{store_name}}, filter, order)",
35
                    FUNCTION_FEATURES + "({{store_name}}, filter, order)",
36 36
                    new String[]{
37 37
                        "store - data store name to be used",
38 38
                        "where - Optional. String value with a filter expression",
......
58 58
            }
59 59
            try {
60 60
                DataStore store = this.getStore(storeName);
61
                if( store == null || !(store instanceof FeatureStore) ) {
62
                    throw new ExpressionRuntimeException("Cant locate the store '"+storeName+"' in function '"+FUNCTION_FEATURES+"'.");
61
                if (store == null || !(store instanceof FeatureStore)) {
62
                    throw new ExpressionRuntimeException("Cant locate the store '" + storeName + "' in function '" + FUNCTION_FEATURES + "'.");
63 63
                }
64
                if( !(store instanceof FeatureStore) ) {
65
                    throw new ExpressionRuntimeException("The store'"+storeName+"' is not valid for function '"+FUNCTION_FEATURES+"', a FeatureStore is required.");
64
                if (!(store instanceof FeatureStore)) {
65
                    throw new ExpressionRuntimeException("The store'" + storeName + "' is not valid for function '" + FUNCTION_FEATURES + "', a FeatureStore is required.");
66 66
                }
67 67
                FeatureStore featureStore = (FeatureStore) store;
68 68
                List<Feature> features;
......
80 80
                    features = featureStore.getFeatures(query);
81 81
                }
82 82
                return features;
83
            } catch(ExpressionRuntimeException ex) {
83
            } catch (ExpressionRuntimeException ex) {
84 84
                throw ex;
85 85
            } catch (Exception ex) {
86
                throw new ExpressionRuntimeException("Problems calling '"+FUNCTION_FEATURES+"' function", ex);
86
                throw new ExpressionRuntimeException("Problems calling '" + FUNCTION_FEATURES + "' function", ex);
87 87
            }
88 88
        }
89 89

  
......
104 104
    public static void selfRegister() {
105 105
        ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager();
106 106
        manager.registerSymbolTable(new DALSymbolTableFactory());
107
    }    
107
    }
108 108

  
109 109
}

Also available in: Unified diff