- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface FpmlTradeInfoParserPlugin
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description
parseTrade(FpmlDocument document, java.time.LocalDate tradeDate, com.google.common.collect.ListMultimap<java.lang.String,StandardId> allTradeIds)Parses trade information from the FpML document.
standard()Returns the standard parser plugin that parses the trade date and the first identifier of "our" party.
static FpmlTradeInfoParserPlugin standard()
- the standard trade info parser
TradeInfoBuilder parseTrade(FpmlDocument document, java.time.LocalDate tradeDate, com.google.common.collect.ListMultimap<java.lang.String,StandardId> allTradeIds)Parses trade information from the FpML document.
This parses any trade info that is desired from the specified FpML document. Details of the whole document and parser helper methods are provided. Typically such parsing will require accessing the
<tradeHeader>element from the root FpML element in the document.
Since most implementations will need the trade date and a trade identifier, these are pre-parsed before the method is invoked. The parties associated with the party href id can be obtained from the document.
A new instance of the builder must be returned each time the method is invoked. The builder is returned to allow the counterparty to be added by the
FpmlParserPluginimplementation based on the trade direction.
tradeDate- the trade date from the document
allTradeIds- the collection of trade identifiers in the document, keyed by party href id
document- the document-wide information and parser helper
- the trade info object
java.lang.RuntimeException- if unable to parse