eclipse-aaspe / package-explorer

AASX Package Explorer
Other
41 stars 12 forks source link

Import Thing Description JSON LD document into SubModel failed [BUG] #199

Closed STUBA-rupr closed 1 month ago

STUBA-rupr commented 2 months ago

Unable to import the JSON LD File I tried to Import Thing Description JSON LD document into SubModel, but it failed with the error Unable to import the JSON LD File.

To Reproduce

Desktop (please complete the following information):

STUBA-rupr commented 2 months ago

Meanwhile, I made just a silly workaround in TDJsonImport.cs (according to V2 where a GlobalReference was used for createAASQualifier):

// AAS Semantic ID
public static Aas.Reference createSemanticID(string tdType)
{
    var key = Aas.Stringification.KeyTypesFromString(tdType);

    Aas.Reference tdSemanticId = new(Aas.ReferenceTypes.ExternalReference, new List<Aas.IKey>() { 
        new Aas.Key(
            key == null ? Aas.KeyTypes.GlobalReference : (Aas.KeyTypes)key
            ,
        TDSemanticId.getSemanticID(tdType)) 
    });

    return tdSemanticId;    
}
juileetikekar commented 1 month ago

The issue has been fixed.