eclipse-aaspe / package-explorer

AASX Package Explorer
Other
64 stars 19 forks source link

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

Closed STUBA-rupr closed 6 months ago

STUBA-rupr commented 7 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 7 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 6 months ago

The issue has been fixed.