-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Newly generated V3.0.1 Classes and toString() Method #159
Newly generated V3.0.1 Classes and toString() Method #159
Conversation
I just realise that I have re-added the "dataformat-rdf" and "validator". Will remove them before merging. |
"DefaultBlob (" + "value=%s," | ||
+ "contentType=%s," | ||
+ ")", | ||
this.value, this.contentType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably would be nice if we could use Arrays.toString(this.value)
here as the value is a byte[] and converting it to String might "change", or better "hide", its original value.
For example, depending on the encoding, two different byte[] value might produce the same output, e.g. [-1, -2, -3] and [-17, -65, -67, -17, -65, -67, -17, -65, -67] both produce the output [B@57fa26b7
when serialized this way.
When using Arrays.toString(...)
the values would be printed as arrays and not be converted to string and therefore would produce different output as expected.
…ostring # Conflicts: # dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/MostSpecificClassComparator.java # dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/mapping/Mapper.java # dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/mapping/MappingException.java # dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonDeserializer.java # dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializer.java # dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableDeserializerTest.java # dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonReferableSerializerTest.java # dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonSerializerTest.java # dataformat-json/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/util/Examples.java # dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java # model/pom.xml
@arnoweiss would it be possible for you to review this PR? |
Builds, tests updated, looks good to me. |
This is not possible, or at least I don't know how, other than doing it manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good
.annotationIntrospector(new ReflectionAnnotationIntrospector()) | ||
.build(); | ||
ReflectionHelper.JSON_MIXINS.entrySet().forEach(x -> mapper.addMixIn(x.getKey(), x.getValue())); | ||
} | ||
|
||
protected SimpleModule buildCustomSerializerModule() { | ||
SimpleModule module = new SimpleModule(); | ||
// TODO: module.addSerializer(EmbeddedDataSpecification.class, new EmbeddedDataSpecificationSerializer()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either remove or implement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This PR contains the model classes as generated by the latest V3.0.1 RDF schema files.
Additionally,
this.kind = ModellingKind.INSTANCE;