|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileInterface
This interface specifies the methods needed to read source files and write result files for StatWeave.
Method Summary | |
---|---|
void |
embedPlots(java.lang.String sig,
FigFile ff,
int[] pages)
Replace bookmark with specified figure(s) in ff |
java.util.Vector<java.lang.String> |
getArgs()
Return the arguments specified in a code reference.. |
java.lang.String |
getCodeLine()
Return one line from a code chunk. |
java.lang.String |
getExpr()
Return the expression given in current expr tag, or the label in a recallCode, recallOutput, or recallFig tag |
int[] |
getFigFormats()
Return acceptable graphics formats -- null if no graphics supported. |
java.lang.String |
getLabel()
Return the label specified in the latest tag. |
java.lang.String |
getLang()
Return the language associated with latest tag |
java.lang.String |
getLine()
Return the next line from the source file. |
java.lang.String |
getOptions()
Return the options list for latest tag. |
StatWeave |
getParent()
Access the parent |
java.lang.String |
getPosition()
Return a string that describes somehow the current position in the source file |
Tag |
nextTag()
Return the next tag type found in the file |
void |
readSourceFile(java.lang.String fileName)
Read the specified source file (most likely into a buffer). |
void |
replaceBookmark(java.lang.String sig,
java.lang.String text,
Tag context)
Find the given bookmark previously saved with signature sig, and replace it with text. |
void |
saveBookmark(java.lang.String sig)
Replace the current tagged region of the source file with the specified sig. |
void |
setParent(StatWeave parent)
Set the parent object for this instance |
void |
writeResults(int mopUp)
Write the results to the results file (a call to parent.getConfig("sys.baseName") may help figure out the right name.) |
Method Detail |
---|
void setParent(StatWeave parent)
StatWeave getParent()
int[] getFigFormats()
Note the required integer constants are defined in FigFile
void readSourceFile(java.lang.String fileName)
java.lang.String getLine()
java.lang.String getPosition()
void writeResults(int mopUp)
Finally, clean up intermediate files as directed by the mopUp argument, which should have a value of 0, 1, or 2. 0 means leave all intermediate files; 2 means erase all intermediate files and leave only essential ones; and 1 is somewhere in between (e.g. keep graphics files)
Tag nextTag()
java.lang.String getLang()
Needed when tag is chunk, langOpts, or expr
java.lang.String getExpr()
java.lang.String getOptions()
Needed when tag is chunk, globalOpts, or langOpts
java.lang.String getCodeLine()
If it is actually a code reference, return the string !coderef label or !coderef *label, where label is the label provided. Use the * form to force the code reference to be displayed regardless of the value of the option showref. Note that in either case, the label can be obtained using .substring(9).
Return null when the end of the code chunk is reached.
java.lang.String getLabel()
Needed when the tag is coderef, recallFig, recallCode, recallOutput or when getCodeLine returns a code reference. (When the tag is chunk, the label, if any, should be included in the list returned by getOptions().)
java.util.Vector<java.lang.String> getArgs()
void saveBookmark(java.lang.String sig)
void replaceBookmark(java.lang.String sig, java.lang.String text, Tag context)
void embedPlots(java.lang.String sig, FigFile ff, int[] pages)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |