trait CopyableTableParser[Row, Input, Table] extends AnyRef
A trait representing a parser for tables that supports configurability and row-level parsing.
The CopyableTableParser provides methods to configure the parsing behavior of tables, such
as defining headers, enabling forgiving or multiline parsing modes, setting predicates for
row filtering, and defining custom row parsing logic. It operates generically over three
types: Row, representing a single row in the table; Input, representing raw input data for
parsing rows; and Table, representing the parsed table as a whole.
- Row
the type of a single row in the table.
- Input
the type of the raw input data used to parse rows.
- Table
the type of the parsed table.
- Alphabetic
- By Inheritance
- CopyableTableParser
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def setForgiving(forgiving: Boolean): TableParser[Table]
Configures the parser to operate in a "forgiving" mode, where errors encountered during the parsing of individual rows are logged but do not cause the parsing process to fail.
Configures the parser to operate in a "forgiving" mode, where errors encountered during the parsing of individual rows are logged but do not cause the parsing process to fail. When set to
true, the parser will attempt to continue parsing despite encountering errors in the input. When set tofalse, errors will cause the parsing process to terminate.- forgiving
a boolean value indicating whether forgiving mode should be enabled.
trueenables forgiving mode, allowing parsing to continue on errors.falsedisables forgiving mode, causing failures on errors.- returns
an instance of
TableParser[Table]configured with the specified forgiving behavior.
- abstract def setHeader(header: Header): TableParser[Table]
Sets a fixed header for the table parser.
Sets a fixed header for the table parser. This method allows the configuration of the parser to use the specified header, instead of deriving it from the data during parsing.
- header
the
Headerinstance representing the fixed header for the table parser, containing column names and optional additional header lines.- returns
a new
TableParser[Table]instance configured with the specified header.
- abstract def setMultiline(multiline: Boolean): TableParser[Table]
Configures the parser to allow or disallow quoted strings to span across multiple lines.
Configures the parser to allow or disallow quoted strings to span across multiple lines.
When
multilineis set totrue, the parser permits quoted strings in the input to extend beyond a single line. If set tofalse, quoted strings are constrained to stay within one line.- multiline
a boolean flag indicating whether multiline parsing of quoted strings is enabled (
true) or disabled (false).- returns
a new
TableParser[Table]instance configured with the updated multiline setting.
- abstract def setPredicate(predicate: (Try[Row]) => Boolean): TableParser[Table]
Sets a predicate function that determines whether a parsed
Rowshould be included in the finalTable.Sets a predicate function that determines whether a parsed
Rowshould be included in the finalTable. The predicate is applied to each parsedRowwrapped in aTryto allow filtering based on success or failure.- predicate
a function of type
Try[Row] => Booleanthat accepts aTryof aRowand returnstrueif the row should be included in the table, orfalseotherwise.- returns
a new instance of
TableParser[Table]with the specified predicate applied.
- abstract def setRowParser(rowParser: RowParser[Row, Input]): TableParser[Table]
Sets the row parser to be used for parsing rows in the table.
Sets the row parser to be used for parsing rows in the table.
The row parser provides the logic for converting raw input data of type
Inputinto rows of typeRow. This method allows you to configure the table parser with a custom row parser, enabling flexibility in interpreting the rows according to specific requirements.- rowParser
the
RowParserinstance to use for parsing rows. TheRowParserdefines how each input (of typeInput) is transformed into a row (of typeRow), potentially using aHeaderfor additional context.- returns
a new
TableParserinstance configured with the specified row parser.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)