-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read base URI if present during CGMES triplestore import and apply to…
… all files (#2197) Signed-off-by: VEDELAGO MIORA <[email protected]> Co-authored-by: Luma <[email protected]>
- Loading branch information
1 parent
752f3fc
commit 993a98e
Showing
7 changed files
with
2,305 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,200 changes: 2,200 additions & 0 deletions
2,200
...4.0.3/MicroGrid/BaseCase/BC_BE_v2_explicitBase/MicroGridTestConfiguration_BC_BE_EQ_V2.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
cgmes/cgmes-model/src/test/java/com/powsybl/cgmes/model/NamespaceReaderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (c) 2022, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package com.powsybl.cgmes.model; | ||
|
||
import org.junit.Test; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertNull; | ||
|
||
/** | ||
* @author Miora Vedelago <miora.ralambotiana at rte-france.com> | ||
*/ | ||
public class NamespaceReaderTest { | ||
|
||
@Test | ||
public void base() throws IOException { | ||
try (InputStream is = getClass().getResourceAsStream("/empty_cim16_EQ_with_explicitBase.xml")) { | ||
assertEquals("http://example.com", NamespaceReader.base(is)); | ||
} | ||
} | ||
|
||
@Test | ||
public void baseNull() throws IOException { | ||
try (InputStream is = getClass().getResourceAsStream("/empty_cim16_EQ.xml")) { | ||
assertNull(NamespaceReader.base(is)); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
cgmes/cgmes-model/src/test/resources/empty_cim16_EQ_with_explicitBase.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cim="http://iec.ch/TC57/2013/CIM-schema-cim16#" xml:base="http://example.com"> | ||
</rdf:RDF> |