forked from eclipse-aas4j/aas4j
-
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.
* rerun the generator on part 2 classes * remove all *Metadata classes * fix outdated attributes and cardinalities * fix inheritence relations between result classes * remove class SubmodelElementAttributes * reintroduce Arrays.toString(...) for byte[] * map duration to javax.xml.datatype.Duration
- Loading branch information
1 parent
cbfc4d2
commit 1501411
Showing
74 changed files
with
527 additions
and
8,202 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
63 changes: 63 additions & 0 deletions
63
...t/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDurationDeserializerTest.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,63 @@ | ||
/* | ||
* Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. | ||
* Copyright (C) 2023 SAP SE or an SAP affiliate company. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; | ||
|
||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; | ||
import org.eclipse.digitaltwin.aas4j.v3.dataformat.SerializationException; | ||
import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.Examples; | ||
import org.eclipse.digitaltwin.aas4j.v3.model.OperationRequest; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import javax.xml.datatype.DatatypeConfigurationException; | ||
import javax.xml.datatype.DatatypeFactory; | ||
import javax.xml.datatype.Duration; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class JsonDurationDeserializerTest { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(JsonDurationDeserializerTest.class); | ||
|
||
String operationRequestString; | ||
|
||
@Before | ||
public void prepare() throws SerializationException, JsonProcessingException { | ||
|
||
operationRequestString = new ObjectMapper().writeValueAsString(Examples.OPERATION_REQUEST); | ||
|
||
} | ||
|
||
|
||
@Test | ||
public void testDeserializeDuration() throws DeserializationException, DatatypeConfigurationException { | ||
|
||
Duration duration = DatatypeFactory.newInstance().newDurationDayTime("P0DT0H3M0S"); // three minutes | ||
|
||
JsonDeserializer deserializer = new JsonDeserializer(); | ||
|
||
OperationRequest operationRequest = deserializer.read(operationRequestString, OperationRequest.class); | ||
|
||
assertEquals( operationRequest.getClientTimeoutDuration() , duration); | ||
} | ||
|
||
|
||
} |
30 changes: 0 additions & 30 deletions
30
...ain/java/org/eclipse/digitaltwin/aas4j/v3/model/AnnotatedRelationshipElementMetadata.java
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
...rc/main/java/org/eclipse/digitaltwin/aas4j/v3/model/AssetAdministrationShellMetadata.java
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
model/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/BaseOperationResult.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,65 @@ | ||
/* | ||
* Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. | ||
* Copyright (c) 2023, SAP SE or an SAP affiliate company | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License | ||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
* or implied. See the License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package org.eclipse.digitaltwin.aas4j.v3.model; | ||
|
||
|
||
import org.eclipse.digitaltwin.aas4j.v3.model.annotations.IRI; | ||
import org.eclipse.digitaltwin.aas4j.v3.model.annotations.KnownSubtypes; | ||
import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultBaseOperationResult; | ||
|
||
|
||
/** | ||
*/ | ||
@KnownSubtypes({ | ||
@KnownSubtypes.Type(value = DefaultBaseOperationResult.class) | ||
}) | ||
public interface BaseOperationResult extends Result { | ||
|
||
/** | ||
* | ||
* More information under https://admin-shell.io/aas/3/0/BaseOperationResult/executionState | ||
* | ||
* @return Returns the ExecutionState for the property executionState. | ||
*/ | ||
@IRI("https://admin-shell.io/aas/3/0/BaseOperationResult/executionState") | ||
ExecutionState getExecutionState(); | ||
|
||
/** | ||
* | ||
* More information under https://admin-shell.io/aas/3/0/BaseOperationResult/executionState | ||
* | ||
* @param executionState desired value for the property executionState. | ||
*/ | ||
void setExecutionState(ExecutionState executionState); | ||
|
||
/** | ||
* | ||
* More information under https://admin-shell.io/aas/3/0/BaseOperationResult/success | ||
* | ||
* @return Returns the boolean for the property success. | ||
*/ | ||
@IRI("https://admin-shell.io/aas/3/0/BaseOperationResult/success") | ||
boolean getSuccess(); | ||
|
||
/** | ||
* | ||
* More information under https://admin-shell.io/aas/3/0/BaseOperationResult/success | ||
* | ||
* @param success desired value for the property success. | ||
*/ | ||
void setSuccess(boolean success); | ||
|
||
} |
Oops, something went wrong.