You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by kw...@apache.org on 2002/11/09 07:19:25 UTC

cvs commit: xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands AddCommand.java InfoCommand.java CreateCommand.java DirCommand.java ExitCommand.java HelpCommand.java ListCommand.java QueryCommand.java RunScriptCommand.java TimeCommand.java URLCommand.java UseCommand.java AddDocumentCommand.java

kward       2002/11/08 22:19:25

  Modified:    java/scratchpad/admin/src/org/apache/xindice/admin/commands
                        CreateCommand.java DirCommand.java ExitCommand.java
                        HelpCommand.java ListCommand.java QueryCommand.java
                        RunScriptCommand.java TimeCommand.java
                        URLCommand.java UseCommand.java
  Added:       java/scratchpad/admin/src/org/apache/xindice/admin/commands
                        AddCommand.java InfoCommand.java
  Removed:     java/scratchpad/admin/src/org/apache/xindice/admin/commands
                        AddDocumentCommand.java
  Log:
  getting build to run
  
  Revision  Changes    Path
  1.3       +3 -3      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/CreateCommand.java
  
  Index: CreateCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/CreateCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CreateCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ CreateCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -63,10 +63,10 @@
   import java.util.Set;
   
   import org.apache.xindice.admin.commandline.BaseCommand;
  -import org.apache.xindice.admin.commandline.CommandInterface;
  +import org.apache.xindice.admin.commandline.Command;
   
   /**
  - * CommandInterface for creating collections
  + * Command for creating collections
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.3       +2 -2      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/DirCommand.java
  
  Index: DirCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/DirCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DirCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ DirCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -63,7 +63,7 @@
   import java.io.File;
   
   /**
  - * CommandInterface for listing working directory contents
  + * Command for listing working directory contents
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.3       +2 -2      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/ExitCommand.java
  
  Index: ExitCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/ExitCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExitCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ ExitCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -62,7 +62,7 @@
   import org.apache.xindice.admin.commandline.BaseCommand;
   
   /**
  - * CommandInterface fto exit the applicaton
  + * Command fto exit the applicaton
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.3       +4 -4      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/HelpCommand.java
  
  Index: HelpCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/HelpCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HelpCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ HelpCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -62,10 +62,10 @@
   import java.util.Iterator;
   import java.util.Set;
   import org.apache.xindice.admin.commandline.BaseCommand;
  -import org.apache.xindice.admin.commandline.CommandInterface;
  +import org.apache.xindice.admin.commandline.Command;
   
   /**
  - * CommandInterface for displaying help
  + * Command for displaying help
    * Author: kward <ku...@yahoo.com>
    */
   
  @@ -77,7 +77,7 @@
   
   	public void execute(String args[]) {
   		String topic = args[0];
  -		CommandInterface command = getRegister().getCommand(topic);
  +		Command command = getRegister().getCommand(topic);
   		if (command == null) {
   			prompt.out.println("No help available for " + topic);
   		} else {
  
  
  
  1.3       +2 -2      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/ListCommand.java
  
  Index: ListCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/ListCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ListCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ ListCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -65,7 +65,7 @@
   import java.util.Date;
   
   /**
  - * CommandInterface for listing collections and documents
  + * Command for listing collections and documents
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.3       +4 -4      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/QueryCommand.java
  
  Index: QueryCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/QueryCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- QueryCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ QueryCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -62,17 +62,17 @@
   import java.util.Iterator;
   import java.util.Set;
   import org.apache.xindice.admin.commandline.BaseCommand;
  -import org.apache.xindice.admin.commandline.CommandInterface;
  +import org.apache.xindice.admin.commandline.Command;
   
   /**
  - * CommandInterface for querying collections and documents
  + * Command for querying collections and documents
    * Author: kward <ku...@yahoo.com>
    */
   
   public class QueryCommand extends BaseCommand {
   
   	public QueryCommand() {
  -		super("query", 2, "XPath/XUpdate query" + "\nexecutes an XPath or XUpdate query against a document or collection");
  +		super("query", 2, "XPath|XUpdate query" + "\nexecutes an XPath or XUpdate query against a document or collection");
   	}
   
   	public void execute(String args[]) {
  
  
  
  1.3       +2 -2      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/RunScriptCommand.java
  
  Index: RunScriptCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/RunScriptCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RunScriptCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ RunScriptCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -65,7 +65,7 @@
   import java.io.*;
   
   /**
  - * CommandInterface for running batch scripts
  + * Command for running batch scripts
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.3       +2 -2      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/TimeCommand.java
  
  Index: TimeCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/TimeCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TimeCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ TimeCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -63,7 +63,7 @@
   import java.util.Date;
   
   /**
  - * CommandInterface for displaying the current time
  + * Command for displaying the current time
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.3       +2 -2      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/URLCommand.java
  
  Index: URLCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/URLCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- URLCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ URLCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -67,7 +67,7 @@
   import java.io.*;
   
   /**
  - * CommandInterface for handling file urls
  + * Command for handling file urls
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.3       +3 -3      xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/UseCommand.java
  
  Index: UseCommand.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/UseCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UseCommand.java	9 Nov 2002 01:24:55 -0000	1.2
  +++ UseCommand.java	9 Nov 2002 06:19:24 -0000	1.3
  @@ -62,10 +62,10 @@
   import java.util.Iterator;
   import java.util.Set;
   import org.apache.xindice.admin.commandline.BaseCommand;
  -import org.apache.xindice.admin.commandline.CommandInterface;
  +import org.apache.xindice.admin.commandline.Command;
   
   /**
  - * CommandInterface for setting the working collection
  + * Command for setting the working collection
    * Author: kward <ku...@yahoo.com>
    */
   
  
  
  
  1.1                  xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/AddCommand.java
  
  Index: AddCommand.java
  ===================================================================
  package org.apache.xindice.admin.commands;
  
  import java.util.Iterator;
  import java.util.Set;
  
  import org.apache.xindice.admin.commandline.BaseCommand;
  import org.apache.xindice.admin.commandline.Command;
  
  /**
   * This command is used to query information about any command that has
   * been registered with the prompt.
   */
  public class AddCommand extends BaseCommand {
  
  	public AddCommand() {
  		super("add", 1, "adds an XML document to the current collection");
  	}
  
  	public void execute(String args[]) {
  		String document = args[0];
  		prompt.out.println("Added document " + document);
  
  	}
  
  }
  
  
  
  1.1                  xml-xindice/java/scratchpad/admin/src/org/apache/xindice/admin/commands/InfoCommand.java
  
  Index: InfoCommand.java
  ===================================================================
  package org.apache.xindice.admin.commands;
  
  import org.apache.xindice.admin.commandline.BaseCommand;
  import org.apache.xmlrpc.XmlRpc;
  import org.apache.xmlrpc.XmlRpcClient;
  import java.util.Hashtable;
  import java.util.Vector;
  import java.util.Date;
  
  /**
   *  Displays client/server info
   */
  public class InfoCommand extends BaseCommand {
  
  	public InfoCommand() {
  		super("info", 0,
  			"\n- prints out server version and server API version");
  	}
  
  	public void execute(String args[]) {
  
  		try {
  			String dir = System.getProperty("user.dir");
  			prompt.out.println("\n\tWorking directory: "+dir);
  		} catch (SecurityException e) {
  			prompt.err.println("System security exception: " + e);
  		} catch (NullPointerException e) {
  			prompt.err.println("Null system property key: " + e);
  		} catch (IllegalArgumentException e) {
  			prompt.err.println("Bad system property key: " + e);
  		}
  
          Hashtable message = new Hashtable();
          message.put("message", "GetServerVersion");
          Hashtable result = null;
          try {
              result = run(message);
          } catch(Exception e) {
  
          }
          prompt.out.println("\tServer Version: " + result.get("result"));
  
          message.clear();
          message.put("message", "GetApiVersion");
  
          try {
              result = run(message);
          } catch(Exception e) {
  
          }
          prompt.out.println("\tAPI Version: " + result.get("result"));
          prompt.out.println("\tCopyright 2002, Apache Software Foundation\n");
  	}
  }