Package kieker.analysis.generic.source
Class CsvTableReaderProducerStage<R,T>
java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractProducerStage<Table<R,T>>
kieker.analysis.generic.source.CsvTableReaderProducerStage<R,T>
- Type Parameters:
R
- label data typeT
- record data type
public class CsvTableReaderProducerStage<R,T> extends teetime.framework.AbstractProducerStage<Table<R,T>>
Reader for a CSV file. Outputs the whole file as a table.
- Since:
- 2.0.0
- Author:
- Reiner Jung
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CsvTableReaderProducerStage(java.nio.file.Path path, char separator, char quoteSymbol, char escapeSymbol, boolean header, java.lang.Class<T> clazz, IPathLabelMapper<R> mapper)
Read a single CSV file.CsvTableReaderProducerStage(java.nio.file.Path path, char separator, char quoteSymbol, char escapeSymbol, boolean header, java.lang.Class<T> clazz, R label)
Read a single CSV file. -
Method Summary
Modifier and Type Method Description protected void
execute()
Methods inherited from class teetime.framework.AbstractProducerStage
getOutputPort, getTerminationStrategy
Methods inherited from class teetime.framework.AbstractStage
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
-
Constructor Details
-
CsvTableReaderProducerStage
public CsvTableReaderProducerStage(java.nio.file.Path path, char separator, char quoteSymbol, char escapeSymbol, boolean header, java.lang.Class<T> clazz, R label) throws java.io.IOExceptionRead a single CSV file.- Parameters:
path
- file pathseparator
- string containing the separator symbol for cellsquoteSymbol
- quote symbol used for cellsescapeSymbol
- escape characterheader
- indicate how to interpret the first line in the CSV file, set to true to indicate that the first line contains the header informationclazz
- bean classlabel
- table label- Throws:
java.io.IOException
- when a stream could not be opened.
-
CsvTableReaderProducerStage
public CsvTableReaderProducerStage(java.nio.file.Path path, char separator, char quoteSymbol, char escapeSymbol, boolean header, java.lang.Class<T> clazz, IPathLabelMapper<R> mapper) throws java.io.IOExceptionRead a single CSV file.- Parameters:
path
- file pathseparator
- string containing the separator symbol for cellsquoteSymbol
- quote symbol used for cellsescapeSymbol
- escape characterheader
- indicate how to interpret the first line in the CSV file, set to true to indicate that the first line contains the header informationclazz
- bean classmapper
- table label mapper object- Throws:
java.io.IOException
- when a stream could not be opened.
-
-
Method Details
-
execute
protected void execute() throws java.lang.Exception- Specified by:
execute
in classteetime.framework.AbstractStage
- Throws:
java.lang.Exception
-