com.phasmidsoftware.tableparser.core.render
Members list
Packages
Type members
Classlikes
Base class for generating CSV output for product types, such as case classes, by extending both StandardCsvGenerator and CsvProductGenerator.
Base class for generating CSV output for product types, such as case classes, by extending both StandardCsvGenerator and CsvProductGenerator.
This abstract class provides a common foundation for implementing CSV generation for specific types of products by combining the column name handling from StandardCsvGenerator with the field name extraction capabilities of CsvProductGenerator.
Type parameters
- T
-
the type of the product for which this generator is responsible.
Value parameters
- ca
-
an implicit parameter providing an instance of
CsvAttributes, which defines the configuration for the CSV generation, such as the delimiter and quote character.
Attributes
- See also
-
CsvAttributesfor CSV configuration options.StandardCsvGeneratorfor handling standard column name generation.CsvProductGeneratorfor field name extraction specific to product types. - Supertypes
-
trait CsvProductGenerator[T]class StandardCsvGenerator[T]trait CsvGenerator[T]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ProductCsvGenerator[T]class ProductCsvProduct[T]
Trait BaseCsvRenderer[-T] which extends CsvRenderer[T] to render, as CSV, an instance of Product (typically a case class).
Trait BaseCsvRenderer[-T] which extends CsvRenderer[T] to render, as CSV, an instance of Product (typically a case class).
Type parameters
- T
-
the contravariant type of object to be rendered.
Attributes
- Supertypes
- Known subtypes
-
class ProductCsvProduct[T]class ProductCsvRenderer[T]
Companion object for the CsvGenerator type class providing implicit instances for various types.
Companion object for the CsvGenerator type class providing implicit instances for various types.
The implicit generators defined here are standard implementations used to generate CSV headers for specific data types. These generators are derived from predefined instances in the CsvGenerators object.
Implicit instances:
- Integer values (
Int), usingCsvGenerators.CsvGeneratorInt - String values (
String), usingCsvGenerators.CsvGeneratorString - Boolean values (
Boolean), usingCsvGenerators.CsvGeneratorBoolean - Double-precision floating-point numbers (
Double), usingCsvGenerators.CsvGeneratorDouble - Arbitrarily large integers (
BigInt), usingCsvGenerators.CsvGeneratorBigInt - Long integer values (
Long), usingCsvGenerators.CsvGeneratorLong - URL values from the
java.netpackage (java.net.URL), usingCsvGenerators.CsvGeneratorURL
Attributes
- Companion
- trait
- Supertypes
- Self type
-
CsvGenerator.type
Trait (typeclass) for generating headers for CSV output.
Trait (typeclass) for generating headers for CSV output.
CONSIDER why do we need this? It takes a lot of effort to set up, which is essentially the same as for CsvRenderer[T].
NOTE: this is an unusual type class in that none of its methods reference type T.
Type parameters
- T
-
the contravariant type of the objects to be rendered by CSV.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CsvProduct[T]class ProductCsvProduct[T]trait CsvProductGenerator[T]class BaseCsvProductGenerator[T]class ProductCsvGenerator[T]class StandardCsvGenerator[T]object CsvGeneratorBigIntobject CsvGeneratorBooleanobject CsvGeneratorByteobject CsvGeneratorDoubleobject CsvGeneratorFloatobject CsvGeneratorInstantobject CsvGeneratorIntobject CsvGeneratorLocalDateobject CsvGeneratorLongobject CsvGeneratorShortobject CsvGeneratorStringobject CsvGeneratorURLShow all
The CsvGenerators class provides factory methods for creating CsvGenerator instances for different types of data structures. These generators can be used to serialize data into CSV (Comma-Separated Values) format.
The CsvGenerators class provides factory methods for creating CsvGenerator instances for different types of data structures. These generators can be used to serialize data into CSV (Comma-Separated Values) format.
The class includes methods to handle sequences, options, individual types, and products (case classes with varying numbers of fields). It supports up to 6-ary product types, allowing for type inference and customization of CSV behavior.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object AttributeSetobject CsvGenerator
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CsvGenerators.type
Type class which combines CsvRenderer and CsvGenerator
Type class which combines CsvRenderer and CsvGenerator
Type parameters
- T
-
the contravariant type of object to be rendered.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class ProductCsvProduct[T]
Companion object for CsvProduct, which renders a case class and generates its column names.
Companion object for CsvProduct, which renders a case class and generates its column names.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CsvProduct.type
Trait (typeclass) for generating headers for CSV output.
Trait (typeclass) for generating headers for CSV output.
NOTE: this is an unusual type class in that none of its methods reference type T.
Type parameters
- T
-
the type of the objects to be rendered by CSV.
Attributes
- Supertypes
- Known subtypes
Type class for rendering instances to CSV.
Type class for rendering instances to CSV.
Type parameters
- T
-
the contravariant type of object to be rendered.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
trait BaseCsvRenderer[T]class ProductCsvProduct[T]class ProductCsvRenderer[T]trait CsvProduct[T]object CsvRendererRowobject CsvRendererInstantclass StandardCsvRenderer[T]object CsvRendererBooleanobject CsvRendererByteobject CsvRendererDoubleobject CsvRendererFloatobject CsvRendererIntobject CsvRendererLongobject CsvRendererShortobject CsvRendererStringobject CsvRendererURLShow all
An object that provides type class support for rendering data as CSV (Comma-Separated Values).
An object that provides type class support for rendering data as CSV (Comma-Separated Values).
The CsvRenderer object is designed to define implicit instances of CsvRenderer for specific types, allowing those types to be rendered to a CSV format string. It relies on the Renderer type class, which generalizes rendering objects of type T into objects of type O (in this case, strings).
This object can include predefined implicit renderers (e.g., Row renderer) that leverage attributes (Map[String, String]) to modify the output or handle special behaviors for CSV attributes.
Attributes
- Companion
- trait
- Supertypes
- Self type
-
CsvRenderer.type
The CsvRenderers object provides a collection of implicit StandardCsvRenderer implementations for common data types. These renderers are used to convert data of specific types into CSV (Comma-Separated Values) format according to the defined rendering logic.
The CsvRenderers object provides a collection of implicit StandardCsvRenderer implementations for common data types. These renderers are used to convert data of specific types into CSV (Comma-Separated Values) format according to the defined rendering logic.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CsvRenderers.type
Trait to define various renderers for rendering instance of case classes (with their various parameters), containers (Seq and Option), etc. to CSV output.
Trait to define various renderers for rendering instance of case classes (with their various parameters), containers (Seq and Option), etc. to CSV output.
CONSIDER a mechanism to ensure that objects involving case classes are presented in the same order as specified by the header.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object AttributeSetobject CsvRenderer
Singleton companion object providing a factory method to create instances of CsvTableFileRenderer.
Singleton companion object providing a factory method to create instances of CsvTableFileRenderer.
This object simplifies the instantiation of CsvTableFileRenderer, allowing the user to provide a File directly, which is internally converted to a Path. Implicit instances of CsvRenderer, CsvGenerator, and CsvAttributes are required to define CSV rendering logic, header generation, and formatting options.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CsvTableFileRenderer.type
Case class to help render a Table to a File in CSV format.
Case class to help render a Table to a File in CSV format.
TODO merge this with CsvTableEncryptedFileRenderer to avoid duplicate code.
Type parameters
- T
-
the type of object to be rendered, must provide evidence of CsvRenderer[T] amd CsvGenerator[T].
Value parameters
- csvAttributes
-
implicit instance of CsvAttributes.
- path
-
the path to which the table will be written.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Abstract class for rendering a tabular representation of type Table[T] to a sequentially writable format O, such as CSV, while utilizing implicit type classes for rendering cells and generating column names.
Abstract class for rendering a tabular representation of type Table[T] to a sequentially writable format O, such as CSV, while utilizing implicit type classes for rendering cells and generating column names.
This class simplifies the conversion of tabular data (Table[T]) into a structured format (O) with support for customization through attributes and allows seamless integration with CSV-specific typeclasses.
Type parameters
- O
-
the type of the writable output; must have implicit evidence for
Writable. - T
-
the type of elements contained within the table; must have implicit evidence for
CsvRendererandCsvGenerator.
Attributes
- Supertypes
- Known subtypes
-
class CsvTableFileRenderer[T]class CsvTableStringRenderer[T]
Case class to help render a Table to a StringBuilder in CSV format.
Case class to help render a Table to a StringBuilder in CSV format.
Type parameters
- T
-
the type of object to be rendered; must provide evidence of CsvRenderer[T] amd CsvGenerator[T].
Value parameters
- csvAttributes
-
implicit instance of CsvAttributes.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Definition of type class HierarchicalRenderer for the purpose of serializing objects of type T. Since, in general, T will be a case class which may include parameters which are case classes, we render to a hierarchical type: Node.
Definition of type class HierarchicalRenderer for the purpose of serializing objects of type T. Since, in general, T will be a case class which may include parameters which are case classes, we render to a hierarchical type: Node.
Type parameters
- T
-
the type of object to be rendered.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class ProductHierarchicalRenderer[T]class ProductFieldsHierarchicalRenderer[T]class TaggedHierarchicalRenderer[T]trait UntaggedHierarchicalRenderer[T]object BigIntHierarchicalRendererobject BooleanHierarchicalRendererobject DoubleHierarchicalRenderertrait IntHierarchicalRendererobject IntHierarchicalRenderertrait LongHierarchicalRendererobject LongHierarchicalRendererobject StringHierarchicalRendererShow all
Object HierarchicalRenderer provides a collection of implicit instances and type definitions for the UntaggedHierarchicalRenderer trait, allowing for hierarchical serialization of various primitive and common types such as String, Boolean, Int, Long, BigInt, Double, and LocalDate.
Object HierarchicalRenderer provides a collection of implicit instances and type definitions for the UntaggedHierarchicalRenderer trait, allowing for hierarchical serialization of various primitive and common types such as String, Boolean, Int, Long, BigInt, Double, and LocalDate.
These implicit objects define how to render instances of their respective types into a hierarchical structure (Node) by extending the generic UntaggedHierarchicalRenderer which implements the HierarchicalRenderer interface.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HierarchicalRenderer.type
Trait to define various renderers for rendering instance of case classes (with their various parameters), containers (Seq and Option), etc. to hierarchical output elements such as XML or HTML.
Trait to define various renderers for rendering instance of case classes (with their various parameters), containers (Seq and Option), etc. to hierarchical output elements such as XML or HTML.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
The CsvGenerator of a case class T, as derived by CsvGenerator.derived.
The CsvGenerator of a case class T, as derived by CsvGenerator.derived.
Type parameters
- T
-
the type of the case class.
Value parameters
- ca
-
the CsvAttributes.
- fieldGenerators
-
the CsvGenerators of the fields of T, in the same order.
- fieldNames
-
the names of the fields of T, in declaration order.
- helper
-
the ColumnHelper[T], which gives the column name of each field.
Attributes
- Supertypes
-
class BaseCsvProductGenerator[T]trait CsvProductGenerator[T]class StandardCsvGenerator[T]trait CsvGenerator[T]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ProductCsvProduct[T]
The CsvProduct of a case class T, as derived by CsvProduct.derived: a ProductCsvGenerator which is also a CsvRenderer.
The CsvProduct of a case class T, as derived by CsvProduct.derived: a ProductCsvGenerator which is also a CsvRenderer.
Type parameters
- T
-
the type of the case class.
Value parameters
- ca
-
the CsvAttributes.
- fieldGenerators
-
the CsvGenerators of the fields of T, in the same order.
- fieldNames
-
the names of the fields of T, in declaration order.
- fieldRenderers
-
the CsvRenderers of the fields of T, in the same order.
- helper
-
the ColumnHelper[T].
Attributes
- Supertypes
-
trait CsvProduct[T]trait BaseCsvRenderer[T]trait CsvRenderer[T]class ProductCsvGenerator[T]class BaseCsvProductGenerator[T]trait CsvProductGenerator[T]class StandardCsvGenerator[T]trait CsvGenerator[T]class Objecttrait Matchableclass AnyShow all
The CsvRenderer of a case class T, as derived by CsvRenderer.derived. Each field is rendered by its own CsvRenderer, and the results are separated by the delimiter.
The CsvRenderer of a case class T, as derived by CsvRenderer.derived. Each field is rendered by its own CsvRenderer, and the results are separated by the delimiter.
Type parameters
- T
-
the type of the case class.
Value parameters
- ca
-
the CsvAttributes.
- fieldRenderers
-
the CsvRenderers of the fields of T, in declaration order.
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProductCsvRenderer.type
The HierarchicalRenderer of a case class T, as derived by HierarchicalRenderer.derived.
The HierarchicalRenderer of a case class T, as derived by HierarchicalRenderer.derived.
Type parameters
- T
-
the type of the case class.
Value parameters
- attrs
-
the base attributes of the node for a T.
- fieldNames
-
the names of the fields of T, in declaration order.
- fieldRenderers
-
the HierarchicalRenderers of the fields of T, in the same order.
- style
-
the style of the node for a T.
Attributes
- Supertypes
-
class ProductHierarchicalRenderer[T]trait HierarchicalRenderer[T]class Objecttrait Matchableclass AnyShow all
Abstract class ProductHierarchicalRenderer
Abstract class ProductHierarchicalRenderer
Type parameters
- T
-
the type of object to be rendered.
Value parameters
- baseAttrs
-
baseAttrs (a Map[String, String]
- style
-
the style (a String)
Attributes
- Supertypes
- Known subtypes
-
class ProductFieldsHierarchicalRenderer[T]
Definition of trait Renderer for the purpose of serializing objects of type T as an object of type O. This trait may be used as a type class for either T or O (or both).
Definition of trait Renderer for the purpose of serializing objects of type T as an object of type O. This trait may be used as a type class for either T or O (or both).
NOTE: this trait has no direct relationship with TableRenderable.
Type parameters
- O
-
the type of the serialization result.
- T
-
the (contravariant) type of object to be rendered.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CsvRenderer[T]trait BaseCsvRenderer[T]class ProductCsvProduct[T]class ProductCsvRenderer[T]trait CsvProduct[T]object CsvRendererRowobject CsvRendererInstantclass StandardCsvRenderer[T]object CsvRendererBooleanobject CsvRendererByteobject CsvRendererDoubleobject CsvRendererFloatobject CsvRendererIntobject CsvRendererLongobject CsvRendererShortobject CsvRendererStringobject CsvRendererURLclass CsvTableFileRenderer[T]class CsvTableStringRenderer[T]trait HierarchicalRenderer[T]class ProductHierarchicalRenderer[T]class ProductFieldsHierarchicalRenderer[T]class TaggedHierarchicalRenderer[T]trait UntaggedHierarchicalRenderer[T]object BigIntHierarchicalRendererobject BooleanHierarchicalRendererobject DoubleHierarchicalRenderertrait IntHierarchicalRendererobject IntHierarchicalRenderertrait LongHierarchicalRendererobject LongHierarchicalRendererobject StringHierarchicalRendererclass JsonTableRenderer[T]Show all
The StandardCsvGenerator class extends the CsvGenerator trait to provide functionality for generating standardized CSV output. It utilizes implicit CsvAttributes for configuring the delimiter and quote character used in the CSV representation.
The StandardCsvGenerator class extends the CsvGenerator trait to provide functionality for generating standardized CSV output. It utilizes implicit CsvAttributes for configuring the delimiter and quote character used in the CSV representation.
Type parameters
- T
-
the type of the objects for which this generator creates column names.
Value parameters
- ca
-
an implicit instance of
CsvAttributeswhich defines the delimiter and quote character.
Attributes
- Constructor
-
Creates a new
StandardCsvGeneratorinstance with implicitCsvAttributesproviding the configuration for CSV generation. - Supertypes
- Known subtypes
-
class BaseCsvProductGenerator[T]class ProductCsvGenerator[T]class ProductCsvProduct[T]object CsvGeneratorBigIntobject CsvGeneratorBooleanobject CsvGeneratorByteobject CsvGeneratorDoubleobject CsvGeneratorFloatobject CsvGeneratorInstantobject CsvGeneratorIntobject CsvGeneratorLocalDateobject CsvGeneratorLongobject CsvGeneratorShortobject CsvGeneratorStringobject CsvGeneratorURLShow all
Polymorphic trait which defines the behavior of some sort of collection with an underlying type X and which can be rendered.
Polymorphic trait which defines the behavior of some sort of collection with an underlying type X and which can be rendered.
CONSIDER: do we really need this trait? This trait is not, strictly speaking, a typeclass because X does not appear as a parameter or result of any of the methods. However, it cannot be sealed which implies that it is used as a typeclass.
NOTE: this trait has no direct relationship with Renderer. CONSIDER a refactoring of the whole set of traits.
Type parameters
- X
-
the underlying type of this TableRenderable.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Abstract class TaggedHierarchicalRenderer.
Abstract class TaggedHierarchicalRenderer.
Type parameters
- T
-
the type of object to be rendered.
Value parameters
- baseAttrs
-
baseAttrs (a Map[String, String]
- style
-
the style (a String)
Attributes
- Supertypes
CONSIDER having style defined as an Option[String]
CONSIDER having style defined as an Option[String]
Type parameters
- T
-
the type of object to be rendered.
Attributes
- Supertypes
- Known subtypes
-
object BigIntHierarchicalRendererobject BooleanHierarchicalRendererobject DoubleHierarchicalRenderertrait IntHierarchicalRendererobject IntHierarchicalRenderertrait LongHierarchicalRendererobject LongHierarchicalRendererobject StringHierarchicalRendererShow all