public class MMTTheoremFile
extends java.lang.Object
Constructor and Description |
---|
MMTTheoremFile(java.io.File theoremFile)
Constructor using an input File object.
|
MMTTheoremFile(MMTFolder mmtFolder,
java.lang.String theoremLabel,
boolean inputFile)
Constructor using a MMTFolder and a theoremLabel designating a MMT
Theorem File in the MMT Folder.
|
Modifier and Type | Method and Description |
---|---|
void |
close(java.io.Reader readerIn)
Closes the Reader used for the MMTTheoremFile.
|
Statementizer |
constructStatementizer()
Builds an mmj2 Statementizer object for use in parsing an input MMT
Theorem File.
|
java.lang.String |
getFileName() |
java.lang.String |
getLabel() |
java.lang.String |
getSourceFileName() |
void |
writeTheoremToMMTFolder(java.util.List<java.lang.StringBuilder> mmtTheoremLines)
Writes Theorem to the MMT Folder using an input List of StringBuilder
lines.
|
public MMTTheoremFile(java.io.File theoremFile) throws TheoremLoaderException
theoremFile
- the File from which to initialize this objectTheoremLoaderException
- if the filename doesn't have filetype
".mmt".public MMTTheoremFile(MMTFolder mmtFolder, java.lang.String theoremLabel, boolean inputFile) throws TheoremLoaderException
mmtFolder
- the MMTFolder to look in.theoremLabel
- the label of the theorem in the MMT Theorem file.inputFile
- boolean set to true if the MMTTheoremFile is supposed to
be an inputFile (and therefore must exist), otherwise false.TheoremLoaderException
- if the theoremLabel is blank or null, or
if the theorem is not found in the MMT Folder and the
inputFile parameter is true, or if there is a
SecurityException.public Statementizer constructStatementizer() throws java.io.IOException, TheoremLoaderException
java.io.IOException
- if there is an I/O error.TheoremLoaderException
- if the file doesn't actually existpublic void writeTheoremToMMTFolder(java.util.List<java.lang.StringBuilder> mmtTheoremLines) throws TheoremLoaderException
Note: the input lines do not contain newline characters, which are written here in platform neutral code using writeLine().
mmtTheoremLines
- List of StringBuilder lines.TheoremLoaderException
- if there is an I/O error while writing the
MMTTheoremFile lines.public void close(java.io.Reader readerIn)
Does nothing if input Writer is null.
readerIn
- Reader object or null.public java.lang.String getFileName()
public java.lang.String getLabel()
public java.lang.String getSourceFileName()