01: package jimm.datavision.source.charsep;
02:
03: import jimm.datavision.*;
04: import jimm.datavision.source.Query;
05: import jimm.datavision.source.Column;
06: import java.util.ArrayList;
07: import java.util.Iterator;
08:
09: /**
10: * A query used in character-separated file queries.
11: *
12: * @author Jim Menard, <a href="mailto:jimm@io.com">jimm@io.com</a>
13: * @see CharSepSource
14: */
15: public class CharSepQuery extends Query {
16:
17: protected ArrayList charSepCols;
18:
19: public CharSepQuery(Report r) {
20: super (r);
21: charSepCols = new ArrayList();
22: }
23:
24: void addColumn(Column col) {
25: charSepCols.add(col);
26: }
27:
28: public void findSelectablesUsed() {
29: super .findSelectablesUsed();
30: for (Iterator iter = charSepCols.iterator(); iter.hasNext();) {
31: Column col = (Column) iter.next();
32: if (!selectables.contains(col))
33: selectables.add(col);
34: }
35: }
36:
37: }
|