Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Changes to the base code
Browse files Browse the repository at this point in the history
  • Loading branch information
hapakala committed Feb 18, 2024
1 parent 010e614 commit f70e14c
Show file tree
Hide file tree
Showing 5 changed files with 258 additions and 174 deletions.
8 changes: 4 additions & 4 deletions src/AasxPluginAID/AIDAnyUiControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ protected void RenderPanelOutside(
foreground: AnyUiBrushes.DarkBlue,
fontSize: 1.5f,
setBold: true,
content: $"AssetInterfaceDescriptions");
content: $"AssetInterfacesDescription");

if (_opContext?.IsDisplayModeEditOrAdd == true)
AnyUiUIElement.RegisterControl(
Expand All @@ -275,7 +275,7 @@ protected void RenderPanelOutside(
{
Margin = new AnyUiThickness(2),
MinHeight = 21,
Content = "Import Interface Description .."
Content = "Import Thing Description .."
}), (o) =>
{
ButtonTabPanels_Click("ButtonImportInterface");
Expand Down Expand Up @@ -704,7 +704,7 @@ private async Task InterfaceEntity_MenuClick(InterfaceEntity e, string menuItemH
// ask back via display context
if (AnyUiMessageBoxResult.Cancel == await _displayContext?.MessageBoxFlyoutShowAsync(
"Delete Interface description? This cannot be reverted!",
"AssetInterfaceDescriptions",
"AssetInterfacesDescription",
AnyUiMessageBoxButton.OKCancel,
AnyUiMessageBoxImage.Question))
return;
Expand Down Expand Up @@ -899,7 +899,7 @@ private async Task<AnyUiLambdaActionBase> ButtonTabPanels_Click(string cmd, stri
var targetFn = String.Format("{0}_{1}{2}", onlyFn, salt, onlyExt);

var desc = AIDTDImport.CreateAssetInterfaceDescriptionFromTd(tdJObject,
targetPath + "/"+targetFn,_submodel.Id.ToString(),_submodel.SubmodelElements.Count,"JSONLD");
targetPath + targetFn,_submodel.Id.ToString(),_submodel.SubmodelElements.Count,"JSONLD");
_submodel.Add(desc);
PushUpdatenRedrawEvent();
return new AnyUiLambdaActionRedrawAllElementsBase() { NextFocus = _submodel };
Expand Down
8 changes: 5 additions & 3 deletions src/AasxPluginAID/AIDTDExport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public static JObject serialize_aid_elem(JToken tdJToken, Aas.ISubmodelElement s
if (semanticReference == "https://admin-shell.io/idta/AssetInterfaceDescription/1/0/PropertyDefinition"
|| semanticReference == "https://www.w3.org/2019/wot/json-schema#propertyName")
{
TDJson[smcJObject["key"].ToString()] = JToken.FromObject(smcJObject);
string _key = smcJObject["key"].ToString();
smcJObject.Remove("key");
TDJson[_key] = JToken.FromObject(smcJObject);
}
else
{
Expand Down Expand Up @@ -131,9 +133,9 @@ public static JObject ExportInterfacetoTDJson(Aas.ISubmodelElementCollection smc
{

}
else if (se.IdShort == "InterfaceMetaData")
else if (se.IdShort == "InteractionMetadata")
{
JToken InterfaceMetaData = serialize_aid_elem(idtaDef.EndpointMetadataJObject["interface"]["childs"][6], se)["InterfaceMetaData"];
JToken InterfaceMetaData = serialize_aid_elem(idtaDef.EndpointMetadataJObject["interface"]["childs"][6], se)["InteractionMetadata"];
TDJson.Merge(JObject.FromObject(InterfaceMetaData));
}
else
Expand Down
Loading

0 comments on commit f70e14c

Please sign in to comment.