-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de86db6
commit a3f7471
Showing
5 changed files
with
126 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSemanticId.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package de.fraunhofer.iosb.app.model.aas; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAutoDetect; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
|
||
import io.adminshell.aas.v3.model.Key; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
|
||
@JsonAutoDetect | ||
@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) | ||
@JsonInclude(Include.NON_NULL) | ||
public class CustomSemanticId { | ||
private List<CustomSemanticIdKey> keys; | ||
|
||
public List<CustomSemanticIdKey> getKeys() { | ||
return keys; | ||
} | ||
|
||
public void setKeys(List<CustomSemanticIdKey> keys) { | ||
this.keys = keys; | ||
} | ||
|
||
public CustomSemanticId() { | ||
this.keys = Collections.emptyList(); | ||
} | ||
|
||
public CustomSemanticId(List<Key> keys) { | ||
this.keys = new ArrayList<>(); | ||
for (Key key : keys) { | ||
|
||
var customSemanticIdKey = new CustomSemanticIdKey(); | ||
|
||
customSemanticIdKey.setIdType(key.getIdType()); | ||
customSemanticIdKey.setType(key.getType()); | ||
customSemanticIdKey.setValue(key.getValue()); | ||
|
||
this.keys.add(customSemanticIdKey); | ||
|
||
} | ||
} | ||
|
||
} |
46 changes: 46 additions & 0 deletions
46
edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSemanticIdKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package de.fraunhofer.iosb.app.model.aas; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonAutoDetect; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
|
||
import io.adminshell.aas.v3.model.KeyElements; | ||
import io.adminshell.aas.v3.model.KeyType; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
|
||
@JsonAutoDetect | ||
@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) | ||
@JsonInclude(Include.NON_NULL) | ||
public class CustomSemanticIdKey { | ||
private KeyType idType; | ||
private KeyElements type; | ||
private String value; | ||
|
||
|
||
public KeyType getIdType() { | ||
return idType; | ||
} | ||
|
||
public void setIdType(KeyType idType) { | ||
this.idType = idType; | ||
} | ||
|
||
public KeyElements getType() { | ||
return type; | ||
} | ||
|
||
public void setType(KeyElements type) { | ||
this.type = type; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters