diff --git a/src/AasSecurity/AasSecurity.csproj b/src/AasSecurity/AasSecurity.csproj
index dd30a721e..ca0f7b9f8 100644
--- a/src/AasSecurity/AasSecurity.csproj
+++ b/src/AasSecurity/AasSecurity.csproj
@@ -8,12 +8,16 @@
false
+
+
+
+
-
+
-
+
diff --git a/src/AasxServerBlazor/Properties/launchSettings.json b/src/AasxServerBlazor/Properties/launchSettings.json
index 62ad90bcc..8647541c0 100644
--- a/src/AasxServerBlazor/Properties/launchSettings.json
+++ b/src/AasxServerBlazor/Properties/launchSettings.json
@@ -10,7 +10,7 @@
},
"AasxServerBlazor": {
"commandName": "Project",
- "commandLineArgs": "--with-db --start-index 100000 --save-temp 30 --no-security --secret-string-api 1234 --aasx-in-memory 1000 --data-path \"C:\\Development\\DB\" --edit --external-blazor http://localhost:5001",
+ "commandLineArgs": "--start-index 100000 --save-temp 30 --no-security --secret-string-api 1234 --aasx-in-memory 1000 --data-path \"C:\\Development\\DB\" --edit --external-blazor http://localhost:5001",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
diff --git a/src/AasxServerStandardBib/AasEntityBuilder.cs b/src/AasxServerStandardBib/AasEntityBuilder.cs
deleted file mode 100644
index 1e17f725e..000000000
--- a/src/AasxServerStandardBib/AasEntityBuilder.cs
+++ /dev/null
@@ -1,823 +0,0 @@
-/*
-Copyright (c) 2018-2019 Festo AG & Co. KG
-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 AdminShellNS;
-using Extensions;
-using Opc.Ua;
-using System.Collections.Generic;
-
-namespace AasOpcUaServer
-{
- public class AasEntityBuilder
- {
- //// Static singleton for AAS entity builders
- // ugly, but simple: the singleton variables gives access to information
- //
- public static AasModeManager nodeMgr = null;
-
- public AdminShellPackageEnv[] packages = null;
-
- public AasxUaServerOptions theServerOptions = null;
-
- public IDictionary> nodeMgrExternalReferences = null;
-
- ///
- /// Root of AASes
- ///
- public NodeState RootAAS = null;
-
- ///
- /// Root for CDs
- ///
- public NodeState RootConceptDescriptions = null;
-
- ///
- /// Root for DataSpecifications
- ///
- public NodeState RootDataSpecifications = null;
-
- ///
- /// Provide a root node, if semantic ids shall create missing dictionary entry (targets),
- /// which can not be found in the AAS environment.
- ///
- public NodeState RootMissingDictionaryEntries = null;
-
- public AasEntityBuilder(AasModeManager nodeMgr, AdminShellPackageEnv[] package,
- IDictionary> externalReferences, AasxUaServerOptions options)
- {
- AasEntityBuilder.nodeMgr = nodeMgr;
- this.packages = package;
- this.nodeMgrExternalReferences = externalReferences;
- this.aasTypes = new AasTypeEntities();
- this.theServerOptions = options;
- this.aasTypes.BuildEntites(this);
- }
-
- public class NodeRecord
- {
- public NodeState uanode = null;
- public IReferable referable = null;
- public string identification = null;
-
- public NodeRecord() { }
- public NodeRecord(NodeState uanode, IReferable referable)
- {
- this.uanode = uanode;
- this.referable = referable;
- }
- public NodeRecord(NodeState uanode, string identification)
- {
- this.uanode = uanode;
- this.identification = identification;
- }
- }
-
- private Dictionary NodeRecordFromReferable
- = new Dictionary();
- private Dictionary NodeRecordFromIdentificationHash
- = new Dictionary();
-
- ///
- /// Use this function always to remeber new node records.
- ///
- ///
- public void AddNodeRecord(NodeRecord nr)
- {
- if (nr.referable != null && !NodeRecordFromReferable.ContainsKey(nr.referable))
- NodeRecordFromReferable.Add(nr.referable, nr);
-
- if (nr.identification != null && nr.identification != "")
- {
- var hash = "" + nr.identification.Trim().ToUpper();
- if (!NodeRecordFromIdentificationHash.ContainsKey(hash))
- NodeRecordFromIdentificationHash.Add(hash, nr);
- }
- }
-
- ///
- /// Use this always to lookup node records from Referable
- ///
- ///
- ///
- public NodeRecord LookupNodeRecordFromReferable(IReferable referable)
- {
- if (NodeRecordFromReferable == null || !NodeRecordFromReferable.ContainsKey(referable))
- return null;
- return NodeRecordFromReferable[referable];
- }
-
- ///
- /// Use this always to lookup node records from Indentifiable
- ///
- ///
- ///
- public NodeRecord LookupNodeRecordFromIdentification(string identification)
- {
- var hash = "" + identification.Trim().ToUpper();
- if (NodeRecordFromReferable == null || !NodeRecordFromIdentificationHash.ContainsKey(hash))
- return null;
- return NodeRecordFromIdentificationHash[hash];
- }
-
- ///
- /// Base class for actions, which shall be done on the 2nd pass of the information model building
- ///
- public class NodeLateAction
- {
- public NodeState uanode = null;
- }
-
- ///
- /// Make a late reference to another node identified by a AAS reference information
- ///
- public class NodeLateActionLinkToReference : NodeLateAction
- {
- public enum ActionType { None, SetAasReference, SetDictionaryEntry }
-
- public Reference targetReference = null;
- public ActionType actionType = ActionType.None;
-
- public NodeLateActionLinkToReference(NodeState uanode, Reference targetReference,
- ActionType actionType)
- {
- this.uanode = uanode;
- this.targetReference = targetReference;
- this.actionType = actionType;
- }
- }
-
- private List noteLateActions = new List();
-
- ///
- /// Add a late action, which will be processed as 2nd phase of info model preparation
- ///
- ///
- public void AddNodeLateAction(NodeLateAction la)
- {
- this.noteLateActions.Add(la);
- }
-
- private IReferable FindAllReferableByReference(AdminShellPackageEnv[] packages,
- Reference rf)
- {
- // access
- if (packages == null || rf == null)
- return null;
-
- // find
- foreach (var pck in packages)
- {
- var x = pck?.AasEnv?.FindReferableByReference(rf);
- if (x != null)
- return x;
- }
-
- // oh, no
- return null;
- }
-
- ///
- /// Top level creation functions. Uses the definitions of RootAAS, RootConceptDescriptions,
- /// RootDataSpecifications to synthesize information model
- ///
- public void CreateAddInstanceObjects(AasCore.Aas3_0.Environment env)
- {
- if (RootAAS == null)
- return;
-
- // CDs (build 1st to be "remembered" as targets for "HasDictionaryEntry")
- if (env.ConceptDescriptions != null && this.RootConceptDescriptions != null)
- foreach (var cd in env.ConceptDescriptions)
- {
- this.AasTypes.ConceptDescription.CreateAddElements(this.RootConceptDescriptions,
- AasUaBaseEntity.CreateMode.Instance, cd);
- }
-
- // AAS
- if (env.AssetAdministrationShells != null)
- foreach (var aas in env.AssetAdministrationShells)
- this.AasTypes.AAS.CreateAddInstanceObject(RootAAS, env, aas);
-
- // go through late actions
- foreach (var la in this.noteLateActions)
- {
- // make a Reference ??
- var lax = la as NodeLateActionLinkToReference;
-
- // more simple case: AasReference between known entities
- if (lax != null && lax.actionType == NodeLateActionLinkToReference.ActionType.SetAasReference
- && lax.uanode != null
- && this.packages != null)
- {
- // 1st, take reference and turn it into Referable
- var targetReferable = FindAllReferableByReference(this.packages, lax.targetReference);
- if (targetReferable == null)
- continue;
-
- // 2nd, try to lookup the Referable and turn it into a uanode
- var targetNodeRec = this.LookupNodeRecordFromReferable(targetReferable);
- if (targetNodeRec == null || targetNodeRec.uanode == null)
- continue;
-
- // now, we have everything to formulate a reference
- if (!lax.uanode.ReferenceExists(this.AasTypes.HasAasReference.GetTypeNodeId(), false,
- targetNodeRec.uanode.NodeId))
- {
- lax.uanode.AddReference(this.AasTypes.HasAasReference.GetTypeNodeId(), false,
- targetNodeRec.uanode.NodeId);
- }
- }
-
- // a bit more complicated: could include a "empty reference" to outside concept
- if (lax != null && lax.actionType == NodeLateActionLinkToReference.ActionType.SetDictionaryEntry
- && lax.uanode != null
- && this.packages != null)
- {
- // tracking
- var foundAtAll = false;
-
- // 1st, take reference and turn it into Referable
- var targetReferable = FindAllReferableByReference(this.packages, lax.targetReference);
- if (targetReferable != null)
- {
- // 2nd, try to lookup the Referable and turn it into a uanode
- var targetNodeRec = this.LookupNodeRecordFromReferable(targetReferable);
- if (targetNodeRec != null && targetNodeRec.uanode != null)
- {
- // simple case: have a target node, just make a link
- if (lax.uanode.ReferenceExists(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false,
- targetNodeRec.uanode.NodeId))
- {
- lax.uanode.AddReference(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false,
- targetNodeRec.uanode.NodeId);
- }
- foundAtAll = true;
- }
- }
-
- // make "empty reference"??
- // by definition, this makes only sense if the targetReference has exactly 1 key, as we could
- // only have one key in a dictionary entry
- if (!foundAtAll && lax.targetReference.Keys.Count == 1)
- {
- // can turn the targetReference to a simple identification
- //var targetId = new AdminShellConverters().Identifier(lax.targetReference.Keys[0].Value);
- var targetId = lax.targetReference.Keys[0].Value;
-
- // we might have such an (empty) target already available as uanode
- var nr = this.LookupNodeRecordFromIdentification(targetId);
- if (nr != null)
- {
- // just create the missing link
- if (!lax.uanode.ReferenceExists(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false,
- nr.uanode?.NodeId))
- {
- lax.uanode.AddReference(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false,
- nr.uanode?.NodeId);
- }
- }
- else
- {
- // create NEW empty reference?
- if (this.RootMissingDictionaryEntries != null)
- {
- // create missing object
- var miss = this.CreateAddObject(
- this.RootMissingDictionaryEntries,
- AasUaBaseEntity.CreateMode.Instance,
- targetId,
- ReferenceTypeIds.HasComponent,
- this.AasTypes.ConceptDescription.GetTypeObjectFor(targetId)?.NodeId);
-
- // add the reference
- if (lax.uanode.ReferenceExists(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false,
- miss?.NodeId))
- {
- lax.uanode.AddReference(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false,
- miss?.NodeId);
- }
-
- // put it into the NodeRecords, that it can be re-used?? no!!
- this.AddNodeRecord(new AasEntityBuilder.NodeRecord(miss, targetId));
- }
- else
- {
- // just create the missing link
- // TODO (MIHO, 2020-08-06): check, which namespace shall be used
- var missingTarget = new ExpandedNodeId("" + targetId, 99);
- lax.uanode.AddReference(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false,
- missingTarget);
- }
- }
- }
- }
-
- }
- }
-
- //// references
- //
-
- // ReSharper disable once UnusedType.Global
- public class AasReference : Opc.Ua.IReference
- {
- // private members
- private NodeId referenceTypeId = null;
- private bool isInverse = false;
- private ExpandedNodeId targetId = null;
-
- // public getters for IReference
- public NodeId ReferenceTypeId { get { return referenceTypeId; } }
- public bool IsInverse { get { return isInverse; } }
- public ExpandedNodeId TargetId { get { return targetId; } }
-
- public AasReference()
- {
- }
-
- public AasReference(NodeId referenceTypeId, bool isInverse, ExpandedNodeId targetId)
- {
- this.referenceTypeId = referenceTypeId;
- this.isInverse = isInverse;
- this.targetId = targetId;
- }
- }
-
- //// Reference types
- //
-
- public ReferenceTypeState CreateAddReferenceType(
- string browseDisplayName, string inverseName,
- uint preferredNumId = 0, bool useZeroNS = false, NodeId sourceId = null)
- {
- // create node itself
- var x = new ReferenceTypeState();
- x.BrowseName = browseDisplayName;
- x.DisplayName = browseDisplayName;
- x.InverseName = inverseName;
- x.Symmetric = false;
- x.IsAbstract = false;
- x.NodeId = nodeMgr.NewType(nodeMgr.SystemContext, AasUaBaseEntity.CreateMode.Type, x, preferredNumId);
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, x);
-
- // set Subtype reference
- if (sourceId == null)
- sourceId = new NodeId(32, 0);
- nodeMgr.AddExternalReferencePublic(sourceId, ReferenceTypeIds.HasSubtype, false,
- x.NodeId, nodeMgrExternalReferences);
-
- // done
- return x;
- }
-
- //// Folders
- //
-
- public FolderState CreateAddFolder(AasUaBaseEntity.CreateMode mode,
- NodeState parent, string browseDisplayName)
- {
- var x = new FolderState(parent);
- x.BrowseName = browseDisplayName;
- x.DisplayName = browseDisplayName;
- x.NodeId = nodeMgr.NewFromParent(nodeMgr.SystemContext, mode, x, parent);
- x.TypeDefinitionId = ObjectTypeIds.FolderType;
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, x);
- if (parent != null)
- parent.AddChild(x);
- return x;
- }
-
- //// DataTypes
- //
-
- public DataTypeState CreateAddDataType(
- string browseDisplayName, NodeId superTypeId, uint preferredNumId = 0)
- {
- var x = new DataTypeState();
- x.BrowseName = "" + browseDisplayName;
- x.DisplayName = "" + browseDisplayName;
- x.Description = new LocalizedText("en", browseDisplayName);
- x.SuperTypeId = superTypeId;
- x.NodeId = nodeMgr.NewType(nodeMgr.SystemContext, AasUaBaseEntity.CreateMode.Type, x, preferredNumId);
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, x);
- return x;
- }
-
- //// Object types
- //
-
- ///
- /// Helper to create an ObjectType-Node and it to the information model.
- ///
- /// Name displayed in the node tree
- /// Base class or similar
- /// Numerical id of the node in the default name space to be set fixed
- /// Lookup a Description on AAS literal/ refSemantics
- /// Modeling Rule, if not None
- public BaseObjectTypeState CreateAddObjectType(
- string browseDisplayName,
- NodeId superTypeId,
- uint preferredNumId = 0,
- string descriptionKey = null,
- AasUaNodeHelper.ModellingRule modellingRule = AasUaNodeHelper.ModellingRule.None)
- {
- var x = AasUaNodeHelper.CreateObjectType(browseDisplayName, superTypeId, descriptionKey: descriptionKey);
- x.NodeId = nodeMgr.NewType(nodeMgr.SystemContext, AasUaBaseEntity.CreateMode.Type,
- x, preferredNumId);
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, x);
- return x;
- }
-
- //// Variable types
- //
-
- public class AasVariableTypeState : BaseVariableTypeState
- {
- // ReSharper disable once EmptyConstructor
- public AasVariableTypeState()
- : base()
- { }
- }
-
- public AasVariableTypeState CreateAddVariableType(string browseDisplayName, NodeId superTypeId,
- uint preferredNumId = 0)
- {
- var x = new AasVariableTypeState();
- x.BrowseName = "" + browseDisplayName;
- x.DisplayName = "" + browseDisplayName;
- x.Description = new LocalizedText("en", browseDisplayName);
- x.SuperTypeId = superTypeId;
- x.NodeId = nodeMgr.NewType(nodeMgr.SystemContext, AasUaBaseEntity.CreateMode.Type,
- x, preferredNumId);
-
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, x);
- return x;
- }
-
- //// Objects
- //
-
- ///
- /// Helper to create an Object-Node. Note: __NO__ NodeId is created by the default! Must be done by outer
- /// functionality!!
- ///
- /// Parent node
- /// Type or instance
- /// Name displayed in the node tree
- ///
- /// Type of the Object
- /// Modeling Rule, if not None
- ///
- /// The node
- public BaseObjectState CreateAddObject(
- NodeState parent, AasUaBaseEntity.CreateMode mode,
- string browseDisplayName,
- NodeId referenceTypeFromParentId = null,
- NodeId typeDefinitionId = null,
- AasUaNodeHelper.ModellingRule modellingRule = AasUaNodeHelper.ModellingRule.None,
- string extraName = null)
- {
- var x = AasUaNodeHelper.CreateObject(parent, browseDisplayName, typeDefinitionId: typeDefinitionId,
- modellingRule: modellingRule, extraName: extraName);
- x.NodeId = nodeMgr.NewFromParent(nodeMgr.SystemContext, mode, x, parent);
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, x);
- if (parent != null)
- parent.AddChild(x);
-
- if (referenceTypeFromParentId != null)
- {
- if (parent != null)
- {
- if (!parent.ReferenceExists(referenceTypeFromParentId, false, x.NodeId))
- parent.AddReference(referenceTypeFromParentId, false, x.NodeId);
- if (referenceTypeFromParentId == ReferenceTypeIds.HasComponent)
- x.AddReference(referenceTypeFromParentId, true, parent.NodeId);
- if (referenceTypeFromParentId == ReferenceTypeIds.HasProperty)
- x.AddReference(referenceTypeFromParentId, true, parent.NodeId);
- }
-
- //// nodeMgr.AddReference(parentNodeId, new AasReference(referenceTypeId, false, x.NodeId));
- }
-
- //// if (typeDefinitionId != null)
- //// {
- //// x.TypeDefinitionId = typeDefinitionId;
- //// x.AddReference(ReferenceTypeIds.HasTypeDefinition, false, typeDefinitionId);
- //// // nodeMgr.AddReference(x.NodeId, new AasReference(ReferenceTypeIds.HasTypeDefinition, false,
- //// // typeDefinitionId));
- //// }
-
- return x;
- }
-
- //// Properties
- //
-
- ///
- /// Helper to create an PropertyState-Node for a certain type and add it to the information model.
- /// Note: __NO__ NodeId is created by the default! Must be done by outer functionality!!
- ///
- /// C# type of the proprty
- /// Parent node
- /// Type or instance
- /// Name displayed in the node tree
- /// Data type, such as String.. Given by DataTypeIds...
- /// Value of the type T or Null
- ///
- /// Type definition; independent from DataType!
- /// -1 or e.g. 1 for array
- /// Apply default settings for a normal Property
- /// Modeling Rule, if not None
- /// NodeState
- public PropertyState CreateAddPropertyState(
- NodeState parent, AasUaBaseEntity.CreateMode mode,
- string browseDisplayName,
- NodeId dataTypeId, T value,
- NodeId referenceTypeFromParentId = null,
- NodeId typeDefinitionId = null,
- int valueRank = -2,
- bool defaultSettings = false,
- AasUaNodeHelper.ModellingRule modellingRule = AasUaNodeHelper.ModellingRule.None)
- {
- // apply cumulative settings
- if (defaultSettings)
- {
- referenceTypeFromParentId = ReferenceTypeIds.HasProperty;
- typeDefinitionId = VariableTypeIds.PropertyType;
- if (valueRank == -2)
- valueRank = -1;
- }
-
- // make Property
- var x = new PropertyState(parent);
- x.BrowseName = "" + browseDisplayName;
- x.DisplayName = "" + browseDisplayName;
- x.Description = new LocalizedText("en", browseDisplayName);
- x.DataType = dataTypeId;
- if (valueRank > -2)
- x.ValueRank = valueRank;
- // ReSharper disable once RedundantCast
- x.Value = (T)value;
- AasUaNodeHelper.CheckSetModellingRule(modellingRule, x);
- x.NodeId = nodeMgr.NewFromParent(nodeMgr.SystemContext, mode, x, parent);
-
- // add Node
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, x);
- if (parent != null)
- parent.AddChild(x);
-
- // set relations
- if (referenceTypeFromParentId != null)
- {
- if (parent != null)
- {
- if (!parent.ReferenceExists(referenceTypeFromParentId, false, x.NodeId))
- {
- parent.AddReference(referenceTypeFromParentId, false, x.NodeId);
- }
- if (referenceTypeFromParentId == ReferenceTypeIds.HasComponent)
- x.AddReference(referenceTypeFromParentId, true, parent.NodeId);
- if (referenceTypeFromParentId == ReferenceTypeIds.HasProperty)
- x.AddReference(referenceTypeFromParentId, true, parent.NodeId);
- }
- }
- if (typeDefinitionId != null)
- {
- x.TypeDefinitionId = typeDefinitionId;
- }
-
- x.AccessLevel = AccessLevels.CurrentReadOrWrite;
- x.UserAccessLevel = AccessLevels.CurrentReadOrWrite;
-
- return x;
- }
-
- public MethodState CreateAddMethodState(
- NodeState parent, AasUaBaseEntity.CreateMode mode,
- string browseDisplayName,
- Argument[] inputArgs = null, Argument[] outputArgs = null, NodeId referenceTypeFromParentId = null,
- NodeId methodDeclarationId = null, GenericMethodCalledEventHandler onCalled = null)
- {
- // method node
- var m = new MethodState(parent);
- m.BrowseName = "" + browseDisplayName;
- m.DisplayName = "" + browseDisplayName;
- m.Description = new LocalizedText("en", browseDisplayName);
- m.NodeId = nodeMgr.NewFromParent(nodeMgr.SystemContext, mode, m, parent);
- if (methodDeclarationId != null)
- m.MethodDeclarationId = methodDeclarationId;
-
- m.Executable = true;
- m.UserExecutable = true;
-
- nodeMgr.AddPredefinedNode(nodeMgr.SystemContext, m);
- if (parent != null)
- parent.AddChild(m);
-
- if (referenceTypeFromParentId != null)
- {
- if (parent != null)
- {
- parent.AddReference(referenceTypeFromParentId, false, m.NodeId);
- if (referenceTypeFromParentId == ReferenceTypeIds.HasComponent)
- m.AddReference(referenceTypeFromParentId, true, parent.NodeId);
- if (referenceTypeFromParentId == ReferenceTypeIds.HasProperty)
- m.AddReference(referenceTypeFromParentId, true, parent.NodeId);
- }
- }
-
- // can have inputs, outputs
- for (int i = 0; i < 2; i++)
- {
- // pretty argument list
- var arguments = (i == 0) ? inputArgs : outputArgs;
- if (arguments == null || arguments.Length < 1)
- continue;
-
- // make a property for this
- var prop = CreateAddPropertyState(
- m, mode,
- (i == 0) ? "InputArguments" : "OutputArguments",
- DataTypeIds.Argument,
- arguments,
- ReferenceTypeIds.HasProperty,
- typeDefinitionId: VariableTypeIds.PropertyType,
- valueRank: 1);
-
- // explicitely add arguments ass well?
- if (i == 0)
- m.InputArguments = prop;
-
- if (i == 1)
- m.OutputArguments = prop;
-
- }
-
- // event handler
- if (onCalled != null)
- m.OnCallMethod = onCalled;
-
-
- return m;
- }
-
-
- //// Entities
- //
-
- public class AasTypeEntities
- {
- public AasUaEntityPathType PathType;
- public AasUaEntityMimeType MimeType;
-
- public AasUaEntityIdentification Identification;
- public AasUaEntityAdministration Administration;
- public AasUaEntityQualifier Qualifier;
- public AasUaEntityAssetKind AssetKind;
- public AasUaEntityModelingKind ModelingKind;
- public AasUaEntityReferable Referable;
- public AasUaEntityReferenceBase ReferenceBase;
- public AasUaEntityReference Reference;
- public AasUaEntitySemanticId SemanticId;
- public AasUaEntitySubmodel Submodel;
- public AasUaEntityProperty Property;
- public AasUaEntityCollection Collection;
- public AasUaEntitySubmodelElement SubmodelElement;
- public AasUaEntitySubmodelWrapper SubmodelWrapper;
- public AasUaEntityFile File;
- public AasUaEntityFileType FileType;
- public AasUaEntityBlob Blob;
- public AasUaEntityReferenceElement ReferenceElement;
- public AasUaEntityRelationshipElement RelationshipElement;
- public AasUaEntityOperationVariable OperationVariable;
- public AasUaEntityOperation Operation;
- public AasUaEntityConceptDescription ConceptDescription;
- public AasUaEntityAsset Asset;
- public AasUaEntityAAS AAS;
-
- public AasUaEntityDataSpecification DataSpecification;
- public AasUaEntityDataSpecificationIEC61360 DataSpecificationIEC61360;
-
- public AasUaInterfaceAASIdentifiableType IAASIdentifiableType;
- public AasUaInterfaceAASReferableType IAASReferableType;
-
- public AasUaNamespaceZeroEntity BaseInterfaceType;
-
- public AasUaNamespaceZeroReference HasDictionaryEntry;
- public AasUaReferenceHasAasReference HasAasReference;
- public AasUaNamespaceZeroReference HasInterface;
- public AasUaNamespaceZeroReference HasAddIn;
- public AasUaNamespaceZeroEntity DictionaryEntryType;
- public AasUaNamespaceZeroEntity UriDictionaryEntryType;
- public AasUaNamespaceZeroEntity IrdiDictionaryEntryType;
- public AasUaNamespaceZeroEntity DictionaryFolderType;
-
- public void BuildEntites(AasEntityBuilder builder)
- {
- // build up entities, which are in the UA specs, but not in this Stack
- BaseInterfaceType = new AasUaNamespaceZeroEntity(builder, 17602);
- HasDictionaryEntry = new AasUaNamespaceZeroReference(builder, 17597);
- HasInterface = new AasUaNamespaceZeroReference(builder, 17603);
- HasAddIn = new AasUaNamespaceZeroReference(builder, 17604);
- DictionaryEntryType = new AasUaNamespaceZeroEntity(builder, 17589);
- UriDictionaryEntryType = new AasUaNamespaceZeroEntity(builder, 17600);
- IrdiDictionaryEntryType = new AasUaNamespaceZeroEntity(builder, 17598);
- DictionaryFolderType = new AasUaNamespaceZeroEntity(builder, 17591);
-
- // AAS DataTypes
- PathType = new AasUaEntityPathType(builder);
- MimeType = new AasUaEntityMimeType(builder);
-
- // first entities
- Referable = new AasUaEntityReferable(builder, 1004);
- Identification = new AasUaEntityIdentification(builder, 1000);
- Administration = new AasUaEntityAdministration(builder, 1001);
-
- // interfaces
- IAASReferableType = new AasUaInterfaceAASReferableType(
- builder, 2001); // dependencies: Referable
- IAASIdentifiableType = new AasUaInterfaceAASIdentifiableType(
- builder, 2000); // dependencies: IAASReferable
-
- // AAS References
- ReferenceBase = new AasUaEntityReferenceBase(builder, 0);
- Reference = new AasUaEntityReference(builder, 1005);
- SemanticId = new AasUaEntitySemanticId(builder, 1006); // dependecies: Reference
- HasAasReference = new AasUaReferenceHasAasReference(builder, 4000); // dependencies: Referable
-
- // Data Specifications
- DataSpecification = new AasUaEntityDataSpecification(builder, 3000);
- DataSpecificationIEC61360 = new AasUaEntityDataSpecificationIEC61360(
- builder, 3001); // dependencies: Reference, Identification, Administration
-
- // rest
- Qualifier = new AasUaEntityQualifier(builder, 1002); // dependencies: SemanticId, Reference
- AssetKind = new AasUaEntityAssetKind(builder, 1025);
- ModelingKind = new AasUaEntityModelingKind(builder, 1003);
- SubmodelElement = new AasUaEntitySubmodelElement(builder, 1008);
- SubmodelWrapper = new AasUaEntitySubmodelWrapper(builder, 1012); // dependencies: SubmodelElement
- Submodel = new AasUaEntitySubmodel(builder, 1007); // dependencies: SubmodelWrapper
- Property = new AasUaEntityProperty(builder, 1009);
- Collection = new AasUaEntityCollection(builder, 1010); // needs 2 ids!
- FileType = new AasUaEntityFileType(builder, 1014);
- File = new AasUaEntityFile(builder, 1013); // dependencies: FileType
- Blob = new AasUaEntityBlob(builder, 1015);
- ReferenceElement = new AasUaEntityReferenceElement(builder, 1016);
- RelationshipElement = new AasUaEntityRelationshipElement(builder, 1017);
- OperationVariable = new AasUaEntityOperationVariable(builder, 1018);
- Operation = new AasUaEntityOperation(builder, 1019);
- //TODO:Remove
- //ConceptDictionary = new AasUaEntityConceptDictionary(builder, 1020);
- ConceptDescription = new AasUaEntityConceptDescription(builder, 1021);
- //TODO:Remove
- //View = new AasUaEntityView(builder, 1022);
- Asset = new AasUaEntityAsset(builder, 1023);
- AAS = new AasUaEntityAAS(builder, 1024);
- }
- }
-
- private AasTypeEntities aasTypes = null;
- public AasTypeEntities AasTypes { get { return aasTypes; } }
-
- //// Annotations
- //
-
- private Dictionary> nodeStateAnnotations = new Dictionary>();
-
- public void AddNodeStateAnnotation(NodeState nodeState, object businessObject)
- {
- if (!nodeStateAnnotations.ContainsKey(nodeState))
- nodeStateAnnotations[nodeState] = new List