package render
- Alphabetic
- Public
- Protected
Type Members
- abstract class BaseCsvProductGenerator[T] extends StandardCsvGenerator[T] with CsvProductGenerator[T]
Base class for generating CSV output for product types, such as case classes, by extending both
StandardCsvGeneratorandCsvProductGenerator.Base class for generating CSV output for product types, such as case classes, by extending both
StandardCsvGeneratorandCsvProductGenerator.This abstract class provides a common foundation for implementing CSV generation for specific types of products by combining the column name handling from
StandardCsvGeneratorwith the field name extraction capabilities ofCsvProductGenerator.- T
the type of the product for which this generator is responsible.
- See also
CsvAttributesfor CSV configuration options.StandardCsvGeneratorfor handling standard column name generation.CsvProductGeneratorfor field name extraction specific to product types.
- trait BaseCsvRenderer[-T] extends CsvRenderer[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).- T
the contravariant type of object to be rendered.
- trait CsvGenerator[-T] extends AnyRef
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.
- T
the contravariant type of the objects to be rendered by CSV.
- trait CsvGenerators extends AnyRef
The
CsvGeneratorsclass provides factory methods for creatingCsvGeneratorinstances for different types of data structures.The
CsvGeneratorsclass provides factory methods for creatingCsvGeneratorinstances 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.
- trait CsvProduct[-T] extends CsvRenderer[T] with CsvGenerator[T]
Type class which combines CsvRenderer and CsvGenerator
Type class which combines CsvRenderer and CsvGenerator
- T
the contravariant type of object to be rendered.
- trait CsvProductGenerator[T] extends CsvGenerator[T]
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.
- T
the type of the objects to be rendered by CSV.
- trait CsvRenderer[-T] extends Renderer[T, String]
Type class for rendering instances to CSV.
Type class for rendering instances to CSV.
- T
the contravariant type of object to be rendered.
- trait CsvRenderers extends AnyRef
Trait to define various renderers for rendering instance of case classes (with their various parameters), containers (Seq and Option), etc.
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.
- case class CsvTableFileRenderer[T](path: Path)(implicit z1: CsvRenderer[T], z2: CsvGenerator[T], csvAttributes: CsvAttributes) extends CsvTableRenderer[T, FileWriter] with Product with Serializable
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.
- T
the type of object to be rendered, must provide evidence of CsvRenderer[T] amd CsvGenerator[T].
- path
the path to which the table will be written.
- csvAttributes
implicit instance of CsvAttributes.
- abstract class CsvTableRenderer[T, O] extends Renderer[Table[T], Try[O]]
Abstract class for rendering a tabular representation of type
Table[T]to a sequentially writable formatO, 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 formatO, 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.- T
the type of elements contained within the table; must have implicit evidence for
CsvRendererandCsvGenerator.- O
the type of the writable output; must have implicit evidence for
Writable.
- case class CsvTableStringRenderer[T]()(implicit z1: CsvRenderer[T], z2: CsvGenerator[T], csvAttributes: CsvAttributes) extends CsvTableRenderer[T, StringBuilder] with Product with Serializable
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.
- T
the type of object to be rendered; must provide evidence of CsvRenderer[T] amd CsvGenerator[T].
- csvAttributes
implicit instance of CsvAttributes.
- trait HierarchicalRenderer[T] extends Renderer[T, Node]
Definition of type class HierarchicalRenderer for the purpose of serializing objects of type T.
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.
- T
the type of object to be rendered.
- Annotations
- @implicitNotFound()
- trait HierarchicalRenderers extends AnyRef
Trait to define various renderers for rendering instance of case classes (with their various parameters), containers (Seq and Option), etc.
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.
- abstract class JsonTableRenderer[T] extends Renderer[Table[T], String]
Abstract Class JsonTableRenderer, which will render a Table[T] as a JsValue.
Abstract Class JsonTableRenderer, which will render a Table[T] as a JsValue.
- T
the underlying type of the Table (i.e., the Row type) for which there must be evidence of JsonWriter[T].
- abstract class ProductCsvRenderer[T <: Product] extends BaseCsvProductGenerator[T] with BaseCsvRenderer[T] with CsvProduct[T]
Abstract class
ProductCsvRenderer[T]which extendsBaseCsvRenderer[T]andCsvGenerator[T]andCsvProduct[T]to render, as CSV, an instance of Product (typically a case class).Abstract class
ProductCsvRenderer[T]which extendsBaseCsvRenderer[T]andCsvGenerator[T]andCsvProduct[T]to render, as CSV, an instance of Product (typically a case class).- T
the contravariant type of object to be rendered.
- abstract class ProductHierarchicalRenderer[T <: Product] extends HierarchicalRenderer[T]
Abstract class ProductHierarchicalRenderer
Abstract class ProductHierarchicalRenderer
- T
the type of object to be rendered.
- trait Renderer[-T, O] extends AnyRef
Definition of trait Renderer for the purpose of serializing objects of type T as an object of type O.
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.
- T
the (contravariant) type of object to be rendered.
- O
the type of the serialization result.
- Annotations
- @implicitNotFound()
- class StandardCsvGenerator[T] extends CsvGenerator[T]
The
StandardCsvGeneratorclass extends theCsvGeneratortrait to provide functionality for generating standardized CSV output.The
StandardCsvGeneratorclass extends theCsvGeneratortrait to provide functionality for generating standardized CSV output. It utilizes implicitCsvAttributesfor configuring the delimiter and quote character used in the CSV representation.- T
the type of the objects for which this generator creates column names.
- trait TableRenderable[X] extends AnyRef
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.
- X
the underlying type of this TableRenderable.
- abstract class TaggedHierarchicalRenderer[T] extends HierarchicalRenderer[T]
Abstract class TaggedHierarchicalRenderer.
Abstract class TaggedHierarchicalRenderer.
- T
the type of object to be rendered.
- trait UntaggedHierarchicalRenderer[T] extends HierarchicalRenderer[T]
CONSIDER having style defined as an Option[String]
CONSIDER having style defined as an Option[String]
- T
the type of object to be rendered.
Value Members
- object CsvGenerator extends CsvGenerators
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 thejava.netpackage (java.net.URL), usingCsvGenerators.CsvGeneratorURL - object CsvGenerators
- object CsvRenderer extends CsvRenderers
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
CsvRendererobject is designed to define implicit instances ofCsvRendererfor specific types, allowing those types to be rendered to a CSV format string. It relies on theRenderertype class, which generalizes rendering objects of typeTinto objects of typeO(in this case, strings).This object can include predefined implicit renderers (e.g.,
Rowrenderer) that leverage attributes (Map[String, String]) to modify the output or handle special behaviors for CSV attributes. - object CsvRenderers
The
CsvRenderersobject provides a collection of implicitStandardCsvRendererimplementations for common data types.The
CsvRenderersobject provides a collection of implicitStandardCsvRendererimplementations 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. - object CsvTableFileRenderer extends Serializable
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 aFiledirectly, which is internally converted to aPath. Implicit instances ofCsvRenderer,CsvGenerator, andCsvAttributesare required to define CSV rendering logic, header generation, and formatting options. - object HierarchicalRenderer
Object
HierarchicalRendererprovides a collection of implicit instances and type definitions for theUntaggedHierarchicalRenderertrait, allowing for hierarchical serialization of various primitive and common types such asString,Boolean,Int,Long,BigInt,Double, andLocalDate.Object
HierarchicalRendererprovides a collection of implicit instances and type definitions for theUntaggedHierarchicalRenderertrait, allowing for hierarchical serialization of various primitive and common types such asString,Boolean,Int,Long,BigInt,Double, andLocalDate.These implicit objects define how to render instances of their respective types into a hierarchical structure (
Node) by extending the genericUntaggedHierarchicalRendererwhich implements theHierarchicalRendererinterface.