org.w3c.tools.offline.command
Class CommandLine

java.lang.Object
  extended by org.w3c.tools.offline.command.CommandLine

public class CommandLine
extends java.lang.Object

The jigshell command line class.


Field Summary
static java.lang.String ATTR
           
static java.lang.String GO
           
static java.lang.String LIST
           
static java.lang.String NO_OPT
           
protected  java.util.Vector parsedCmd
          a Vector to handle elements of a parsed command
protected static org.apache.oro.text.regex.Perl5Compiler pcompiler
           
protected static org.apache.oro.text.regex.Perl5Matcher pmatcher
           
static java.lang.String REC
           
protected static org.apache.oro.text.regex.Pattern srPattern
           
static java.lang.String UP
           
static java.lang.String WHERE
          static members: jigshell commands syntax
 
Constructor Summary
CommandLine(java.lang.String s)
          Initialize a CommandLine instance.
 
Method Summary
 java.lang.String getAction()
          Get the command line action
 java.lang.String getOption()
          Get the command option
 java.lang.String getTarget()
          Get the command target
 void parse()
          Parse a CommandLine instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHERE

public static java.lang.String WHERE
static members: jigshell commands syntax


LIST

public static java.lang.String LIST

GO

public static java.lang.String GO

REC

public static java.lang.String REC

ATTR

public static java.lang.String ATTR

UP

public static java.lang.String UP

NO_OPT

public static java.lang.String NO_OPT

parsedCmd

protected java.util.Vector parsedCmd
a Vector to handle elements of a parsed command


pmatcher

protected static org.apache.oro.text.regex.Perl5Matcher pmatcher

pcompiler

protected static org.apache.oro.text.regex.Perl5Compiler pcompiler

srPattern

protected static org.apache.oro.text.regex.Pattern srPattern
Constructor Detail

CommandLine

public CommandLine(java.lang.String s)
Initialize a CommandLine instance.

Parameters:
s - the command line.
Method Detail

parse

public void parse()
           throws CommandParseException
Parse a CommandLine instance.

Throws:
CommandParseException

getAction

public java.lang.String getAction()
Get the command line action

Returns:
the string action (should be a jigshell action).

getTarget

public java.lang.String getTarget()
Get the command target

Returns:
the string target (should be a name or regexp).

getOption

public java.lang.String getOption()
Get the command option

Returns:
the command option ("none" if no option specified in the command line).