Skip to content
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

Minor Changes #494

Merged
merged 15 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ A leaf submodel element follows the rules for the different submodel elements co
If it is not a leaf element, the serialization rules must be transitively followed until the value is a leaf submodel element.
* xref:spec-metamodel/referencing.adoc#Reference[Reference] is serialized in format "Normal".
* xref:spec-metamodel/core.adoc#SpecificAssetId[SpecificAssetId] is serialized in format "Normal".
* xref:spec-metamodel/submodel-elements.adoc#SubmodelElement[SubmodelElement]s without a value are not serialized.

* For each submodel element within the submodel, the submodel collection or submodel list:

Expand Down Expand Up @@ -185,7 +186,7 @@ Note: the examples are written in RDF/Turtle syntax, and only "Hello" and "Hallo

|===

The following types defined by the XSD and RDF specifications are explicitly omitted for serialization - they are not element of _DataTypeDefXsd_ or _DataTypeDefRdf_:
The following types defined by the XSD and RDF specifications are explicitly omitted for serialization - they are not element of xref:spec-metamodel/datatypes.adoc#DataTypeDefXsd[DataTypeDefXsd] or xref:spec-metamodel/datatypes.adoc#DataTypeDefRdf[DataTypeDefRdf]:
xs:language, xs:normalizedString, xs:token, xs:NMTOKEN, xs:Name, xs:NCName, xs:QName, xs:ENTITY, xs:ID, xs:IDREF, xs:NOTATION, xs:IDREFS, xs:ENTITIES, xs:NMTOKENS, rdf:HTML and rdf:XMLLiteral.

====
Expand Down Expand Up @@ -294,6 +295,41 @@ The Format "Normal" in comparison to this Value-Only serialization of the proper
}
----

==== Example Value-Only serialization for a SubmodelElementCollection with non-serialized elements

The following SubmodelElementCollection in simplified notation

[source,json,linenums]
----
{
myCollection:
{
"prop1": string,
"capability1": Capability,
"operation1": Operation,
"list": SubmodelElementList(typeofElements:Operation)
}
}
----

is serialized to

[source,json,linenums]
----
"prop1": "value of prop1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is { missing here?

}
----

in Format "Value".

Since Capability and Operation are not part of Value-Only serialization they are omitted.
Also a List containing elements that are omitted is omitted. This is even the case if the SubmodelElementList is mandatory.

====
Note: Similar handling is required in case there are access rules disallowing access to specific submodel elements:
The protected elements shall not be serialized.
====

==== Examples Value-Only serialization for all submodel element types

In the following examples for Value-Only serializations for all submodel element types are given.
Expand Down
Loading