Interface FpmlParserPlugin

  • All Superinterfaces:
    Named

    public interface FpmlParserPlugin
    extends Named
    Pluggable FpML trade parser.

    Implementations of this interface parse an FpML trade element, including any trade header. The FpmlDocument instance provides many useful helper methods.

    See FpmlDocumentParser for the main entry point for FpML parsing.

    • Method Detail

      • extendedEnum

        static ExtendedEnum<FpmlParserPlugin> extendedEnum()
        Gets the extended enum helper.

        This helper allows instances of the parser to be looked up. It also provides the complete set of available instances.

        Returns:
        the extended enum helper
      • parseTrade

        Trade parseTrade​(FpmlDocument document,
                         XmlElement tradeEl)
        Parses a single FpML format trade.

        This parses a trade from the given XML element. Details of the whole document and parser helper methods are provided.

        It is intended that this method is only called when the specified trade element contains a child element of the correct type for this parser.

        Parameters:
        document - the document-wide information and parser helper
        tradeEl - the trade element to parse
        Returns:
        the trade object
        Throws:
        RuntimeException - if unable to parse
      • getName

        String getName()
        Gets the name that uniquely identifies this parser.

        The name must be the name of the product element in FpML that is to be parsed. For example, 'fra', 'swap' or 'fxSingleLeg'.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Named
        Returns:
        the unique name