Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit 277b4a0

Browse files
committed
Update I4AAS V3
1 parent b4c0a60 commit 277b4a0

17 files changed

Lines changed: 544 additions & 9932 deletions

dataformat-uanodeset/nodeset/i4aas/Opc.Ua.I4AAS_V3Draft.NodeSet2.csv

Lines changed: 29 additions & 877 deletions
Large diffs are not rendered by default.

dataformat-uanodeset/nodeset/i4aas/Opc.Ua.I4AAS_V3Draft.NodeSet2.xml

Lines changed: 442 additions & 8524 deletions
Large diffs are not rendered by default.

dataformat-uanodeset/nodeset/xsd/Opc.Ua.I4AAS_V3Draft.NodeSet2.bsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<opc:TypeDictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://opcfoundation.org/UA/I4AAS/" DefaultByteOrder="LittleEndian" xmlns:opc="http://opcfoundation.org/BinarySchema/" xmlns:ua="http://opcfoundation.org/UA/" TargetNamespace="http://opcfoundation.org/UA/I4AAS/">
1+
<opc:TypeDictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://opcfoundation.org/UA/I4AAS/V3/" DefaultByteOrder="LittleEndian" xmlns:opc="http://opcfoundation.org/BinarySchema/" xmlns:ua="http://opcfoundation.org/UA/" TargetNamespace="http://opcfoundation.org/UA/I4AAS/V3/">
22
<opc:Import Namespace="http://opcfoundation.org/UA/"/>
33
<opc:StructuredType BaseType="ua:ExtensionObject" Name="AASKeyDataType">
44
<opc:Field TypeName="tns:AASKeyElementsDataType" Name="Type"/>

dataformat-uanodeset/nodeset/xsd/Opc.Ua.I4AAS_V3Draft.NodeSet2.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<xs:schema elementFormDefault="qualified" targetNamespace="http://opcfoundation.org/UA/I4AAS/Types.xsd" xmlns:tns="http://opcfoundation.org/UA/I4AAS/Types.xsd" xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
1+
<xs:schema elementFormDefault="qualified" targetNamespace="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd" xmlns:tns="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd" xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
22
<xs:import namespace="http://opcfoundation.org/UA/2008/02/Types.xsd"/>
33
<xs:simpleType name="AASAssetKindDataType">
44
<xs:restriction base="xs:string">

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/AssetAdministrationShellMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private void mapAsset() {
5454
}
5555

5656
private void mapSubmodels() {
57-
UAObject smFolder = createFolder("Submodel");
57+
UAObject smFolder = createReferenceList("Submodel");
5858
List<io.adminshell.aas.v3.model.Reference> submodels = source.getSubmodels();
5959
for (int i = 0; i < submodels.size(); i++) {
6060
io.adminshell.aas.v3.model.Reference reference = submodels.get(i);

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/AssetInformationMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected void mapAndAttachChildren() {
6767
attachAsComponent(target, uaThumbnail);
6868
}
6969

70-
UAObject folder = createFolder("SpecificAssetId");
70+
UAObject folder = createIdentifierKeyValuePairList("SpecificAssetId");
7171
for (IdentifierKeyValuePair identifierKeyValuePair : source.getSpecificAssetIds()) {
7272
UAObject uaIdKVP = new IdentifierKeyValuePairMapper(identifierKeyValuePair, ctx).map();
7373
attachAsComponent(folder, uaIdKVP);

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/ConceptDescriptionMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected void mapAndAttachChildren() {
4949

5050
mapDataSpecification(source, target, ctx);
5151

52-
UAObject createFolder = createFolder("IsCaseOf");
52+
UAObject createFolder = createReferenceList("IsCaseOf");
5353
for (Reference reference : source.getIsCaseOfs()) {
5454
UAObject uaRef = new ReferenceMapper(reference, ctx, reference.getKeys().get(0).getValue()).map();
5555
attachAsComponent(createFolder, uaRef);

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/HasDataSpecificationMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.opcfoundation.ua._2011._03.uanodeset.ListOfReferences;
2121
import org.opcfoundation.ua._2011._03.uanodeset.UAObject;
2222

23+
import io.adminshell.aas.v3.dataformat.i4aas.mappers.utils.I4AASIdentifier;
2324
import io.adminshell.aas.v3.dataformat.i4aas.mappers.utils.UaIdentifier;
2425
import io.adminshell.aas.v3.model.DataSpecificationContent;
2526
import io.adminshell.aas.v3.model.DataSpecificationIEC61360;
@@ -31,7 +32,7 @@ public interface HasDataSpecificationMapper {
3132

3233
public default void mapDataSpecification(HasDataSpecification source, UAObject target, MappingContext ctx) {
3334

34-
UAObject folder = I4AASMapper.createFolder(target, "DataSpecification", ctx);
35+
UAObject folder = I4AASMapper.createFolder(target, "DataSpecification", ctx, I4AASIdentifier.AASReferenceList);
3536

3637
List<EmbeddedDataSpecification> embeddedDataSpecifications = source.getEmbeddedDataSpecifications();
3738
for (int i = 0; i < embeddedDataSpecifications.size(); i++) {

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/I4AASMapper.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,35 @@ protected final String createI4AASBrowseName(String name) {
9898
}
9999

100100
protected final UAObject createFolder(String folderName) {
101-
return createFolder((UAObject) target, folderName, ctx);
101+
return createFolder((UAObject) target, folderName, ctx, UaIdentifier.FolderType);
102102
}
103103

104104
private static final String createI4AASBrowseName(String name, MappingContext ctx) {
105105
return ctx.getI4aasNsIndex() + ":" + name;
106106
}
107107

108-
public static final UAObject createFolder(UAObject target, String folderName, MappingContext ctx) {
108+
public static final UAObject createFolder(UAObject target, String folderName, MappingContext ctx, BasicIdentifier folderSubtype) {
109109
UAObject folder = UAObject.builder().withNodeId(ctx.newModelNodeIdAsString())
110110
.withBrowseName(createI4AASBrowseName(folderName, ctx)).withDisplayName(createLocalizedText(folderName))
111111
.build();
112112
ctx.getNodeSet().getUAObjectOrUAVariableOrUAMethod().add(folder);
113-
addTypeReferenceFor(folder, UaIdentifier.FolderType, ctx);
113+
addTypeReferenceFor(folder, folderSubtype, ctx);
114114
attachAsComponent((UAObject) target, folder);
115115
return folder;
116116
}
117+
118+
119+
public final UAObject createReferenceList(String folderName) {
120+
return createFolder((UAObject) target, folderName, ctx, I4AASIdentifier.AASReferenceList);
121+
}
117122

123+
public final UAObject createSubmodelElementList(String folderName){
124+
return createFolder((UAObject)target, folderName, ctx, I4AASIdentifier.AASSubmodelElementList);
125+
}
126+
127+
public final UAObject createIdentifierKeyValuePairList(String folderName) {
128+
return createFolder((UAObject)target, folderName, ctx, I4AASIdentifier.AASIdentifierKeyValuePairList);
129+
}
118130

119131
protected static void attachAsType(UAInstance parent, UAInstance child, BasicIdentifier typeId) {
120132
child.setParentNodeId(parent.getNodeId());

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/QualifiableMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import org.opcfoundation.ua._2011._03.uanodeset.UAObject;
2121

22+
import io.adminshell.aas.v3.dataformat.i4aas.mappers.utils.I4AASIdentifier;
2223
import io.adminshell.aas.v3.model.Constraint;
2324
import io.adminshell.aas.v3.model.Qualifiable;
2425
import io.adminshell.aas.v3.model.Qualifier;
@@ -27,7 +28,7 @@ public interface QualifiableMapper {
2728

2829
public default void mapQualifiable(Qualifiable source, UAObject target, MappingContext ctx) {
2930

30-
UAObject folder = I4AASMapper.createFolder(target, "Qualifier", ctx);
31+
UAObject folder = I4AASMapper.createFolder(target, "Qualifier", ctx, I4AASIdentifier.AASQualifierList);
3132

3233
List<Constraint> qualifiers = source.getQualifiers();
3334
for (int i = 0; i < qualifiers.size(); i++) {

0 commit comments

Comments
 (0)