• java.lang.Object

• public final class RatesCurveGroupDefinitionCsvLoader
extends java.lang.Object
Loads a set of curve group definitions into memory by reading from CSV resources.

The CSV file has the following header row:
Group Name, Curve Type, Reference, Curve Name.

• The 'Group Name' column is the name of the group of curves.
• The 'Curve Type' column is the type of the curve, "forward" or "discount".
• The 'Reference' column is the reference the curve is used for, such as "USD" or "USD-LIBOR-3M".
• The 'Curve Name' column is the name of the curve.

CSV files sometimes contain a Unicode Byte Order Mark. Callers are responsible for handling this, such as by using UnicodeBom.

RatesCurveGroupDefinition
• ### Method Summary

All Methods
Modifier and Type Method Description
static java.util.List<RatesCurveGroupDefinition> loadCurveGroupDefinitions​(ResourceLocator groupsResource)
Loads the curve groups definition CSV file.
static java.util.List<RatesCurveGroupDefinition> parseCurveGroupDefinitions​(com.google.common.io.CharSource groupsCharSource)
Parses the curve groups definition CSV file.
static void writeCurveGroup​(java.io.File file, RatesCurveGroup... groups)
Writes the curve group in a CSV format to a file.
static void writeCurveGroup​(java.lang.Appendable underlying, RatesCurveGroup... groups)
Writes the curve group in a CSV format to an appendable.
static void writeCurveGroupDefinition​(java.io.File file, RatesCurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to a file.
static void writeCurveGroupDefinition​(java.lang.Appendable underlying, RatesCurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to an appendable.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Method Detail

public static java.util.List<RatesCurveGroupDefinition> loadCurveGroupDefinitions​(ResourceLocator groupsResource)
Loads the curve groups definition CSV file.

The list of NodalCurveDefinition will be empty in the resulting definition.

Parameters:
groupsResource - the curve groups CSV resource
Returns:
the list of definitions
• #### parseCurveGroupDefinitions

public static java.util.List<RatesCurveGroupDefinition> parseCurveGroupDefinitions​(com.google.common.io.CharSource groupsCharSource)
Parses the curve groups definition CSV file.

The list of NodalCurveDefinition will be empty in the resulting definition.

Parameters:
groupsCharSource - the curve groups CSV character source
Returns:
the list of definitions
• #### writeCurveGroupDefinition

public static void writeCurveGroupDefinition​(java.io.File file,
RatesCurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to a file.
Parameters:
file - the destination for the CSV, such as a file
groups - the curve groups
• #### writeCurveGroupDefinition

public static void writeCurveGroupDefinition​(java.lang.Appendable underlying,
RatesCurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to an appendable.
Parameters:
underlying - the underlying appendable destination
groups - the curve groups
• #### writeCurveGroup

public static void writeCurveGroup​(java.io.File file,
RatesCurveGroup... groups)
Writes the curve group in a CSV format to a file.
Parameters:
file - the file
groups - the curve groups
• #### writeCurveGroup

public static void writeCurveGroup​(java.lang.Appendable underlying,
RatesCurveGroup... groups)
Writes the curve group in a CSV format to an appendable.
Parameters:
underlying - the underlying appendable destination
groups - the curve groups