abstract class StringsTableParser[Table] extends AbstractTableParser[Table]

Abstract class to extend AbstractTableParser but with Input = Strings This is the unusual situation where a file is a sequence of a sequence of Strings, each representing one value.

Table

the table type.

Linear Supertypes
AbstractTableParser[Table], TableParser[Table], TableBuilder[Table], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringsTableParser
  2. AbstractTableParser
  3. TableParser
  4. TableBuilder
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StringsTableParser()

Type Members

  1. type Input = Seq[String]

    The input type, typically String or Strings.

    The input type, typically String or Strings.

    Definition Classes
    StringsTableParser → TableParser
  2. abstract type Row

    The row type.

    The row type.

    Definition Classes
    TableBuilder

Abstract Value Members

  1. abstract def builder(rows: Iterator[Row], header: Header): Table

    Method to construct a Table based on the given iterator of rows and the given header.

    Method to construct a Table based on the given iterator of rows and the given header.

    rows

    an iterator of Row objects representing the data rows.

    header

    a Header object representing the table's column headers.

    returns

    the constructed Table based on the input rows and header.

    Attributes
    protected
    Definition Classes
    TableBuilder
  2. abstract val rowParser: RowParser[Row, Input]

    Method to define a row parser.

    Method to define a row parser.

    returns

    a RowParser[Row, Input].

    Definition Classes
    TableParser

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def doParseRows(ts: Iterator[Input], header: Header, f: ((Input, Int)) => Try[Row])(implicit ev: Joinable[Input]): Try[Table]

    Parses rows of input data into a table representation.

    Parses rows of input data into a table representation.

    This method utilizes an IndexedInputToRowsAggregator to transform an iterator of inputs into rows using the provided header and transformation function. It processes the input, materializes the resulting rows into a list, and constructs a table representation from the processed rows and header.

    ts

    an iterator of inputs to be parsed into rows.

    header

    the Header containing column metadata to guide the transformation process.

    f

    a transformation function that maps the Header to a function capable of transforming a tuple of input and its index into a Try[Row]. This function encapsulates row processing logic and error handling for each input element.

    ev

    an implicit evidence parameter ensuring the input type adheres to the Joinable type class, which defines how input elements can be combined or validated during processing.

    returns

    a Try containing a Table if the parsing is successful, or an error in case of failure.

    Definition Classes
    AbstractTableParser
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. val forgiving: Boolean

    If true, individual row failures are logged but do not cause the overall parse to fail.

    If true, individual row failures are logged but do not cause the overall parse to fail.

    Attributes
    protected
    Definition Classes
    TableBuilder
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. val headerRowsToRead: Int

    This indicates the number of header rows which must be read from the input.

    This indicates the number of header rows which must be read from the input. The value is usually 1 but some types of CSV file have more than one header line. If maybeHeader exists, then this number is ignored.

    CONSIDER if this is really ignored when maybeHeader is defined, then we should eliminate such places where this value has an override of 0.

    Definition Classes
    TableParser
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. val maybeHeader: Option[Header]

    This variable determines if there is a programmed, i.e., fixed, header for the parser.

    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
    Definition Classes
    TableParser
  15. 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.

    returns

    true if quoted strings may span more than one line.

    Attributes
    protected
    Definition Classes
    TableParser
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def parse(xs: Iterator[Strings], n: Int = headerRowsToRead): Try[Table]

    Method to parse a table based on a sequence of Inputs.

    Method to parse a table based on a sequence of Inputs. NOTE: this is required so that we can invoke this method with an Iterator[Strings].

    xs

    the sequence of Inputs, one for each row

    n

    the number of rows to drop (length of the header) (defaults to 1)

    returns

    a Try[Table].

    Definition Classes
    StringsTableParser → AbstractTableParser → TableParser
  20. def parseRows(wss: Iterator[Strings], header: Header): Try[Table]

    Parses the rows of a table using the given header and returns the parsed table wrapped in a Try.

    Parses the rows of a table using the given header and returns the parsed table wrapped in a Try.

    This method processes a sequence of rows (each represented as a Strings), leveraging the provided header and a row parser to translate these rows into a structured table of type Table.

    wss

    an Iterator of Strings where each element represents a row (sequence of cell values).

    header

    the Header object containing metadata about the structure of the table, such as column names.

    returns

    a Try[Table] containing the parsed table on success or an exception on failure.

    Definition Classes
    StringsTableParser → AbstractTableParser
  21. val predicate: (Try[Row]) => Boolean

    Predicate to filter rows.

    Predicate to filter rows. Defaults to including all rows.

    Attributes
    protected
    Definition Classes
    TableBuilder
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AbstractTableParser[Table]

Inherited from TableParser[Table]

Inherited from TableBuilder[Table]

Inherited from AnyRef

Inherited from Any

Ungrouped