Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Network properties in XML #864

Merged
merged 2 commits into from
Jul 12, 2019
Merged

Export Network properties in XML #864

merged 2 commits into from
Jul 12, 2019

Conversation

mathbagu
Copy link
Contributor

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest
This PR is link to this topic

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix?

What is the current behavior? (You can also link to an open issue here)
If a network has properties, when exporting to XML, these properties are lost.

What is the new behavior (if this is a feature change)?
The properties are read/write by the XML formatter.

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
@@ -20,6 +20,7 @@
<xs:element name="network">
<xs:complexType>
<xs:sequence>
<xs:element name="property" type="iidm:Property" minOccurs="0" maxOccurs="unbounded" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like in the Java model, we also could have network inherit from identifiable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not possible to set the network name in the Java model (through factory), so if I make an inheritance in the XSD, there is something to fix in the Java API too. Do you want I change this too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network factory would not be the best place for setting an optional attribute like name but it is surprising that there is no setName method in Identiable interface and that nobody has ever ask for it.
We can keep it as it is and see later, it is really a minor design issue.

@coveralls
Copy link

coveralls commented Jul 10, 2019

Coverage Status

Coverage increased (+0.03%) to 82.976% when pulling 765042f on network-properties into 6224fe3 on master.

@mathbagu mathbagu merged commit 2352aa9 into master Jul 12, 2019
@mathbagu mathbagu deleted the network-properties branch July 12, 2019 07:53
niconoir pushed a commit that referenced this pull request Sep 4, 2019
Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants