RowProcessor

com.phasmidsoftware.tableparser.core.parse.RowProcessor
trait RowProcessor[Row]

Typeclass trait representing a row processor that defines how rows of input data can be parsed into specific types, typically useful for parsing and processing tabular data with headers. CONSIDER finding a common super-type between this and TableParser.

Type parameters

Row

the type that each row will be processed into.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Types

type Input

The input type, typically String.

The input type, typically String.

Attributes

Value members

Abstract fields

protected val rowParser: RowParser[Row, Input]

Method to define a row parser.

Method to define a row parser.

Attributes

Returns

a RowParser[Row, Input].

Concrete fields

protected val forgiving: Boolean

Method to determine how errors are handled.

Method to determine how errors are handled.

Attributes

Returns

true if individual errors are logged but do not cause parsing to fail.

val headerRowsToRead: Int

This indicates the number of header rows which must be read from the input. If maybeHeader exists, then this property is ignored.

This indicates the number of header rows which must be read from the input. If maybeHeader exists, then this property is ignored.

Attributes

protected val maybeHeader: Option[Header]

This variable determines if there is a programmed, i.e., fixed, header for the parser. If its value is None, it signifies that we must look to the first line(s) of data for an appropriate header.

This variable determines if there is a programmed, i.e., fixed, header for the parser. If its value is None, it signifies that we must look to the first line(s) of data for an appropriate header.

Attributes

protected val multiline: Boolean

Value to determine whether it is acceptable to have a quoted string span more than one line.

Value to determine whether it is acceptable to have a quoted string span more than one line.

Attributes

Returns

true if quoted strings may span more than one line.

protected val predicate: Try[Row] => Boolean

Function to determine whether or not a row should be included in the table. Typically used for random sampling.

Function to determine whether or not a row should be included in the table. Typically used for random sampling.

Attributes