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

Commit fd67f82

Browse files
committed
fixed failed text after V3 Type changes
1 parent 4628f87 commit fd67f82

3 files changed

Lines changed: 15 additions & 12 deletions

File tree

dataformat-uanodeset/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ The OPC UA Companion Specification as published by [opcfoundation.org](https://o
66

77
You can find the pre-release UA NodeSet as xml under /nodeset/i4aas as well as all changes documented in a CSV file.
88

9+
## generated JAXB classes
10+
11+
The UA NodeSet de/serializer is based on JAXB annotated classes, generated by from 3 XSD files (/nodeset/xsd), which you can also extract from the pom.xml. The execution with id *generate-uatypes-classes* is deactivated since minor manual changes were necessary so that the XML namespaces are set correctly. To prevent overrides, these generated, then adjusted classes for *generate-uatypes-classes* are copy-pasted from /target/generated/src/main/java to /src/main/java If you need to update these classes, consider to change the execution phase to *generate-sources*.

dataformat-uanodeset/src/test/java/io/adminshell/aas/v3/dataformat/i4aas/GeneratedExtensionObjectTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ public void testJAXBunmarshalling() throws JAXBException {
5454
JAXBContext jaxbCtx = org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(new Class[] {UANodeSet.class, ListOfExtensionObject.class, AASKeyDataType.class}, null);
5555

5656
InputStream resourceAsStream = GeneratedExtensionObjectTest.class
57-
.getResourceAsStream("/aasdatatypekey_example.xml");
57+
.getResourceAsStream("/AASSimple_v3Draft.xml");
5858
UANodeSet uanodeset = (UANodeSet) jaxbCtx.createUnmarshaller().unmarshal(resourceAsStream);
5959
List<UANode> uaObjectOrUAVariableOrUAMethod = uanodeset.getUAObjectOrUAVariableOrUAMethod();
6060
for (UANode uaNode : uaObjectOrUAVariableOrUAMethod) {
61-
if (uaNode.getNodeId().equals("ns=1;i=6002")) {
61+
if (uaNode.getNodeId().equals("ns=1;i=162")) {
6262
UAVariable uaNodeAsVar = (UAVariable) uaNode;
6363
Object genericExtension = uaNodeAsVar.getValue().getAny();
6464

@@ -71,7 +71,7 @@ public void testJAXBunmarshalling() throws JAXBException {
7171

7272
JAXBElement<AASKeyDataType> aasKey = jaxbCtx.createUnmarshaller().unmarshal((Node) anyAASDataTypeKey, AASKeyDataType.class);
7373

74-
Assert.assertEquals(AASKeyTypeDataType.ID_SHORT_0, aasKey.getValue().getIdType());
74+
Assert.assertEquals(AASKeyTypeDataType.IRI_4, aasKey.getValue().getIdType());
7575
}
7676
}
7777
}

dataformat-uanodeset/src/test/resources/AASSimple_V3Draft.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Uri>http://opcfoundation.org/UA/I4AAS/V3/</Uri>
66
</NamespaceUris>
77
<Models>
8-
<Model ModelUri="http://example.org/SerializerTest" Version="1.0.0" PublicationDate="2021-07-28T09:46:55.837552400">
8+
<Model ModelUri="http://example.org/SerializerTest" Version="1.0.0" PublicationDate="2021-07-29T09:18:37.095581700">
99
<RequiredModel ModelUri="http://opcfoundation.org/UA/" Version="1.04.7" PublicationDate="2020-07-15T00:00:00Z"/>
1010
<RequiredModel ModelUri="http://opcfoundation.org/UA/I4AAS/V3/" Version="1.0.0" PublicationDate="2021-06-04T00:00:00Z"/>
1111
</Model>
@@ -594,7 +594,7 @@
594594
<uax:Identifier>ns=2;i=5039</uax:Identifier>
595595
</uax:TypeId>
596596
<uax:Body>
597-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
597+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
598598
<ns0:Type>GlobalReference_13</ns0:Type>
599599
<ns0:Value>0173-1#05-AAA650#002</ns0:Value>
600600
<ns0:IdType>IRDI_3</ns0:IdType>
@@ -791,7 +791,7 @@
791791
<uax:Identifier>ns=2;i=5039</uax:Identifier>
792792
</uax:TypeId>
793793
<uax:Body>
794-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
794+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
795795
<ns0:Type>GlobalReference_13</ns0:Type>
796796
<ns0:Value>0173-1#05-AAA650#002</ns0:Value>
797797
<ns0:IdType>IRDI_3</ns0:IdType>
@@ -1784,7 +1784,7 @@
17841784
<uax:Identifier>ns=2;i=5039</uax:Identifier>
17851785
</uax:TypeId>
17861786
<uax:Body>
1787-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
1787+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
17881788
<ns0:Type>Asset_2</ns0:Type>
17891789
<ns0:Value>http://customer.com/assets/KHBVZJSQKIY</ns0:Value>
17901790
<ns0:IdType>IRI_4</ns0:IdType>
@@ -1901,7 +1901,7 @@
19011901
<uax:Identifier>ns=2;i=5039</uax:Identifier>
19021902
</uax:TypeId>
19031903
<uax:Body>
1904-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
1904+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
19051905
<ns0:Type>GlobalReference_13</ns0:Type>
19061906
<ns0:Value>http://customer.com/Systems/ERP/012</ns0:Value>
19071907
<ns0:IdType>IRI_4</ns0:IdType>
@@ -1962,7 +1962,7 @@
19621962
<uax:Identifier>ns=2;i=5039</uax:Identifier>
19631963
</uax:TypeId>
19641964
<uax:Body>
1965-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
1965+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
19661966
<ns0:Type>GlobalReference_13</ns0:Type>
19671967
<ns0:Value>http://customer.com/Systems/IoT/1</ns0:Value>
19681968
<ns0:IdType>IRI_4</ns0:IdType>
@@ -2023,7 +2023,7 @@
20232023
<uax:Identifier>ns=2;i=5039</uax:Identifier>
20242024
</uax:TypeId>
20252025
<uax:Body>
2026-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
2026+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
20272027
<ns0:Type>Submodel_20</ns0:Type>
20282028
<ns0:Value>http://i40.customer.com/type/1/1/7A7104BDAB57E184</ns0:Value>
20292029
<ns0:IdType>IRI_4</ns0:IdType>
@@ -2054,7 +2054,7 @@
20542054
<uax:Identifier>ns=2;i=5039</uax:Identifier>
20552055
</uax:TypeId>
20562056
<uax:Body>
2057-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
2057+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
20582058
<ns0:Type>Submodel_20</ns0:Type>
20592059
<ns0:Value>http://i40.customer.com/instance/1/1/AC69B1CB44F07935</ns0:Value>
20602060
<ns0:IdType>IRI_4</ns0:IdType>
@@ -2085,7 +2085,7 @@
20852085
<uax:Identifier>ns=2;i=5039</uax:Identifier>
20862086
</uax:TypeId>
20872087
<uax:Body>
2088-
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/Types.xsd">
2088+
<ns0:AASKeyDataType xmlns:ns0="http://opcfoundation.org/UA/I4AAS/V3/Types.xsd">
20892089
<ns0:Type>Submodel_20</ns0:Type>
20902090
<ns0:Value>http://i40.customer.com/type/1/1/1A7B62B529F19152</ns0:Value>
20912091
<ns0:IdType>IRI_4</ns0:IdType>

0 commit comments

Comments
 (0)