Class DefaultDBReader

java.lang.Object
org.scictrl.mp.orbitcorrect.accessories.AbstractParameterReader
org.scictrl.mp.orbitcorrect.accessories.DefaultDBReader
All Implemented Interfaces:
IDataBushReader

public class DefaultDBReader extends AbstractParameterReader implements IDataBushReader
This is straightforward implementation of IDataBushReader. DefaultDBReader is designed for reading input written in DataBush specific format. String, written in this format is obtained by calling DataBush.toString() method. Proper read sequence is
  • open input stream with any of openInStream method
  • read input with DefaultDBReader.read() method. List elements can be returned by read or obtained with DefaultDBReader.getList() method.
  • close input with DefaultDBReader.closeInStream().
Example of reading is described in ParameterReader.
The only difference is, that you should call read() instead init(). Method init() does not implements any functionallity. Result of reading are instances of DataBush elements, with parameters initialized as described in input format. Elements are stored in ElementList. The list is used to initialize DataBush. Examples, how elements are written in DataBush specific format, can be obtained by calling DefaultDBReader.getSamples().
Author:
igor@scictrl.com
See Also: