Skip to content

Commit 849812a

Browse files
committed
Merge branch 'main' into apache_parquet_format
2 parents 8ca170b + 57030b2 commit 849812a

File tree

258 files changed

+27604
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+27604
-141
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "CodeQL Scanning"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore:
7+
- 'documentation/decisions/**'
8+
9+
pull_request:
10+
branches: [ "main" ]
11+
schedule:
12+
- cron: '30 0 * * *'
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: 'ubuntu-latest'
18+
permissions:
19+
security-events: write
20+
packages: read
21+
actions: read
22+
contents: read
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- language: actions
29+
build-mode: none
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v3
37+
with:
38+
languages: ${{ matrix.language }}
39+
build-mode: ${{ matrix.build-mode }}
40+
41+
- name: Autobuild
42+
uses: github/codeql-action/autobuild@v2
43+
44+
- name: Perform CodeQL Analysis
45+
uses: github/codeql-action/analyze@v3
46+
with:
47+
category: "/language:${{matrix.language}}"

.github/workflows/pull-request-check.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ jobs:
3636
done
3737
echo "ONLY_MD=true" >> "$GITHUB_ENV"
3838
39-
- name: Set up JDK 11
40-
uses: actions/setup-java@v3
39+
- name: Set up JDK 21
40+
id: setup-java
41+
uses: actions/setup-java@v4
4142
if: env.ONLY_MD != 'true'
4243
with:
43-
distribution: 'adopt'
44-
java-version: '11'
44+
distribution: 'temurin'
45+
java-version: '21'
4546

4647
- name: Cache Maven packages
4748
uses: actions/cache@v3
@@ -62,6 +63,13 @@ jobs:
6263
- name: Build
6364
if: env.ONLY_MD != 'true'
6465
run: |
66+
export JAVA_HOME=${{ steps.setup-java.outputs.path }}
67+
export PATH=$JAVA_HOME/bin:$PATH
68+
echo "Using Java version:"
69+
java -version
70+
echo "JAVA_HOME: $JAVA_HOME"
71+
echo "Maven Java version:"
72+
./mvnw --version
6573
./mvnw -B generate-resources -pl documentation -Pantora
6674
./mvnw -B clean install -pl esmf-samm-build-plugin
6775
./mvnw -B clean package -pl esmf-semantic-aspect-meta-model
@@ -76,4 +84,4 @@ jobs:
7684
name: samm-artifacts
7785
path: |
7886
esmf-semantic-aspect-meta-model/target/*.jar
79-
SAMM-*-specification.zip
87+
SAMM-*-specification.zip

.github/workflows/release-artifact.yml

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,69 @@ jobs:
1111

1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

16-
- name: Set up JDK 11
17-
uses: actions/setup-java@v3
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
1818
with:
19-
distribution: 'adopt'
20-
java-version: '11'
21-
server-id: ossrh
22-
server-username: OSSRH_USERNAME
23-
server-password: OSSRH_TOKEN
19+
distribution: 'temurin'
20+
java-version: '21'
21+
server-id: central
22+
server-username: CENTRAL_SONATYPE_TOKEN_USERNAME
23+
server-password: CENTRAL_SONATYPE_TOKEN_PASSWORD
2424
gpg-private-key: ${{ secrets.PGP_KEY }}
2525
gpg-passphrase: PGP_KEY_PASSWORD
26-
overwrite-settings: true
26+
overwrite-settings: false
2727

2828
- name: Set release version in antora.yml
2929
uses: mikefarah/yq@master
3030
with:
3131
cmd: yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/antora.yml
3232

33-
- name: Build SAMM artifact and release to OSSRH
33+
- name: Build SAMM artifact and create Maven Central bundle
3434
run: |
3535
set -x
36+
37+
export MAVEN_OPTS="-Xmx4096m"
38+
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
39+
release_version=${{ github.event.inputs.release_version }}
40+
3641
rm -rf ~/.m2/repository/org/eclipse/esmf
37-
./mvnw -B versions:set -DnewVersion=${{ github.event.inputs.release_version }}
42+
./mvnw -B versions:set -DnewVersion=${ release_version }
3843
./mvnw -B versions:commit
3944
# Since the meta model project itself does not inherit from the parent, we must set its version separately
40-
./mvnw -B versions:set -DnewVersion=${{ github.event.inputs.release_version }} -pl esmf-semantic-aspect-meta-model
45+
./mvnw -B versions:set -DnewVersion=${ release_version } -pl esmf-semantic-aspect-meta-model
4146
./mvnw -B versions:commit -pl esmf-semantic-aspect-meta-model
4247
./mvnw -B clean generate-resources -pl documentation -Pantora
4348
./mvnw -B -U clean install -pl esmf-samm-build-plugin
44-
./mvnw -B -U clean deploy -pl esmf-semantic-aspect-meta-model -Psign,release-build
49+
./mvnw -B -U clean deploy -pl esmf-semantic-aspect-meta-model -Psign,release-build -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
50+
51+
echo "Contents of target/central-staging:"
52+
ls -lR target/central-staging
53+
54+
pushd target/central-staging
55+
zip -r -9 ../central-bundle.zip .
56+
popd
57+
4558
cd build/
46-
mv site SAMM-${{ github.event.inputs.release_version }}
47-
zip -r ../SAMM-${{ github.event.inputs.release_version }}-specification.zip SAMM-${{ github.event.inputs.release_version }}
59+
mv site SAMM-${ release_version }
60+
zip -r ../SAMM-${ release_version }-specification.zip SAMM-${ release_version }
4861
env:
49-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
50-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
5162
PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}
5263

53-
# If the deployment to OSSRH went through, the following steps will
64+
- name: Release to Maven Central
65+
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
66+
run: |
67+
token_header=$(printf "$CENTRAL_USERNAME:$CENTRAL_TOKEN" | base64)
68+
curl --request POST \
69+
--header "Authorization: Bearer $token_header" \
70+
71+
https://central.sonatype.com/api/v1/publisher/upload
72+
env:
73+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }}
74+
CENTRAL_TOKEN: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }}
75+
76+
# If the deployment to Maven Central went through, the following steps will
5477
# - Commit updated version to release branch
5578
# - Create Github release
5679

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ local.properties
1414
.settings/
1515
.loadpath
1616
.recommenders
17-
package-lock.json
18-
package.json
1917

2018
# External tool builders
2119
.externalToolBuilders/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To build the Semantic Aspect Meta Model Java artifact, run
9999
```
100100

101101
This will compile the code and run all tests. The resulting JAR file can be found under
102-
esmf-semantic-aspect-meta-model > target. Please be aware, that you need JDK 11 to run build and
102+
esmf-semantic-aspect-meta-model > target. Please be aware, that you need JDK 21 to run build and
103103
tests.
104104

105105
Before making a contribution, please take a look at the [contribution guidelines](CONTRIBUTING.md).

documentation/decisions/0007-model-resolution.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ definitions. I.e., it is readable from top to bottom without encountering undefi
101101
_models_root_/_namespace_main_part_/_namespace_version_part_/AspectModelFile.ttl.
102102
* In filesystem-based model storage, the namespace file containing an Aspect model element
103103
definition should have the same name as the Aspect's local name suffixed with ".ttl".
104-
104+
* In filesystem-based model storage, there may not be two files with the same names that only differ in casing
105+
(e.g., FileName.ttl and filename.ttl) in the same namespace directory.
106+
105107
### Resolution of files
106108

107109
![Model structure for loaded models](0007-model-resolution.svg)

documentation/modules/ROOT/pages/datatypes.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ SPDX-License-Identifier: MPL-2.0
1313
[[data-types]]
1414
= Data Types
1515

16+
This page details *scalar* data types. Such a scalar data type gets used by a Characteristic to further define a Property.
17+
18+
For modeling Properties that require non-scalar data types, use xref:entities.adoc[Entities].
19+
1620
== Type Hierarchy
1721

1822
The system of types used in the {meta-model-full-name} (and subsequently in the models conforming to
@@ -88,6 +92,9 @@ definition in the respective standards and an informative description of their v
8892
| `https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal[rdf:langString]` | Strings with language tags | "Hello"@en, "Hallo"@de. Note that this is written in RDF/Turtle syntax, and that only "Hello" and "Hallo" are the actual values. | {ok}
8993
|===
9094

95+
NOTE: When using `rdf:langString`, a language tag *must always* be provided using the `@` syntax (e.g., `"Hello"@en`).
96+
Using a typed literal form such as `"Hello"^^rdf:langString` is *invalid* and *should cause* the model loading or validation to fail.
97+
9198
The following types defined by the XSD and RDF specifications, respectively, are considered
9299
unsuitable in Aspect Models and _should not_ be used:
93100

documentation/modules/ROOT/pages/modeling-guidelines.adoc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ SPDX-License-Identifier: MPL-2.0
1818
=== Notes
1919

2020
* As mentioned in the xref:index.adoc[Introduction], Aspect Models are described in RDF Turtle
21-
xref:samm-specification:appendix:bibliography.adoc#turtle[[turtle\]]. The aspect specification will
22-
therefore assume basic familiarity with Turtle.
21+
xref:samm-specification:appendix:bibliography.adoc#turtle[[turtle\]]. The aspect specification will
22+
therefore assume basic familiarity with Turtle.
2323
* For the definition of the different Model elements please refer to the
24-
xref:meta-model-elements.adoc[Meta Model Elements].
24+
xref:meta-model-elements.adoc[Meta Model Elements].
2525

2626

2727
[[naming-rules]]
@@ -32,22 +32,22 @@ https://en.wikipedia.org/wiki/Naming_convention_(programming)#Java[Java naming c
3232
classes, properties and methods.
3333

3434
* The names of Aspects, Entities, Events, Constraints and Characteristics follow the naming conventions for
35-
Java classes, i.e. UpperCamelCase.
35+
Java classes, i.e. UpperCamelCase.
3636
* The names of Properties, Operations and Units follow the naming conventions of Java methods, i.e.
37-
lowerCamelCase.
37+
lowerCamelCase.
3838

3939
[[rdf-turtle-formatting-rules]]
4040
=== RDF/Turtle formatting rules
4141

4242
* Each Aspect Model is defined in a separate TTL (Turtle) file.
4343
* The Turtle file containing an Aspect Model must have the same name as the Aspect.
4444
* Aspect Model files must be UTF-8 encoded and should not contain a
45-
https://en.wikipedia.org/wiki/Byte_order_mark[byte order mark].
45+
https://en.wikipedia.org/wiki/Byte_order_mark[byte order mark].
4646
* There should be one empty line between model element definitions.
4747
* Indentation should be done with three spaces.
4848
* There should be a space before every separating semicolon.
4949
* There should be padding spaces inside RDF lists and anonymous nodes (i.e. inside brackets and
50-
square brackets)
50+
square brackets)
5151

5252
[[attributes-that-all-model-elements-have]]
5353
=== Attributes that all model elements have
@@ -59,13 +59,13 @@ attributes:
5959
|===
6060
| Attributes | Description | Required
6161
| `samm:preferredName` | Human readable name in a specific language. This attribute may be defined
62-
multiple times for different languages but only once for a specific language. There should be at
63-
least one preferredName defined with an "en" language tag. | {nok}
62+
multiple times for different languages but only once for a specific language. There should be at
63+
least one preferredName defined with an "en" language tag. | {nok}
6464
| `samm:description` | Human readable description in a specific language. This attribute may be
65-
defined multiple times for different languages but only once for a specific language. There should
66-
be at least one description defined with an "en" language tag. | {nok}
65+
defined multiple times for different languages but only once for a specific language. There should
66+
be at least one description defined with an "en" language tag. | {nok}
6767
| `samm:see` | A reference to a related element in an external taxonomy, ontology or other standards
68-
document. The datatype is `xsd:anyURI`. This attribute may be defined multiple times. | {nok}
68+
document. The datatype is `xsd:anyURI`. This attribute may be defined multiple times. | {nok}
6969
|===
7070

7171
NOTE: Although both `samm:preferredName` and `samm:description` should be set at least once in every
@@ -125,15 +125,15 @@ addition to the general attributes, every Aspect Model element has the following
125125
|===
126126
| Attributes | Description | Required
127127
| `samm:properties` | The list of Properties of this Aspect. Leaving out this
128-
attribute completely is equivalent to having it present with an empty list as value. | {nok}
128+
attribute completely is equivalent to having it present with an empty list as value. | {nok}
129129
| `samm:operations` | The list of Operations of this Aspect. Leaving out this
130-
attribute completely is equivalent to having it present with an empty list as value. | {nok}
130+
attribute completely is equivalent to having it present with an empty list as value. | {nok}
131131
| `samm:events` | The list of Events of this Aspect. | {nok}
132132
|===
133133

134134
* Aspects follow the naming conventions for Java classes, i.e. UpperCamelCase.
135135
* Each Aspect Model must be defined in its own file. The file name must be the same as the Aspect's
136-
name.
136+
name.
137137
* The hierarchical namespace part in the Aspect's URN can be freely chosen.
138138

139139
The definition of an Aspect should therefore have the following structure in TTL syntax; note though
@@ -161,7 +161,7 @@ that all model elements have], Properties have the following attributes:
161161
|===
162162
| Attributes | Description | Required
163163
| `samm:characteristic` | The xref:characteristics.adoc#characteristics[Characteristic] describing
164-
this Property. | {ok}
164+
this Property. | {ok}
165165
| `samm:exampleValue` | An exemplary value that the Property can take, helping to clarify the intended meaning of the Property.
166166
This attribute supports both scalar literal values (e.g., xsd:string, xsd:float), an anonymous described scalar value,
167167
and value references that point to example values (i.e., references to instances of xref:modeling-guidelines.adoc#value-type[samm:Value]).
@@ -474,7 +474,7 @@ for Properties when all of the following conditions are met:
474474
* The value has a well-known structure consisting of different, separate parts
475475
* The parts can and should be described in more detail
476476
* The Property should not be decomposed/deconstructed into an Entity with separate Properties for
477-
each part
477+
each part
478478

479479
One of the main use cases is complex identifiers that encode context information such as provenance
480480
information, version numbers, locations codes and so on. It is unreasonable to split such a value up
@@ -493,10 +493,10 @@ Characteristic, and after that a complete concrete example is given.
493493
|===
494494
| Name | Example Value | Deconstruction Rule | Elements
495495
| ISO 8601 date | "2019-09-27"^^`xsd:date` | `(\d\{4})-(\d\{2})-(\d\{2})` | ( `:year` "-" `:month`
496-
"-" `:day` )
496+
"-" `:day` )
497497
| Email Address | "\[email protected]" | `([\w\.-]+)@([\w\.-]+\.\w{2,4})` | ( `:username` "@" `:host` )
498498
| Hex-encoded color | "0xAC03BE" | `0x([0-9A-Fa-f]\{2})([0-9A-Fa-f]\{2})([0-9A-Fa-f]\{2})` | ( "0x"
499-
`:red` `:green` `:blue` )
499+
`:red` `:green` `:blue` )
500500
|===
501501

502502
The following code shows the Aspect Model for the first example from the table. Note that when
@@ -538,7 +538,7 @@ include::example$reference-declaration.ttl[tags=content]
538538

539539
As explained in the section xref:modeling-guidelines.adoc#declaring-quantifiable-values-and-measurements[Declaring Quantifiables and Measurements], some values only make sense when they also have a unit assigned to them.
540540
This unit definition is in many cases fixed at design time, does not change thereafter and therefore at runtime (in the JSON payload for example), only the actual value is transported. +
541-
There may be scenarios, however, where this permanent fixation on a specific unit might not be sufficient because the unit can only be determined dynamically
541+
There may be scenarios, however, where this permanent fixation on a specific unit might not be sufficient because the unit can only be determined dynamically
542542
at runtime, or is a kind of configuration parameter which must be set when the system is being deployed/starting up. In cases like this, a xref:characteristics.adoc#unit-reference-characteristic[UnitReference] characteristic instance can be used to include a dynamic reference to the desired unit from the xref:appendix:unitcatalog.adoc[Unit catalog] and this information is then always included in the payload. The runtime payload refers to the unit using its `samm:curie`, i.e., the unit's URN's element name prefixed with `unit:`.
543543

544544
For example an Aspect with the following model:
@@ -554,7 +554,7 @@ can produce a JSON payload that could look something like this:
554554
----
555555
{
556556
"value" : 2.25,
557-
"unit" : "unit:hectopascal"
557+
"unit" : "unit:hectopascal"
558558
}
559559
----
560560

@@ -611,7 +611,7 @@ Entities have the following attributes:
611611
|===
612612
| Attributes | Description | Required
613613
| `samm:properties` | The list of Properties which make up the Entity. Leaving out this
614-
attribute completely is equivalent to having it present with an empty list as value.| {nok}
614+
attribute completely is equivalent to having it present with an empty list as value.| {nok}
615615
| `samm:extends` | The Entity which is extended by this Entity | {nok}
616616
|===
617617

@@ -707,7 +707,7 @@ Operations have the following attributes:
707707
|===
708708
| Attributes | Description | Required
709709
| `samm:input` | A list of references to Properties that describe the input to the operation. The
710-
attribute must be present, but the list may be empty. | {ok}
710+
attribute must be present, but the list may be empty. | {ok}
711711
| `samm:output` | A single reference to a Property that describes the output of the operation. |
712712
{nok}
713713
|===

0 commit comments

Comments
 (0)