java.lang.Object
net.finmath.modelling.descriptor.xmlparser.FPMLParser
- All Implemented Interfaces:
XMLParser
Class for parsing trades saved in FpML to product descriptors.
- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
ConstructorsConstructorDescriptionFPMLParser(String homePartyId, String discountCurveName)
Construct the parser.FPMLParser(String homePartyId, String forwardCurveName, String discountCurveName)
Construct the parser. -
Method Summary
Modifier and TypeMethodDescriptiongetProductDescriptor(File file)
Parse a product descriptor from a file.getProductDescriptor(Node node)
Generates a product descriptor from an already existing Document.
-
Constructor Details
-
FPMLParser
Construct the parser.- Parameters:
homePartyId
- Id of the agent doing the valuation.forwardCurveName
- Name of the forward curve to be given to the descriptors.discountCurveName
- Name of the discount curve to be given to the descriptors.
-
FPMLParser
Construct the parser.- Parameters:
homePartyId
- Id of the agent doing the valuation.discountCurveName
- Name of the discount curve to be given to the descriptors.
-
-
Method Details
-
getProductDescriptor
public ProductDescriptor getProductDescriptor(File file) throws SAXException, IOException, ParserConfigurationExceptionDescription copied from interface:XMLParser
Parse a product descriptor from a file.- Specified by:
getProductDescriptor
in interfaceXMLParser
- Parameters:
file
- File containing a trade.- Returns:
- Product descriptor extracted from the file.
- Throws:
SAXException
- Thrown by the xml parser.IOException
- Thrown if the file in not found or another IO error occured.ParserConfigurationException
- Thrown by the xml parser.
-
getProductDescriptor
Generates a product descriptor from an already existing Document.- Parameters:
node
- The leaf node where the product description starts in the XML.- Returns:
- ProductDescriptor
- Throws:
IllegalArgumentException
- Thrown id the document is not an FpML 5 document.
-