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

Commit 23436a1

Browse files
author
Atlassian Bamboo
committed
Updating raw Java classes to 1.1.2-SNAPSHOT
1 parent ab7af18 commit 23436a1

3 files changed

Lines changed: 21 additions & 32 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ public interface Entity extends SubmodelElement {
6161
* Constraint AASd-014: Either the attribute globalAssetId or externalAssetId of an Entity must be
6262
* set if Entity/entityType is set to 'SelfManagedEntity'. They are not existing otherwise.
6363
*
64-
* More information under https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId
64+
* More information under https://admin-shell.io/aas/3/0/RC01/Entity/specificAssetId
6565
*
66-
* @return Returns the List of IdentifierKeyValuePairs for the property externalAssetIds.
66+
* @return Returns the IdentifierKeyValuePair for the property specificAssetId.
6767
*/
68-
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId")
69-
List<IdentifierKeyValuePair> getExternalAssetIds();
68+
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/specificAssetId")
69+
IdentifierKeyValuePair getSpecificAssetId();
7070

7171
/**
7272
* Reference to an identifier key value pair representing an external identifier of the asset
@@ -78,11 +78,11 @@ public interface Entity extends SubmodelElement {
7878
* Constraint AASd-014: Either the attribute globalAssetId or externalAssetId of an Entity must be
7979
* set if Entity/entityType is set to 'SelfManagedEntity'. They are not existing otherwise.
8080
*
81-
* More information under https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId
81+
* More information under https://admin-shell.io/aas/3/0/RC01/Entity/specificAssetId
8282
*
83-
* @param externalAssetIds desired value for the property externalAssetIds.
83+
* @param specificAssetId desired value for the property specificAssetId.
8484
*/
85-
void setExternalAssetIds(List<IdentifierKeyValuePair> externalAssetIds);
85+
void setSpecificAssetId(IdentifierKeyValuePair specificAssetId);
8686

8787
/**
8888
* Describes whether the entity is a co-managed entity or a self-managed entity.

src/main/java/io/adminshell/aas/v3/model/builder/EntityBuilder.java

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,13 @@ public B globalAssetId(Reference globalAssetId) {
2323
}
2424

2525
/**
26-
* This function allows setting a value for externalAssetIds
26+
* This function allows setting a value for specificAssetId
2727
*
28-
* @param externalAssetIds desired value to be set
29-
* @return Builder object with new value for externalAssetIds
28+
* @param specificAssetId desired value to be set
29+
* @return Builder object with new value for specificAssetId
3030
*/
31-
public B externalAssetIds(List<IdentifierKeyValuePair> externalAssetIds) {
32-
getBuildingInstance().setExternalAssetIds(externalAssetIds);
33-
return getSelf();
34-
}
35-
36-
/**
37-
* This function allows adding a value to the List externalAssetIds
38-
*
39-
* @param externalAssetId desired value to be added
40-
* @return Builder object with new value for externalAssetIds
41-
*/
42-
public B externalAssetId(IdentifierKeyValuePair externalAssetId) {
43-
getBuildingInstance().getExternalAssetIds().add(externalAssetId);
31+
public B specificAssetId(IdentifierKeyValuePair specificAssetId) {
32+
getBuildingInstance().setSpecificAssetId(specificAssetId);
4433
return getSelf();
4534
}
4635

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public class DefaultEntity implements Entity {
2525
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/entityType")
2626
protected EntityType entityType;
2727

28-
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId")
29-
protected List<IdentifierKeyValuePair> externalAssetIds = new ArrayList<>();
30-
3128
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/globalAssetId")
3229
protected Reference globalAssetId;
3330

31+
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/specificAssetId")
32+
protected IdentifierKeyValuePair specificAssetId;
33+
3434
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/statement")
3535
protected List<SubmodelElement> statements = new ArrayList<>();
3636

@@ -63,7 +63,7 @@ public DefaultEntity() {}
6363
@Override
6464
public int hashCode() {
6565
return Objects.hash(this.globalAssetId,
66-
this.externalAssetIds,
66+
this.specificAssetId,
6767
this.entityType,
6868
this.statements,
6969
this.category,
@@ -87,7 +87,7 @@ public boolean equals(Object obj) {
8787
} else {
8888
DefaultEntity other = (DefaultEntity) obj;
8989
return Objects.equals(this.globalAssetId, other.globalAssetId) &&
90-
Objects.equals(this.externalAssetIds, other.externalAssetIds) &&
90+
Objects.equals(this.specificAssetId, other.specificAssetId) &&
9191
Objects.equals(this.entityType, other.entityType) &&
9292
Objects.equals(this.statements, other.statements) &&
9393
Objects.equals(this.category, other.category) &&
@@ -112,13 +112,13 @@ public void setGlobalAssetId(Reference globalAssetId) {
112112
}
113113

114114
@Override
115-
public List<IdentifierKeyValuePair> getExternalAssetIds() {
116-
return externalAssetIds;
115+
public IdentifierKeyValuePair getSpecificAssetId() {
116+
return specificAssetId;
117117
}
118118

119119
@Override
120-
public void setExternalAssetIds(List<IdentifierKeyValuePair> externalAssetIds) {
121-
this.externalAssetIds = externalAssetIds;
120+
public void setSpecificAssetId(IdentifierKeyValuePair specificAssetId) {
121+
this.specificAssetId = specificAssetId;
122122
}
123123

124124
@Override

0 commit comments

Comments
 (0)