Skip navigation links
com.opengamma.strata.loader.csv

## Interface TradeCsvInfoResolver

• All Known Subinterfaces:
CsvInfoResolver

public interface TradeCsvInfoResolver
Resolves additional information when parsing trade CSV files.

Data loaded from a CSV may contain additional information that needs to be captured. This plugin point allows the additional CSV columns to be parsed and captured.

• ### Method Summary

All Methods
Modifier and Type Method and Description
default FraTrade completeTrade(CsvRow row, FraTrade trade)
Completes the FRA trade, potentially parsing additional columns.
default FxSingleTrade completeTrade(CsvRow row, FxSingleTrade trade)
Completes the FX Forward trade, potentially parsing additional columns.
default SecurityTrade completeTrade(CsvRow row, SecurityTrade trade)
Completes the trade, potentially parsing additional columns.
default SwapTrade completeTrade(CsvRow row, SwapTrade trade)
Completes the FRA trade, potentially parsing additional columns.
default TermDepositTrade completeTrade(CsvRow row, TermDepositTrade trade)
Completes the trade, potentially parsing additional columns.
ReferenceData getReferenceData()
Gets the reference data being used.
static TradeCsvInfoResolver of(ReferenceData refData)
Obtains an instance that uses the specified set of reference data.
default void parseTradeInfo(CsvRow row, TradeInfoBuilder builder)
Parses attributes into TradeInfo.
static TradeCsvInfoResolver standard()
Obtains an instance that uses the standard set of reference data.
• ### Method Detail

• #### standard

static TradeCsvInfoResolver standard()
Obtains an instance that uses the standard set of reference data.
Returns:
the loader
• #### of

static TradeCsvInfoResolver of(ReferenceData refData)
Obtains an instance that uses the specified set of reference data.
Parameters:
refData - the reference data
Returns:
the loader
• #### getReferenceData

ReferenceData getReferenceData()
Gets the reference data being used.
Returns:
the reference data
• #### parseTradeInfo

default void parseTradeInfo(CsvRow row,
TradeInfoBuilder builder)
Parses attributes into TradeInfo.

If they are available, the trade ID, date, time and zone will have been set before this method is called. They may be altered if necessary, although this is not recommended.

Parameters:
row - the CSV row to parse
builder - the builder to update
• #### completeTrade

default FraTrade completeTrade(CsvRow row,
FraTrade trade)
Completes the FRA trade, potentially parsing additional columns.

This is called after the trade has been parsed and after parseTradeInfo(CsvRow, TradeInfoBuilder).

Parameters:
row - the CSV row to parse
trade - the parsed trade
Returns:
the updated trade
• #### completeTrade

default SecurityTrade completeTrade(CsvRow row,
SecurityTrade trade)
Completes the trade, potentially parsing additional columns.

This is called after the trade has been parsed and after parseTradeInfo(CsvRow, TradeInfoBuilder).

Parameters:
row - the CSV row to parse
trade - the parsed trade
Returns:
the updated trade
• #### completeTrade

default SwapTrade completeTrade(CsvRow row,
SwapTrade trade)
Completes the FRA trade, potentially parsing additional columns.

This is called after the trade has been parsed and after parseTradeInfo(CsvRow, TradeInfoBuilder).

Parameters:
row - the CSV row to parse
trade - the parsed trade
Returns:
the updated trade
• #### completeTrade

default TermDepositTrade completeTrade(CsvRow row,
TermDepositTrade trade)
Completes the trade, potentially parsing additional columns.

This is called after the trade has been parsed and after parseTradeInfo(CsvRow, TradeInfoBuilder).

Parameters:
row - the CSV row to parse
trade - the parsed trade
Returns:
the updated trade
Skip navigation links

Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.