forked from eclipse-basyx/basyx-java-server-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Connected Variants of Submodel Elements (eclipse-basyx#280)
* Adds ConnectedBlob,Property,Range and Interface Signed-off-by: Jannik Fried <[email protected]> * added stubs for connected SubmodelElements * Adds ConnectedVariants of Submodel Elements Signed-off-by: FriedJannik <[email protected]> * added test for ConnectedBlob * Fixes bug where only Nested SMEs could be Updated * updated ConnectedBlob * - Makes test faster - Adds Property tests Signed-off-by: FriedJannik <[email protected]> * Changes Interface to Class to remove redundant constructor Adds Entity Test stubs Signed-off-by: FriedJannik <[email protected]> * added tests for further connected SubmodelElements * added remaining tests for connectedSubmodelElements * Fixed dezerialization of SMLs and the respective ConnectedSME tests * Removed Collection Single Property Test * Adds JavaDoc Signed-off-by: FriedJannik <[email protected]> * Adapts JavaDoc Signed-off-by: FriedJannik <[email protected]> * Adapts JavaDoc Signed-off-by: FriedJannik <[email protected]> --------- Signed-off-by: Jannik Fried <[email protected]> Signed-off-by: FriedJannik <[email protected]> Co-authored-by: Aaron Zielstorff <[email protected]>
- Loading branch information
1 parent
b3301fc
commit 86a4fc5
Showing
18 changed files
with
1,185 additions
and
6 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
48 changes: 48 additions & 0 deletions
48
...bmodelservice/client/connectedSubmodelElements/ConnectedAnnotatedRelationshipElement.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 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2024 the Eclipse BaSyx Authors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to | ||
* the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
******************************************************************************/ | ||
|
||
package org.eclipse.digitaltwin.basyx.submodelservice.client.connectedSubmodelElements; | ||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.AnnotatedRelationshipElement; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.AnnotatedRelationshipElementValue; | ||
|
||
/** | ||
* Connected variant of {@link AnnotatedRelationshipElement} | ||
* | ||
* @author zielstor, fried | ||
* | ||
*/ | ||
public class ConnectedAnnotatedRelationshipElement | ||
extends ConnectedSubmodelElement<AnnotatedRelationshipElementValue, AnnotatedRelationshipElement> { | ||
/** | ||
* | ||
* @param submodelServiceUrl URL of the submodel service | ||
* @param idShortPath idShort of the submodel element | ||
*/ | ||
public ConnectedAnnotatedRelationshipElement(String submodelServiceUrl, String idShortPath) { | ||
super(submodelServiceUrl, idShortPath); | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...in/basyx/submodelservice/client/connectedSubmodelElements/ConnectedBasicEventElement.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,47 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2024 the Eclipse BaSyx Authors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to | ||
* the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
******************************************************************************/ | ||
|
||
package org.eclipse.digitaltwin.basyx.submodelservice.client.connectedSubmodelElements; | ||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.BasicEventElement; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.BasicEventValue; | ||
|
||
/** | ||
* Connected variant of {@link BasicEventElement} | ||
* | ||
* @author zielstor, fried | ||
* | ||
*/ | ||
public class ConnectedBasicEventElement extends ConnectedSubmodelElement<BasicEventValue, BasicEventElement> { | ||
/** | ||
* | ||
* @param submodelServiceUrl URL of the submodel service | ||
* @param idShortPath idShort of the submodel element | ||
*/ | ||
public ConnectedBasicEventElement(String submodelServiceUrl, String idShortPath) { | ||
super(submodelServiceUrl, idShortPath); | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...pse/digitaltwin/basyx/submodelservice/client/connectedSubmodelElements/ConnectedBlob.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,47 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2024 the Eclipse BaSyx Authors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to | ||
* the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
******************************************************************************/ | ||
|
||
package org.eclipse.digitaltwin.basyx.submodelservice.client.connectedSubmodelElements; | ||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.Blob; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.FileBlobValue; | ||
|
||
/** | ||
* Connected variant of {@link Blob} | ||
* | ||
* @author zielstor, fried | ||
* | ||
*/ | ||
public class ConnectedBlob extends ConnectedSubmodelElement<FileBlobValue, Blob> { | ||
/** | ||
* | ||
* @param submodelServiceUrl URL of the submodel service | ||
* @param idShortPath idShort of the submodel element | ||
*/ | ||
public ConnectedBlob(String submodelServiceUrl, String idShortPath) { | ||
super(submodelServiceUrl, idShortPath); | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
...e/digitaltwin/basyx/submodelservice/client/connectedSubmodelElements/ConnectedEntity.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,56 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2024 the Eclipse BaSyx Authors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to | ||
* the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
******************************************************************************/ | ||
|
||
package org.eclipse.digitaltwin.basyx.submodelservice.client.connectedSubmodelElements; | ||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.Entity; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.EntityValue; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.mapper.EntityValueMapper; | ||
|
||
/** | ||
* Connected variant of {@link Entity} | ||
* | ||
* @author zielstor, fried | ||
* | ||
*/ | ||
public class ConnectedEntity extends ConnectedSubmodelElement<EntityValue, Entity> { | ||
/** | ||
* | ||
* @param submodelServiceUrl URL of the submodel service | ||
* @param idShortPath idShort of the submodel element | ||
*/ | ||
public ConnectedEntity(String submodelServiceUrl, String idShortPath) { | ||
super(submodelServiceUrl, idShortPath); | ||
} | ||
|
||
@Override | ||
public EntityValue getValue() { | ||
Entity entity = (Entity) service.getSubmodelElement(idShortPath); | ||
EntityValueMapper entityValueMapper = new EntityValueMapper(entity); | ||
return entityValueMapper.getValue(); | ||
} | ||
|
||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...pse/digitaltwin/basyx/submodelservice/client/connectedSubmodelElements/ConnectedFile.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,47 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2024 the Eclipse BaSyx Authors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to | ||
* the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
******************************************************************************/ | ||
|
||
package org.eclipse.digitaltwin.basyx.submodelservice.client.connectedSubmodelElements; | ||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.File; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.FileBlobValue; | ||
|
||
/** | ||
* Connected variant of {@link File} | ||
* | ||
* @author zielstor, fried | ||
* | ||
*/ | ||
public class ConnectedFile extends ConnectedSubmodelElement<FileBlobValue, File> { | ||
/** | ||
* | ||
* @param submodelServiceUrl URL of the submodel service | ||
* @param idShortPath idShort of the submodel element | ||
*/ | ||
public ConnectedFile(String submodelServiceUrl, String idShortPath) { | ||
super(submodelServiceUrl, idShortPath); | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...asyx/submodelservice/client/connectedSubmodelElements/ConnectedMultiLanguageProperty.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,47 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2024 the Eclipse BaSyx Authors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to | ||
* the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
******************************************************************************/ | ||
|
||
package org.eclipse.digitaltwin.basyx.submodelservice.client.connectedSubmodelElements; | ||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.MultiLanguageProperty; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.MultiLanguagePropertyValue; | ||
|
||
/** | ||
* Connected variant of {@link MultiLanguageProperty} | ||
* | ||
* @author zielstor, fried | ||
* | ||
*/ | ||
public class ConnectedMultiLanguageProperty extends ConnectedSubmodelElement<MultiLanguagePropertyValue, MultiLanguageProperty> { | ||
/** | ||
* | ||
* @param submodelServiceUrl URL of the submodel service | ||
* @param idShortPath idShort of the submodel element | ||
*/ | ||
public ConnectedMultiLanguageProperty(String submodelServiceUrl, String idShortPath) { | ||
super(submodelServiceUrl, idShortPath); | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...digitaltwin/basyx/submodelservice/client/connectedSubmodelElements/ConnectedProperty.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,47 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2024 the Eclipse BaSyx Authors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to | ||
* the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* SPDX-License-Identifier: MIT | ||
******************************************************************************/ | ||
|
||
package org.eclipse.digitaltwin.basyx.submodelservice.client.connectedSubmodelElements; | ||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.Property; | ||
import org.eclipse.digitaltwin.basyx.submodelservice.value.PropertyValue; | ||
|
||
/** | ||
* Connected variant of {@link Property} | ||
* | ||
* @author zielstor, fried | ||
* | ||
*/ | ||
public class ConnectedProperty extends ConnectedSubmodelElement<PropertyValue,Property> { | ||
/** | ||
* | ||
* @param submodelServiceUrl URL of the submodel service | ||
* @param idShortPath idShort of the submodel element | ||
*/ | ||
public ConnectedProperty(String submodelServiceUrl, String idShortPath) { | ||
super(submodelServiceUrl,idShortPath); | ||
} | ||
|
||
} |
Oops, something went wrong.