Class Utils
java.lang.Object
io.openems.edge.timeofusetariff.entsoe.Utils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
parseCurrency
(String xml) Parses the XML response from the Entso-E API to extract the currency associated with the prices.protected static TimeOfUsePrices
parsePrices
(String xml, String resolution, double exchangeRate) Parses the XML response from the Entso-E API to get the Day-Ahead prices.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
parsePrices
protected static TimeOfUsePrices parsePrices(String xml, String resolution, double exchangeRate) throws ParserConfigurationException, SAXException, IOException Parses the XML response from the Entso-E API to get the Day-Ahead prices.- Parameters:
xml
- The XML string to be parsed.resolution
- PT15M or PT60MexchangeRate
- The exchange rate of user currency to EUR.- Returns:
- The
TimeOfUsePrices
- Throws:
ParserConfigurationException
- on error.SAXException
- on errorIOException
- on error
-
parseCurrency
protected static String parseCurrency(String xml) throws ParserConfigurationException, SAXException, IOException Parses the XML response from the Entso-E API to extract the currency associated with the prices.- Parameters:
xml
- The XML string to be parsed.- Returns:
- The currency string.
- Throws:
ParserConfigurationException
- on error.SAXException
- on errorIOException
- on error
-