Package adams.data.io.input
Class AbstractNestedFlowReader
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.input.AbstractFlowReader
-
- adams.data.io.input.AbstractNestedFlowReader
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileFormatHandler
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,FlowReader
,NestedFlowReader
,Serializable
- Direct Known Subclasses:
DefaultFlowReader
public abstract class AbstractNestedFlowReader extends AbstractFlowReader implements NestedFlowReader
Ancestor for flow readers that support the nested format as well.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.io.input.AbstractFlowReader
AbstractFlowReader.InputType
-
-
Field Summary
-
Fields inherited from class adams.data.io.input.AbstractFlowReader
m_Errors, m_Quiet, m_Warnings
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractNestedFlowReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List
doReadNested(File file)
Performs the actual reading.protected List
doReadNested(InputStream in)
Performs the actual reading.protected List
doReadNested(Reader r)
Performs the actual reading.List
readNested(File file)
Reads the flow in nested format from the specified file.List
readNested(InputStream stream)
Reads the flow in nested format from the stream.List
readNested(Reader r)
Reads the flow from the given reader.List
readNested(String filename)
Reads the flow in nested format from the given file.-
Methods inherited from class adams.data.io.input.AbstractFlowReader
addError, addError, addWarning, addWarning, check, doReadActor, doReadActor, doReadActor, getDefaultFormatExtension, getErrors, getFormatDescription, getFormatExtensions, getInputType, getReaders, getWarnings, initialize, isQuiet, readActor, readActor, readActor, readActor, setQuiet
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.io.FileFormatHandler
getDefaultFormatExtension, getFormatDescription, getFormatExtensions
-
Methods inherited from interface adams.data.io.input.FlowReader
getCorrespondingWriter, getErrors, getWarnings, readActor, readActor, readActor, readActor
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
readNested
public List readNested(File file)
Reads the flow in nested format from the specified file.- Specified by:
readNested
in interfaceNestedFlowReader
- Parameters:
file
- the file to read from- Returns:
- null in case of an error, otherwise the flow
-
readNested
public List readNested(String filename)
Reads the flow in nested format from the given file.- Specified by:
readNested
in interfaceNestedFlowReader
- Parameters:
filename
- the file to read from- Returns:
- the flow or null in case of an error
-
readNested
public List readNested(InputStream stream)
Reads the flow in nested format from the stream. The caller must ensure to close the stream.- Specified by:
readNested
in interfaceNestedFlowReader
- Parameters:
stream
- the stream to read from- Returns:
- the flow or null in case of an error
-
readNested
public List readNested(Reader r)
Reads the flow from the given reader. The caller must ensure to close the reader.- Parameters:
r
- the reader to read from- Returns:
- the flow or null in case of an error
-
doReadNested
protected List doReadNested(File file)
Performs the actual reading.
Default implementation returns null.- Parameters:
file
- the file to read from- Returns:
- the flow or null in case of an error
- See Also:
AbstractFlowReader.getInputType()
-
doReadNested
protected List doReadNested(Reader r)
Performs the actual reading.
Default implementation returns null.- Parameters:
r
- the reader to read from- Returns:
- the flow or null in case of an error
- See Also:
AbstractFlowReader.getInputType()
-
doReadNested
protected List doReadNested(InputStream in)
Performs the actual reading.
Default implementation returns null.- Parameters:
in
- the input stream to read from- Returns:
- the flow or null in case of an error
- See Also:
AbstractFlowReader.getInputType()
-
-