Revision 44925 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/RowTagFunction.java
RowTagFunction.java | ||
---|---|---|
26 | 26 |
import java.util.Map; |
27 | 27 |
import java.util.Objects; |
28 | 28 |
import org.apache.commons.lang3.Range; |
29 |
import org.gvsig.expressionevaluator.Code; |
|
30 | 29 |
import org.gvsig.expressionevaluator.Codes; |
31 | 30 |
import org.gvsig.expressionevaluator.ExpressionRuntimeException; |
32 | 31 |
import org.gvsig.expressionevaluator.Interpreter; |
... | ... | |
34 | 33 |
import org.gvsig.fmap.dal.DataManager; |
35 | 34 |
import org.gvsig.fmap.dal.feature.Feature; |
36 | 35 |
import org.gvsig.tools.util.GetItemByKey; |
36 |
import org.gvsig.tools.util.GetKeys; |
|
37 | 37 |
|
38 | 38 |
/** |
39 | 39 |
* |
... | ... | |
45 | 45 |
super( DALFunctions.GROUP_DATA_ACCESS, |
46 | 46 |
DataManager.FUNCTION_ROW_TAG, |
47 | 47 |
Range.between(1,2), |
48 |
"Retrieves a value associated with a tag from the current line.", |
|
48 |
"Retrieves a value associated with a tag from the current line.\n" + |
|
49 |
"Return null if used outer a table filter or if the row don't " + |
|
50 |
"have a tag with the value indicated.", |
|
49 | 51 |
DataManager.FUNCTION_ROW_TAG+"({{name}})", |
50 | 52 |
null, |
51 | 53 |
"Object", |
... | ... | |
89 | 91 |
f.setExtraValue(key, val); |
90 | 92 |
} |
91 | 93 |
} |
92 |
// } else if( map instanceof GetItemByKey && map instanceof GetKeys ) {
|
|
93 |
// for (String key : ((GetKeys<String>)map).getKeys() ) {
|
|
94 |
// Object val = ((GetItemByKey<String,Object>)map).get(key);
|
|
95 |
// f.setExtraValue(key, val);
|
|
96 |
// }
|
|
94 |
} else if( map instanceof GetItemByKey && map instanceof GetKeys ) { |
|
95 |
for (String key : ((GetKeys<String>)map).getKeys() ) { |
|
96 |
Object val = ((GetItemByKey<String,Object>)map).get(key); |
|
97 |
f.setExtraValue(key, val); |
|
98 |
} |
|
97 | 99 |
} |
98 | 100 |
} |
99 | 101 |
} |
Also available in: Unified diff