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

Commit fc86843

Browse files
author
Atlassian Bamboo
committed
Updating raw Java classes to 1.1.2-SNAPSHOT
1 parent fd85029 commit fc86843

3 files changed

Lines changed: 30 additions & 56 deletions

File tree

src/main/java/io/adminshell/aas/v3/model/EmbeddedDataSpecification.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.adminshell.aas.v3.model;
22

3-
import java.util.List;
43

54

65

@@ -26,10 +25,10 @@ public interface EmbeddedDataSpecification {
2625
* More information under
2726
* https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecification
2827
*
29-
* @return Returns the List of References for the property dataSpecifications.
28+
* @return Returns the Reference for the property dataSpecification.
3029
*/
3130
@IRI("https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecification")
32-
List<Reference> getDataSpecifications();
31+
Reference getDataSpecification();
3332

3433
/**
3534
* Global reference to the data specification template used by the element. Reference points to a
@@ -40,9 +39,9 @@ public interface EmbeddedDataSpecification {
4039
* More information under
4140
* https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecification
4241
*
43-
* @param dataSpecifications desired value for the property dataSpecifications.
42+
* @param dataSpecification desired value for the property dataSpecification.
4443
*/
45-
void setDataSpecifications(List<Reference> dataSpecifications);
44+
void setDataSpecification(Reference dataSpecification);
4645

4746
/**
4847
* Property links to a Data Specification Content, which contains the formalized definitions
@@ -51,10 +50,10 @@ public interface EmbeddedDataSpecification {
5150
* More information under
5251
* https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent
5352
*
54-
* @return Returns the List of DataSpecificationContents for the property dataSpecificationContents.
53+
* @return Returns the DataSpecificationContent for the property dataSpecificationContent.
5554
*/
5655
@IRI("https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent")
57-
List<DataSpecificationContent> getDataSpecificationContents();
56+
DataSpecificationContent getDataSpecificationContent();
5857

5958
/**
6059
* Property links to a Data Specification Content, which contains the formalized definitions
@@ -63,8 +62,8 @@ public interface EmbeddedDataSpecification {
6362
* More information under
6463
* https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent
6564
*
66-
* @param dataSpecificationContents desired value for the property dataSpecificationContents.
65+
* @param dataSpecificationContent desired value for the property dataSpecificationContent.
6766
*/
68-
void setDataSpecificationContents(List<DataSpecificationContent> dataSpecificationContents);
67+
void setDataSpecificationContent(DataSpecificationContent dataSpecificationContent);
6968

7069
}
Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.adminshell.aas.v3.model.builder;
22

3-
import java.util.List;
43

54

65

@@ -13,46 +12,24 @@ public abstract class EmbeddedDataSpecificationBuilder<T extends EmbeddedDataSpe
1312
extends ExtendableBuilder<T, B> {
1413

1514
/**
16-
* This function allows setting a value for dataSpecifications
15+
* This function allows setting a value for dataSpecification
1716
*
18-
* @param dataSpecifications desired value to be set
19-
* @return Builder object with new value for dataSpecifications
20-
*/
21-
public B dataSpecifications(List<Reference> dataSpecifications) {
22-
getBuildingInstance().setDataSpecifications(dataSpecifications);
23-
return getSelf();
24-
}
25-
26-
/**
27-
* This function allows adding a value to the List dataSpecifications
28-
*
29-
* @param dataSpecification desired value to be added
30-
* @return Builder object with new value for dataSpecifications
17+
* @param dataSpecification desired value to be set
18+
* @return Builder object with new value for dataSpecification
3119
*/
3220
public B dataSpecification(Reference dataSpecification) {
33-
getBuildingInstance().getDataSpecifications().add(dataSpecification);
34-
return getSelf();
35-
}
36-
37-
/**
38-
* This function allows setting a value for dataSpecificationContents
39-
*
40-
* @param dataSpecificationContents desired value to be set
41-
* @return Builder object with new value for dataSpecificationContents
42-
*/
43-
public B dataSpecificationContents(List<DataSpecificationContent> dataSpecificationContents) {
44-
getBuildingInstance().setDataSpecificationContents(dataSpecificationContents);
21+
getBuildingInstance().setDataSpecification(dataSpecification);
4522
return getSelf();
4623
}
4724

4825
/**
49-
* This function allows adding a value to the List dataSpecificationContents
26+
* This function allows setting a value for dataSpecificationContent
5027
*
51-
* @param dataSpecificationContent desired value to be added
52-
* @return Builder object with new value for dataSpecificationContents
28+
* @param dataSpecificationContent desired value to be set
29+
* @return Builder object with new value for dataSpecificationContent
5330
*/
5431
public B dataSpecificationContent(DataSpecificationContent dataSpecificationContent) {
55-
getBuildingInstance().getDataSpecificationContents().add(dataSpecificationContent);
32+
getBuildingInstance().setDataSpecificationContent(dataSpecificationContent);
5633
return getSelf();
5734
}
5835
}

src/main/java/io/adminshell/aas/v3/model/impl/DefaultEmbeddedDataSpecification.java

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.adminshell.aas.v3.model.impl;
22

3-
import java.util.ArrayList;
4-
import java.util.List;
53
import java.util.Objects;
64

75

@@ -20,17 +18,17 @@
2018
public class DefaultEmbeddedDataSpecification implements EmbeddedDataSpecification {
2119

2220
@IRI("https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecification")
23-
protected List<Reference> dataSpecifications = new ArrayList<>();
21+
protected Reference dataSpecification;
2422

2523
@IRI("https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent")
26-
protected List<DataSpecificationContent> dataSpecificationContents = new ArrayList<>();
24+
protected DataSpecificationContent dataSpecificationContent;
2725

2826
public DefaultEmbeddedDataSpecification() {}
2927

3028
@Override
3129
public int hashCode() {
32-
return Objects.hash(this.dataSpecifications,
33-
this.dataSpecificationContents);
30+
return Objects.hash(this.dataSpecification,
31+
this.dataSpecificationContent);
3432
}
3533

3634
@Override
@@ -43,29 +41,29 @@ public boolean equals(Object obj) {
4341
return false;
4442
} else {
4543
DefaultEmbeddedDataSpecification other = (DefaultEmbeddedDataSpecification) obj;
46-
return Objects.equals(this.dataSpecifications, other.dataSpecifications) &&
47-
Objects.equals(this.dataSpecificationContents, other.dataSpecificationContents);
44+
return Objects.equals(this.dataSpecification, other.dataSpecification) &&
45+
Objects.equals(this.dataSpecificationContent, other.dataSpecificationContent);
4846
}
4947
}
5048

5149
@Override
52-
public List<Reference> getDataSpecifications() {
53-
return dataSpecifications;
50+
public Reference getDataSpecification() {
51+
return dataSpecification;
5452
}
5553

5654
@Override
57-
public void setDataSpecifications(List<Reference> dataSpecifications) {
58-
this.dataSpecifications = dataSpecifications;
55+
public void setDataSpecification(Reference dataSpecification) {
56+
this.dataSpecification = dataSpecification;
5957
}
6058

6159
@Override
62-
public List<DataSpecificationContent> getDataSpecificationContents() {
63-
return dataSpecificationContents;
60+
public DataSpecificationContent getDataSpecificationContent() {
61+
return dataSpecificationContent;
6462
}
6563

6664
@Override
67-
public void setDataSpecificationContents(List<DataSpecificationContent> dataSpecificationContents) {
68-
this.dataSpecificationContents = dataSpecificationContents;
65+
public void setDataSpecificationContent(DataSpecificationContent dataSpecificationContent) {
66+
this.dataSpecificationContent = dataSpecificationContent;
6967
}
7068

7169
/**

0 commit comments

Comments
 (0)