Packages

c

com.phasmidsoftware.tableparser.cats.parse

EncryptedHeadedStringTableParser

case class EncryptedHeadedStringTableParser[X, A](encryptedRowPredicate: (String) => Boolean, keyFunction: (String) => String, maybeHeader: Option[Header] = None, forgiving: Boolean = false, headerRowsToRead: Int = 1)(implicit evidence$1: CellParser[X], evidence$2: ClassTag[X], evidence$3: HexEncryption[A]) extends HeadedStringTableParser[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 for which there must be evidence of a CellParser and ClassTag.

A

the cipher algorithm (for which there must be evidence of HexEncryption[A]).

encryptedRowPredicate

a function which takes a String and returns a Boolean.

keyFunction

a function which takes a String and returns a String (input might be ignored).

maybeHeader

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

forgiving

if true, exceptions when parsing individual rows will be logged then ignored. if false, any exception will terminate the parsing. Defaults to false.

headerRowsToRead

the number of header rows expected in the input file defaults to 1.

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

Instance Constructors

  1. new EncryptedHeadedStringTableParser(encryptedRowPredicate: (String) => Boolean, keyFunction: (String) => String, maybeHeader: Option[Header] = None, forgiving: Boolean = false, headerRowsToRead: Int = 1)(implicit arg0: CellParser[X], arg1: ClassTag[X], arg2: HexEncryption[A])

    encryptedRowPredicate

    a function which takes a String and returns a Boolean.

    keyFunction

    a function which takes a String and returns a String (input might be ignored).

    maybeHeader

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

    forgiving

    if true, exceptions when parsing individual rows will be logged then ignored. if false, any exception will terminate the parsing. Defaults to false.

    headerRowsToRead

    the number of header rows expected in the input file defaults to 1.

Type Members

  1. type Input = String
    Definition Classes
    StringTableParser → TableParser
  2. type Row = X
    Definition Classes
    HeadedStringTableParser → TableParser

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]
    Attributes
    protected
    Definition Classes
    HeadedStringTableParser → TableParser
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def doParseRows(ts: Iterator[Input], header: Header, f: ((Input, Int)) => Try[Row])(implicit ev: Joinable[Input]): Try[Table[X]]
    Definition Classes
    AbstractTableParser
  8. val encryptedRowPredicate: (String) => Boolean
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. val forgiving: Boolean
    Definition Classes
    EncryptedHeadedStringTableParser → HeadedStringTableParser → TableParser
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. val headerRowsToRead: Int
    Definition Classes
    EncryptedHeadedStringTableParser → HeadedStringTableParser → TableParser
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. val keyFunction: (String) => String
  15. val maybeHeader: Option[Header]
    Definition Classes
    EncryptedHeadedStringTableParser → TableParser
  16. val multiline: Boolean
    Attributes
    protected
    Definition Classes
    TableParser
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. def parse(xs: Iterator[String], n: Int): Try[Table[X]]
    Definition Classes
    StringTableParser → AbstractTableParser → TableParser
  21. def parseIO(xr: Iterator[String], n: Int): IO[Table[X]]

    TESTME

    TESTME

    xr

    the sequence of Inputs, one for each row

    n

    the number of lines that should be used as a Header. If n == 0 == maybeHeader.empty then there is a logic error.

    returns

    an IO[Table]

  22. def parseRows(ws: Iterator[String], header: Header): Try[Table[X]]
    Definition Classes
    StringTableParser → AbstractTableParser
  23. val predicate: (Try[Row]) => Boolean
    Attributes
    protected
    Definition Classes
    TableParser
  24. def productElementNames: Iterator[String]
    Definition Classes
    Product
  25. val rowParser: RowParser[X, String]
    Definition Classes
    HeadedStringTableParser → TableParser
  26. def setForgiving(b: Boolean): TableParser[Table[X]]

    Set the value of forgiving for the plaintext TableParser.

    Set the value of forgiving for the plaintext TableParser.

    b

    true or false. See TableParser.

    returns

    a TableParser of Table[X]

    Definition Classes
    EncryptedHeadedStringTableParser → CopyableTableParser
  27. def setHeader(header: Header): TableParser[Table[X]]

    Set the Header for the plaintext TableParser.

    Set the Header for the plaintext TableParser.

    CONSIDER does this make sense to allow?

    header

    the required Header.

    returns

    a TableParser of Table[X]

    Definition Classes
    EncryptedHeadedStringTableParser → CopyableTableParser
  28. def setMultiline(b: Boolean): TableParser[Table[X]]

    Set the value of multiline for the plaintext TableParser.

    Set the value of multiline for the plaintext TableParser.

    b

    value of multiline for the plaintext TableParser. See TableParser.

    returns

    a TableParser of Table[X]

    Definition Classes
    EncryptedHeadedStringTableParser → CopyableTableParser
  29. def setPlaintextPredicate(p: (Try[X]) => Boolean): TableParser[Table[X]]

    Set the value of predicate for the plaintext TableParser.

    Set the value of predicate for the plaintext TableParser.

    p

    predicate for the plaintext TableParser.

    returns

    a TableParser of Table[X]

  30. def setPredicate(predicate: (Try[X]) => Boolean): TableParser[Table[X]]

    Set the predicate for the plaintext TableParser.

    Set the predicate for the plaintext TableParser.

    predicate

    a predicate which will be applied to each X (i.e. AFTER decryption).

    returns

    a TableParser of Table[X]

    Definition Classes
    EncryptedHeadedStringTableParser → CopyableTableParser
  31. def setRowParser(rp: RowParser[X, Input]): TableParser[Table[X]]

    Set the value of the row parser for the plaintext TableParser.

    Set the value of the row parser for the plaintext TableParser.

    rp

    the row parser for the plaintext TableParser.

    returns

    a TableParser of Table[X]

    Definition Classes
    EncryptedHeadedStringTableParser → CopyableTableParser
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

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 Serializable

Inherited from Product

Inherited from Equals

Inherited from HeadedStringTableParser[X]

Inherited from CopyableTableParser[X, String, Table[X]]

Inherited from StringTableParser[Table[X]]

Inherited from AbstractTableParser[Table[X]]

Inherited from TableParser[Table[X]]

Inherited from AnyRef

Inherited from Any

Ungrouped