Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
6fcdcaa
* redo changes of MIHO/Post_SpecConf_AsciiDoc
festo-i40 Sep 2, 2024
3c0aec1
* fix w.r.t. missing
festo-i40 Sep 3, 2024
cda3ac6
* added heading4 to
festo-i40 Sep 6, 2024
7f63aec
* post build commands for
festo-i40 Sep 11, 2024
f740514
* ROOT for AsciiDoc
festo-i40 Sep 11, 2024
94d5bff
* investigate
festo-i40 Sep 13, 2024
6c9c7af
* package container
festo-i40 Sep 20, 2024
64d3181
* intermediate state
festo-i40 Oct 5, 2024
b1ae05f
* need to refactor PageOffset
festo-i40 Oct 5, 2024
8cc656c
* start try refactor for
festo-i40 Oct 6, 2024
1548df9
* SME under SM seems to work
festo-i40 Oct 6, 2024
1a773b8
* query GraphQL for
festo-i40 Oct 9, 2024
4936603
* messing up to much async
festo-i40 Oct 12, 2024
af185d1
* change refactor of
festo-i40 Oct 12, 2024
e3aaa4d
* showing of side info
festo-i40 Oct 13, 2024
49eab51
* update
festo-i40 Oct 14, 2024
6725c43
* update (before change)
festo-i40 Oct 20, 2024
cd32220
* update (before change)
festo-i40 Oct 21, 2024
3a7c2f8
* update
festo-i40 Oct 28, 2024
4c55d35
* update
festo-i40 Oct 28, 2024
e5ba065
* update
festo-i40 Oct 28, 2024
dc8659e
* update before refactore
festo-i40 Nov 1, 2024
d60e69e
* DELETE of resources in repo
festo-i40 Nov 2, 2024
1ac55c5
* refactor File to Blob ask
festo-i40 Nov 2, 2024
3ef55d1
* 1st implementation of
festo-i40 Nov 3, 2024
315957d
* dreams came true: found
festo-i40 Nov 3, 2024
5613c75
* update some of the plugins
festo-i40 Nov 3, 2024
4fd6e63
* update
festo-i40 Nov 5, 2024
ef9bf93
* update before refactor local stream
festo-i40 Nov 9, 2024
8774e64
* update
festo-i40 Nov 16, 2024
e0cb8ee
* adopt file repos for
festo-i40 Nov 18, 2024
3ef89b8
* update
festo-i40 Nov 18, 2024
8662edc
* update
festo-i40 Nov 18, 2024
e6d6bcb
* update before refactor
festo-i40 Dec 23, 2024
bb20c1b
* 1st overall progress
festo-i40 Dec 23, 2024
962bf0b
* update
festo-i40 Dec 25, 2024
ef938db
* save as local file
festo-i40 Dec 25, 2024
5f94093
* upload of attachments
festo-i40 Dec 29, 2024
a65af9a
* update
festo-i40 Dec 30, 2024
4c329d9
* scripting to wait
festo-i40 Dec 31, 2024
0022da5
* update (pending after long break)
festo-i40 May 8, 2025
3fc2c31
* endpoint improvement
festo-i40 Jun 6, 2025
47b30a7
* update
festo-i40 Jun 6, 2025
ff9494d
* update before array of endpoints
festo-i40 Jun 8, 2025
5887afb
* update (Basyx read)
festo-i40 Jun 9, 2025
bf993f3
* update
festo-i40 Jun 9, 2025
d1a3488
* update
festo-i40 Jun 12, 2025
d221a59
* update
festo-i40 Jun 13, 2025
2d158fe
* update before Andreas security session
festo-i40 Jul 18, 2025
0fb4714
* implement X5C: 1st approach
festo-i40 Jul 18, 2025
083c97d
* move handler for security access into main application
festo-i40 Jul 18, 2025
4ae03e0
* fix w.r.t. missing
festo-i40 Sep 3, 2024
ddf1a11
* investigate
festo-i40 Sep 13, 2024
89e5058
* package container
festo-i40 Sep 20, 2024
920f54d
* intermediate state
festo-i40 Oct 5, 2024
ac794de
* need to refactor PageOffset
festo-i40 Oct 5, 2024
2a26c63
* start try refactor for
festo-i40 Oct 6, 2024
1b72419
* SME under SM seems to work
festo-i40 Oct 6, 2024
194cda7
* query GraphQL for
festo-i40 Oct 9, 2024
1a82650
* messing up to much async
festo-i40 Oct 12, 2024
031a716
* change refactor of
festo-i40 Oct 12, 2024
11d67a1
* showing of side info
festo-i40 Oct 13, 2024
e286510
* update
festo-i40 Oct 14, 2024
f47923c
* update (before change)
festo-i40 Oct 20, 2024
6edb889
* update (before change)
festo-i40 Oct 21, 2024
4ee19e5
* update
festo-i40 Oct 28, 2024
f331451
* update
festo-i40 Oct 28, 2024
110de53
* update
festo-i40 Oct 28, 2024
536076e
* update before refactore
festo-i40 Nov 1, 2024
ce756ba
* DELETE of resources in repo
festo-i40 Nov 2, 2024
9936d9b
* refactor File to Blob ask
festo-i40 Nov 2, 2024
228e5d1
* 1st implementation of
festo-i40 Nov 3, 2024
eb8f1ad
* dreams came true: found
festo-i40 Nov 3, 2024
ded0d24
* update some of the plugins
festo-i40 Nov 3, 2024
7a02fa4
* update
festo-i40 Nov 5, 2024
12a1578
* update before refactor local stream
festo-i40 Nov 9, 2024
f7d23f1
* update
festo-i40 Nov 16, 2024
34e1c60
* adopt file repos for
festo-i40 Nov 18, 2024
495d8d6
* update
festo-i40 Nov 18, 2024
e50de17
* update
festo-i40 Nov 18, 2024
9c436ec
* update before refactor
festo-i40 Dec 23, 2024
5eb3027
* 1st overall progress
festo-i40 Dec 23, 2024
e030a9f
* update
festo-i40 Dec 25, 2024
80824b2
* save as local file
festo-i40 Dec 25, 2024
c802e6c
* upload of attachments
festo-i40 Dec 29, 2024
4ad44a6
* update
festo-i40 Dec 30, 2024
64c6cef
* scripting to wait
festo-i40 Dec 31, 2024
28c886a
* update (pending after long break)
festo-i40 May 8, 2025
510912c
* endpoint improvement
festo-i40 Jun 6, 2025
cc22c7a
* update
festo-i40 Jun 6, 2025
31a6008
* update before array of endpoints
festo-i40 Jun 8, 2025
856809d
* update (Basyx read)
festo-i40 Jun 9, 2025
80dc054
* update
festo-i40 Jun 9, 2025
8032aca
* update
festo-i40 Jun 12, 2025
e0d1ab1
* update
festo-i40 Jun 13, 2025
0b6ff47
* update before Andreas security session
festo-i40 Jul 18, 2025
740e96e
* implement X5C: 1st approach
festo-i40 Jul 18, 2025
3fdc422
* move handler for security access into main application
festo-i40 Jul 18, 2025
990d757
Merge branch 'MIHO/Post_SpecConf_AsciiDoc_Redo_QueryTest' of github.c…
festo-i40 Jul 18, 2025
6b5e9c6
* update default language mapping
festo-i40 Jul 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/AasCore.Aas3_0/DiaryData/ITaintedData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdminShellNS.DiaryData
{
public interface ITaintedData
{
TaintedDataDef TaintedData { get; }
}
}
45 changes: 45 additions & 0 deletions src/AasCore.Aas3_0/DiaryData/TaintedDataDef.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using AasCore.Aas3_0;
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using System.Xml.Serialization;

namespace AdminShellNS.DiaryData
{
public class TaintedDataDef
{
[XmlIgnore]
[JsonIgnore]
private DateTime? _tainted = null;

[XmlIgnore]
[JsonIgnore]
public DateTime? Tainted
{
get { return _tainted; }
set { _tainted = value; }
}

public static void TaintIdentifiable(IReferable element)
{
// trivial
if (element == null)
return;

// find identifiable
var el = element;
while (el != null)
{
// found?
if (el is IIdentifiable && el is ITaintedData itd)
{
itd.TaintedData.Tainted = DateTime.UtcNow;
return;
}

// up
el = (el as IReferable)?.Parent as IReferable;
}
}
}
}
38 changes: 28 additions & 10 deletions src/AasCore.Aas3_0/types.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ public interface IReferable : IHasExtensions, IDiaryData
/// <summary>
/// An element that has a globally unique identifier.
/// </summary>
public interface IIdentifiable : IReferable
public interface IIdentifiable : IReferable, ITaintedData
{
/// <summary>
/// Administrative information of an identifiable element.
Expand Down Expand Up @@ -1317,6 +1317,12 @@ public class AssetAdministrationShell : IAssetAdministrationShell
[JsonIgnore]
public DiaryDataDef DiaryData { get { return _diaryData; } }

[JsonIgnore]
private TaintedDataDef _taintedData = new TaintedDataDef();

[JsonIgnore]
public TaintedDataDef TaintedData { get { return _taintedData; } }

#endregion

/// <summary>
Expand Down Expand Up @@ -2460,6 +2466,12 @@ public class Submodel : ISubmodel
[JsonIgnore]
public DiaryDataDef DiaryData { get { return _diaryData; } }

[JsonIgnore]
private TaintedDataDef _taintedData = new TaintedDataDef();

[JsonIgnore]
public TaintedDataDef TaintedData { get { return _taintedData; } }

#endregion

/// <summary>
Expand Down Expand Up @@ -10741,6 +10753,12 @@ public class ConceptDescription : IConceptDescription
[JsonIgnore]
public DiaryDataDef DiaryData { get { return _diaryData; } }

[JsonIgnore]
private TaintedDataDef _taintedData = new TaintedDataDef();

[JsonIgnore]
public TaintedDataDef TaintedData { get { return _taintedData; } }

#endregion

/// <summary>
Expand Down Expand Up @@ -11910,17 +11928,17 @@ public interface IEnvironment : IClass, IDiaryData
/// <summary>
/// Asset administration shell
/// </summary>
public List<IAssetAdministrationShell>? AssetAdministrationShells { get; set; }
public IList<IAssetAdministrationShell>? AssetAdministrationShells { get; set; }

/// <summary>
/// Submodel
/// </summary>
public List<ISubmodel>? Submodels { get; set; }
public IList<ISubmodel>? Submodels { get; set; }

/// <summary>
/// Concept description
/// </summary>
public List<IConceptDescription>? ConceptDescriptions { get; set; }
public IList<IConceptDescription>? ConceptDescriptions { get; set; }

/// <summary>
/// Iterate over AssetAdministrationShells, if set, and otherwise return an empty enumerable.
Expand Down Expand Up @@ -11951,17 +11969,17 @@ public class Environment : IEnvironment
/// <summary>
/// Asset administration shell
/// </summary>
public List<IAssetAdministrationShell>? AssetAdministrationShells { get; set; }
public IList<IAssetAdministrationShell>? AssetAdministrationShells { get; set; }

/// <summary>
/// Submodel
/// </summary>
public List<ISubmodel>? Submodels { get; set; }
public IList<ISubmodel>? Submodels { get; set; }

/// <summary>
/// Concept description
/// </summary>
public List<IConceptDescription>? ConceptDescriptions { get; set; }
public IList<IConceptDescription>? ConceptDescriptions { get; set; }

/// <summary>
/// Iterate over AssetAdministrationShells, if set, and otherwise return an empty enumerable.
Expand Down Expand Up @@ -12116,9 +12134,9 @@ public T Transform<TContext, T>(
}

public Environment(
List<IAssetAdministrationShell>? assetAdministrationShells = null,
List<ISubmodel>? submodels = null,
List<IConceptDescription>? conceptDescriptions = null)
IList<IAssetAdministrationShell>? assetAdministrationShells = null,
IList<ISubmodel>? submodels = null,
IList<IConceptDescription>? conceptDescriptions = null)
{
AssetAdministrationShells = assetAdministrationShells;
Submodels = submodels;
Expand Down
2 changes: 1 addition & 1 deletion src/AasxAmlImExport/AmlExport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ private static void SetInternalLinks(
}
}

public static bool ExportTo(AdminShellPackageEnv package, string amlfn, bool tryUseCompactProperties = false)
public static bool ExportTo(AdminShellPackageEnvBase package, string amlfn, bool tryUseCompactProperties = false)
{
// start
if (package == null || amlfn == null || package.AasEnv == null)
Expand Down
6 changes: 3 additions & 3 deletions src/AasxAmlImExport/AmlImport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static string PrintSemantic(CAEXSequence<RefSemanticType> sem)

public class AmlParser
{
public AdminShellPackageEnv package = null;
public AdminShellPackageEnvBase package = null;

private class TargetIdAction
{
Expand Down Expand Up @@ -87,7 +87,7 @@ public IeViewAmlTarget(InternalElementType ie, CAEXObject amlTarget)

public AmlParser() { }

public AmlParser(AdminShellPackageEnv package)
public AmlParser(AdminShellPackageEnvBase package)
{
this.package = package;
}
Expand Down Expand Up @@ -1634,7 +1634,7 @@ public void Start(CAEXFileType caex)
}
}

public static void ImportInto(AdminShellPackageEnv package, string amlfn)
public static void ImportInto(AdminShellPackageEnvBase package, string amlfn)
{
// try open file
var doc = CAEXDocument.LoadFromFile(amlfn);
Expand Down
4 changes: 2 additions & 2 deletions src/AasxBammRdfImExport/RDFimport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ namespace AasxBammRdfImExport
public static class BAMMRDFimport
{

public static AdminShellNS.AdminShellPackageEnv thePackageEnv;
public static AdminShellNS.AdminShellPackageEnvBase thePackageEnv;

public static void ImportInto(
string rdffn, Aas.IEnvironment env, Aas.ISubmodel sm,
Aas.Reference smref)
{
thePackageEnv = new AdminShellNS.AdminShellPackageEnv();
thePackageEnv = new AdminShellNS.AdminShellPackageFileBasedEnv();
List<string> entity_subject = new List<string>();
List<string> autos_list = new List<string>();
List<string> set_list = new List<string>();
Expand Down
1 change: 1 addition & 0 deletions src/AasxCsharpLibrary/AasxCsharpLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.0.2" />
<PackageReference Include="Namotion.Reflection" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NJsonSchema" Version="10.8.0" />
Expand Down
8 changes: 8 additions & 0 deletions src/AasxCsharpLibrary/AdminShellBasicExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ public static IEnumerable<T> ForEachSafe<T>(this List<T> list)
yield return x;
}

public static void ForEach<T>(this IList<T> list, Action <T> action)
{
if (list == null)
return;
foreach (var x in list)
action?.Invoke(x);
}

/// <summary>
/// Multiple a string into a iterable list
/// </summary>
Expand Down
16 changes: 16 additions & 0 deletions src/AasxCsharpLibrary/AdminShellCollections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,28 @@ public class MultiValueDictionary<K, V>

public void Add(K key, V value)
{
if (key == null)
return;

if (dict.TryGetValue(key, out var list))
list.Add(value);
else
dict.Add(key, new List<V> { value });
}

public void AddIfValueIsNew(K key, V value)
{
if (key == null)
return;

if (dict.TryGetValue(key, out var list))
{
if (!list.Contains(value))
list.Add(value);
}
else
dict.Add(key, new List<V> { value });
}
public void Remove(K key)
{
if (dict.ContainsKey(key))
Expand Down
57 changes: 57 additions & 0 deletions src/AasxCsharpLibrary/AdminShellComparers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
Copyright (c) 2018-2023 Festo SE & Co. KG <https://www.festo.com/net/de_de/Forms/web/contact_international>
Author: Michael Hoffmeister

This source code is licensed under the Apache License 2.0 (see LICENSE.txt).

This source code may use other Open Source software components (see LICENSE.txt).
*/

using Extensions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;

namespace AdminShellNS
{
public static class AdminShellComparers
{

/// see: https://www.codeproject.com/Articles/72470/LINQ-Enhancing-Distinct-With-The-PredicateEquality
public class PredicateEqualityComparer<T> : EqualityComparer<T>
{
private Func<T, T, bool> predicate;

public PredicateEqualityComparer(Func<T, T, bool> predicate)
: base()
{
this.predicate = predicate;
}

public override bool Equals(T x, T y)
{
if (x != null)
{
return ((y != null) && this.predicate(x, y));
}

if (y != null)
{
return false;
}

return true;
}

public override int GetHashCode(T obj)
{
// Always return the same value to force the call to IEqualityComparer<T>.Equals
return 0;
}
}
}
}
Loading
Loading