Skip to content

Commit

Permalink
*fix for supplementary files not appearing (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWollbrink authored Jun 7, 2024
1 parent 4a267d2 commit 423f03f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/AasxCsharpLibrary/AdminShellPackageEnv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1540,8 +1540,9 @@ public ListOfAasSupplementaryFile GetListOfSupplementaryFiles()

// get the origin from the package
PackagePart originPart = null;
xs = _openPackage.GetRelationshipsByType(
"http://admin-shell.io/aasx/relationships/aasx-origin");
xs = _openPackage.GetRelationshipsByType("http://admin-shell.io/aasx/relationships/aasx-origin");
var test = xs.Count();
if(xs.Count() <= 0) xs = _openPackage.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aasx-origin");
foreach (var x in xs)
if (x.SourceUri.ToString() == "/")
{
Expand All @@ -1558,7 +1559,8 @@ public ListOfAasSupplementaryFile GetListOfSupplementaryFiles()
{
// get the specs from the origin
PackagePart specPart = null;
xs = originPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-spec");
xs = originPart.GetRelationshipsByType("http://admin-shell.io/aasx/relationships/aas-spec");
if(xs.Count() <= 0) xs = originPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-spec");
foreach (var x in xs)
{
//specPart = _openPackage.GetPart(x.TargetUri);
Expand All @@ -1573,8 +1575,8 @@ public ListOfAasSupplementaryFile GetListOfSupplementaryFiles()
if (specPart != null)
{
// get the supplementaries from the package, derived from spec
xs = specPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-suppl");
if(xs == null) xs = specPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-suppl");
xs = specPart.GetRelationshipsByType("http://admin-shell.io/aasx/relationships/aas-suppl");
if(xs.Count() <= 0) xs = specPart.GetRelationshipsByType("http://www.admin-shell.io/aasx/relationships/aas-suppl");
foreach (var x in xs)
{
result.Add(
Expand Down

0 comments on commit 423f03f

Please sign in to comment.