java.lang.Object
net.finmath.modelling.descriptor.xmlparser.FIPXMLParser
- All Implemented Interfaces:
XMLParser
Class for parsing trades saved in FIPXML to product descriptors.
- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct the parser with default parameters.FIPXMLParser(boolean agentIsBuyer, String discountCurveName)Construct the parser. -
Method Summary
Modifier and TypeMethodDescriptiongetProductDescriptor(File file)Parse a product descriptor from a file.getSwapProductDescriptor(File file)Parse a product descriptor from a file containing a swap trade.
-
Constructor Details
-
FIPXMLParser
public FIPXMLParser()Construct the parser with default parameters. I.e. agent is buyer. Name of discount curve will be taken from file. -
FIPXMLParser
Construct the parser.- Parameters:
agentIsBuyer- Boolean indicating whether valuation is done from the buyers perspective.discountCurveName- Name of the discount curve to be assigned to the descriptor. If set to null or left blank the parser will try to determine this from the file.
-
-
Method Details
-
getProductDescriptor
public ProductDescriptor getProductDescriptor(File file) throws SAXException, IOException, ParserConfigurationExceptionDescription copied from interface:XMLParserParse a product descriptor from a file.- Specified by:
getProductDescriptorin 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.
-
getSwapProductDescriptor
public InterestRateSwapProductDescriptor getSwapProductDescriptor(File file) throws SAXException, IOException, ParserConfigurationExceptionParse a product descriptor from a file containing a swap trade.- Parameters:
file- File containing a swap 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.
-