1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.scripting.table;
12
13 import java.io.IOException;
14 import java.util.Iterator;
15
16 import uk.ac.starlink.table.ColumnInfo;
17 import uk.ac.starlink.table.RowListStarTable;
18 import uk.ac.starlink.table.StarTable;
19
20 /*** Extension of the standard starlink read-write table that supports the extra scripting methods.
21 * See RowListStarTable javadoc <a href="http://www.star.bristol.ac.uk/~mbt/stil/javadocs/uk/ac/starlink/table/RowListStarTable.html">http://www.star.bristol.ac.uk/~mbt/stil/javadocs/uk/ac/starlink/table/RowListStarTable.html</a>
22 * @author Noel Winstanley nw@jb.man.ac.uk 07-Dec-2004
23 *
24 */
25 public class MutableScriptStarTable extends RowListStarTable implements
26 ScriptStarTable {
27
28 public ScriptStarTable addColumn(ColumnInfo meta, Object colValue) {
29 return this.methods.addColumn(meta, colValue);
30 }
31 public MutableScriptStarTable asMutableTable() throws IOException {
32 return this.methods.asMutableTable();
33 }
34 public Iterator columnIterator(int col) throws IOException {
35 return this.methods.columnIterator(col);
36 }
37 public Iterator iterator() throws IOException {
38 return this.methods.iterator();
39 }
40 public ScriptStarTable removeColumn(int index) {
41 return this.methods.removeColumn(index);
42 }
43 /*** Construct a new MutableScriptStarTable
44 * @param arg0
45 */
46 public MutableScriptStarTable(ColumnInfo[] arg0) {
47 super(arg0);
48 }
49
50 /*** Construct a new MutableScriptStarTable
51 * @param arg0
52 */
53 public MutableScriptStarTable(StarTable arg0) {
54 super(arg0);
55 }
56 protected final ExtraTableMethods methods = new ExtraTableMethodsImpl() {
57 public MutableScriptStarTable asMutableTable() {
58 return MutableScriptStarTable.this;
59 }
60 protected StarTable getTable() {
61 return MutableScriptStarTable.this;
62 }
63 };
64
65
66 }
67
68
69
70
71
72
73
74
75
76
77