Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package phasmidsoftware
    Definition Classes
    com
  • package tableparser
    Definition Classes
    phasmidsoftware
  • package core
    Definition Classes
    tableparser
  • package examples
    Definition Classes
    core
  • object Movie extends CellParsers with CsvGenerators with CsvRenderers with Serializable

    The Movie object provides functionality for generating CSV representations of Movie instances.

    The Movie object provides functionality for generating CSV representations of Movie instances. It utilizes the CsvGenerators framework to define and create CSV generators for the various fields and nested components of the Movie class, as well as the Movie class itself.

    Overview

    The Movie object contains the following key elements:

    - **csvGenerators**: An instance of CsvGenerators that provides predefined CSV generators for standard data types such as Boolean, Int, Double, and String. It serves as the foundation for custom CSV generators.

    - **createMovieCvsGenerator**: A method that constructs a CsvGenerator specific to the Movie class. This generator supports serialization of Movie instances into CSV format, accounting for nested data structures and optional values.

    Dependencies

    This object imports the following from com.phasmidsoftware.tableparser.core.render.CsvGenerators: - Predefined implicit CSV generators for basic data types and utilities for creating additional generators.

    Key Method Descriptions

    - createMovieCvsGenerator:

    • Constructs and returns a CsvGenerator[Movie], facilitating the generation of CSV rows for Movie objects.
    • Custom generators are defined for various components of the Movie class, including:
      • StringList: A sequence of strings.
      • Option[Double]: Optional Double values.
      • Option[Int]: Optional Int values.
      • Option[String]: Optional String values.
      • Format: A case class representing the format of a Movie.
      • Production: A case class holding details about a Movie's production.
      • Rating: Represents a case class for the rating information of a Movie.
      • Reviews: A case class containing detailed review information.
      • Name: A case class for principal names.
      • Principal: A case class for individuals associated with a Movie.
      • Option[Principal]: An optional Principal.
      • AttributeSet: A case class for sets of attributes such as genres or plot keywords.
    • The resulting CsvGenerator[Movie] aggregates these component-level generators to enable CSV serialization of the entire Movie object.

    Usage

    To generate a CSV representation of Movie objects: 1. Invoke the createMovieCvsGenerator method within this object to obtain the appropriate CsvGenerator[Movie]. 2. Use the generated CsvGenerator to serialize a Movie instance into a CSV format.

    This utility is especially useful for exporting Movie data into a structured format, such as for persistence or integration with external systems that require CSV data.

    Example

    val movieCsvGenerator = Movie.createMovieCvsGenerator
    val movie = Movie("Inception", Format(...), Production(...), Reviews(...), ...)
    val csvRepresentation = movieCsvGenerator.generate(movie)
    Definition Classes
    examples
    Annotations
    @deprecated
    Deprecated

    (Since version 1.7.0) Example code: it moves out of the library, into the tests, in 2.0.0

  • MovieConfig
  • MovieRowProcessor
  • MovieTableParser

implicit object MovieConfig extends DefaultRowConfig

An implicit object extending DefaultRowConfig, used for customizing the configuration settings for parsing rows in the context of the MovieParser class.

The MovieConfig object overrides the default listEnclosure property to use an empty string ("") instead of the default {}. This customization may imply that no special characters are used to enclose lists in this parsing configuration.

See also

DefaultRowConfig

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MovieConfig
  2. DefaultRowConfig
  3. RowConfig
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. val delimiter: Regex

    the delimiter Regex (see LineParser).

    the delimiter Regex (see LineParser). defaults to ", *".r, i.e., a comma followed by any n=umber of spaces.*

    Definition Classes
    DefaultRowConfig → RowConfig
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. val listEnclosure: String

    the "listEnclosure" characters (see LineParser).

    the "listEnclosure" characters (see LineParser). defaults to "{}"

    Definition Classes
    MovieConfig → DefaultRowConfig → RowConfig
  13. val listSep: Char

    the "listSep" character (see LineParser).

    the "listSep" character (see LineParser). defaults to "|"

    Definition Classes
    DefaultRowConfig → RowConfig
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. val quote: Char

    the "quote" Char (see LineParser).

    the "quote" Char (see LineParser). defaults to ".

    Definition Classes
    DefaultRowConfig → RowConfig
  18. val string: Regex

    the "string" Regex (see LineParser).

    the "string" Regex (see LineParser). defaults to "\w+".r, i.e., at least one word character. CONSIDER making the string regex derive from the delimiter

    Definition Classes
    DefaultRowConfig → RowConfig
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    RowConfig → AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. 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 DefaultRowConfig

Inherited from RowConfig

Inherited from AnyRef

Inherited from Any

Ungrouped