Skip to content

Commit f474067

Browse files
*fix for supplementary files not appearing
1 parent 8486760 commit f474067

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/AasxCsharpLibrary/AdminShellPackageEnv.cs

+7-5
Original file line numberDiff line numberDiff line change
@@ -1540,8 +1540,9 @@ public ListOfAasSupplementaryFile GetListOfSupplementaryFiles()
15401540

15411541
// get the origin from the package
15421542
PackagePart originPart = null;
1543-
xs = _openPackage.GetRelationshipsByType(
1544-
"http://admin-shell.io/aasx/relationships/aasx-origin");
1543+
xs = _openPackage.GetRelationshipsByType("http://admin-shell.io/aasx/relationships/aasx-origin");
1544+
var test = xs.Count();
1545+
if(xs.Count() <= 0) xs = _openPackage.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aasx-origin");
15451546
foreach (var x in xs)
15461547
if (x.SourceUri.ToString() == "/")
15471548
{
@@ -1558,7 +1559,8 @@ public ListOfAasSupplementaryFile GetListOfSupplementaryFiles()
15581559
{
15591560
// get the specs from the origin
15601561
PackagePart specPart = null;
1561-
xs = originPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-spec");
1562+
xs = originPart.GetRelationshipsByType("http://admin-shell.io/aasx/relationships/aas-spec");
1563+
if(xs.Count() <= 0) xs = originPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-spec");
15621564
foreach (var x in xs)
15631565
{
15641566
//specPart = _openPackage.GetPart(x.TargetUri);
@@ -1573,8 +1575,8 @@ public ListOfAasSupplementaryFile GetListOfSupplementaryFiles()
15731575
if (specPart != null)
15741576
{
15751577
// get the supplementaries from the package, derived from spec
1576-
xs = specPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-suppl");
1577-
if(xs == null) xs = specPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-suppl");
1578+
xs = specPart.GetRelationshipsByType("http://admin-shell.io/aasx/relationships/aas-suppl");
1579+
if(xs.Count() <= 0) xs = specPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-suppl");
15781580
foreach (var x in xs)
15791581
{
15801582
result.Add(

0 commit comments

Comments
 (0)