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
-
Constructor Summary
ConstructorDescriptionDataFileReader
(Object target) Instantiates this reader with the specifiedOutputBuilder
used to build the object generated from the file.DataFileReader
(OutputBuilder<?, ?> outputBuilder) Instantiates this reader with the specifiedOutputBuilder
used to build the object generated from the file. -
Method Summary
Modifier and TypeMethodDescriptionOutputBuilder<?,
?> protected void
mark()
void
popMark()
void
read()
Loads in the xml descriptor file and causes the file to be parsed.protected void
restore()
void
setDescriptorFileName
(String descriptorFileName) void
setFileToParseName
(String fileToParseName) void
setNewLineConverter
(NewLinePatternConverter newLineConverter) void
setoutputBuilder
(OutputBuilder<?, ?> outputBuilder)
-
Field Details
-
descriptorDocument
protected org.jdom.Document descriptorDocument
-
-
Constructor Details
-
DataFileReader
Instantiates this reader with the specifiedOutputBuilder
used to build the object generated from the file.- Parameters:
outputBuilder
- used to build the result of the parsing
-
DataFileReader
Instantiates this reader with the specifiedOutputBuilder
used 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:
read
in interfaceReader
- Throws:
IOException
org.jdom.JDOMException
- See Also:
-
getoutputBuilder
-
setoutputBuilder
-
getParseResult
-
getDescriptorFileName
-
setDescriptorFileName
-
getFileToParseName
-
setFileToParseName
-
getNewLineConverter
-
setNewLineConverter
-
popMark
public void popMark()
-