01: /*
02: * This is free software, licensed under the Gnu Public License (GPL)
03: * get a copy from <http://www.gnu.org/licenses/gpl.html>
04: *
05: * author: Henner Zeller <H.Zeller@acm.org>
06: */
07: package henplus.commands;
08:
09: import henplus.HenPlus;
10: import henplus.SQLSession;
11: import henplus.AbstractCommand;
12:
13: /**
14: * document me.
15: */
16: public class ExportCommand extends AbstractCommand {
17: /**
18: * returns the command-strings this command can handle.
19: */
20: public String[] getCommandList() {
21: return new String[] { "export" };
22: }
23:
24: /**
25: * execute the command given.
26: */
27: public int execute(SQLSession session, String cmd, String param) {
28: int argc = argumentCount(param);
29: HenPlus.msg().println("sorry, not implemented yet.");
30: return (argc == 3) ? SUCCESS : SYNTAX_ERROR;
31: }
32:
33: /**
34: * return a descriptive string.
35: */
36: public String getShortDescription() {
37: return "export as XML, SQL or CSV";
38: }
39:
40: public String getSynopsis(String cmd) {
41: return "export <csv|xml|sql> <table> <filename>";
42: }
43:
44: public String getLongDescription(String cmd) {
45: String dsc;
46: dsc = "\texports the given table.";
47: return dsc;
48: }
49:
50: }
51:
52: /*
53: * Local variables:
54: * c-basic-offset: 4
55: * compile-command: "ant -emacs -find build.xml"
56: * End:
57: */
|