case class HeadedStringTableParser[X](maybeFixedHeader: Option[Header] = None, forgiving: Boolean = false)(implicit evidence$1: CellParser[X], evidence$2: ClassTag[X]) extends StringTableParser[Table[X]] with Product with Serializable

Case class to define a StringTableParser that assumes a header to be found in the input file. This class attempts to provide as much built-in functionality as possible.

This class assumes that the names of the columns are in the first line. This class implements builder with a HeadedTable object. This class uses StandardRowParser of its rowParser.

X

the underlying row type which must provide evidence of a CellParser and ClassTag.

maybeFixedHeader

None => requires that the data source has a header row. Some(h) => specifies that the header is to be taken from h. NOTE: that the simplest is to specify the header directly from the type X:

See also

HeadedStringTableParser#create

Linear Supertypes
Serializable, Product, Equals, StringTableParser[Table[X]], AbstractTableParser[Table[X]], TableParser[Table[X]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HeadedStringTableParser
  2. Serializable
  3. Product
  4. Equals
  5. StringTableParser
  6. AbstractTableParser
  7. TableParser
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new HeadedStringTableParser(maybeFixedHeader: Option[Header] = None, forgiving: Boolean = false)(implicit arg0: CellParser[X], arg1: ClassTag[X])

    maybeFixedHeader

    None => requires that the data source has a header row. Some(h) => specifies that the header is to be taken from h. NOTE: that the simplest is to specify the header directly from the type X:

Type Members

  1. type Input = String

    The input type.

    The input type.

    Definition Classes
    StringTableParserTableParser
  2. type Row = X

    The row type.

    The row type.

    Definition Classes
    HeadedStringTableParserTableParser

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 builder(rows: Iterator[X], header: Header): Table[Row]

    Default method to create a new table.

    Default method to create a new table. It does this by invoking either builderWithHeader or builderWithoutHeader, as appropriate.

    rows

    the rows which will make up the table.

    header

    the Header, derived either from the program or the data.

    returns

    an instance of Table.

    Attributes
    protected
    Definition Classes
    HeadedStringTableParserTableParser
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def doParseRows[T](ts: Iterator[T], header: Header, f: (T) => (Header) => Try[Row]): Try[Table[X]]

    Common code for parsing rows.

    Common code for parsing rows.

    T

    the parametric type of the resulting Table. T corresponds to Input in the calling method, i.e. a Row.

    ts

    a sequence of Ts.

    header

    the Header.

    f

    a curried function which transforms a T into a function which is of type Header => Try[Row].

    returns

    a Try of Table

    Attributes
    protected
    Definition Classes
    AbstractTableParser
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. val forgiving: Boolean

    Method to determine how errors are handled.

    Method to determine how errors are handled.

    returns

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

    Definition Classes
    HeadedStringTableParserTableParser
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def logFailures(rys: Iterator[Try[Row]]): Iterator[Try[Row]]

    Method to log any failures (only in forgiving mode).

    Method to log any failures (only in forgiving mode).

    rys

    the sequence of Try[Row]

    returns

    a sequence of Try[Row] which will all be of type Success.

    Attributes
    protected
    Definition Classes
    AbstractTableParserTableParser
  14. val maybeFixedHeader: Option[Header]

    This variable determines if there is a programmed, i.e.

    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 of data for an appropriate header.

    Definition Classes
    HeadedStringTableParserTableParser
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def parse(xs: Iterator[Input]): Try[Table[X]]

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

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

    xs

    the sequence of Inputs, one for each row

    returns

    a Try[Table]

    Definition Classes
    AbstractTableParserTableParser
  19. def parseRows(xs: Iterator[String], header: Header): Try[Table[X]]

    Abstract method to parse a sequence of Inputs, with a given header.

    Abstract method to parse a sequence of Inputs, with a given header.

    xs

    the sequence of Inputs, one for each row

    header

    the header to be used.

    returns

    a Try[Table]

    Definition Classes
    StringTableParserAbstractTableParser
  20. def productElementNames: Iterator[String]
    Definition Classes
    Product
  21. val rowParser: RowParser[X, String]

    Method to define a row parser.

    Method to define a row parser.

    returns

    a RowParser[Row, Input].

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

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from StringTableParser[Table[X]]

Inherited from AbstractTableParser[Table[X]]

Inherited from TableParser[Table[X]]

Inherited from AnyRef

Inherited from Any

Ungrouped