Package com.powsybl.iidm.xml
Class AbstractConnectableXml<T extends Connectable,A extends IdentifiableAdder<A>,P extends Container>
- java.lang.Object
-
- com.powsybl.iidm.xml.AbstractConnectableXml<T,A,P>
-
- Direct Known Subclasses:
LccConverterStationXml
,StaticVarCompensatorXml
public abstract class AbstractConnectableXml<T extends Connectable,A extends IdentifiableAdder<A>,P extends Container> extends Object
- Author:
- Geoffroy Jamgotchian
-
-
Constructor Summary
Constructors Constructor Description AbstractConnectableXml()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract A
createAdder(P parent)
protected abstract String
getRootElementName()
protected abstract boolean
hasSubElements(T identifiable)
protected boolean
hasSubElements(T identifiable, NetworkXmlWriterContext context)
protected static boolean
hasValidOperationalLimits(Branch<?> branch, NetworkXmlWriterContext context)
protected static boolean
hasValidOperationalLimits(FlowsLimitsHolder limitsHolder, NetworkXmlWriterContext context)
protected boolean
isValid(T identifiable, P parent)
void
read(P parent, NetworkXmlReaderContext context)
static void
readActivePowerLimits(Integer index, ActivePowerLimitsAdder activePowerLimitsAdder, XMLStreamReader reader)
static void
readApparentPowerLimits(Integer index, ApparentPowerLimitsAdder apparentPowerLimitsAdder, XMLStreamReader reader)
static void
readCurrentLimits(Integer index, CurrentLimitsAdder currentLimitsAdder, XMLStreamReader reader)
protected void
readElement(String id, A adder, NetworkXmlReaderContext context)
protected static void
readNodeOrBus(int index, ThreeWindingsTransformerAdder.LegAdder adder, NetworkXmlReaderContext context)
protected static void
readNodeOrBus(BranchAdder adder, NetworkXmlReaderContext context)
protected static void
readNodeOrBus(InjectionAdder adder, NetworkXmlReaderContext context)
protected static void
readPQ(Integer index, Terminal t, XMLStreamReader reader)
protected abstract T
readRootElementAttributes(A adder, NetworkXmlReaderContext context)
protected void
readSubElements(T identifiable, NetworkXmlReaderContext context)
protected static Terminal
readTerminalRef(Network network, String id, String side)
Deprecated.protected void
readUntilEndRootElement(XMLStreamReader reader, XmlUtil.XmlEventHandler eventHandler)
void
write(T identifiable, P parent, NetworkXmlWriterContext context)
static void
writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, IidmXmlVersion version)
Deprecated.static void
writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, IidmXmlVersion version, boolean valid, ExportOptions exportOptions)
static void
writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, IidmXmlVersion version, ExportOptions exportOptions)
static void
writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, String nsUri, IidmXmlVersion version)
Deprecated.static void
writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, String nsUri, IidmXmlVersion version, boolean valid, ExportOptions exportOptions)
static void
writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, String nsUri, IidmXmlVersion version, ExportOptions exportOptions)
protected static void
writeNodeOrBus(Integer index, Terminal t, NetworkXmlWriterContext context)
protected static void
writePQ(Integer index, Terminal t, XMLStreamWriter writer)
protected abstract void
writeRootElementAttributes(T identifiable, P parent, NetworkXmlWriterContext context)
protected void
writeSubElements(T identifiable, P parent, NetworkXmlWriterContext context)
protected static void
writeTerminalRef(Terminal t, NetworkXmlWriterContext context, String elementName)
Deprecated.
-
-
-
Method Detail
-
hasValidOperationalLimits
protected static boolean hasValidOperationalLimits(Branch<?> branch, NetworkXmlWriterContext context)
-
hasValidOperationalLimits
protected static boolean hasValidOperationalLimits(FlowsLimitsHolder limitsHolder, NetworkXmlWriterContext context)
-
writeNodeOrBus
protected static void writeNodeOrBus(Integer index, Terminal t, NetworkXmlWriterContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
readNodeOrBus
protected static void readNodeOrBus(InjectionAdder adder, NetworkXmlReaderContext context)
-
readNodeOrBus
protected static void readNodeOrBus(BranchAdder adder, NetworkXmlReaderContext context)
-
readNodeOrBus
protected static void readNodeOrBus(int index, ThreeWindingsTransformerAdder.LegAdder adder, NetworkXmlReaderContext context)
-
writePQ
protected static void writePQ(Integer index, Terminal t, XMLStreamWriter writer) throws XMLStreamException
- Throws:
XMLStreamException
-
readPQ
protected static void readPQ(Integer index, Terminal t, XMLStreamReader reader)
-
readActivePowerLimits
public static void readActivePowerLimits(Integer index, ActivePowerLimitsAdder activePowerLimitsAdder, XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
readApparentPowerLimits
public static void readApparentPowerLimits(Integer index, ApparentPowerLimitsAdder apparentPowerLimitsAdder, XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
readCurrentLimits
public static void readCurrentLimits(Integer index, CurrentLimitsAdder currentLimitsAdder, XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
writeCurrentLimits
@Deprecated public static void writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, IidmXmlVersion version) throws XMLStreamException
Deprecated.- Throws:
XMLStreamException
-
writeCurrentLimits
public static void writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, IidmXmlVersion version, ExportOptions exportOptions) throws XMLStreamException
- Throws:
XMLStreamException
-
writeCurrentLimits
public static void writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, IidmXmlVersion version, boolean valid, ExportOptions exportOptions) throws XMLStreamException
- Throws:
XMLStreamException
-
writeCurrentLimits
@Deprecated public static void writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, String nsUri, IidmXmlVersion version) throws XMLStreamException
Deprecated.- Throws:
XMLStreamException
-
writeCurrentLimits
public static void writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, String nsUri, IidmXmlVersion version, ExportOptions exportOptions) throws XMLStreamException
- Throws:
XMLStreamException
-
writeCurrentLimits
public static void writeCurrentLimits(Integer index, CurrentLimits limits, XMLStreamWriter writer, String nsUri, IidmXmlVersion version, boolean valid, ExportOptions exportOptions) throws XMLStreamException
- Throws:
XMLStreamException
-
writeTerminalRef
@Deprecated protected static void writeTerminalRef(Terminal t, NetworkXmlWriterContext context, String elementName) throws XMLStreamException
Deprecated.- Throws:
XMLStreamException
-
readTerminalRef
@Deprecated protected static Terminal readTerminalRef(Network network, String id, String side)
Deprecated.
-
getRootElementName
protected abstract String getRootElementName()
-
hasSubElements
protected abstract boolean hasSubElements(T identifiable)
-
hasSubElements
protected boolean hasSubElements(T identifiable, NetworkXmlWriterContext context)
-
isValid
protected boolean isValid(T identifiable, P parent)
-
writeRootElementAttributes
protected abstract void writeRootElementAttributes(T identifiable, P parent, NetworkXmlWriterContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
writeSubElements
protected void writeSubElements(T identifiable, P parent, NetworkXmlWriterContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
write
public final void write(T identifiable, P parent, NetworkXmlWriterContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
readUntilEndRootElement
protected void readUntilEndRootElement(XMLStreamReader reader, XmlUtil.XmlEventHandler eventHandler) throws XMLStreamException
- Throws:
XMLStreamException
-
createAdder
protected abstract A createAdder(P parent)
-
readRootElementAttributes
protected abstract T readRootElementAttributes(A adder, NetworkXmlReaderContext context)
-
readSubElements
protected void readSubElements(T identifiable, NetworkXmlReaderContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
readElement
protected void readElement(String id, A adder, NetworkXmlReaderContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
read
public final void read(P parent, NetworkXmlReaderContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
-