|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrvl.swv.StatWeave
public class StatWeave
StatWeave is the main class for weaving and tangling source files.
It constructs an instance of FileInterface
for the required file type, plus
one or more instances of
EngineInterface
as needed based on the statistical engine(s) required
to process the source file.
The main(java.lang.String[])
method provides a command-line interface that reads options
and the source filename from the command line. The main work is done by
weave(java.lang.String, java.lang.String, boolean)
, which is called by main(java.lang.String[])
but could also be called
by, say, a GUI.
To use this class, we also require that a configuration file be defined; its default name is statweave.cfg on Windows systems, and .statweave on all other platforms. StatWeave looks for this file in the home directory.
Field Summary | |
---|---|
java.io.PrintStream |
errStream
|
Constructor Summary | |
---|---|
StatWeave(java.lang.String cfgFile)
Constructor |
Method Summary | |
---|---|
void |
error(java.lang.String msg,
int errCode)
Called by interface classes to report an error. |
java.lang.String |
getConfig(java.lang.String property)
Return specified configuration property with specified key. |
double |
getDim(java.lang.String optName,
double dfault)
Returns a dimension in inches for named option. |
java.lang.String |
getDir()
return directory of source file |
java.lang.String |
getOption(java.lang.String optName)
Return the specified option from currentOpts |
java.lang.String |
getOption(java.lang.String optName,
java.lang.String dfault)
Return the specified option from currentOpts. |
boolean |
isTrue(java.lang.String optName)
Returns true if option named optname starts with T |
boolean |
isWeaving()
return true if weaving, false if tangling |
static void |
main(java.lang.String[] args)
Command-line interface |
static void |
message(java.lang.String msg)
Display a non-error message |
void |
tangle(java.lang.String fileName)
Main routine for tangling a file. |
static void |
warning(java.lang.String msg)
Called by interface classes to report a warning |
void |
weave(java.lang.String fileName)
Main routine for weaving a file. |
void |
weave(java.lang.String fileName,
java.lang.String resultName,
boolean weaving)
Main routine for weaving a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.io.PrintStream errStream
Constructor Detail |
---|
public StatWeave(java.lang.String cfgFile)
Method Detail |
---|
public static void message(java.lang.String msg)
public static void warning(java.lang.String msg)
public void error(java.lang.String msg, int errCode)
public java.lang.String getOption(java.lang.String optName)
public java.lang.String getOption(java.lang.String optName, java.lang.String dfault)
public boolean isTrue(java.lang.String optName)
public double getDim(java.lang.String optName, double dfault)
public java.lang.String getConfig(java.lang.String property)
--custom
option, this returns a customization
property instead, if it exists.)
public boolean isWeaving()
public java.lang.String getDir()
public void weave(java.lang.String fileName, java.lang.String resultName, boolean weaving)
public void weave(java.lang.String fileName)
public void tangle(java.lang.String fileName)
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |