Package com.powsybl.iidm.xml
Class ExportOptions
- java.lang.Object
-
- com.powsybl.iidm.xml.AbstractOptions<ExportOptions>
-
- com.powsybl.iidm.xml.ExportOptions
-
public class ExportOptions extends AbstractOptions<ExportOptions>
- Author:
- Geoffroy Jamgotchian
, Miora Ralambotiana
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExportOptions.IidmVersionIncompatibilityBehavior
-
Field Summary
-
Fields inherited from class com.powsybl.iidm.xml.AbstractOptions
extensions
-
-
Constructor Summary
Constructors Constructor Description ExportOptions()
ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound)
ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, boolean sorted)
ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, boolean sorted, String version)
ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, boolean sorted, String version, ExportOptions.IidmVersionIncompatibilityBehavior iidmVersionIncompatibilityBehavior)
ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, String version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExportOptions
addExtension(String extension)
ExportOptions
addExtensionVersion(String extensionName, String extensionVersion)
Add a given version in which the extension with the given name will be exported if this version is supported by the extension's XML serializer and if it is compatible with the IIDM version in which the network will be exported.Charset
getCharset()
Optional<String>
getExtensionVersion(String extensionName)
Return an optional containing the version oin which the extension with the given name will be exported if it has previously been added.ExportOptions.IidmVersionIncompatibilityBehavior
getIidmVersionIncompatibilityBehavior()
TopologyLevel
getTopologyLevel()
String
getVersion()
boolean
isAnonymized()
boolean
isIndent()
boolean
isOnlyMainCc()
boolean
isSorted()
boolean
isThrowExceptionIfExtensionNotFound()
boolean
isWithBranchSV()
ExportOptions
setAnonymized(boolean anonymized)
ExportOptions
setCharset(Charset charset)
ExportOptions
setExtensions(Set<String> extensions)
ExportOptions
setIidmVersionIncompatibilityBehavior(ExportOptions.IidmVersionIncompatibilityBehavior iidmVersionIncompatibilityBehavior)
ExportOptions
setIndent(boolean indent)
ExportOptions
setOnlyMainCc(boolean onlyMainCc)
ExportOptions
setSorted(boolean sorted)
ExportOptions
setThrowExceptionIfExtensionNotFound(boolean throwException)
ExportOptions
setTopologyLevel(TopologyLevel topologyLevel)
ExportOptions
setVersion(String version)
ExportOptions
setWithBranchSV(boolean withBranchSV)
-
Methods inherited from class com.powsybl.iidm.xml.AbstractOptions
getExtensions, hasAtLeastOneExtension, withAllExtensions, withExtension, withNoExtension
-
-
-
-
Constructor Detail
-
ExportOptions
public ExportOptions()
-
ExportOptions
public ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound)
-
ExportOptions
public ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, boolean sorted)
-
ExportOptions
public ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, String version)
-
ExportOptions
public ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, boolean sorted, String version)
-
ExportOptions
public ExportOptions(boolean withBranchSV, boolean indent, boolean onlyMainCc, TopologyLevel topologyLevel, boolean throwExceptionIfExtensionNotFound, boolean sorted, String version, ExportOptions.IidmVersionIncompatibilityBehavior iidmVersionIncompatibilityBehavior)
-
-
Method Detail
-
addExtension
public ExportOptions addExtension(String extension)
- Specified by:
addExtension
in classAbstractOptions<ExportOptions>
-
isWithBranchSV
public boolean isWithBranchSV()
-
setWithBranchSV
public ExportOptions setWithBranchSV(boolean withBranchSV)
-
isIndent
public boolean isIndent()
-
setIndent
public ExportOptions setIndent(boolean indent)
-
isOnlyMainCc
public boolean isOnlyMainCc()
-
setOnlyMainCc
public ExportOptions setOnlyMainCc(boolean onlyMainCc)
-
isAnonymized
public boolean isAnonymized()
-
setAnonymized
public ExportOptions setAnonymized(boolean anonymized)
-
getTopologyLevel
public TopologyLevel getTopologyLevel()
-
setTopologyLevel
public ExportOptions setTopologyLevel(TopologyLevel topologyLevel)
-
setExtensions
public ExportOptions setExtensions(Set<String> extensions)
- Specified by:
setExtensions
in classAbstractOptions<ExportOptions>
-
isThrowExceptionIfExtensionNotFound
public boolean isThrowExceptionIfExtensionNotFound()
- Specified by:
isThrowExceptionIfExtensionNotFound
in classAbstractOptions<ExportOptions>
-
setThrowExceptionIfExtensionNotFound
public ExportOptions setThrowExceptionIfExtensionNotFound(boolean throwException)
-
getVersion
public String getVersion()
-
setVersion
public ExportOptions setVersion(String version)
-
getIidmVersionIncompatibilityBehavior
public ExportOptions.IidmVersionIncompatibilityBehavior getIidmVersionIncompatibilityBehavior()
-
setIidmVersionIncompatibilityBehavior
public ExportOptions setIidmVersionIncompatibilityBehavior(ExportOptions.IidmVersionIncompatibilityBehavior iidmVersionIncompatibilityBehavior)
-
getCharset
public Charset getCharset()
-
setCharset
public ExportOptions setCharset(Charset charset)
-
addExtensionVersion
public ExportOptions addExtensionVersion(String extensionName, String extensionVersion)
Add a given version in which the extension with the given name will be exported if this version is supported by the extension's XML serializer and if it is compatible with the IIDM version in which the network will be exported. If the version is not added for an extension configured to be serialized, the extension will be serialized in the most recent version compatible with the IIDM version in which the network will be exported. If a version is added for an extension configured not to be serialized, the version will be ignored. If a version has already been added for the extension, throw an exception.
-
getExtensionVersion
public Optional<String> getExtensionVersion(String extensionName)
Return an optional containing the version oin which the extension with the given name will be exported if it has previously been added. If it has never been added, return an empty optional.
-
isSorted
public boolean isSorted()
-
setSorted
public ExportOptions setSorted(boolean sorted)
-
-