Package repast.simphony.integration
Class DataFileReader
java.lang.Object
repast.simphony.integration.DataFileReader
- All Implemented Interfaces:
Reader
This is the primary class for data file reading. This takes in a descriptor, a file name for the
data, and an output writer and will parse the data file according to the descriptor, giving a
final result.
- Author:
- Jerry Vos
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataFileReader(Object target) Instantiates this reader with the specifiedOutputBuilderused to build the object generated from the file.DataFileReader(OutputBuilder<?, ?> outputBuilder) Instantiates this reader with the specifiedOutputBuilderused to build the object generated from the file. -
Method Summary
Modifier and TypeMethodDescriptionOutputBuilder<?,?> protected voidmark()voidpopMark()voidread()Loads in the xml descriptor file and causes the file to be parsed.protected voidrestore()voidsetDescriptorFileName(String descriptorFileName) voidsetFileToParseName(String fileToParseName) voidsetNewLineConverter(NewLinePatternConverter newLineConverter) voidsetoutputBuilder(OutputBuilder<?, ?> outputBuilder)
-
Field Details
-
descriptorDocument
protected org.jdom.Document descriptorDocument
-
-
Constructor Details
-
DataFileReader
Instantiates this reader with the specifiedOutputBuilderused to build the object generated from the file.- Parameters:
outputBuilder- used to build the result of the parsing
-
DataFileReader
Instantiates this reader with the specifiedOutputBuilderused to build the object generated from the file.- Parameters:
outputBuilder- used to build the result of the parsing
-
-
Method Details
-
restore
- Throws:
IOException
-
mark
- Throws:
IOException
-
read
Loads in the xml descriptor file and causes the file to be parsed. After calling this method (assuming it doesn't throw an exception), thegetParseResult()method will return a value built from the read in file.- Specified by:
readin interfaceReader- Throws:
IOExceptionorg.jdom.JDOMException- See Also:
-
getoutputBuilder
-
setoutputBuilder
-
getParseResult
-
getDescriptorFileName
-
setDescriptorFileName
-
getFileToParseName
-
setFileToParseName
-
getNewLineConverter
-
setNewLineConverter
-
popMark
public void popMark()
-