public final class IidmXmlUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IidmXmlUtil.ErrorMessage |
Modifier and Type | Method and Description |
---|---|
static <C extends AbstractNetworkXmlContext> |
assertMaximumVersion(String rootElementName,
String elementName,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion maxVersion,
C context)
Assert that the context's IIDM-XML version equals or is less recent than a given IIDM-XML version.
|
static <C extends AbstractNetworkXmlContext> |
assertMinimumVersion(String rootElementName,
String elementName,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion minVersion,
C context)
Assert that the context's IIDM-XML version equals or is more recent than a given IIDM-XML version.
|
static <C extends AbstractNetworkXmlContext> |
assertMinimumVersionAndRunIfNotDefault(boolean valueIsNotDefault,
String rootElementName,
String elementName,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion minVersion,
C context,
Runnable runnable)
Assert that the context's IIDM-XML version equals or is more recent than a given IIDM-XML version if the value of an attribute or the state of an equipment
is not default (interpretable for previous versions).
|
static <C extends AbstractNetworkXmlContext> |
assertMinimumVersionIfNotDefault(boolean valueIsNotDefault,
String rootElementName,
String elementName,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion minVersion,
C context)
Assert that the context's IIDM-XML version equals or is more recent than a given IIDM-XML version if the value of an attribute or the state of an equipment
is not default (interpretable for previous versions).
|
static <C extends AbstractNetworkXmlContext> |
assertStrictMaximumVersion(String rootElementName,
String elementName,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion maxVersion,
C context)
Assert that the context's IIDM-XML version is strictly older than a given IIDM-XML version.
|
static <C extends AbstractNetworkXmlContext> |
runFromMinimumVersion(IidmXmlVersion minVersion,
C context,
Runnable runnable)
Run a given runnable if the context's IIDM-XML version equals or is more recent than a given minimum IIDM-XML version.
|
static <C extends AbstractNetworkXmlContext> |
runUntilMaximumVersion(IidmXmlVersion maxVersion,
C context,
Runnable runnable)
Run a given runnable if the context's IIDM-XML version equals or is older than a given maximum IIDM-XML version.
|
static void |
writeBooleanAttributeFromMinimumVersion(String rootElementName,
String attributeName,
boolean value,
boolean defaultValue,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion minVersion,
NetworkXmlWriterContext context)
Write a mandatory boolean attribute from a given minimum IIDM-XML version.
|
static void |
writeDoubleAttributeFromMinimumVersion(String rootElementName,
String attributeName,
double value,
double defaultValue,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion minVersion,
NetworkXmlWriterContext context)
Write a double attribute from a given minimum IIDM-XML version if its value is defined.
|
static void |
writeDoubleAttributeFromMinimumVersion(String rootElementName,
String attributeName,
double value,
IidmXmlUtil.ErrorMessage type,
IidmXmlVersion minVersion,
NetworkXmlWriterContext context)
Write a double attribute from a given minimum IIDM-XML version if its value is defined.
|
static void |
writeIntAttributeUntilMaximumVersion(String attributeName,
int value,
IidmXmlVersion maxVersion,
NetworkXmlWriterContext context)
Write a mandatory int attribute until a given maximum IIDM-XML version.
|
public static <C extends AbstractNetworkXmlContext> void assertMaximumVersion(String rootElementName, String elementName, IidmXmlUtil.ErrorMessage type, IidmXmlVersion maxVersion, C context)
public static <C extends AbstractNetworkXmlContext> void assertMinimumVersion(String rootElementName, String elementName, IidmXmlUtil.ErrorMessage type, IidmXmlVersion minVersion, C context)
public static <C extends AbstractNetworkXmlContext> void assertMinimumVersionIfNotDefault(boolean valueIsNotDefault, String rootElementName, String elementName, IidmXmlUtil.ErrorMessage type, IidmXmlVersion minVersion, C context)
public static <C extends AbstractNetworkXmlContext> void assertMinimumVersionAndRunIfNotDefault(boolean valueIsNotDefault, String rootElementName, String elementName, IidmXmlUtil.ErrorMessage type, IidmXmlVersion minVersion, C context, Runnable runnable)
public static <C extends AbstractNetworkXmlContext> void assertStrictMaximumVersion(String rootElementName, String elementName, IidmXmlUtil.ErrorMessage type, IidmXmlVersion maxVersion, C context)
public static <C extends AbstractNetworkXmlContext> void runFromMinimumVersion(IidmXmlVersion minVersion, C context, Runnable runnable)
public static <C extends AbstractNetworkXmlContext> void runUntilMaximumVersion(IidmXmlVersion maxVersion, C context, Runnable runnable)
public static void writeBooleanAttributeFromMinimumVersion(String rootElementName, String attributeName, boolean value, boolean defaultValue, IidmXmlUtil.ErrorMessage type, IidmXmlVersion minVersion, NetworkXmlWriterContext context)
public static void writeDoubleAttributeFromMinimumVersion(String rootElementName, String attributeName, double value, IidmXmlUtil.ErrorMessage type, IidmXmlVersion minVersion, NetworkXmlWriterContext context)
public static void writeDoubleAttributeFromMinimumVersion(String rootElementName, String attributeName, double value, double defaultValue, IidmXmlUtil.ErrorMessage type, IidmXmlVersion minVersion, NetworkXmlWriterContext context)
public static void writeIntAttributeUntilMaximumVersion(String attributeName, int value, IidmXmlVersion maxVersion, NetworkXmlWriterContext context) throws XMLStreamException
XMLStreamException
Copyright © 2020. All rights reserved.