├── AssetAdministrationShell_examples
├── Raspberry_Pi_3b_plus.aasx
└── Raspberry_Pi_3b_plus
│ ├── RASPBERRY_PI_3B_PLUS_001.jpg
│ ├── _rels
│ └── .rels
│ └── aasx
│ ├── _rels
│ └── aasx-origin.rels
│ ├── aasx-origin
│ ├── documents
│ ├── product_sheet.pdf
│ └── review_and_guide.pdf
│ └── iais_fraunhofer_de_en_aas_examples
│ └── _rels
│ └── iais_fraunhofer_de_en_aas_examples_rspbryp3bp.rels
├── LICENSE
├── README.md
├── rami.ttl
├── reasoning
├── rami-rulesets
│ ├── rami-rl.n3
│ ├── rami-sameAs.n3
│ └── rami-subClassOf.n3
└── reasoning_examples
│ ├── rami_rl_reasoned.nt
│ ├── rami_sameAs_reasoned.nt
│ ├── rami_subClassOf_reasoned.nt
│ ├── raspberry_reasoned.ttl-rl.nt
│ ├── raspberry_reasoned.ttl-sameAs.nt
│ └── raspberry_reasoned.ttl-subClassOf.nt
├── rml_mapping
├── AAS-to-SAAS-mapping.rml.ttl
├── mapping_examples
│ ├── raspberry-mapping.jsonld
│ ├── raspberry-mapping.nq
│ └── raspberry-mapping.ttl
└── raspberry-mapping.rml.ttl
└── schema
├── AAS-Shape.ttl
├── AccessControlShapes
├── AccessControlPolicyPointsShape.ttl
├── AccessControlShape.ttl
├── AccessPermissionRuleShape.ttl
├── ObjectAttributesShape.ttl
├── PermissionShape.ttl
├── PermissionsPerObjectShape.ttl
├── PolicyAdministrationPointShape.ttl
├── PolicyInformationPointsShape.ttl
├── SecurityShape.ttl
└── SubjectAttributesShape.ttl
├── AdminShell.xsd
├── AdministrativeInformationShape.ttl
├── AssetShape.ttl
├── BlobShape.ttl
├── ConceptDescriptionShape.ttl
├── ConceptDictionaryShape.ttl
├── DataElementShape.ttl
├── DataSpecificationShape.ttl
├── FileShape.ttl
├── FormulaShape.ttl
├── HasKindShape.ttl
├── IEC 61360 Schema.xsd
├── IdentifiableShape.ttl
├── IdentifierShape.ttl
├── KeyShape.ttl
├── OperationShape.ttl
├── OperationVariableShape.ttl
├── PropertyShape.ttl
├── QualifiableShape.ttl
├── QualifierShape.ttl
├── ReferenceElementShape.ttl
├── ReferenceShape.ttl
├── RelationshipElementShape.ttl
├── SubmodelElementCollectionShape.ttl
├── SubmodelElementShape.ttl
├── SubmodelShape.ttl
└── ViewShape.ttl
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus.aasx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/i40-Tools/RAMIOntology/b239031e84d5fac3ca2f93ee65d6c6e360f35b81/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus.aasx
--------------------------------------------------------------------------------
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/RASPBERRY_PI_3B_PLUS_001.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/i40-Tools/RAMIOntology/b239031e84d5fac3ca2f93ee65d6c6e360f35b81/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/RASPBERRY_PI_3B_PLUS_001.jpg
--------------------------------------------------------------------------------
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/_rels/.rels:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/_rels/aasx-origin.rels:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/aasx-origin:
--------------------------------------------------------------------------------
1 | Intentionally empty.
--------------------------------------------------------------------------------
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/documents/product_sheet.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/i40-Tools/RAMIOntology/b239031e84d5fac3ca2f93ee65d6c6e360f35b81/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/documents/product_sheet.pdf
--------------------------------------------------------------------------------
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/documents/review_and_guide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/i40-Tools/RAMIOntology/b239031e84d5fac3ca2f93ee65d6c6e360f35b81/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/documents/review_and_guide.pdf
--------------------------------------------------------------------------------
/AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/iais_fraunhofer_de_en_aas_examples/_rels/iais_fraunhofer_de_en_aas_examples_rspbryp3bp.rels:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RAMIVocabulary
2 | Repository containing the developing of the RAMI vocabulary. This semantically enriched data model is based
3 | on the Plattform Industrie 4.0 specification [Details of the Asset Administration Shell - Part 1](https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/2018-verwaltungsschale-im-detail.html).
4 | This repository provides an RDF version of the specification,
5 |
6 | The ontology itself is contained in [rami.ttl](rami.ttl). You can find a visualization of the latest version can be created using the
7 | [WebVOwl API](http://www.visualdataweb.de/webvowl/\#iri=https://raw.githubusercontent.com/i40-Tools/RAMIOntology/master/rami.ttl).
8 |
9 |
10 | ## Mapping
11 | The [mapping](rml_mapping) folder contains a template of [RML](https://rml.io/) TripleMaps for Asset Administration Shell documents in XML. A mapping from JSON to RDF is not yet included.
12 | In addition, an example mapping file for a Raspberry Pi demo AAS (see [examples](AssetAdministrationShell_examples)) in various serializations is supplied.
13 |
14 |
15 | ## Schema Validation
16 | The [schema files](schema) are encoded as [SHACL](https://www.w3.org/TR/shacl/) shapes.
17 |
18 |
19 | ## Reasoning
20 | The derivation of new facts (see [reasoning](reasoning)) can be implemented using N3 rules as specified by [Linked Data-Fu](https://linked-data-fu.github.io/).
21 |
22 |
23 | ## HowTo Use
24 | Although the ontology and all the other supplied files can be displayed by any text editor, [Protege](http://protege.stanford.edu/) is the tool of choice. As previously mentioned,
25 | [WebVOwl](http://www.visualdataweb.de/webvowl/) is a great service to create visualizations.
26 |
27 | In order to execute the mapping, clone and build the [RML Mapper](https://github.com/RMLio/rmlmapper-java).
28 |
29 | ```
30 | java -jar rmlmapper-4.3.3-r95.jar -v -m AssetAdministrationShell_examples/Raspberry_Pi_3b_plus/aasx/iais_fraunhofer_de_en_aas_examples/iais_fraunhofer_de_en_aas_examples_raspberry_pi_3b_plus.aas.xml -s turtle -o output-file.ttl
31 | ```
32 |
33 | The SHACL validation process requires the installation of the [TopBraid SHACL API](https://github.com/TopQuadrant/shacl)
34 | ```
35 | shaclvalidate.sh -datafile output-file.ttl -shapesfile schema/AAS-Shape.ttl
36 | ```
37 |
38 | The N3 reasoning rules can be applied through [Linked Data-Fu](https://linked-data-fu.github.io/):
39 | ```
40 | /bin/ldfu.sh -i output-file.ttl -p reasoning/rami-rulesets/rami-rl.n3 -o output-with-reasoning.nt
41 | ```
--------------------------------------------------------------------------------
/reasoning/rami-rulesets/rami-rl.n3:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 | @prefix iaisex: .
9 | @prefix aas: .
10 | @prefix string: .
11 | @prefix math: .
12 | @prefix log: .
13 | @prefix skos: .
14 | @prefix foaf: .
15 | @prefix http: .
16 | @prefix httpm: .
17 | @prefix dbpedia: .
18 | @prefix dbo: .
19 | @prefix : .
20 |
21 |
22 | # GET the ontology as background knowledge
23 | {
24 | [] http:mthd httpm:GET ;
25 | http:requestURI .
26 | }
27 |
28 |
29 |
30 | # NOTE rami:hasSubmodel inverse property of rami:parent
31 | {
32 | ?a rami:hasSubmodel ?b .
33 | ?a rdf:type rami:Referable .
34 | ?b rdf:type rami:Referable .
35 | } => {
36 | ?b rami:parent ?a .
37 | } .
38 |
39 | # NOTE only in the same context
40 | {
41 | ?a rdfs:label ?id_short .
42 | ?b rdfs:label ?id_short2 .
43 | # ?id_short string:equalIgnoringCase ?id_short2 .
44 | ?id_short log:equalTo ?id_short2 .
45 | } => {
46 | ?a owl:sameAs ?b .
47 | } .
48 |
49 |
50 |
51 | # Subclass entailment
52 | # copied from http://linked-data-fu.github.io/
53 | # credits:
54 | #
55 | #
56 | #
57 | # rdfs9
58 | { ?xxx rdfs:subClassOf ?yyy . ?zzz rdf:type ?xxx . } => { ?zzz rdf:type ?yyy . } .
59 | # rdfs11
60 | { ?xxx rdfs:subClassOf ?yyy . ?yyy rdfs:subClassOf ?zzz . } => { ?xxx rdfs:subClassOf ?zzz . } .
61 |
62 | # sameAs entailment
63 | # copied from http://linked-data-fu.github.io/
64 | # credits: http://www.w3.org/TR/rdf11-mt/ and http://harth.org/andreas/foaf#ah
65 | # eq-sym
66 | { ?x owl:sameAs ?y . } => { ?y owl:sameAs ?x . } .
67 | # eq-trans
68 | { ?x owl:sameAs ?y . ?y owl:sameAs ?z . } => { ?x owl:sameAs ?z . } .
69 | # eq-rep-s
70 | { ?s owl:sameAs ?s0 . ?s ?p ?o . } => { ?s0 ?p ?o . } .
71 | # eq-rep-p
72 | { ?p owl:sameAs ?p0 . ?s ?p ?o . } => { ?s ?p0 ?o . } .
73 | # eq-rep-o
74 | { ?o owl:sameAs ?o0 . ?s ?p ?o . } => { ?s ?p ?o0 . } .
--------------------------------------------------------------------------------
/reasoning/rami-rulesets/rami-sameAs.n3:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 | @prefix iaisex: .
9 | @prefix aas: .
10 | @prefix string: .
11 | @prefix math: .
12 | @prefix log: .
13 | @prefix skos: .
14 | @prefix foaf: .
15 | @prefix http: .
16 | @prefix httpm: .
17 | @prefix dbpedia: .
18 | @prefix dbo: .
19 | @prefix : .
20 |
21 |
22 | # GET the ontology as background knowledge
23 | {
24 | [] http:mthd httpm:GET ;
25 | http:requestURI .
26 | }
27 |
28 |
29 |
30 | # NOTE rami:hasSubmodel inverse property of rami:parent
31 | {
32 | ?a rami:hasSubmodel ?b .
33 | ?a rdf:type rami:Referable .
34 | ?b rdf:type rami:Referable .
35 | } => {
36 | ?b rami:parent ?a .
37 | } .
38 |
39 | # NOTE only in the same context
40 | {
41 | ?a rdfs:label ?id_short .
42 | ?b rdfs:label ?id_short2 .
43 | # ?id_short string:equalIgnoringCase ?id_short2 .
44 | ?id_short log:equalTo ?id_short2 .
45 | } => {
46 | ?a owl:sameAs ?b .
47 | } .
48 |
49 |
50 | # sameAs entailment
51 | # copied from http://linked-data-fu.github.io/
52 | # credits: http://www.w3.org/TR/rdf11-mt/ and http://harth.org/andreas/foaf#ah
53 | # eq-sym
54 | { ?x owl:sameAs ?y . } => { ?y owl:sameAs ?x . } .
55 | # eq-trans
56 | { ?x owl:sameAs ?y . ?y owl:sameAs ?z . } => { ?x owl:sameAs ?z . } .
57 | # eq-rep-s
58 | { ?s owl:sameAs ?s0 . ?s ?p ?o . } => { ?s0 ?p ?o . } .
59 | # eq-rep-p
60 | { ?p owl:sameAs ?p0 . ?s ?p ?o . } => { ?s ?p0 ?o . } .
61 | # eq-rep-o
62 | { ?o owl:sameAs ?o0 . ?s ?p ?o . } => { ?s ?p ?o0 . } .
--------------------------------------------------------------------------------
/reasoning/rami-rulesets/rami-subClassOf.n3:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 | @prefix iaisex: .
9 | @prefix aas: .
10 | @prefix string: .
11 | @prefix math: .
12 | @prefix log: .
13 | @prefix skos: .
14 | @prefix foaf: .
15 | @prefix http: .
16 | @prefix httpm: .
17 | @prefix dbpedia: .
18 | @prefix dbo: .
19 | @prefix : .
20 |
21 |
22 | # GET the ontology as background knowledge
23 | {
24 | [] http:mthd httpm:GET ;
25 | http:requestURI .
26 | }
27 |
28 |
29 |
30 | # NOTE rami:hasSubmodel inverse property of rami:parent
31 | {
32 | ?a rami:hasSubmodel ?b .
33 | ?a rdf:type rami:Referable .
34 | ?b rdf:type rami:Referable .
35 | } => {
36 | ?b rami:parent ?a .
37 | } .
38 |
39 | # NOTE only in the same context
40 | {
41 | ?a rdfs:label ?id_short .
42 | ?b rdfs:label ?id_short2 .
43 | # ?id_short string:equalIgnoringCase ?id_short2 .
44 | ?id_short log:equalTo ?id_short2 .
45 | } => {
46 | ?a owl:sameAs ?b .
47 | } .
48 |
49 |
50 |
51 | # Subclass entailment
52 | # copied from http://linked-data-fu.github.io/
53 | # credits:
54 | #
55 | #
56 | #
57 | # rdfs9
58 | { ?xxx rdfs:subClassOf ?yyy . ?zzz rdf:type ?xxx . } => { ?zzz rdf:type ?yyy . } .
59 | # rdfs11
60 | { ?xxx rdfs:subClassOf ?yyy . ?yyy rdfs:subClassOf ?zzz . } => { ?xxx rdfs:subClassOf ?zzz . } .
61 |
--------------------------------------------------------------------------------
/rml_mapping/AAS-to-SAAS-mapping.rml.ttl:
--------------------------------------------------------------------------------
1 | @prefix tm: .
2 | @prefix ls: .
3 | @prefix owl: .
4 | @prefix rdf: .
5 | @prefix rdfs: .
6 | @prefix xsd: .
7 | @prefix dcterms: .
8 | @prefix skos: .
9 | @prefix sh: .
10 | @prefix rml: .
11 | @prefix ql: .
12 | @prefix rr: .
13 | @prefix rami: .
14 |
15 |
16 |
17 | _:AssetShellMap1 a rr:TriplesMap ;
18 |
19 | # XML source file with xPath iterator
20 | rml:logicalSource [
21 | rml:source "" ;
22 | rml:referenceFormulation ql:XPath ;
23 | rml:iterator "//*[local-name()='assetAdministrationShell'][identification/@idType = 'URI']"
24 | ] ;
25 |
26 | # URI mapping of the asset
27 | rr:subjectMap [
28 | rml:reference "identification" ;
29 | rr:class rami:AdminShell
30 | ] ;
31 |
32 |
33 | # the name of the Asset is encoded by the idShort
34 | rr:predicateObjectMap [
35 | rr:predicateMap [ rr:constant rdfs:label ] ;
36 | rr:objectMap [
37 | rml:reference "idShort" ;
38 | rr:termType rr:Literal ;
39 | rr:datatype xsd:string
40 | ]
41 | ] ;
42 |
43 | # a description can be supplied
44 | rr:predicateObjectMap [
45 | rr:predicateMap [ rr:constant rdfs:comment ] ;
46 | rr:objectMap [
47 | rml:reference "description/langString" ;
48 | rr:termType rr:Literal ;
49 | rr:datatype xsd:string
50 | ]
51 | ] ;
52 |
53 | # an asset shell can have an asset
54 | rr:predicateObjectMap [
55 | rr:predicateMap [
56 | rr:constant rami:hasAsset ;
57 | rr:termType rr:URI
58 | ] ;
59 | rr:objectMap [ rml:reference "assetRef/keys/key" ]
60 | ] ;
61 |
62 | # submodels for the asset
63 | rr:predicateObjectMap [
64 | rr:predicateMap [ rr:constant rami:hasSubmodel ] ;
65 | rr:objectMap [
66 | rml:reference "submodelRefs/submodelRef/keys/key" ;
67 | rr:termType rr:URI
68 | ]
69 | ] ;
70 |
71 | .
72 |
73 |
74 | _:AssetShellMap1 a rr:TriplesMap ;
75 |
76 | # XML source file with xPath iterator
77 | rml:logicalSource [
78 | rml:source "" ;
79 | rml:referenceFormulation ql:XPath ;
80 | rml:iterator "//*[local-name()='assetAdministrationShell']"
81 | ] ;
82 |
83 | # URI mapping of the asset
84 | rr:subjectMap [
85 | rr:template "http://example.org/{identification[@idType!='URI']}" ;
86 | rr:class rami:AssetShell
87 | ] ;
88 |
89 |
90 | # the name of the Asset is encoded by the idShort
91 | rr:predicateObjectMap [
92 | rr:predicateMap [ rr:constant rdfs:label ] ;
93 | rr:objectMap [
94 | rml:reference "idShort" ;
95 | rr:termType rr:Literal ;
96 | rr:datatype xsd:string
97 | ]
98 | ] ;
99 |
100 | # a description can be supplied
101 | rr:predicateObjectMap [
102 | rr:predicateMap [ rr:constant rdfs:comment ] ;
103 | rr:objectMap [
104 | rml:reference "description/langString" ;
105 | rr:termType rr:Literal ;
106 | rr:datatype xsd:string
107 | ]
108 | ] ;
109 |
110 | # the ID
111 | rr:predicateObjectMap [
112 | rr:predicateMap [ rr:constant rami:id ] ;
113 | rr:objectMap [
114 | rml:reference "identification" ;
115 | rr:termType rr:Literal ;
116 | rr:datatype xsd:string
117 | ]
118 | ] ;
119 |
120 | # an asset shell can have an asset
121 | rr:predicateObjectMap [
122 | rr:predicateMap [
123 | rr:constant rami:hasAsset ;
124 | rr:termType rr:URI
125 | ] ;
126 | rr:objectMap [ rml:reference "assetRef/keys/key" ]
127 | ] ;
128 |
129 | # submodels for the asset
130 | rr:predicateObjectMap [
131 | rr:predicateMap [ rr:constant rami:hasSubmodel ] ;
132 | rr:objectMap [
133 | rml:reference "submodelRefs/submodelRef/keys/key" ;
134 | rr:termType rr:URI
135 | ]
136 | ] ;
137 |
138 | # derived from another AAS
139 | rr:predicateObjectMap [
140 | rr:predicateMap [ rr:constant rami:derivedFrom ] ;
141 | rr:objectMap [
142 | rml:reference "derivedFrom/keys/key" ;
143 | rr:termType rr:URI
144 | ]
145 | ] ;
146 |
147 | # derived from another AAS
148 | rr:predicateObjectMap [
149 | rr:predicateMap [ rr:constant rami:derivedFrom ] ;
150 | rr:objectMap [
151 | rml:reference "derivedFrom/keys/key" ;
152 | #rr:termType rr:URI
153 | ]
154 | ] ;
155 |
156 | .
157 |
158 |
159 |
160 |
161 |
162 |
163 | _:AssetMap a rr:TriplesMap ;
164 |
165 | # XML source file with xPath iterator
166 | rml:logicalSource [
167 | rml:source "" ;
168 | rml:referenceFormulation ql:XPath ;
169 | rml:iterator "//*[local-name()='asset']"
170 | ] ;
171 |
172 | # URI mapping of the asset
173 | rr:subjectMap [
174 | rml:reference "identification" ;
175 | rr:class rami:Asset
176 | ] ;
177 |
178 |
179 | # the name of the Asset is encoded by the idShort
180 | rr:predicateObjectMap [
181 | rr:predicateMap [ rr:constant rdfs:label ] ;
182 | rr:objectMap [
183 | rml:reference "idShort" ;
184 | rr:termType rr:Literal ;
185 | rr:datatype xsd:string
186 | ]
187 | ] ;
188 |
189 | # a description can be supplied
190 | rr:predicateObjectMap [
191 | rr:predicateMap [ rr:constant rdfs:comment ] ;
192 | rr:objectMap [
193 | rml:reference "description/langString" ;
194 | rr:termType rr:Literal ;
195 | rr:datatype xsd:string
196 | ]
197 | ] ;
198 |
199 | # an asset can be of kind instance or type
200 | rr:predicateObjectMap [
201 | rr:predicateMap [ rr:constant rami:hasKind ] ;
202 | rr:objectMap [ rr:template "https://w3id.org/i40/rami#{kind}" ]
203 | ] ;
204 |
205 | # submodels for the asset
206 | rr:predicateObjectMap [
207 | rr:predicateMap [ rr:constant rami:hasSubmodel ] ;
208 | rr:objectMap [
209 | rml:reference "assetIdentificationModelRef/keys/key" ;
210 | rr:termType rr:URI
211 | ]
212 | ]
213 | .
214 |
215 |
216 |
217 | # SubmodelMap
218 | _:SubModelMap a rr:TriplesMap ;
219 |
220 | # XML source file with xPath iterator
221 | rml:logicalSource [
222 | rml:source "" ;
223 | rml:referenceFormulation ql:XPath ;
224 | rml:iterator "//*[local-name()='submodel']"
225 | ] ;
226 |
227 | # URI mapping of the SubModel
228 | rr:subjectMap [
229 | rml:reference "identification" ;
230 | rr:class rami:Submodel
231 | ] ;
232 |
233 |
234 | # the name of the SubModel is encoded by the idShort
235 | rr:predicateObjectMap [
236 | rr:predicate rdfs:label ;
237 | rr:objectMap [
238 | rml:reference "idShort" ;
239 | rr:termType rr:Literal ;
240 | rr:datatype xsd:string
241 | ]
242 | ] ;
243 |
244 | # a description can be supplied
245 | rr:predicateObjectMap [
246 | rr:predicate rdfs:comment ;
247 | rr:objectMap [
248 | rml:reference "description/langString" ;
249 | rr:termType rr:Literal ;
250 | rr:datatype xsd:string
251 | ]
252 | ] ;
253 |
254 | # an asset can be of kind instance or type
255 | rr:predicateObjectMap [
256 | rr:predicate rami:hasKind ;
257 | rr:objectMap [ rr:template "https://w3id.org/i40/rami#{kind}" ]
258 | ] ;
259 |
260 | # SubmodelElementCollection for the submodel
261 | rr:predicateObjectMap [
262 | rr:predicateMap [ rr:constant rami:submodelElementCollection ] ;
263 | rr:objectMap [
264 | rml:reference "submodelElements/submodelElement/submodelElementCollection/semanticId/keys/key[@idType='URI']" ;
265 | rr:termType rr:URI
266 | ]
267 | ] ;
268 |
269 | # SubmodelElementCollection for the submodel
270 | rr:predicateObjectMap [
271 | rr:predicateMap [ rr:constant rami:submodelElementCollection ] ;
272 | rr:objectMap [
273 | rr:template "http://example.org/{submodelElements/submodelElement/submodelElementCollection[semanticId/keys/key/@idType != 'URI']/idShort}" ;
274 | rr:termType rr:URI
275 | ]
276 | ] ;
277 |
278 | .
279 |
280 |
281 |
282 |
283 | # SubmodelElementCollectionMap
284 | _:SubmodelElementCollectionMap1 a rr:TriplesMap ;
285 |
286 | # XML source file with xPath iterator
287 | rml:logicalSource [
288 | rml:source "" ;
289 | rml:referenceFormulation ql:XPath ;
290 | rml:iterator "//*[local-name()='submodelElementCollection']"
291 | ] ;
292 |
293 | # URI mapping of the SubModel
294 | rr:subjectMap [
295 | rml:reference "semanticId/keys/key[@idType='URI']" ;
296 | rr:class rami:SubmodelElementCollection
297 | ] ;
298 |
299 |
300 | # the name of the SubModel is encoded by the idShort
301 | rr:predicateObjectMap [
302 | rr:predicate rdfs:label ;
303 | rr:objectMap [
304 | rml:reference "idShort" ;
305 | rr:termType rr:Literal ;
306 | rr:datatype xsd:string
307 | ]
308 | ] ;
309 |
310 | # a description can be supplied
311 | rr:predicateObjectMap [
312 | rr:predicate rdfs:comment ;
313 | rr:objectMap [
314 | rml:reference "description/langString" ;
315 | rr:termType rr:Literal ;
316 | rr:datatype xsd:string
317 | ]
318 | ] ;
319 | .
320 |
321 | # SubmodelElementCollectionMap
322 | _:SubmodelElementCollectionMap2 a rr:TriplesMap ;
323 |
324 | # XML source file with xPath iterator
325 | rml:logicalSource [
326 | rml:source "" ;
327 | rml:referenceFormulation ql:XPath ;
328 | rml:iterator "//*[local-name()='submodelElementCollection'][semanticId/keys/key/@idType != 'URI']"
329 | ] ;
330 |
331 | # URI mapping of the SubModel
332 | rr:subjectMap [
333 | rr:template "http://example.org/{idShort}" ;
334 | rr:class rami:SubmodelElementCollection
335 | ] ;
336 |
337 |
338 | # the name of the SubModel is encoded by the idShort
339 | rr:predicateObjectMap [
340 | rr:predicate rdfs:label ;
341 | rr:objectMap [
342 | rml:reference "idShort" ;
343 | rr:termType rr:Literal ;
344 | rr:datatype xsd:string
345 | ]
346 | ] ;
347 |
348 | # a description can be supplied
349 | rr:predicateObjectMap [
350 | rr:predicate rdfs:comment ;
351 | rr:objectMap [
352 | rml:reference "description/langString" ;
353 | rr:termType rr:Literal ;
354 | rr:datatype xsd:string
355 | ]
356 | ] ;
357 |
358 | # a description can be supplied
359 | rr:predicateObjectMap [
360 | rr:predicate rami:id ;
361 | rr:objectMap [
362 | rml:reference "semanticId/keys/key" ;
363 | rr:termType rr:Literal ;
364 | rr:datatype xsd:string
365 | ]
366 | ] ;
367 | .
368 |
369 |
370 |
371 | # PropertyMap for predicates at property position
372 | _:PropertyMap1 a rr:TriplesMap ;
373 |
374 | # XML source file with xPath iterator
375 | rml:logicalSource [
376 | rml:source "" ;
377 | rml:referenceFormulation ql:XPath ;
378 | rml:iterator "//*[local-name()='property']"
379 | ] ;
380 |
381 | # URI mapping of the SubModel or SubModelElementColletction, not the property itself
382 | rr:subjectMap [
383 | rml:reference "ancestor::submodel[not(submodelElements/submodelElement/submodelElementCollection)]/identification" ;
384 | #rr:class rami:Submodel
385 | ] ;
386 | # SubmodelElements with aas:property
387 | rr:predicateObjectMap [
388 | rr:predicateMap [
389 | rml:reference "semanticId/keys/key[@idType='URI']" ;
390 | rr:termType rr:URI
391 | ] ;
392 | rr:objectMap [
393 | rml:reference "value" ;
394 | ]
395 |
396 | ] ;
397 |
398 | rr:predicateObjectMap [
399 | rr:predicateMap [
400 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
401 | rr:termType rr:URI
402 | ] ;
403 | rr:objectMap [
404 | rml:reference "value" ;
405 | ]
406 |
407 | ]
408 | .
409 |
410 |
411 | # PropertyMap for predicates at property position
412 | _:PropertyMap2 a rr:TriplesMap ;
413 |
414 | # XML source file with xPath iterator
415 | rml:logicalSource [
416 | rml:source "" ;
417 | rml:referenceFormulation ql:XPath ;
418 | rml:iterator "//*[local-name()='property']"
419 | ] ;
420 |
421 | # URI mapping of the SubModel, not the property
422 | rr:subjectMap [
423 | rml:reference "ancestor::submodelElementCollection/semanticId/keys/key" ;
424 | #rr:class rami:SubmodelElementCollection
425 | ] ;
426 | # SubmodelElements with aas:property
427 | rr:predicateObjectMap [
428 | rr:predicateMap [
429 | rml:reference "semanticId/keys/key[@idType='URI']" ;
430 | rr:termType rr:URI
431 | ] ;
432 | rr:objectMap [
433 | rml:reference "value" ;
434 | ]
435 |
436 | ] ;
437 |
438 | rr:predicateObjectMap [
439 | rr:predicateMap [
440 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
441 | ] ;
442 | rr:objectMap [
443 | rml:reference "value" ;
444 | ]
445 |
446 | ]
447 | .
448 |
449 |
450 |
451 |
452 | # PropertyMap for predicates at file position
453 | _:PropertyMap3 a rr:TriplesMap ;
454 |
455 | # XML source file with xPath iterator
456 | rml:logicalSource [
457 | rml:source "" ;
458 | rml:referenceFormulation ql:XPath ;
459 | rml:iterator "//*[local-name()='file']"
460 | ] ;
461 |
462 | # URI mapping of the SubModel, not the property
463 | rr:subjectMap [
464 | rml:reference "../../../submodel/identification" ;
465 | #rr:template "http://IEC61360.org/localFile#" ;
466 | #rr:class rami:Submodel
467 | ] ;
468 | # SubmodelElements with aas:property
469 | rr:predicateObjectMap [
470 | rr:predicateMap [
471 | rml:reference "semanticId/keys/key[@idType='URI']" ;
472 | ] ;
473 | rr:objectMap [
474 | rml:reference "value" ;
475 | ]
476 |
477 | ] ;
478 | # SubmodelElements with aas:property
479 | rr:predicateObjectMap [
480 | rr:predicateMap [
481 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
482 | ] ;
483 | rr:objectMap [
484 | rml:reference "value" ;
485 | ]
486 |
487 | ]
488 | .
489 |
490 |
491 |
492 | # PropertyMap for predicates at file position
493 | _:PropertyMap4 a rr:TriplesMap ;
494 |
495 | # XML source file with xPath iterator
496 | rml:logicalSource [
497 | rml:source "" ;
498 | rml:referenceFormulation ql:XPath ;
499 | rml:iterator "//*[local-name()='file']"
500 | ] ;
501 |
502 | # URI mapping of the SubModel, not the property
503 | rr:subjectMap [
504 | rml:reference "ancestor::submodelElementCollection/semanticId/keys/key[@idType='URI']" ;
505 | #rr:class rami:SubmodelElementCollection
506 | ] ;
507 | # SubmodelElements with aas:property
508 | rr:predicateObjectMap [
509 | rr:predicateMap [
510 | rml:reference "semanticId/keys/key[@idType='URI']" ;
511 | ] ;
512 | rr:objectMap [
513 | rml:reference "value" ;
514 | ]
515 |
516 | ] ;
517 | # SubmodelElements with aas:property
518 | rr:predicateObjectMap [
519 | rr:predicateMap [
520 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
521 | ] ;
522 | rr:objectMap [
523 | rml:reference "value" ;
524 | ]
525 |
526 | ]
527 | .
528 |
529 |
530 |
531 | # PropertyMap for predicates at blob position
532 | _:PropertyMap5 a rr:TriplesMap ;
533 |
534 | # XML source file with xPath iterator
535 | rml:logicalSource [
536 | rml:source "" ;
537 | rml:referenceFormulation ql:XPath ;
538 | rml:iterator "//*[local-name()='blob']"
539 | ] ;
540 |
541 | # URI mapping of the SubModel, not the property
542 | rr:subjectMap [
543 | rml:reference "ancestor::submodel[not(submodelElements/submodelElement/submodelElementCollection)]/identification" ;
544 | #rr:template "http://IEC61360.org/localFile#" ;
545 | #rr:class rami:Submodel
546 | ] ;
547 | # SubmodelElements with aas:property
548 | rr:predicateObjectMap [
549 | rr:predicateMap [
550 | rml:reference "semanticId/keys/key[@idType='URI']" ;
551 | ] ;
552 | rr:objectMap [
553 | rml:reference "value" ;
554 | ]
555 |
556 | ] ;
557 | # SubmodelElements with aas:property
558 | rr:predicateObjectMap [
559 | rr:predicateMap [
560 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
561 | ] ;
562 | rr:objectMap [
563 | rml:reference "value" ;
564 | ]
565 |
566 | ]
567 | .
568 |
569 |
570 | # PropertyMap for predicates at file position
571 | _:PropertyMap6 a rr:TriplesMap ;
572 |
573 | # XML source file with xPath iterator
574 | rml:logicalSource [
575 | rml:source "" ;
576 | rml:referenceFormulation ql:XPath ;
577 | rml:iterator "//*[local-name()='blob']"
578 | ] ;
579 |
580 | # URI mapping of the SubModel, not the property
581 | rr:subjectMap [
582 | rml:reference "ancestor::submodelElementCollection/semanticId/keys/key[@idType='URI']" ;
583 | #rr:class rami:SubmodelElementCollection
584 | ] ;
585 | # SubmodelElements with aas:property
586 | rr:predicateObjectMap [
587 | rr:predicateMap [
588 | rml:reference "semanticId/keys/key[@idType='URI']" ;
589 | ] ;
590 | rr:objectMap [
591 | rml:reference "value" ;
592 | ]
593 |
594 | ] ;
595 | # SubmodelElements with aas:property
596 | rr:predicateObjectMap [
597 | rr:predicateMap [
598 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
599 | ] ;
600 | rr:objectMap [
601 | rml:reference "value" ;
602 | ]
603 |
604 | ]
605 | .
606 |
607 |
608 | # PropertyMap for predicates at property position
609 | _:PropertyMap7 a rr:TriplesMap ;
610 |
611 | # XML source file with xPath iterator
612 | rml:logicalSource [
613 | rml:source "" ;
614 | rml:referenceFormulation ql:XPath ;
615 | rml:iterator "//*[local-name()='property']"
616 | ] ;
617 |
618 | # URI mapping of the SubmodelElementCollection, not the property directly
619 | rr:subjectMap [
620 | rr:template "http://example.org/{ancestor::submodelElementCollection/semanticId/keys/key[@idType='IRDI']}" ;
621 | #rr:class rami:SubmodelElementCollection
622 | ] ;
623 | # SubmodelElements with aas:property
624 | rr:predicateObjectMap [
625 | rr:predicateMap [
626 | rml:reference "semanticId/keys/key[@idType='URI']" ;
627 | rr:termType rr:URI
628 | ] ;
629 | rr:objectMap [
630 | rml:reference "value" ;
631 | ]
632 |
633 | ] ;
634 |
635 | rr:predicateObjectMap [
636 | rr:predicateMap [
637 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
638 | ] ;
639 | rr:objectMap [
640 | rml:reference "value" ;
641 | ]
642 |
643 | ]
644 | .
645 |
646 |
647 | # PropertyMap for files at property position
648 | _:PropertyMap8 a rr:TriplesMap ;
649 |
650 | # XML source file with xPath iterator
651 | rml:logicalSource [
652 | rml:source "" ;
653 | rml:referenceFormulation ql:XPath ;
654 | rml:iterator "//*[local-name()='file']"
655 | ] ;
656 |
657 | # URI mapping of the SubmodelElementCollection, not the property directly
658 | rr:subjectMap [
659 | rr:template "http://example.org/{ancestor::submodelElementCollection/semanticId/keys/key[@idType='IRDI']}" ;
660 | #rr:class rami:SubmodelElementCollection
661 | ] ;
662 | # SubmodelElements with aas:property
663 | rr:predicateObjectMap [
664 | rr:predicateMap [
665 | rml:reference "semanticId/keys/key[@idType='URI']" ;
666 | rr:termType rr:URI
667 | ] ;
668 | rr:objectMap [
669 | rml:reference "value" ;
670 | ]
671 |
672 | ] ;
673 |
674 | rr:predicateObjectMap [
675 | rr:predicateMap [
676 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
677 | ] ;
678 | rr:objectMap [
679 | rml:reference "value" ;
680 | ]
681 |
682 | ]
683 | .
684 |
685 |
686 | # PropertyMap for blobs at property position
687 | _:PropertyMap9 a rr:TriplesMap ;
688 |
689 | # XML source file with xPath iterator
690 | rml:logicalSource [
691 | rml:source "" ;
692 | rml:referenceFormulation ql:XPath ;
693 | rml:iterator "//*[local-name()='blob']"
694 | ] ;
695 |
696 | # URI mapping of the SubmodelElementCollection, not the property directly
697 | rr:subjectMap [
698 | rr:template "http://example.org/{ancestor::submodelElementCollection/semanticId/keys/key[@idType='IRDI']}" ;
699 | #rr:class rami:SubmodelElementCollection
700 | ] ;
701 | # SubmodelElements with aas:property
702 | rr:predicateObjectMap [
703 | rr:predicateMap [
704 | rml:reference "semanticId/keys/key[@idType='URI']" ;
705 | rr:termType rr:URI
706 | ] ;
707 | rr:objectMap [
708 | rml:reference "value" ;
709 | ]
710 |
711 | ] ;
712 |
713 | rr:predicateObjectMap [
714 | rr:predicateMap [
715 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
716 | ] ;
717 | rr:objectMap [
718 | rml:reference "value" ;
719 | ]
720 |
721 | ]
722 | .
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 | # PropertyMap for properties at subject position
736 | _:PropertyMapA a rr:TriplesMap ;
737 |
738 | # XML source file with xPath iterator
739 | rml:logicalSource [
740 | rml:source "" ;
741 | rml:referenceFormulation ql:XPath ;
742 | rml:iterator "//*[local-name()='property']"
743 | ] ;
744 |
745 | # URI mapping of the SubModel, not the property
746 | rr:subjectMap [
747 | rml:reference "semanticId/keys/key[@idType='URI']" ;
748 | rr:class rami:Property
749 | ] ;
750 |
751 | # rdfs:label
752 | rr:predicateObjectMap [
753 | rr:predicate rdfs:label ;
754 | rr:objectMap [ rml:reference "idShort" ]
755 | ] ;
756 |
757 | # rdfs:comment
758 | rr:predicateObjectMap [
759 | rr:predicate rdfs:comment ;
760 | rr:objectMap [ rml:reference "description/langString" ]
761 | ] ;
762 | .
763 |
764 |
765 | # PropertyMap for properties at subject position
766 | _:PropertyMapB a rr:TriplesMap ;
767 |
768 | # XML source file with xPath iterator
769 | rml:logicalSource [
770 | rml:source "" ;
771 | rml:referenceFormulation ql:XPath ;
772 | rml:iterator "//*[local-name()='property']"
773 | ] ;
774 | rr:subjectMap [
775 | rr:template "http://example.org/{semanticId/keys/key[@idType != 'URI']}" ;
776 | rr:class rami:Property
777 | ] ;
778 |
779 | # rdfs:label
780 | rr:predicateObjectMap [
781 | rr:predicate rdfs:label ;
782 | rr:objectMap [ rml:reference "idShort" ]
783 | ] ;
784 |
785 | # rdfs:comment
786 | rr:predicateObjectMap [
787 | rr:predicate rdfs:comment ;
788 | rr:objectMap [ rml:reference "description/langString" ]
789 | ] ;
790 |
791 | # rami:id
792 | rr:predicateObjectMap [
793 | rr:predicate rami:id ;
794 | rr:objectMap [ rml:reference "semanticId/keys/key" ]
795 | ] ;
796 | .
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 | # ConceptDescription
810 | _:ConceptDescriptionMap1 a rr:TriplesMap ;
811 |
812 | # XML source file with xPath iterator
813 | rml:logicalSource [
814 | rml:source "" ;
815 | rml:referenceFormulation ql:XPath ;
816 | rml:iterator "//*[local-name()='conceptDescription']"
817 | ] ;
818 |
819 | # URI mapping of the conceptDescription
820 | rr:subjectMap [
821 | rml:reference "identification" ;
822 | rr:class rami:ConceptDescription
823 | ] ;
824 |
825 |
826 | # the name of the Asset is encoded by the idShort
827 | rr:predicateObjectMap [
828 | rr:predicateMap [ rr:constant rdfs:label ] ;
829 | rr:objectMap [
830 | rml:reference "idShort" ;
831 | rr:termType rr:Literal ;
832 | rr:datatype xsd:string
833 | ]
834 | ] ;
835 |
836 | # a description can be supplied
837 | rr:predicateObjectMap [
838 | rr:predicateMap [ rr:constant rdfs:comment ] ;
839 | rr:objectMap [
840 | rml:reference "description/langString" ;
841 | rr:termType rr:Literal ;
842 | rr:datatype xsd:string
843 | ]
844 | ] ;
845 |
846 | # a ConceptDescription can have a DataSpecification
847 | rr:predicateObjectMap [
848 | rr:predicateMap [
849 | rr:constant rami:hasDataSpecification ;
850 | rr:termType rr:URI
851 | ] ;
852 | rr:objectMap [ rml:reference "embeddedDataSpecification/hasDataSpecification/keys/key[@idType='URI']" ;
853 | rr:termType rr:URI
854 | ]
855 | ] ;
856 |
857 | # IEC61360 DataSpecification, reference only
858 | rr:predicateObjectMap [
859 | rr:predicateMap [ rr:constant rami:hasDataSpecificationIEC61360 ] ;
860 | rr:objectMap [
861 | rr:template "http://IEC61360.org/localFile#{embeddedDataSpecification/dataSpecificationContent/dataSpecificationIEC61360/shortName}" ;
862 | #rr:termType rr:BlankNode
863 | ]
864 | ] ;
865 |
866 | .
867 |
868 |
869 | # ConceptDescription
870 | _:ConceptDescriptionMap2 a rr:TriplesMap ;
871 |
872 | # XML source file with xPath iterator
873 | rml:logicalSource [
874 | rml:source "" ;
875 | rml:referenceFormulation ql:XPath ;
876 | rml:iterator "//*[local-name()='conceptDescription']"
877 | ] ;
878 |
879 | # URI mapping of the conceptDescription
880 | rr:subjectMap [
881 | rr:template "http://example.org/{identification[@idType='IRDI']}" ;
882 | rr:class rami:ConceptDescription
883 | ] ;
884 |
885 |
886 | # the name of the Asset is encoded by the idShort
887 | rr:predicateObjectMap [
888 | rr:predicateMap [ rr:constant rdfs:label ] ;
889 | rr:objectMap [
890 | rml:reference "idShort" ;
891 | rr:termType rr:Literal ;
892 | rr:datatype xsd:string
893 | ]
894 | ] ;
895 |
896 | # the name of the Asset is encoded by the
897 | rr:predicateObjectMap [
898 | rr:predicateMap [ rr:constant rdfs:label ] ;
899 | rr:objectMap [
900 | rml:reference "dataSpecificationContent/dataSpecificationIEC61360/preferredName/langString" ;
901 | rr:termType rr:Literal ;
902 | rr:datatype xsd:string
903 | ]
904 | ] ;
905 |
906 | # the name of the Asset is encoded by the
907 | rr:predicateObjectMap [
908 | rr:predicateMap [ rr:constant rdfs:label ] ;
909 | rr:objectMap [
910 | rml:reference "dataSpecificationContent/dataSpecificationIEC61360/shortName" ;
911 | rr:termType rr:Literal ;
912 | rr:datatype xsd:string
913 | ]
914 | ] ;
915 |
916 | # a description can be supplied
917 | rr:predicateObjectMap [
918 | rr:predicateMap [ rr:constant rdfs:comment ] ;
919 | rr:objectMap [
920 | rml:reference "description/langString" ;
921 | rr:termType rr:Literal ;
922 | rr:datatype xsd:string
923 | ]
924 | ] ;
925 |
926 | # a description can be supplied
927 | rr:predicateObjectMap [
928 | rr:predicateMap [ rr:constant rdfs:comment ] ;
929 | rr:objectMap [
930 | rml:reference "dataSpecificationContent/dataSpecificationIEC61360/definition/langString" ;
931 | rr:termType rr:Literal ;
932 | rr:datatype xsd:string
933 | ]
934 | ] ;
935 |
936 | # a
937 | rr:predicateObjectMap [
938 | rr:predicateMap [ rr:constant rami:id ] ;
939 | rr:objectMap [
940 | rml:reference "identification" ;
941 | rr:termType rr:Literal ;
942 | rr:datatype xsd:string
943 | ]
944 | ] ;
945 |
946 | # a ConceptDescription can have a DataSpecification
947 | rr:predicateObjectMap [
948 | rr:predicateMap [
949 | rr:constant rami:hasDataSpecification ;
950 | rr:termType rr:URI
951 | ] ;
952 | rr:objectMap [ rml:reference "embeddedDataSpecification/hasDataSpecification/keys/key[@idType='URI']" ;
953 | rr:termType rr:URI
954 | ]
955 | ] ;
956 |
957 | # IEC61360 DataSpecification, reference only
958 | rr:predicateObjectMap [
959 | rr:predicateMap [ rr:constant rami:hasDataSpecificationIEC61360 ] ;
960 | rr:objectMap [
961 | rr:template "http://IEC61360.org/localFile#{embeddedDataSpecification/dataSpecificationContent/dataSpecificationIEC61360/shortName}" ;
962 | #rr:termType rr:BlankNode
963 | ]
964 | ] ;
965 |
966 | .
967 |
--------------------------------------------------------------------------------
/rml_mapping/mapping_examples/raspberry-mapping.jsonld:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/i40-Tools/RAMIOntology/b239031e84d5fac3ca2f93ee65d6c6e360f35b81/rml_mapping/mapping_examples/raspberry-mapping.jsonld
--------------------------------------------------------------------------------
/rml_mapping/mapping_examples/raspberry-mapping.nq:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/i40-Tools/RAMIOntology/b239031e84d5fac3ca2f93ee65d6c6e360f35b81/rml_mapping/mapping_examples/raspberry-mapping.nq
--------------------------------------------------------------------------------
/rml_mapping/raspberry-mapping.rml.ttl:
--------------------------------------------------------------------------------
1 | @prefix tm: .
2 | @prefix ls: .
3 | @prefix owl: .
4 | @prefix rdf: .
5 | @prefix rdfs: .
6 | @prefix xsd: .
7 | @prefix dcterms: .
8 | @prefix skos: .
9 | @prefix sh: .
10 | @prefix rml: .
11 | @prefix ql: .
12 | @prefix rr: .
13 | @prefix rami: .
14 |
15 |
16 |
17 | _:AssetShellMap1 a rr:TriplesMap ;
18 |
19 | # XML source file with xPath iterator
20 | rml:logicalSource [
21 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
22 | rml:referenceFormulation ql:XPath ;
23 | rml:iterator "//*[local-name()='assetAdministrationShell'][identification/@idType = 'URI']"
24 | ] ;
25 |
26 | # URI mapping of the asset
27 | rr:subjectMap [
28 | rml:reference "identification" ;
29 | rr:class rami:AdminShell
30 | ] ;
31 |
32 |
33 | # the name of the Asset is encoded by the idShort
34 | rr:predicateObjectMap [
35 | rr:predicateMap [ rr:constant rdfs:label ] ;
36 | rr:objectMap [
37 | rml:reference "idShort" ;
38 | rr:termType rr:Literal ;
39 | rr:datatype xsd:string
40 | ]
41 | ] ;
42 |
43 | # a description can be supplied
44 | rr:predicateObjectMap [
45 | rr:predicateMap [ rr:constant rdfs:comment ] ;
46 | rr:objectMap [
47 | rml:reference "description/langString" ;
48 | rr:termType rr:Literal ;
49 | rr:datatype xsd:string
50 | ]
51 | ] ;
52 |
53 | # an asset shell can have an asset
54 | rr:predicateObjectMap [
55 | rr:predicateMap [
56 | rr:constant rami:hasAsset ;
57 | rr:termType rr:URI
58 | ] ;
59 | rr:objectMap [ rml:reference "assetRef/keys/key" ]
60 | ] ;
61 |
62 | # submodels for the asset
63 | rr:predicateObjectMap [
64 | rr:predicateMap [ rr:constant rami:hasSubmodel ] ;
65 | rr:objectMap [
66 | rml:reference "submodelRefs/submodelRef/keys/key" ;
67 | rr:termType rr:URI
68 | ]
69 | ] ;
70 |
71 | .
72 |
73 |
74 | _:AssetShellMap1 a rr:TriplesMap ;
75 |
76 | # XML source file with xPath iterator
77 | rml:logicalSource [
78 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
79 | rml:referenceFormulation ql:XPath ;
80 | rml:iterator "//*[local-name()='assetAdministrationShell']"
81 | ] ;
82 |
83 | # URI mapping of the asset
84 | rr:subjectMap [
85 | rr:template "http://example.org/{identification[@idType!='URI']}" ;
86 | rr:class rami:AssetShell
87 | ] ;
88 |
89 |
90 | # the name of the Asset is encoded by the idShort
91 | rr:predicateObjectMap [
92 | rr:predicateMap [ rr:constant rdfs:label ] ;
93 | rr:objectMap [
94 | rml:reference "idShort" ;
95 | rr:termType rr:Literal ;
96 | rr:datatype xsd:string
97 | ]
98 | ] ;
99 |
100 | # a description can be supplied
101 | rr:predicateObjectMap [
102 | rr:predicateMap [ rr:constant rdfs:comment ] ;
103 | rr:objectMap [
104 | rml:reference "description/langString" ;
105 | rr:termType rr:Literal ;
106 | rr:datatype xsd:string
107 | ]
108 | ] ;
109 |
110 | # the ID
111 | rr:predicateObjectMap [
112 | rr:predicateMap [ rr:constant rami:id ] ;
113 | rr:objectMap [
114 | rml:reference "identification" ;
115 | rr:termType rr:Literal ;
116 | rr:datatype xsd:string
117 | ]
118 | ] ;
119 |
120 | # an asset shell can have an asset
121 | rr:predicateObjectMap [
122 | rr:predicateMap [
123 | rr:constant rami:hasAsset ;
124 | rr:termType rr:URI
125 | ] ;
126 | rr:objectMap [ rml:reference "assetRef/keys/key" ]
127 | ] ;
128 |
129 | # submodels for the asset
130 | rr:predicateObjectMap [
131 | rr:predicateMap [ rr:constant rami:hasSubmodel ] ;
132 | rr:objectMap [
133 | rml:reference "submodelRefs/submodelRef/keys/key" ;
134 | rr:termType rr:URI
135 | ]
136 | ] ;
137 |
138 | # derived from another AAS
139 | rr:predicateObjectMap [
140 | rr:predicateMap [ rr:constant rami:derivedFrom ] ;
141 | rr:objectMap [
142 | rml:reference "derivedFrom/keys/key" ;
143 | rr:termType rr:URI
144 | ]
145 | ] ;
146 |
147 | # derived from another AAS
148 | rr:predicateObjectMap [
149 | rr:predicateMap [ rr:constant rami:derivedFrom ] ;
150 | rr:objectMap [
151 | rml:reference "derivedFrom/keys/key" ;
152 | #rr:termType rr:URI
153 | ]
154 | ] ;
155 |
156 | .
157 |
158 |
159 |
160 |
161 |
162 |
163 | _:AssetMap a rr:TriplesMap ;
164 |
165 | # XML source file with xPath iterator
166 | rml:logicalSource [
167 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
168 | rml:referenceFormulation ql:XPath ;
169 | rml:iterator "//*[local-name()='asset']"
170 | ] ;
171 |
172 | # URI mapping of the asset
173 | rr:subjectMap [
174 | rml:reference "identification" ;
175 | rr:class rami:Asset
176 | ] ;
177 |
178 |
179 | # the name of the Asset is encoded by the idShort
180 | rr:predicateObjectMap [
181 | rr:predicateMap [ rr:constant rdfs:label ] ;
182 | rr:objectMap [
183 | rml:reference "idShort" ;
184 | rr:termType rr:Literal ;
185 | rr:datatype xsd:string
186 | ]
187 | ] ;
188 |
189 | # a description can be supplied
190 | rr:predicateObjectMap [
191 | rr:predicateMap [ rr:constant rdfs:comment ] ;
192 | rr:objectMap [
193 | rml:reference "description/langString" ;
194 | rr:termType rr:Literal ;
195 | rr:datatype xsd:string
196 | ]
197 | ] ;
198 |
199 | # an asset can be of kind instance or type
200 | rr:predicateObjectMap [
201 | rr:predicateMap [ rr:constant rami:hasKind ] ;
202 | rr:objectMap [ rr:template "https://w3id.org/i40/rami#{kind}" ]
203 | ] ;
204 |
205 | # submodels for the asset
206 | rr:predicateObjectMap [
207 | rr:predicateMap [ rr:constant rami:hasSubmodel ] ;
208 | rr:objectMap [
209 | rml:reference "assetIdentificationModelRef/keys/key" ;
210 | rr:termType rr:URI
211 | ]
212 | ]
213 | .
214 |
215 |
216 |
217 | # SubmodelMap
218 | _:SubModelMap a rr:TriplesMap ;
219 |
220 | # XML source file with xPath iterator
221 | rml:logicalSource [
222 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
223 | rml:referenceFormulation ql:XPath ;
224 | rml:iterator "//*[local-name()='submodel']"
225 | ] ;
226 |
227 | # URI mapping of the SubModel
228 | rr:subjectMap [
229 | rml:reference "identification" ;
230 | rr:class rami:Submodel
231 | ] ;
232 |
233 |
234 | # the name of the SubModel is encoded by the idShort
235 | rr:predicateObjectMap [
236 | rr:predicate rdfs:label ;
237 | rr:objectMap [
238 | rml:reference "idShort" ;
239 | rr:termType rr:Literal ;
240 | rr:datatype xsd:string
241 | ]
242 | ] ;
243 |
244 | # a description can be supplied
245 | rr:predicateObjectMap [
246 | rr:predicate rdfs:comment ;
247 | rr:objectMap [
248 | rml:reference "description/langString" ;
249 | rr:termType rr:Literal ;
250 | rr:datatype xsd:string
251 | ]
252 | ] ;
253 |
254 | # an asset can be of kind instance or type
255 | rr:predicateObjectMap [
256 | rr:predicate rami:hasKind ;
257 | rr:objectMap [ rr:template "https://w3id.org/i40/rami#{kind}" ]
258 | ] ;
259 |
260 | # SubmodelElementCollection for the submodel
261 | rr:predicateObjectMap [
262 | rr:predicateMap [ rr:constant rami:submodelElementCollection ] ;
263 | rr:objectMap [
264 | rml:reference "submodelElements/submodelElement/submodelElementCollection/semanticId/keys/key[@idType='URI']" ;
265 | rr:termType rr:URI
266 | ]
267 | ] ;
268 |
269 | # SubmodelElementCollection for the submodel
270 | rr:predicateObjectMap [
271 | rr:predicateMap [ rr:constant rami:submodelElementCollection ] ;
272 | rr:objectMap [
273 | rr:template "http://example.org/{submodelElements/submodelElement/submodelElementCollection[semanticId/keys/key/@idType != 'URI']/idShort}" ;
274 | rr:termType rr:URI
275 | ]
276 | ] ;
277 |
278 | .
279 |
280 |
281 |
282 |
283 | # SubmodelElementCollectionMap
284 | _:SubmodelElementCollectionMap1 a rr:TriplesMap ;
285 |
286 | # XML source file with xPath iterator
287 | rml:logicalSource [
288 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
289 | rml:referenceFormulation ql:XPath ;
290 | rml:iterator "//*[local-name()='submodelElementCollection']"
291 | ] ;
292 |
293 | # URI mapping of the SubModel
294 | rr:subjectMap [
295 | rml:reference "semanticId/keys/key[@idType='URI']" ;
296 | rr:class rami:SubmodelElementCollection
297 | ] ;
298 |
299 |
300 | # the name of the SubModel is encoded by the idShort
301 | rr:predicateObjectMap [
302 | rr:predicate rdfs:label ;
303 | rr:objectMap [
304 | rml:reference "idShort" ;
305 | rr:termType rr:Literal ;
306 | rr:datatype xsd:string
307 | ]
308 | ] ;
309 |
310 | # a description can be supplied
311 | rr:predicateObjectMap [
312 | rr:predicate rdfs:comment ;
313 | rr:objectMap [
314 | rml:reference "description/langString" ;
315 | rr:termType rr:Literal ;
316 | rr:datatype xsd:string
317 | ]
318 | ] ;
319 | .
320 |
321 | # SubmodelElementCollectionMap
322 | _:SubmodelElementCollectionMap2 a rr:TriplesMap ;
323 |
324 | # XML source file with xPath iterator
325 | rml:logicalSource [
326 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
327 | rml:referenceFormulation ql:XPath ;
328 | rml:iterator "//*[local-name()='submodelElementCollection'][semanticId/keys/key/@idType != 'URI']"
329 | ] ;
330 |
331 | # URI mapping of the SubModel
332 | rr:subjectMap [
333 | rr:template "http://example.org/{idShort}" ;
334 | rr:class rami:SubmodelElementCollection
335 | ] ;
336 |
337 |
338 | # the name of the SubModel is encoded by the idShort
339 | rr:predicateObjectMap [
340 | rr:predicate rdfs:label ;
341 | rr:objectMap [
342 | rml:reference "idShort" ;
343 | rr:termType rr:Literal ;
344 | rr:datatype xsd:string
345 | ]
346 | ] ;
347 |
348 | # a description can be supplied
349 | rr:predicateObjectMap [
350 | rr:predicate rdfs:comment ;
351 | rr:objectMap [
352 | rml:reference "description/langString" ;
353 | rr:termType rr:Literal ;
354 | rr:datatype xsd:string
355 | ]
356 | ] ;
357 |
358 | # a description can be supplied
359 | rr:predicateObjectMap [
360 | rr:predicate rami:id ;
361 | rr:objectMap [
362 | rml:reference "semanticId/keys/key" ;
363 | rr:termType rr:Literal ;
364 | rr:datatype xsd:string
365 | ]
366 | ] ;
367 | .
368 |
369 |
370 |
371 | # PropertyMap for predicates at property position
372 | _:PropertyMap1 a rr:TriplesMap ;
373 |
374 | # XML source file with xPath iterator
375 | rml:logicalSource [
376 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
377 | rml:referenceFormulation ql:XPath ;
378 | rml:iterator "//*[local-name()='property']"
379 | ] ;
380 |
381 | # URI mapping of the SubModel or SubModelElementColletction, not the property itself
382 | rr:subjectMap [
383 | rml:reference "ancestor::submodel[not(submodelElements/submodelElement/submodelElementCollection)]/identification" ;
384 | #rr:class rami:Submodel
385 | ] ;
386 | # SubmodelElements with aas:property
387 | rr:predicateObjectMap [
388 | rr:predicateMap [
389 | rml:reference "semanticId/keys/key[@idType='URI']" ;
390 | rr:termType rr:URI
391 | ] ;
392 | rr:objectMap [
393 | rml:reference "value" ;
394 | ]
395 |
396 | ] ;
397 |
398 | rr:predicateObjectMap [
399 | rr:predicateMap [
400 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
401 | rr:termType rr:URI
402 | ] ;
403 | rr:objectMap [
404 | rml:reference "value" ;
405 | ]
406 |
407 | ]
408 | .
409 |
410 |
411 | # PropertyMap for predicates at property position
412 | _:PropertyMap2 a rr:TriplesMap ;
413 |
414 | # XML source file with xPath iterator
415 | rml:logicalSource [
416 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
417 | rml:referenceFormulation ql:XPath ;
418 | rml:iterator "//*[local-name()='property']"
419 | ] ;
420 |
421 | # URI mapping of the SubModel, not the property
422 | rr:subjectMap [
423 | rml:reference "ancestor::submodelElementCollection/semanticId/keys/key" ;
424 | #rr:class rami:SubmodelElementCollection
425 | ] ;
426 | # SubmodelElements with aas:property
427 | rr:predicateObjectMap [
428 | rr:predicateMap [
429 | rml:reference "semanticId/keys/key[@idType='URI']" ;
430 | rr:termType rr:URI
431 | ] ;
432 | rr:objectMap [
433 | rml:reference "value" ;
434 | ]
435 |
436 | ] ;
437 |
438 | rr:predicateObjectMap [
439 | rr:predicateMap [
440 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
441 | ] ;
442 | rr:objectMap [
443 | rml:reference "value" ;
444 | ]
445 |
446 | ]
447 | .
448 |
449 |
450 |
451 |
452 | # PropertyMap for predicates at file position
453 | _:PropertyMap3 a rr:TriplesMap ;
454 |
455 | # XML source file with xPath iterator
456 | rml:logicalSource [
457 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
458 | rml:referenceFormulation ql:XPath ;
459 | rml:iterator "//*[local-name()='file']"
460 | ] ;
461 |
462 | # URI mapping of the SubModel, not the property
463 | rr:subjectMap [
464 | rml:reference "../../../submodel/identification" ;
465 | #rr:template "http://IEC61360.org/localFile#" ;
466 | #rr:class rami:Submodel
467 | ] ;
468 | # SubmodelElements with aas:property
469 | rr:predicateObjectMap [
470 | rr:predicateMap [
471 | rml:reference "semanticId/keys/key[@idType='URI']" ;
472 | ] ;
473 | rr:objectMap [
474 | rml:reference "value" ;
475 | ]
476 |
477 | ] ;
478 | # SubmodelElements with aas:property
479 | rr:predicateObjectMap [
480 | rr:predicateMap [
481 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
482 | ] ;
483 | rr:objectMap [
484 | rml:reference "value" ;
485 | ]
486 |
487 | ]
488 | .
489 |
490 |
491 |
492 | # PropertyMap for predicates at file position
493 | _:PropertyMap4 a rr:TriplesMap ;
494 |
495 | # XML source file with xPath iterator
496 | rml:logicalSource [
497 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
498 | rml:referenceFormulation ql:XPath ;
499 | rml:iterator "//*[local-name()='file']"
500 | ] ;
501 |
502 | # URI mapping of the SubModel, not the property
503 | rr:subjectMap [
504 | rml:reference "ancestor::submodelElementCollection/semanticId/keys/key[@idType='URI']" ;
505 | #rr:class rami:SubmodelElementCollection
506 | ] ;
507 | # SubmodelElements with aas:property
508 | rr:predicateObjectMap [
509 | rr:predicateMap [
510 | rml:reference "semanticId/keys/key[@idType='URI']" ;
511 | ] ;
512 | rr:objectMap [
513 | rml:reference "value" ;
514 | ]
515 |
516 | ] ;
517 | # SubmodelElements with aas:property
518 | rr:predicateObjectMap [
519 | rr:predicateMap [
520 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
521 | ] ;
522 | rr:objectMap [
523 | rml:reference "value" ;
524 | ]
525 |
526 | ]
527 | .
528 |
529 |
530 |
531 | # PropertyMap for predicates at blob position
532 | _:PropertyMap5 a rr:TriplesMap ;
533 |
534 | # XML source file with xPath iterator
535 | rml:logicalSource [
536 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
537 | rml:referenceFormulation ql:XPath ;
538 | rml:iterator "//*[local-name()='blob']"
539 | ] ;
540 |
541 | # URI mapping of the SubModel, not the property
542 | rr:subjectMap [
543 | rml:reference "ancestor::submodel[not(submodelElements/submodelElement/submodelElementCollection)]/identification" ;
544 | #rr:template "http://IEC61360.org/localFile#" ;
545 | #rr:class rami:Submodel
546 | ] ;
547 | # SubmodelElements with aas:property
548 | rr:predicateObjectMap [
549 | rr:predicateMap [
550 | rml:reference "semanticId/keys/key[@idType='URI']" ;
551 | ] ;
552 | rr:objectMap [
553 | rml:reference "value" ;
554 | ]
555 |
556 | ] ;
557 | # SubmodelElements with aas:property
558 | rr:predicateObjectMap [
559 | rr:predicateMap [
560 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
561 | ] ;
562 | rr:objectMap [
563 | rml:reference "value" ;
564 | ]
565 |
566 | ]
567 | .
568 |
569 |
570 | # PropertyMap for predicates at file position
571 | _:PropertyMap6 a rr:TriplesMap ;
572 |
573 | # XML source file with xPath iterator
574 | rml:logicalSource [
575 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
576 | rml:referenceFormulation ql:XPath ;
577 | rml:iterator "//*[local-name()='blob']"
578 | ] ;
579 |
580 | # URI mapping of the SubModel, not the property
581 | rr:subjectMap [
582 | rml:reference "ancestor::submodelElementCollection/semanticId/keys/key[@idType='URI']" ;
583 | #rr:class rami:SubmodelElementCollection
584 | ] ;
585 | # SubmodelElements with aas:property
586 | rr:predicateObjectMap [
587 | rr:predicateMap [
588 | rml:reference "semanticId/keys/key[@idType='URI']" ;
589 | ] ;
590 | rr:objectMap [
591 | rml:reference "value" ;
592 | ]
593 |
594 | ] ;
595 | # SubmodelElements with aas:property
596 | rr:predicateObjectMap [
597 | rr:predicateMap [
598 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
599 | ] ;
600 | rr:objectMap [
601 | rml:reference "value" ;
602 | ]
603 |
604 | ]
605 | .
606 |
607 |
608 | # PropertyMap for predicates at property position
609 | _:PropertyMap7 a rr:TriplesMap ;
610 |
611 | # XML source file with xPath iterator
612 | rml:logicalSource [
613 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
614 | rml:referenceFormulation ql:XPath ;
615 | rml:iterator "//*[local-name()='property']"
616 | ] ;
617 |
618 | # URI mapping of the SubmodelElementCollection, not the property directly
619 | rr:subjectMap [
620 | rr:template "http://example.org/{ancestor::submodelElementCollection/semanticId/keys/key[@idType='IRDI']}" ;
621 | #rr:class rami:SubmodelElementCollection
622 | ] ;
623 | # SubmodelElements with aas:property
624 | rr:predicateObjectMap [
625 | rr:predicateMap [
626 | rml:reference "semanticId/keys/key[@idType='URI']" ;
627 | rr:termType rr:URI
628 | ] ;
629 | rr:objectMap [
630 | rml:reference "value" ;
631 | ]
632 |
633 | ] ;
634 |
635 | rr:predicateObjectMap [
636 | rr:predicateMap [
637 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
638 | ] ;
639 | rr:objectMap [
640 | rml:reference "value" ;
641 | ]
642 |
643 | ]
644 | .
645 |
646 |
647 | # PropertyMap for files at property position
648 | _:PropertyMap8 a rr:TriplesMap ;
649 |
650 | # XML source file with xPath iterator
651 | rml:logicalSource [
652 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
653 | rml:referenceFormulation ql:XPath ;
654 | rml:iterator "//*[local-name()='file']"
655 | ] ;
656 |
657 | # URI mapping of the SubmodelElementCollection, not the property directly
658 | rr:subjectMap [
659 | rr:template "http://example.org/{ancestor::submodelElementCollection/semanticId/keys/key[@idType='IRDI']}" ;
660 | #rr:class rami:SubmodelElementCollection
661 | ] ;
662 | # SubmodelElements with aas:property
663 | rr:predicateObjectMap [
664 | rr:predicateMap [
665 | rml:reference "semanticId/keys/key[@idType='URI']" ;
666 | rr:termType rr:URI
667 | ] ;
668 | rr:objectMap [
669 | rml:reference "value" ;
670 | ]
671 |
672 | ] ;
673 |
674 | rr:predicateObjectMap [
675 | rr:predicateMap [
676 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
677 | ] ;
678 | rr:objectMap [
679 | rml:reference "value" ;
680 | ]
681 |
682 | ]
683 | .
684 |
685 |
686 | # PropertyMap for blobs at property position
687 | _:PropertyMap9 a rr:TriplesMap ;
688 |
689 | # XML source file with xPath iterator
690 | rml:logicalSource [
691 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
692 | rml:referenceFormulation ql:XPath ;
693 | rml:iterator "//*[local-name()='blob']"
694 | ] ;
695 |
696 | # URI mapping of the SubmodelElementCollection, not the property directly
697 | rr:subjectMap [
698 | rr:template "http://example.org/{ancestor::submodelElementCollection/semanticId/keys/key[@idType='IRDI']}" ;
699 | #rr:class rami:SubmodelElementCollection
700 | ] ;
701 | # SubmodelElements with aas:property
702 | rr:predicateObjectMap [
703 | rr:predicateMap [
704 | rml:reference "semanticId/keys/key[@idType='URI']" ;
705 | rr:termType rr:URI
706 | ] ;
707 | rr:objectMap [
708 | rml:reference "value" ;
709 | ]
710 |
711 | ] ;
712 |
713 | rr:predicateObjectMap [
714 | rr:predicateMap [
715 | rr:template "http://example.org/{semanticId/keys/key[@idType='IRDI']}" ;
716 | ] ;
717 | rr:objectMap [
718 | rml:reference "value" ;
719 | ]
720 |
721 | ]
722 | .
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 | # PropertyMap for properties at subject position
736 | _:PropertyMapA a rr:TriplesMap ;
737 |
738 | # XML source file with xPath iterator
739 | rml:logicalSource [
740 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
741 | rml:referenceFormulation ql:XPath ;
742 | rml:iterator "//*[local-name()='property']"
743 | ] ;
744 |
745 | # URI mapping of the SubModel, not the property
746 | rr:subjectMap [
747 | rml:reference "semanticId/keys/key[@idType='URI']" ;
748 | rr:class rami:Property
749 | ] ;
750 |
751 | # rdfs:label
752 | rr:predicateObjectMap [
753 | rr:predicate rdfs:label ;
754 | rr:objectMap [ rml:reference "idShort" ]
755 | ] ;
756 |
757 | # rdfs:comment
758 | rr:predicateObjectMap [
759 | rr:predicate rdfs:comment ;
760 | rr:objectMap [ rml:reference "description/langString" ]
761 | ] ;
762 | .
763 |
764 |
765 | # PropertyMap for properties at subject position
766 | _:PropertyMapB a rr:TriplesMap ;
767 |
768 | # XML source file with xPath iterator
769 | rml:logicalSource [
770 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
771 | rml:referenceFormulation ql:XPath ;
772 | rml:iterator "//*[local-name()='property']"
773 | ] ;
774 | rr:subjectMap [
775 | rr:template "http://example.org/{semanticId/keys/key[@idType != 'URI']}" ;
776 | rr:class rami:Property
777 | ] ;
778 |
779 | # rdfs:label
780 | rr:predicateObjectMap [
781 | rr:predicate rdfs:label ;
782 | rr:objectMap [ rml:reference "idShort" ]
783 | ] ;
784 |
785 | # rdfs:comment
786 | rr:predicateObjectMap [
787 | rr:predicate rdfs:comment ;
788 | rr:objectMap [ rml:reference "description/langString" ]
789 | ] ;
790 |
791 | # rami:id
792 | rr:predicateObjectMap [
793 | rr:predicate rami:id ;
794 | rr:objectMap [ rml:reference "semanticId/keys/key" ]
795 | ] ;
796 | .
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 | # ConceptDescription
810 | _:ConceptDescriptionMap1 a rr:TriplesMap ;
811 |
812 | # XML source file with xPath iterator
813 | rml:logicalSource [
814 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
815 | rml:referenceFormulation ql:XPath ;
816 | rml:iterator "//*[local-name()='conceptDescription']"
817 | ] ;
818 |
819 | # URI mapping of the conceptDescription
820 | rr:subjectMap [
821 | rml:reference "identification" ;
822 | rr:class rami:ConceptDescription
823 | ] ;
824 |
825 |
826 | # the name of the Asset is encoded by the idShort
827 | rr:predicateObjectMap [
828 | rr:predicateMap [ rr:constant rdfs:label ] ;
829 | rr:objectMap [
830 | rml:reference "idShort" ;
831 | rr:termType rr:Literal ;
832 | rr:datatype xsd:string
833 | ]
834 | ] ;
835 |
836 | # a description can be supplied
837 | rr:predicateObjectMap [
838 | rr:predicateMap [ rr:constant rdfs:comment ] ;
839 | rr:objectMap [
840 | rml:reference "description/langString" ;
841 | rr:termType rr:Literal ;
842 | rr:datatype xsd:string
843 | ]
844 | ] ;
845 |
846 | # a ConceptDescription can have a DataSpecification
847 | rr:predicateObjectMap [
848 | rr:predicateMap [
849 | rr:constant rami:hasDataSpecification ;
850 | rr:termType rr:URI
851 | ] ;
852 | rr:objectMap [ rml:reference "embeddedDataSpecification/hasDataSpecification/keys/key[@idType='URI']" ;
853 | rr:termType rr:URI
854 | ]
855 | ] ;
856 |
857 | # IEC61360 DataSpecification, reference only
858 | rr:predicateObjectMap [
859 | rr:predicateMap [ rr:constant rami:hasDataSpecificationIEC61360 ] ;
860 | rr:objectMap [
861 | rr:template "http://IEC61360.org/localFile#{embeddedDataSpecification/dataSpecificationContent/dataSpecificationIEC61360/shortName}" ;
862 | #rr:termType rr:BlankNode
863 | ]
864 | ] ;
865 |
866 | .
867 |
868 |
869 | # ConceptDescription
870 | _:ConceptDescriptionMap2 a rr:TriplesMap ;
871 |
872 | # XML source file with xPath iterator
873 | rml:logicalSource [
874 | rml:source "examples/RaspberryPiModel3B_plus.aas.xml" ;
875 | rml:referenceFormulation ql:XPath ;
876 | rml:iterator "//*[local-name()='conceptDescription']"
877 | ] ;
878 |
879 | # URI mapping of the conceptDescription
880 | rr:subjectMap [
881 | rr:template "http://example.org/{identification[@idType='IRDI']}" ;
882 | rr:class rami:ConceptDescription
883 | ] ;
884 |
885 |
886 | # the name of the Asset is encoded by the idShort
887 | rr:predicateObjectMap [
888 | rr:predicateMap [ rr:constant rdfs:label ] ;
889 | rr:objectMap [
890 | rml:reference "idShort" ;
891 | rr:termType rr:Literal ;
892 | rr:datatype xsd:string
893 | ]
894 | ] ;
895 |
896 | # the name of the Asset is encoded by the
897 | rr:predicateObjectMap [
898 | rr:predicateMap [ rr:constant rdfs:label ] ;
899 | rr:objectMap [
900 | rml:reference "dataSpecificationContent/dataSpecificationIEC61360/preferredName/langString" ;
901 | rr:termType rr:Literal ;
902 | rr:datatype xsd:string
903 | ]
904 | ] ;
905 |
906 | # the name of the Asset is encoded by the
907 | rr:predicateObjectMap [
908 | rr:predicateMap [ rr:constant rdfs:label ] ;
909 | rr:objectMap [
910 | rml:reference "dataSpecificationContent/dataSpecificationIEC61360/shortName" ;
911 | rr:termType rr:Literal ;
912 | rr:datatype xsd:string
913 | ]
914 | ] ;
915 |
916 | # a description can be supplied
917 | rr:predicateObjectMap [
918 | rr:predicateMap [ rr:constant rdfs:comment ] ;
919 | rr:objectMap [
920 | rml:reference "description/langString" ;
921 | rr:termType rr:Literal ;
922 | rr:datatype xsd:string
923 | ]
924 | ] ;
925 |
926 | # a description can be supplied
927 | rr:predicateObjectMap [
928 | rr:predicateMap [ rr:constant rdfs:comment ] ;
929 | rr:objectMap [
930 | rml:reference "dataSpecificationContent/dataSpecificationIEC61360/definition/langString" ;
931 | rr:termType rr:Literal ;
932 | rr:datatype xsd:string
933 | ]
934 | ] ;
935 |
936 | # a
937 | rr:predicateObjectMap [
938 | rr:predicateMap [ rr:constant rami:id ] ;
939 | rr:objectMap [
940 | rml:reference "identification" ;
941 | rr:termType rr:Literal ;
942 | rr:datatype xsd:string
943 | ]
944 | ] ;
945 |
946 | # a ConceptDescription can have a DataSpecification
947 | rr:predicateObjectMap [
948 | rr:predicateMap [
949 | rr:constant rami:hasDataSpecification ;
950 | rr:termType rr:URI
951 | ] ;
952 | rr:objectMap [ rml:reference "embeddedDataSpecification/hasDataSpecification/keys/key[@idType='URI']" ;
953 | rr:termType rr:URI
954 | ]
955 | ] ;
956 |
957 | # IEC61360 DataSpecification, reference only
958 | rr:predicateObjectMap [
959 | rr:predicateMap [ rr:constant rami:hasDataSpecificationIEC61360 ] ;
960 | rr:objectMap [
961 | rr:template "http://IEC61360.org/localFile#{embeddedDataSpecification/dataSpecificationContent/dataSpecificationIEC61360/shortName}" ;
962 | #rr:termType rr:BlankNode
963 | ]
964 | ] ;
965 |
966 | .
967 |
--------------------------------------------------------------------------------
/schema/AAS-Shape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | # author: Sebastian Bader (sebastian.bader@iais.fraunhofer.de)
11 | # Resources:
12 | # RAMI Ontology: https://vocol.iais.fraunhofer.de/rami/
13 | # W3C recommendation: https://www.w3.org/TR/shacl/
14 | # SHACL syntax checking: http://shacl.org/playground/
15 | # SHACL Advanced Features: https://w3c.github.io/data-shapes/shacl-af/
16 |
17 | <#AasShape>
18 | a sh:NodeShape ;
19 | sh:targetClass rami:AdminShell ;
20 | sh:property [
21 | sh:path rdf:type ;
22 | sh:minCount 1 ; # this statement is redundant as each instance of type ids:Rule has at least one class relation (type).
23 | #sh:message ""@en ;
24 | ] ;
25 | sh:constraint [
26 | sh:nodeKind sh:URI ;
27 | sh:message "Each AAS object must be a URI."@en ;
28 | ] ;
29 | sh:property [
30 | sh:path rami:derivedFrom ;
31 | sh:class rami:AdminShell ;
32 | sh:minCount 0 ;
33 | sh:maxCount 1 ;
34 | sh:severity sh:Violation ;
35 | sh:message "Each AAS must be derived from either exactly 1 or none other AAS."@en ;
36 | ] ;
37 | sh:property [
38 | sh:path rami:security ;
39 | sh:class rami:Security ;
40 | sh:minCount 1 ;
41 | sh:maxCount 1 ;
42 | sh:severity sh:Violation ;
43 | sh:message "Each AAS must be related to exactly one Security element through the security relation."@en ;
44 | ] ;
45 | sh:property [
46 | sh:path rami:asset ;
47 | sh:class rami:Asset ;
48 | sh:minCount 1 ;
49 | sh:maxCount 1 ;
50 | sh:severity sh:Violation ;
51 | sh:message "Each AAS must be related to exactly one Asset through the asset relation."@en ;
52 | ] ;
53 | # sh:property [
54 | # sh:path rami:hasSubmodel ;
55 | # sh:class rami:Submodel ;
56 | # sh:minCount 0 ;
57 | # #sh:message ""@en ;
58 | # ] ; #otherwise the property is redundant, because it inherits also from DataSpecification
59 | sh:property [
60 | sh:path rami:conceptDescription ;
61 | sh:class rami:ConceptDescription ;
62 | sh:minCount 0 ;
63 | #sh:message ""@en ;
64 | ] ;
65 | sh:property [
66 | sh:path rami:hasView ;
67 | sh:class rami:View ;
68 | sh:minCount 0 ; #Perhaps sh:minCount has to be 1 (see "AAS in detail", p. 65 Figure 33)
69 | #sh:message ""@en ;
70 | ] ;
71 | sh:property [
72 | sh:path rami:hasKind ;
73 | sh:class rami:AssetKind ;
74 | sh:minCount 1 ;
75 | sh:maxCount 1 ;
76 | sh:severity sh:Violation ;
77 | sh:message "Each AAS must be either of kind instance or type."@en ;
78 | ] ;
79 | sh:constraint [
80 | sh:nodeKind sh:URI ;
81 | sh:message "Each AAS object must be a URI."@en ;
82 | ] ;
83 | # AAS inherits from Identifiable
84 | sh:property [
85 | sh:path rami:administration ;
86 | sh:minCount 0 ;
87 | sh:maxCount 1 ;
88 | sh:class rami:AdministrativeInformation ;
89 | sh:severity sh:Violation ;
90 | sh:message ""@en ;
91 | ] ;
92 | sh:property [
93 | sh:path rami:id ;
94 | sh:minCount 0 ;
95 | sh:message "An identifiable entity can have a rami:id."@en ;
96 | ] ;
97 | # Identifiable inherits from Referable
98 | sh:property [
99 | sh:path rami:idShort ;
100 | sh:valueDatatype xsd:string ;
101 | sh:minCount 0 ;
102 | sh:maxCount 1 ;
103 | sh:severity sh:violation ;
104 | sh:message "..."@en ;
105 | ] ;
106 |
107 | sh:property [
108 | sh:path rami:category ;
109 | sh:valueDatatype xsd:string ;
110 | sh:minCount 0 ;
111 | sh:maxCount 1 ;
112 | sh:severity sh:violation ;
113 | sh:message "..."@en ;
114 | ] ;
115 |
116 | sh:property [
117 | sh:path rami:description ;
118 | sh:valueDatatype xsd:langString ;
119 | sh:minCount 0 ;
120 | sh:maxCount 1 ;
121 | sh:severity sh:violation ;
122 | sh:message "..."@en ;
123 | ] ;
124 |
125 | sh:property [
126 | sh:path rami:parent ;
127 | sh:class rami:Referable ;
128 | sh:minCount 0 ;
129 | sh:maxCount 1 ;
130 | sh:severity sh:violation ;
131 | sh:message "..."@en ;
132 | ] ;
133 |
134 |
135 | # AAS inherits from DataSpecification
136 | sh:property [
137 | sh:path rami:hasDataSpecification ;
138 | sh:class rami:Reference ;
139 | sh:minCount 0 ;
140 | sh:nodeKind sh:IRI ; # class Reference is not part of the ontology
141 | sh:severity sh:Violation ;
142 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
143 | ] ;
144 | sh:property [
145 | sh:path rami:hasSubmodel ;
146 | sh:class rami:Submodel ;
147 | sh:minCount 0 ;
148 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
149 | ] .
--------------------------------------------------------------------------------
/schema/AccessControlShapes/AccessControlPolicyPointsShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#AccessControlPolicyPointsShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:AccessControlPolicyPoints ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:hasPolicyAdministrationPoint ;
19 | sh:class rami:PolicyAdministrationPoint ;
20 | sh:minCount 1 ;
21 | sh:maxCount 1 ; # MANDATORY
22 | sh:severity sh:Violation ;
23 | sh:message "Exactly one policyAdministrationPoint is required."@en ;
24 | ] ;
25 |
26 | sh:property [
27 | sh:path rami:hasPolicyDecisionPoint ;
28 | sh:class rmai:PolicyDecisionPoint ;
29 | sh:minCount 1 ;
30 | sh:maxCount 1 ;
31 | sh:severity sh:Violation ;
32 | sh:message "Exaclty one PolicyDecisionPoint is necessary."@en ;
33 | ] ;
34 |
35 | sh:property [
36 | sh:path rami:hasPolicyEnforcementPoint ;
37 | sh:class rami:PolicyEnforcementPoint ;
38 | sh:minCount 1 ;
39 | sh:maxCount 1 ;
40 | sh:severity sh:Violation ;
41 | sh:message "Exactly one PolicyEnforcementPoint is mandatory."@en ;
42 | ] ;
43 |
44 | sh:property [
45 | sh:path rami:hasPolicyInformationPoints ;
46 | sh:class rami:PolicyInformationPoints ;
47 | sh:minCount 0 ;
48 | sh:severity sh:Violation ;
49 | sh:message "PolicyInformationPoints have to be instance of PolicyInformationPoints."@en ;
50 | ] .
--------------------------------------------------------------------------------
/schema/AccessControlShapes/AccessControlShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#AccessControlShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:AccessControl ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ; # redundst
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:hasAccessPermissionRule ;
19 | sh:class rami:AccessPermissionRule ;
20 | sh:minCount 0 ;
21 | sh:severity sh:Violation ;
22 | sh:message "rami:hasAccessPermissionRule has to be of type AccessPermissionRule."@en ;
23 | ] ;
24 |
25 | sh:property [
26 | sh:path rami:selectableSubjectAttributes ;
27 | sh:class rami:Submodel ;
28 | sh:minCount 1 ; # see Figure 66 (page 125) in "AAS in detail"
29 | sh:maxCount 1 ; # optional
30 | sh:severity sh:Violation ;
31 | sh:message "rami:selectableSubjectAttributes needs to be instance of rami:Submodel"@en ;
32 | ] ;
33 |
34 | sh:property [
35 | sh:path rami:defaultSubjectAttributes* ;
36 | sh:class rami:Submodel ;
37 | sh:minCount 1 ; # see Figure 66 (page 125) in "AAS in detail"
38 | sh:maxCount 1 ; # optional
39 | sh:severity sh:Violation ;
40 | sh:message "rami:defaultSubjectAttribute needs to be instance of rami:Submodel"@en ;
41 | ] ;
42 |
43 | sh:property [
44 | sh:path rami:selectablePermissions ;
45 | sh:class rami:Submodel ;
46 | sh:minCount 1 ; # see Figure 66 (page 125) in "AAS in detail"
47 | sh:maxCount 1 ; # optional
48 | sh:severity sh:Violation ;
49 | sh:message "rami:selectablePermissions needs to be instance of rami:Submodel"@en ;
50 | ] ;
51 |
52 | sh:property [
53 | sh:path rami:defaultPermissions ;
54 | sh:class rami:Submodel ;
55 | sh:minCount 1 ; # see Figure 66 (page 125) in "AAS in detail"
56 | sh:maxCount 1 ; # optional
57 | sh:severity sh:Violation ;
58 | sh:message "rami:defaultPermissions needs to be instance of rami:Submodel"@en ;
59 | ] ;
60 |
61 | sh:property [
62 | sh:path rami:selectableEnvironmentAttributes ;
63 | sh:class rami:Submodel ;
64 | sh:minCount 0 ;
65 | sh:maxCount 1 ; # optional
66 | sh:severity sh:Violation ;
67 | sh:message "rami:selectableEnvironmentAttributes needs to be instance of rami:Submodel"@en ;
68 | ] ;
69 |
70 | sh:property [
71 | sh:path rami:defaultEnvironmentAttributes ;
72 | sh:class rami:Submodel ;
73 | sh:minCount 1 ; # see Figure 66 (page 125) in "AAS in detail"
74 | sh:maxCount 1 ; # optional
75 | sh:severity sh:Violation ;
76 | sh:message "rami:defaultEnvironmentAttributes needs to be instance of rami:Submodel"@en ;
77 | ] .
--------------------------------------------------------------------------------
/schema/AccessControlShapes/AccessPermissionRuleShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#AccessPermissionRuleShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:AccessPermissionRule ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:targetSubjectAttributes ;
19 | sh:class rami:SubjectAttributes ;
20 | sh:minCount 1 ;
21 | sh:severity sh:Violation ;
22 | sh:message "AccessPermissionRule requires at least one SubjectAttribute."@en ;
23 | ] ;
24 |
25 | sh:property [
26 | sh:path rami:permissionsPerObject ;
27 | sh:class rami:PermissionsPerObject ;
28 | sh:minCount 1 ;
29 | sh:severity sh:Violation ;
30 | sh:message "AccessPermissionRule requires at least one instance of PermissionsPerObject."@en ;
31 | ] ;
32 |
33 | # inherits from Referable:
34 | sh:property [
35 | sh:path rami:idShort ;
36 | sh:valueDatatype xsd:string ;
37 | sh:minCount 0 ;
38 | sh:maxCount 1 ;
39 | sh:severity sh:violation ;
40 | sh:message "..."@en ;
41 | ] ;
42 |
43 | sh:property [
44 | sh:path rami:category ;
45 | sh:valueDatatype xsd:string ;
46 | sh:minCount 0 ;
47 | sh:maxCount 1 ;
48 | sh:severity sh:violation ;
49 | sh:message "..."@en ;
50 | ] ;
51 |
52 | sh:property [
53 | sh:path rami:description ;
54 | sh:valueDatatype xsd:langString ;
55 | sh:minCount 0 ;
56 | sh:maxCount 1 ;
57 | sh:severity sh:violation ;
58 | sh:message "..."@en ;
59 | ] ;
60 |
61 | sh:property [
62 | sh:path rami:parent ;
63 | sh:class rami:Referable ;
64 | sh:minCount 0 ;
65 | sh:maxCount 1 ;
66 | sh:severity sh:violation ;
67 | sh:message "..."@en ;
68 | ] ;
69 |
70 | # inherits from Qualifiable:
71 | sh:constraint [
72 | sh:nodeKind sh:URI ;
73 | sh:message "Each rami object must be a URI."@en ;
74 | ] ;
75 |
76 | sh:property [
77 | sh:path rami:qualifier ;
78 | sh:minCount 0 ;
79 | sh:constraint [
80 | sh:nodeKind sh:URI ;
81 | ] ;
82 | sh:severity sh:Violation ;
83 | sh:message "rami:qualifier must be point to a proper URI."@en ;
84 | ] .
--------------------------------------------------------------------------------
/schema/AccessControlShapes/ObjectAttributesShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#ObjectAttributesShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:ObjectAttributes ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:objectAttribute ;
19 | sh:class rami:DataElement ;
20 | sh:minCount 1 ;
21 | sh:severity sh:Violation ;
22 | sh:message "ObjectAttributes required at least one rami:ojectAttribiute of type DataElement."@en ;
23 | ] .
--------------------------------------------------------------------------------
/schema/AccessControlShapes/PermissionShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#PermissionShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:Permission ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:hasPermission ;
19 | sh:class rami:Property ;
20 | sh:minCount 1 ;
21 | sh:maxCount 1 ; # MANDATORY !
22 | #TODO: Impelment constraints AASd-010 and AASd-11
23 | sh:severity sh:Violation ;
24 | sh:message "Exactly one Property needs to assign torami:hasPermission property."@en ;
25 | ] ;
26 |
27 | sh:property [
28 | sh:path rami:kindOfPermission ;
29 | sh:class rami:PermissioNKind ;
30 | sh:minCount 1 ;
31 | sh:maxCount 1 ; # MANDATORY !
32 | sh:severity sh:Violation ;
33 | sh:message "Exactly one case of PermissionKind needs to assign to rami:kindOfPermission property."@en ;
34 | ] .
35 |
--------------------------------------------------------------------------------
/schema/AccessControlShapes/PermissionsPerObjectShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#PermissionsPerObjectShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:PermissionsPerObject ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:object ;
19 | sh:class rami:Referable ;
20 | sh:minCount 1 ;
21 | sh:maxCount 1 ; # MANDATORY!
22 | sh:severity sh:Violation ;
23 | sh:message "Exaclty one Referable object is required."@en ;
24 | ] ;
25 |
26 | sh:property [
27 | sh:path rami:targetObjectAttributes ;
28 | sh:class rami:ObjectAttrinbutes ;
29 | sh:minCount 0 ;
30 | sh:maxCount 1 ; #optional!
31 | sh:severity sh:Violation ;
32 | sh:message "The targetObjectAttribute property is optional but the referenced object needs to be instance of ObjectAttributes"@en ;
33 | ] ;
34 |
35 | sh:property [
36 | sh:path rami:hasPermission ;
37 | sh:class rami:Permission ;
38 | sh:minCount 0 ;
39 | sh:severity sh:Violation ;
40 | sh:message "The permission property is not mandatory but assigned values must be Permissions."@en ;
41 | ] .
--------------------------------------------------------------------------------
/schema/AccessControlShapes/PolicyAdministrationPointShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#PolicyAdministrationPoint>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:PolicyAdministrationPoint ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ; # redundant
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:localAccessControl ;
19 | sh:class rami:AccessControl ;
20 | sh:minCount 0 ;
21 | sh:maxCount 1 ; # optional
22 | #TODO: Implement constraint AASd-009
23 | sh:severity sh:Violation ;
24 | sh:message "localAccessControl-property is optional but needs to be instance of AccessControl."@en ;
25 | ] ;
26 |
27 | sh:property [
28 | sh:path rami:hasExternalAccessControl ;
29 | sh:class rami:Endpoint ;
30 | sh:minCount 0 ;
31 | sh:maxCount 1 ; # optional
32 | sh:constraint [
33 | sh:nodeKind rami:Reference ;
34 | ] ;
35 | sh:severity sh:Violation ;
36 | sh:message "the externalAccessControl property is optional but needs to be instace of rami:Endpoint"@en ;
37 | ] .
38 |
39 |
--------------------------------------------------------------------------------
/schema/AccessControlShapes/PolicyInformationPointsShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#PolicyInformationPointsShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:PolicyInformationPoints ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ; # redundsnt
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:externalInformationPoint ;
19 | sh:class rami:Endpoint ;
20 | sh:minCount 0 ;
21 | sh:severity sh:Violation ;
22 | sh:message "External Information points have to instance of rami:Endpoint."@en ;
23 | ] ;
24 |
25 | sh:property [
26 | sh:path rami:internalInformationPoint ;
27 | sh:class rami:Submodel ;
28 | sh:constraint [
29 | sh:nodeKind rami:Reference ;
30 | ] ;
31 | sh:minCount 0 ;
32 | sh:severity sh:Violation ;
33 | sh:message "rami:internalInformationPoint needs to be instance of rami:Submodel."@en ;
34 | ] ;
--------------------------------------------------------------------------------
/schema/AccessControlShapes/SecurityShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#SecurityShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:Security ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:hasAccessControlPolicyPoints ;
19 | sh:class rami:AccessControlPolicyPoints ;
20 | sh:minCount 1 ;
21 | sh:maxCount 1 ; #MANDATORY
22 | sh:severity sh:Violation ;
23 | sh:message "rami:hasAccessControlPolicyPoints needs to be instance of rami:AccessControlPolicyPoints. There should be exactly one instance."@en ;
24 | ] ;
25 |
26 | sh:trustAnchor [
27 | sh:path rami:trustAnchor ;
28 | sh:class rami:Certificate ;
29 | sh:minCount 0 ;
30 | sh:severity sh:Violation ;
31 | sh:message "trustAnchors have to be Certificates."@en ;
32 | ] .
--------------------------------------------------------------------------------
/schema/AccessControlShapes/SubjectAttributesShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#SubjectAttributesShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:SubjectAttributes ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:hasSubjcetAttribute ;
19 | sh:class rami:DataElement ;
20 | sh:minCount 1 ;
21 | sh:severity sh:Violation ;
22 | sh:message "At least one DataElement instance is required."@en ;
23 | ] .
24 |
--------------------------------------------------------------------------------
/schema/AdminShell.xsd:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
453 |
454 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
--------------------------------------------------------------------------------
/schema/AdministrativeInformationShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | # author: Sebastian Bader (sebastian.bader@iais.fraunhofer.de)
11 | # Resources:
12 | # RAMI Ontology: https://vocol.iais.fraunhofer.de/rami/
13 | # W3C recommendation: https://www.w3.org/TR/shacl/
14 | # SHACL syntax checking: http://shacl.org/playground/
15 | # SHACL Advanced Features: https://w3c.github.io/data-shapes/shacl-af/
16 |
17 | <#AdministrativeInformationShape>
18 | a sh:NodeShape ;
19 | sh:targetClass rami:AdministrativeInformation ;
20 | sh:property [
21 | sh:path rdf:type ;
22 | sh:minCount 1 ; # this statement is redundant as each instance of type ids:Rule has at least one class relation (type).
23 | #sh:message ""@en ;
24 | ] ;
25 | sh:property [
26 | sh:path dcterms:hasVersion ;
27 | sh:valueDatatype xsd:string ;
28 | sh:minCount 0 ;
29 | sh:maxCount 1 ;
30 | sh:severity sh:Violation ;
31 | sh:message "Each submodel element must have at max one version attribute with datatype xsd:string."@en ;
32 | ] ;
33 | sh:property [
34 | sh:path dcterms:hasRevision ;
35 | sh:valueDatatype xsd:string ;
36 | sh:minCount 0 ;
37 | sh:maxCount 1 ;
38 | ###################
39 | <<<<<<< HEAD
40 | sh:constraint [
41 | ######## How to model, that version-property is required?
42 | ] ;
43 | =======
44 | # sh:constraint [
45 | # ######## How to model, that version-property is required?
46 | # ] ;
47 | >>>>>>> details_of_the_AAS_1.1
48 | ###################
49 | sh:message "Each submodel element must have at max one revision attribute with datatype xsd:string."@en ;
50 | ] ;
51 |
52 | <<<<<<< HEAD
53 | sh:property [
54 | sh:path rami:semanticId ;
55 | sh:nodeKind sh:IRI ;
56 | sh:minCount 1 ;
57 | sh:severity sh:Violation ;
58 | sh:message "Each submodel must have at least one semanticId attribute."@en ;
59 | ] .
60 | =======
61 | # sh:property [
62 | # sh:path rami:semanticId ;
63 | # sh:someOf [
64 | # sh:constraint [
65 | # sh:nodeKind sh:IRI ;
66 | # ] ;
67 | ########################################
68 | # the semanticID is part of RDF itself #
69 | ########################################
70 | .
71 | >>>>>>> details_of_the_AAS_1.1
72 |
--------------------------------------------------------------------------------
/schema/AssetShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | # author: Sebastian Bader (sebastian.bader@iais.fraunhofer.de)
11 | # Resources:
12 | # RAMI Ontology: https://vocol.iais.fraunhofer.de/rami/
13 | # W3C recommendation: https://www.w3.org/TR/shacl/
14 | # SHACL syntax checking: http://shacl.org/playground/
15 | # SHACL Advanced Features: https://w3c.github.io/data-shapes/shacl-af/
16 |
17 | <#AssetShape>
18 | a sh:NodeShape ;
19 | sh:targetClass rami:Asset ;
20 | sh:property [
21 | sh:path rdf:type ;
22 | sh:minCount 1 ; # this statement is redundant as each instance of type ids:Rule has at least one class relation (type).
23 | #sh:message ""@en ;
24 | ] ;
25 | sh:constraint [
26 | sh:nodeKind sh:IRI ;
27 | sh:message "Each asset object must be a URI."@en ;
28 | ] ;
29 | sh:property [
30 | sh:path rami:idShort ;
31 | sh:minCount 1 ;
32 | sh:valueDatatype xsd:string ;
33 | sh:severity sh:Violation ;
34 | sh:message "A short id attribute must be set for each asset."@en ;
35 | ] ;
36 | sh:property [
37 | sh:path rami:assetIdentificationModel ;
38 | sh:minCount 0 ;
39 | sh:maxCount 1 ;
40 | sh:class rami:Submodel ;
41 | sh:severity sh:Violation ;
42 | sh:message "An Asset can have at maximum one Submodel as an Asset Identification Model."@en ;
43 | ] ;
44 | # Asset inherits from Identifiable
45 | sh:property [
46 | sh:path rami:administration ;
47 | sh:minCount 0 ;
48 | sh:maxCount 1 ;
49 | sh:class rami:AdministrativeInformation ;
50 | sh:severity sh:Violation ;
51 | sh:message ""@en ;
52 | ] ;
53 | sh:property [
54 | sh:path rami:id ;
55 | sh:class rami:Identifier ;
56 | sh:minCount 0 ;
57 | sh:message "An identifiable entity can have a rami:id."@en ;
58 | ] ;
59 |
60 | # Identifable inherits from Referable
61 | sh:property [
62 | sh:path rami:idShort ;
63 | sh:valueDatatype xsd:string ;
64 | sh:minCount 0 ;
65 | sh:maxCount 1 ;
66 | sh:severity sh:violation ;
67 | sh:message "..."@en ;
68 | ] ;
69 |
70 | sh:property [
71 | sh:path rami:category ;
72 | sh:valueDatatype xsd:string ;
73 | sh:minCount 0 ;
74 | sh:maxCount 1 ;
75 | sh:severity sh:violation ;
76 | sh:message "..."@en ;
77 | ] ;
78 |
79 | sh:property [
80 | sh:path rami:description ;
81 | sh:valueDatatype xsd:langString ;
82 | sh:minCount 0 ;
83 | sh:maxCount 1 ;
84 | sh:severity sh:violation ;
85 | sh:message "The description property needs to be of type xsd:langString."@en ;
86 | ] ;
87 |
88 | sh:property [
89 | sh:path rami:parent ;
90 | sh:class rami:Referable ; # see "AAS in detail", p. 124
91 | sh:minCount 0 ;
92 | sh:maxCount 1 ;
93 | sh:severity sh:violation ;
94 | sh:message "..."@en ;
95 | ] ;
96 |
97 | # Asset inherits from DataSpecification
98 | sh:property [
99 | sh:path rami:hasDataSpecification ;
100 | sh:minCount 0 ;
101 | sh:class rami:Reference ; # see "AAS in detail", p. 124
102 | sh:nodeKind sh:IRI ; # class Reference is not part of the ontology
103 | sh:severity sh:Violation ;
104 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
105 | ] ;
106 | sh:property [
107 | sh:path rami:hasSubmodel ;
108 | sh:class rami:Submodel ;
109 | sh:minCount 0 ;
110 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
111 | ] ;
112 | # Asset inherits from HasKind
113 | sh:property [
114 | sh:path rami:hasKind ;
115 | sh:minCount 0 ;
116 | sh:maxCount 1 ;
117 | sh:someOf [
118 | sh:constraint [
119 | sh:nodeKind sh:Type ;
120 | ] ;
121 | sh:constraint [
122 | sh:nodeKind rami:Instance ;
123 | ] ;
124 | ] ;
125 | sh:severity sh:Violation ;
126 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
127 | ] .
128 |
--------------------------------------------------------------------------------
/schema/BlobShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 | <<<<<<< HEAD
9 |
10 | <#BlobShape>
11 |
12 |
13 | =======
14 | @prefix u4u: .
15 |
16 | <#BlobShape>
17 |
18 | >>>>>>> details_of_the_AAS_1.1
19 | a sh:NodeShape ;
20 | sh:targetClass rami:Blob ;
21 | sh:property [
22 | sh:path rdf:type ;
23 | sh:minCount 1 ;
24 | ] ;
25 |
26 | <<<<<<< HEAD
27 | =======
28 | # sh:constraint [
29 | # sh:nodeKind rami:IRDI ;
30 | # sh:message "Each asset object must be an IRDI."@en ;
31 | # ] ;
32 |
33 | >>>>>>> details_of_the_AAS_1.1
34 | sh:property [
35 | sh:path rami:value ;
36 | sh:class rami:value ;
37 | sh:minCount 0 ;
38 | sh:severity sh:Violation ;
39 | sh:message "Each Blob needs a value-attribute, which is a BLOB data element"@en ;
40 | ] ;
41 |
42 | sh:property [
43 | sh:path rami:mimeType ;
44 | <<<<<<< HEAD
45 | sh:class rami:mimeType ;
46 | =======
47 | sh:class u4u:MimetypeDatatype ;
48 | #TODO: RegEx-implemetation "[a-z]+/[a-z]+"
49 | >>>>>>> details_of_the_AAS_1.1
50 | sh:minCount 1 ;
51 | sh:maxCount 1 ;
52 | sh:severity sh:Violation ;
53 | sh:message "Each Blob must refer to the mime-type, that is the content of the BLOB"@en
54 | ] ;
55 |
56 | # Blob inherits from DataElement (> SubmodelElelement):
57 | sh:property [
58 | sh:path rami:dataElement ;
59 | sh:minCount 1 ;
60 | sh:constraint [
61 | sh:nodeKind sh:URI ;
62 | ] ;
63 | sh:severity sh:Violation ;
64 | sh:message "rami:dataElement must be point to a proper URI."@en ;
65 | <<<<<<< HEAD
66 | ] ;
67 | =======
68 | ] ;
69 | ##################################
70 | # inherits from DataElement (and DataElement inherits from SubmodelElement
71 | # (SubmodelElements inherits from:
72 | # HasDataSpecification; Referable; Qualifiable; HasSemantics; HasKind))
73 | ##################################
74 |
75 | # DataSpecification:
76 | sh:property [
77 | sh:path rami:hasDataSpecification ;
78 | sh:class rami:Reference ;
79 | sh:minCount 0 ;
80 | sh:nodeKind sh:URI ;
81 | sh:severity sh:Violation ;
82 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
83 | ] ;
84 |
85 | sh:property [
86 | sh:path rami:hasSubmodel ;
87 | sh:class rami:Submodel ;
88 | sh:minCount 0 ;
89 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
90 | ] ;
91 |
92 | # Identifiable:
93 | sh:property [
94 | sh:path rami:administration ;
95 | sh:minCount 0 ;
96 | sh:maxCount 1 ;
97 | sh:class rami:AdministrativeInformation ;
98 | sh:severity sh:Violation ;
99 | sh:message ""@en ;
100 | ] ;
101 |
102 | #Identifiable inherits from Referable
103 | sh:property [
104 | sh:path rami:idShort ;
105 | sh:valueDatatype xsd:string ;
106 | sh:minCount 0 ; # WHY NOT MANDATORY (sh:minCount 1) ?
107 | sh:maxCount 1 ;
108 | sh:severity sh:violation ;
109 | sh:message "The idShort-property from Referable needs to be xsd:string."@en ;
110 | ] ;
111 |
112 | sh:property [
113 | sh:path rami:category ;
114 | sh:valueDatatype xsd:string ;
115 | sh:minCount 0 ;
116 | sh:maxCount 1 ;
117 | sh:severity sh:violation ;
118 | sh:message "rami:category is a property that is inherited from Referable and needs to be of type xsd:string."@en ;
119 | ] ;
120 |
121 | sh:property [
122 | sh:path rami:description ;
123 | sh:valueDatatype xsd:langString ;
124 | sh:minCount 0 ;
125 | sh:maxCount 1 ;
126 | sh:severity sh:violation ;
127 | sh:message "..."@en ;
128 | ] ;
129 |
130 | sh:property [
131 | sh:path rami:parent ;
132 | sh:class rami:Referable ;
133 | sh:minCount 0 ;
134 | sh:maxCount 1 ;
135 | sh:severity sh:violation ;
136 | sh:message "..."@en ;
137 | ] ;
138 |
139 |
140 | # Qualifiable:
141 | sh:constraint [
142 | sh:nodeKind sh:URI ;
143 | sh:message "Each rami object must be a URI."@en ;
144 | ] ;
145 |
146 | sh:property [
147 | sh:path rami:qualifier ;
148 | sh:minCount 0 ;
149 | sh:constraint [
150 | sh:nodeKind sh:URI ;
151 | ] ;
152 | sh:severity sh:Violation ;
153 | sh:message "rami:qualifier must be point to a proper URI."@en ;
154 | ] ;
155 |
156 | # HasSemantics:
157 | # sh:property [
158 | # sh:path rami:semanticId ;
159 | # sh:someOf [
160 | # sh:constraint [
161 | # sh:nodeKind sh:IRI ;
162 | # ] ;
163 | ########################################
164 | # the semanticID is part of RDF itself #
165 | ########################################
166 |
167 | # HasKind:
168 | sh:property [
169 | sh:path rami:hasKind ;
170 | sh:minCount 0 ;
171 | sh:maxCount 1 ;
172 | sh:someOf [
173 | sh:constraint [
174 | sh:nodeKind sh:Type ;
175 | ] ;
176 | sh:constraint [
177 | sh:nodeKind rami:Instance ;
178 | ] ;
179 | ] ;
180 | sh:severity sh:Violation ;
181 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
182 | ] .
183 | >>>>>>> details_of_the_AAS_1.1
184 |
--------------------------------------------------------------------------------
/schema/ConceptDescriptionShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | # author: Sebastian Bader (sebastian.bader@iais.fraunhofer.de)
11 | # Resources:
12 | # RAMI Ontology: https://vocol.iais.fraunhofer.de/rami/
13 | # W3C recommendation: https://www.w3.org/TR/shacl/
14 | # SHACL syntax checking: http://shacl.org/playground/
15 | # SHACL Advanced Features: https://w3c.github.io/data-shapes/shacl-af/
16 |
17 | <#ConeptDescriptionShape>
18 | a sh:NodeShape ;
19 | sh:targetClass rami:ConceptDescription ;
20 | sh:property [
21 | sh:path rdf:type ;
22 | sh:minCount 1 ; # this statement is redundant as each instance of type ids:Rule has at least one class relation (type).
23 | #sh:message ""@en ;
24 | ] ;
25 | <<<<<<< HEAD
26 | sh:constraint [
27 | sh:nodeKind rami:IRDI ;
28 | sh:message "Each asset object must be an IRDI."@en ;
29 | ] ;
30 | =======
31 | sh:constraint [
32 | sh:nodeKind rami:IRDI ;
33 | sh:message "Each asset object must be an IRDI."@en ;
34 | ] ;
35 | >>>>>>> details_of_the_AAS_1.1
36 |
37 | sh:property [
38 | sh:path rami:isCaseOf ;
39 | sh:class rami:Reference ;
40 | sh:minCount 0 ;
41 | sh:severity sh:Violation ;
42 | sh:message "rami:isCaseOf is a global refernce to an external definition that this concept is compatible to or was derived from."@en ;
43 | ] ;
44 |
45 | sh:property [
46 | sh:path rami:idShort ;
47 | sh:valueDatatype xsd:string ;
48 | sh:minCount 0 ; # optional?
49 | sh:severity sh:Violation ;
50 | sh:message "Each concept description must have at least one short ID with datatype xsd:string."@en ; # message covers not the specification: sh:minCount 0
51 | ] ;
52 |
53 | sh:property [
54 | sh:path rami:preferredName ;
55 | sh:valueDatatype xsd:langString ;
56 | sh:minCount 0 ;
57 | rdfs:comment "This is the preferred Name of the concept in any language."@en ;
58 | sh:severity sh:Violation ;
59 | sh:message "The rami:preferredName should be of type xsd:string."@en ;
60 | ] ; ### not specified in table, but listed in more than three UMLs (for example: "AAS in detail", p. 65 Figure 33)
61 |
62 | sh:property [
63 | sh:path rami:definition ;
64 | sh:valueDatatype xsd:langString ;
65 | sh:minCount 0 ;
66 | sh:severity sh:Violation ;
67 | sh:message "Definitions of conceptDescriptions should be langStrings."@en ;
68 | ] ;
69 |
70 | sh:property [
71 | sh:path rami:shortName ;
72 | sh:valueDatatyp xsd:string ;
73 | sh:minCount 0 ;
74 | sh:maxCount 1 ;
75 | sh:severity sh:Violation ;
76 | sh:message "The shortName is part of the conceptDescription."@en ;
77 | ] ;
78 |
79 | ########################################
80 | # the semanticID is part of RDF itself #
81 | ########################################
82 | .
--------------------------------------------------------------------------------
/schema/ConceptDictionaryShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#ConceptDictionaryShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:Asset ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:hasConceptDescription ;
19 | sh:class rami:ConceptDescription ;
20 | sh:minCount 0 ;
21 | sh:severity sh:violation ;
22 | sh:message "rami:hasConceptDescription of type rami:ConceptDescription defines a concept."@en ;
23 | <<<<<<< HEAD
24 | ]
25 | =======
26 | ] ;
27 | >>>>>>> details_of_the_AAS_1.1
28 |
29 | ##############################################
30 | # inherits from Referable
31 | sh:property [
32 | sh:path rami:idShort ;
33 | sh:valueDatatype xsd:string ;
34 | sh:minCount 0 ;
35 | sh:maxCount 1 ;
36 | sh:severity sh:violation ;
37 | sh:message "..."@en ;
38 | ] ;
39 |
40 | sh:property [
41 | sh:path rami:category ;
42 | sh:valueDatatype xsd:string ;
43 | sh:minCount 0 ;
44 | sh:maxCount 1 ;
45 | sh:severity sh:violation ;
46 | sh:message "..."@en ;
47 | ] ;
48 |
49 | sh:property [
50 | sh:path rami:description ;
51 | sh:valueDatatype xsd:langString ;
52 | sh:minCount 0 ;
53 | sh:maxCount 1 ;
54 | sh:severity sh:violation ;
55 | sh:message "..."@en ;
56 | ] ;
57 |
58 | sh:property [
59 | sh:path rami:parent ;
60 | sh:class rami:Referable ; #reference to an abstract class ?? (polymorphism?)
61 | sh:minCount 0 ;
62 | sh:maxCount 1 ;
63 | sh:severity sh:violation ;
64 | sh:message "..."@en ;
65 | ] .
66 | ##############################################
--------------------------------------------------------------------------------
/schema/DataElementShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <<<<<<< HEAD
10 | =======
11 | ###############
12 | # abstract ?! #
13 | ###############
14 | >>>>>>> details_of_the_AAS_1.1
15 |
16 | <#DataElementShape>
17 | a sh:NodeShape ;
18 | sh:targetClass rami:DataElement ;
19 | sh:property [
20 | sh:path rdf:type ;
21 | sh:minCount 1 ;
22 | ] ;
23 |
24 | #################################
25 | # inherits from SubmodelElement #
26 | # copied all lines below #
27 | #################################
28 |
29 | sh:property [
30 | sh:path rami:idShort ;
31 | sh:valueDatatype xsd:string ;
32 | sh:minCount 1 ;
33 | sh:severity sh:Violation ;
34 | sh:message "Each submodel element must have at least one short ID with datatype xsd:string."@en ;
35 | ] ;
36 | <<<<<<< HEAD
37 | sh:property [
38 | sh:path rami:semanticId ;
39 | sh:nodeKind sh:IRI ;
40 | sh:minCount 1 ;
41 | sh:severity sh:Violation ;
42 | sh:message "Each SubmodelElement must have at least one semanticId attribute."@en ;
43 | ]
44 | =======
45 | # sh:property [
46 | # sh:path rami:semanticId ;
47 | # sh:someOf [
48 | # sh:constraint [
49 | # sh:nodeKind sh:IRI ;
50 | # ] ;
51 | ########################################
52 | # the semanticID is part of RDF itself #
53 | ########################################
54 | >>>>>>> details_of_the_AAS_1.1
55 | # SubmodelElement inherits from HasSemantics
56 | # hasSemantics requirements are fulfilled by RDF itself
57 |
58 | # SubmodelElement inherits from Qualifiable
59 | sh:property [
60 | sh:path rami:qualifier ;
61 | sh:minCount 0 ;
62 | sh:constraint [
63 | sh:nodeKind sh:URI ; # Contraints are not part of the ontology
64 | ] ;
65 | sh:severity sh:Violation ;
66 | sh:message "rami:qualifier must be point to a proper URI."@en ;
67 | ] ;
68 | # SubmodelElement inherits from Referable
69 | <<<<<<< HEAD
70 | sh:property [
71 | sh:path rami:administration ;
72 | sh:minCount 0 ;
73 | sh:maxCount 1 ;
74 | sh:class rami:AdministrativeInformation ;
75 | sh:severity sh:Violation ;
76 | sh:message ""@en ;
77 | ] ;
78 | =======
79 | # sh:property [
80 | # sh:path rami:administration ;
81 | # sh:minCount 0 ;
82 | # sh:maxCount 1 ;
83 | # sh:class rami:AdministrativeInformation ;
84 | # sh:severity sh:Violation ;
85 | # sh:message "rami:administration has to be of type rami:AdministrativeInformation."@en ;
86 | # ] ;
87 | sh:property [
88 | sh:path rami:idShort ;
89 | sh:valueDatatype xsd:string ;
90 | sh:minCount 0 ;
91 | sh:maxCount 1 ;
92 | sh:severity sh:violation ;
93 | sh:message "..."@en ;
94 | ] ;
95 |
96 | sh:property [
97 | sh:path rami:category ;
98 | sh:valueDatatype xsd:string ;
99 | sh:minCount 0 ;
100 | sh:maxCount 1 ;
101 | sh:severity sh:violation ;
102 | sh:message "..."@en ;
103 | ] ;
104 |
105 | sh:property [
106 | sh:path rami:description ;
107 | sh:valueDatatype xsd:langString ;
108 | sh:minCount 0 ;
109 | sh:maxCount 1 ;
110 | sh:severity sh:violation ;
111 | sh:message "..."@en ;
112 | ] ;
113 |
114 | sh:property [
115 | sh:path rami:parent ;
116 | sh:class rami:Referable ;
117 | sh:minCount 0 ;
118 | sh:maxCount 1 ;
119 | sh:severity sh:violation ;
120 | sh:message "..."@en ;
121 | ] ;
122 |
123 | >>>>>>> details_of_the_AAS_1.1
124 | # Submodel inherits from DataSpecification
125 | sh:property [
126 | sh:path rami:hasDataSpecification ;
127 | sh:minCount 0 ;
128 | sh:nodeKind sh:IRI ; # class Reference is not part of the ontology
129 | sh:severity sh:Violation ;
130 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
131 | ] ;
132 | sh:property [
133 | sh:path rami:hasSubmodel ;
134 | sh:class rami:Submodel ;
135 | sh:minCount 0 ;
136 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
137 | ] ;
138 | # Submodel inherits from HasKind
139 | sh:property [
140 | sh:path rami:hasKind ;
141 | sh:minCount 0 ;
142 | sh:maxCount 1 ;
143 | sh:someOf [
144 | sh:constraint [
145 | sh:nodeKind sh:Type ;
146 | ] ;
147 | sh:constraint [
148 | sh:nodeKind rami:Instance ;
149 | ] ;
150 | ] ;
151 | sh:severity sh:Violation ;
152 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
153 | ] .
--------------------------------------------------------------------------------
/schema/DataSpecificationShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | # author: Sebastian Bader (sebastian.bader@iais.fraunhofer.de)
11 | # Resources:
12 | # RAMI Ontology: https://vocol.iais.fraunhofer.de/rami/
13 | # W3C recommendation: https://www.w3.org/TR/shacl/
14 | # SHACL syntax checking: http://shacl.org/playground/
15 | # SHACL Advanced Features: https://w3c.github.io/data-shapes/shacl-af/
16 |
17 | <#DataSpecificationShape>
18 | a sh:NodeShape ;
19 | sh:targetClass rami:DataSpecification ;
20 | sh:property [
21 | sh:path rdf:type ;
22 | sh:minCount 1 ; # this statement is redundant as each instance of type ids:Rule has at least one class relation (type).
23 | #sh:message ""@en ;
24 | ] ;
25 | sh:constraint [
26 | sh:nodeKind sh:IRI ;
27 | sh:message "Each DataSpecification object must be a URI."@en ;
28 | ] ;
29 | sh:property [
30 | sh:path rami:hasDataSpecification ;
31 | sh:minCount 0 ;
32 | sh:nodeKind sh:IRI ; # class Reference is not part of the ontology
33 | sh:severity sh:Violation ;
34 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
35 | ] ;
36 | sh:property [
37 | sh:path rami:hasSubmodel ;
38 | sh:class rami:Submodel ;
39 | sh:minCount 0 ;
40 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
41 | ] .
42 |
--------------------------------------------------------------------------------
/schema/FileShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 | <<<<<<< HEAD
9 | =======
10 | @prefix u4u: .
11 | >>>>>>> details_of_the_AAS_1.1
12 |
13 | <#FileShape>
14 |
15 | a sh:NodeShape ;
16 | sh:targetClass rami:File ;
17 | sh:property [
18 | sh:path rdf:type ;
19 | sh:minCount 1 ;
20 | ] ;
21 |
22 | <<<<<<< HEAD
23 | sh:property [
24 | sh:path rami:mimeType ;
25 | sh:class rami:mimeType ;
26 | =======
27 | # sh:constraint [
28 | # sh:nodeKind rami:IRDI ;
29 | # sh:message "Each asset object must be an IRDI."@en ;
30 | # ] ;
31 |
32 | sh:property [
33 | sh:path rami:mimeType ;
34 | sh:class u4u:MimetypeDatatype ;
35 | #TODO: implement RegEx "[a-z]+/[a-z]+"
36 | >>>>>>> details_of_the_AAS_1.1
37 | sh:minCount 1 ;
38 | sh:maxCount 1 ;
39 | sh:severity sh:Violation ;
40 | sh:message "Each File must refer to the mime-type, that is the content of the file"@en
41 | <<<<<<< HEAD
42 | ] ;
43 | =======
44 | ] ;
45 | ##################################
46 | # inherits from DataElement (and DataElement inherits from SubmodelElement
47 | # (SubmodelElements inherits from:
48 | # HasDataSpecification; Referable; Qualifiable; HasSemantics; HasKind))
49 | ##################################
50 |
51 | # DataSpecification:
52 | sh:property [
53 | sh:path rami:hasDataSpecification ;
54 | sh:minCount 0 ;
55 | sh:nodeKind sh:URI ;
56 | sh:severity sh:Violation ;
57 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
58 | ] ;
59 |
60 | sh:property [
61 | sh:path rami:hasSubmodel ;
62 | sh:class rami:Submodel ;
63 | sh:minCount 0 ;
64 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
65 | ] ;
66 |
67 | # Referable:
68 | sh:property [
69 | sh:path rami:idShort ;
70 | sh:valueDatatype xsd:string ;
71 | sh:minCount 0 ;
72 | sh:maxCount 1 ;
73 | sh:severity sh:violation ;
74 | sh:message "..."@en ;
75 | ] ;
76 |
77 | sh:property [
78 | sh:path rami:category ;
79 | sh:valueDatatype xsd:string ;
80 | sh:minCount 0 ;
81 | sh:maxCount 1 ;
82 | sh:severity sh:violation ;
83 | sh:message "..."@en ;
84 | ] ;
85 |
86 | sh:property [
87 | sh:path rami:description ;
88 | sh:valueDatatype xsd:langString ;
89 | sh:minCount 0 ;
90 | sh:maxCount 1 ;
91 | sh:severity sh:violation ;
92 | sh:message "..."@en ;
93 | ] ;
94 |
95 | sh:property [
96 | sh:path rami:parent ;
97 | sh:class rami:Referable ;
98 | sh:minCount 0 ;
99 | sh:maxCount 1 ;
100 | sh:severity sh:violation ;
101 | sh:message "..."@en ;
102 | ] ;
103 |
104 |
105 | # Qualifiable:
106 | sh:constraint [
107 | sh:nodeKind sh:IRI ;
108 | sh:message "Each rami object must be a URI."@en ;
109 | ] ;
110 |
111 | sh:property [
112 | sh:path rami:qualifier ;
113 | sh:minCount 0 ;
114 | sh:constraint [
115 | sh:nodeKind sh:URI ;
116 | ] ;
117 | sh:severity sh:Violation ;
118 | sh:message "rami:qualifier must be point to a proper URI."@en ;
119 | ] ;
120 |
121 | # HasSemantics:
122 | sh:property [
123 | sh:path rami:semanticId ;
124 | sh:nodeKind sh:URI ;
125 | sh:minCount 1 ;
126 | sh:maxCount 1 ;
127 | sh:severity sh:Violation ;
128 | sh:message "Every submodel element needs exactly one semantic definition (semanticId in HasSemantics)"@en ;
129 | ] ;
130 |
131 | # HasKind:
132 | sh:property [
133 | sh:path rami:hasKind ;
134 | sh:minCount 0 ;
135 | sh:maxCount 1 ;
136 | sh:someOf [
137 | sh:constraint [
138 | sh:nodeKind sh:Type ;
139 | ] ;
140 | sh:constraint [
141 | sh:nodeKind rami:Instance ;
142 | ] ;
143 | ] ;
144 | sh:severity sh:Violation ;
145 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
146 | ] .
147 | >>>>>>> details_of_the_AAS_1.1
148 |
--------------------------------------------------------------------------------
/schema/FormulaShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#FormulaShape>
10 | <<<<<<< HEAD
11 | a sh:FormulaShape ;
12 | sh:path rami:Formula ;
13 | sh:datatype xsd:string ;
14 | sh:minCount 1 ;
15 | =======
16 | a sh:NodeShape ;
17 | sh:targetClass rami:Formula ;
18 | sh:property [
19 | sh:path rdf:type ;
20 | sh:minCount 1 ;
21 | ] ;
22 | >>>>>>> details_of_the_AAS_1.1
23 |
24 | sh:property [
25 | sh:path rami:dependsOn ;
26 | sh:class rami:Reference ;
27 | sh:minCount 0 ;
28 | sh:severity sh:Violation ;
29 | <<<<<<< HEAD
30 | #sh:message ""@en ;
31 | ] ;
32 | #########################################################
33 | # inherits from Constraint (not defined in the pdf?!?! #
34 | # TODO: Implement! #
35 | =======
36 | sh:message "rami:dependsOn needs to be instance of class rami:Reference."@en ;
37 | ] ;
38 | #########################################################
39 | # inherits from Constraint (not defined in the pdf?!?! #
40 | >>>>>>> details_of_the_AAS_1.1
41 | #########################################################
42 |
43 | .
--------------------------------------------------------------------------------
/schema/HasKindShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | # author: Sebastian Bader (sebastian.bader@iais.fraunhofer.de)
11 | # Resources:
12 | # RAMI Ontology: https://vocol.iais.fraunhofer.de/rami/
13 | # W3C recommendation: https://www.w3.org/TR/shacl/
14 | # SHACL syntax checking: http://shacl.org/playground/
15 | # SHACL Advanced Features: https://w3c.github.io/data-shapes/shacl-af/
16 |
17 | <#HasKindShape>
18 | a sh:NodeShape ;
19 | sh:targetClass rami:HasKind ;
20 | sh:property [
21 | sh:path rdf:type ;
22 | sh:minCount 1 ; # this statement is redundant as each instance of type ids:Rule has at least one class relation (type).
23 | #sh:message ""@en ;
24 | ] ;
25 | sh:constraint [
26 | sh:nodeKind sh:IRI ;
27 | sh:message "Each rami:HasKind object must be a URI."@en ;
28 | ] ;
29 | sh:property [
30 | sh:path rami:hasKind ;
31 | sh:minCount 0 ;
32 | sh:maxCount 1 ;
33 | sh:someOf [
34 | sh:constraint [
35 | sh:nodeKind sh:Type ;
36 | ] ;
37 | sh:constraint [
38 | sh:nodeKind rami:Instance ;
39 | ] ;
40 | ] ;
41 | sh:severity sh:Violation ;
42 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
43 | ] .
44 |
--------------------------------------------------------------------------------
/schema/IEC 61360 Schema.xsd:
--------------------------------------------------------------------------------
1 |
2 |
6 |
8 |
9 |
10 |
11 |
13 |
14 |
16 |
17 |
19 |
20 |
22 |
23 |
25 |
26 |
28 |
29 |
31 |
32 |
34 |
35 |
37 |
38 |
40 |
41 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | # author: Sebastian Bader (sebastian.bader@iais.fraunhofer.de)
11 | # Resources:
12 | # RAMI Ontology: https://vocol.iais.fraunhofer.de/rami/
13 | # W3C recommendation: https://www.w3.org/TR/shacl/
14 | # SHACL syntax checking: http://shacl.org/playground/
15 | # SHACL Advanced Features: https://w3c.github.io/data-shapes/shacl-af/
16 |
17 | ###############################
18 | # Identifiable is abstract ?! #
19 | ###############################
20 |
21 | <#IdentifiableShape>
22 | a sh:NodeShape ;
23 | sh:targetClass rami:Identifiable ;
24 | sh:property [
25 | sh:path rdf:type ;
26 | sh:minCount 1 ; # this statement is redundant as each instance of type ids:Rule has at least one class relation (type).
27 | #sh:message ""@en ;
28 | ] ;
29 | sh:constraint [
30 | sh:nodeKind sh:IRI ;
31 | sh:message "Each Identifiable object must be a URI."@en ;
32 | ] ;
33 | sh:property [
34 | sh:path rami:administration ;
35 | sh:minCount 0 ;
36 | sh:maxCount 1 ;
37 | sh:class rami:AdministrativeInformation ;
38 | sh:severity sh:Violation ;
39 | sh:message ""@en ;
40 | ] ;
41 | sh:property [
42 | sh:path rami:id ;
43 | sh:minCount 0 ;
44 | sh:message "An identifiable entity can have a rami:id."@en ;
45 | ] .
46 |
--------------------------------------------------------------------------------
/schema/IdentifierShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#IdentiferShape>
10 |
11 | <<<<<<< HEAD
12 |
13 | a sh:NodeShape ;
14 | =======
15 | a sh:NodeShape ;
16 | >>>>>>> details_of_the_AAS_1.1
17 | sh:targetClass rami:Identifier ;
18 | sh:property [
19 | sh:path rdf:type ;
20 | sh:minCount 1 ;
21 | ] ;
22 |
23 | sh:property [
24 | sh:path rami:idType ;
25 | sh:class rami:idType ;
26 | # sh:type ; specify the type
27 | sh:minCount 1 ;
28 | sh:maxCount 1 ;
29 | sh:severity sh:Violation ;
30 | sh:message "property value idType necessary"@en ;
31 | ] ;
32 |
33 | sh:property [
34 | <<<<<<< HEAD
35 | sh:path rami:id ;
36 | sh:class rami:id ;
37 | =======
38 | sh:path rami:id ; # FIXME:id is also the path for Identifier in AssetShape
39 | sh:class rami:id ; #deprecated ?!
40 | >>>>>>> details_of_the_AAS_1.1
41 | #sh:nodeKind rami:Id ;
42 | sh:minCount 1 ;
43 | sh:maxCount 1 ;
44 | ] .
--------------------------------------------------------------------------------
/schema/KeyShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#KeyShape>
10 | <<<<<<< HEAD
11 |
12 |
13 | a sh:NodeShape ;
14 | =======
15 | a sh:NodeShape ;
16 | >>>>>>> details_of_the_AAS_1.1
17 | sh:targetClass rami:Key ;
18 | sh:property [
19 | sh:path rdf:type ;
20 | sh:minCount 1 ;
21 | ] ;
22 |
23 | sh:property [
24 | sh:path rami:type ;
25 | <<<<<<< HEAD
26 | sh:class rami:KeyElements ;
27 | =======
28 | sh:class rami:KeyElements ; #enum not specified ?!
29 | >>>>>>> details_of_the_AAS_1.1
30 | sh:minCount 1 ;
31 | sh:maxCount 1 ;
32 | sh:severity sh:Violation ;
33 | sh:message "..."@en ;
34 | ] ;
35 |
36 | sh:property [
37 | sh:path rami:local ;
38 | sh:minCount 1 ;
39 | sh:maxCount 1 ;
40 | sh:valueDatatype xsd:boolean ;
41 | ] ;
42 |
43 | sh:property [
44 | sh:path rami:value ;
45 | sh:minCount 1 ;
46 | sh:maxCount 1 ;
47 | sh:valueDatatype xsd:string ;
48 | ] ;
49 |
50 | sh:property [
51 | sh:path rami:idType ;
52 | sh:class rami:KeyType ;
53 | sh:minCount 1 ;
54 | sh:maxCount 1 ;
55 | ] .
--------------------------------------------------------------------------------
/schema/OperationShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#OperationShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:Operation ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ;
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:in ;
19 | sh:class rami:OperationVariable ;
20 | sh:minCount 0 ; # optional
21 | sh:severity sh:Violation ;
22 | sh:message "the rami:in attribute of rami:operation is the input parameter and of type rami:OperationVariable."@en ;
23 | ] ;
24 |
25 | sh:property [
26 | sh:path rami:out ;
27 | sh:class rami:OperationVariable ;
28 | sh:minCount 0 ; # optional
29 | sh:severity sh:Violation ;
30 | sh:message "the rami:out attribute of rami:Operation is output parameter and of type rami:OperationVariable."@en ;
31 | ] ;
32 |
33 | #################################
34 | # inherits from SubmodelElement #
35 | #################################
36 |
37 | sh:property [
38 | sh:path rami:idShort ;
39 | sh:valueDatatype xsd:string ;
40 | sh:minCount 1 ;
41 | sh:severity sh:Violation ;
42 | sh:message "Each SubmodelElement must have at least one short ID with datatype xsd:string."@en ;
43 | ] ;
44 |
45 | # sh:property [
46 | # sh:path rami:semanticId ;
47 | # sh:class rami:Reference ;
48 | # ######### is the following line necessary ?
49 | # #sh:nodeKind sh:IRI ;
50 | # sh:minCount 1 ;
51 | # sh:severity sh:Violation ;
52 | # sh:message "Each SubmodelElement must have at least one semanticId attribute."@en ;
53 | # ] ;
54 | #############################################################################
55 | # rami:semanticID is not necessary, because it is specified by RDF itself #
56 | #############################################################################
57 | # SubmodelElement inherits from Qualifiable
58 | sh:property [
59 | sh:path rami:qualifier ;
60 | sh:minCount 0 ;
61 | sh:constraint [
62 | sh:nodeKind sh:IRI ;
63 | ] ;
64 | sh:severity sh:Violation ;
65 | sh:message "rami:qualifier must be point to a proper IRI."@en ;
66 | ] ;
67 |
68 | # SubmodelElement inherits from Referable
69 | sh:property [
70 | sh:path rami:administration ;
71 | sh:minCount 1 ;
72 | sh:maxCount 1 ;
73 | sh:message "..."@en ;
74 | ] ;
75 |
76 | # inherits from DataSpecification
77 | sh:property [
78 | sh:path rami:hasDataSpecification ;
79 | sh:minCount 0 ;
80 | sh:nodeKind sh:IRI ; # class Reference is not part of the ontology
81 | sh:severity sh:Violation ;
82 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
83 | ] ;
84 |
85 | sh:property [
86 | sh:path rami:hasSubmodel ;
87 | sh:class rami:Submodel ;
88 | sh:minCount 0 ;
89 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
90 | ] ;
91 |
92 | # Submodel inherits from HasKind
93 | sh:property [
94 | sh:path rami:hasKind ;
95 | sh:minCount 0 ;
96 | sh:maxCount 1 ;
97 | sh:someOf [
98 | sh:constraint [
99 | sh:nodeKind sh:Type ;
100 | ] ;
101 | sh:constraint [
102 | sh:nodeKind rami:Instance ;
103 | ] ;
104 | ] ;
105 | sh:severity sh:Violation ;
106 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
107 | ] .
--------------------------------------------------------------------------------
/schema/OperationVariableShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 | <#OperationVariableShape>
10 | a sh:NodeShape ;
11 | sh:targetClass rami:OperationVariable ;
12 | sh:property [
13 | sh:path rdf:type ;
14 | sh:minCount 1 ; # redundant
15 | ] ;
16 |
17 | sh:property [
18 | sh:path rami:value ;
19 | sh:class rami:SubmodelElement ;
20 | sh:minCount 1 ;
21 | sh:maxCount 1 ; # MANDATORY!
22 | sh:node [
23 | a sh:NodeShape ;
24 | sh:path rami:kind ;
25 | sh:hasValue rami:Type
26 | ] ;
27 | sh:severity sh:Violation ;
28 | sh:message "there should be exactly one value of type rami:SubmodelElement and this shall be of kind=Type."@en ;
29 | ] ;
30 |
31 | #################################
32 | # inherits from SubmodelElement #
33 | #################################
34 |
35 | sh:property [
36 | sh:path rami:idShort ;
37 | sh:valueDatatype xsd:string ;
38 | sh:minCount 1 ;
39 | sh:severity sh:Violation ;
40 | sh:message "Each submodel element must have at least one short ID with datatype xsd:string."@en ;
41 | ] ;
42 |
43 | # sh:property [
44 | # sh:path rami:semanticId ;
45 | # sh:nodeKind sh:IRI ;
46 | # sh:minCount 1 ;
47 | # sh:severity sh:Violation ;
48 | # sh:message "Each SubmodelElement must have at least one semanticId attribute."@en ;
49 | # ] ;
50 | ##### specified by RDF itself
51 |
52 | # SubmodelElement inherits from Qualifiable
53 | sh:property [
54 | sh:path rami:qualifier ;
55 | sh:minCount 0 ;
56 | sh:constraint [
57 | sh:nodeKind sh:IRI ;
58 | ] ;
59 | sh:severity sh:Violation ;
60 | sh:message "rami:qualifier must be point to a proper IRI."@en ;
61 | ] ;
62 |
63 | # SubmodelElement inherits from Referable
64 | sh:property [
65 | sh:path rami:idShort ;
66 | sh:valueDatatype xsd:string ;
67 | sh:minCount 0 ;
68 | sh:maxCount 1 ;
69 | sh:severity sh:violation ;
70 | sh:message "..."@en ;
71 | ] ;
72 |
73 | sh:property [
74 | sh:path rami:category ;
75 | sh:valueDatatype xsd:string ;
76 | sh:minCount 0 ;
77 | sh:maxCount 1 ;
78 | sh:severity sh:violation ;
79 | sh:message "..."@en ;
80 | ] ;
81 |
82 | sh:property [
83 | sh:path rami:description ;
84 | sh:valueDatatype xsd:langString ;
85 | sh:minCount 0 ;
86 | sh:maxCount 1 ;
87 | sh:severity sh:violation ;
88 | sh:message "..."@en ;
89 | ] ;
90 |
91 | sh:property [
92 | sh:path rami:parent ;
93 | sh:class rami:Referable ;
94 | sh:minCount 0 ;
95 | sh:maxCount 1 ;
96 | sh:severity sh:violation ;
97 | sh:message "..."@en ;
98 | ] ;
99 |
100 |
101 | # inherits from DataSpecification
102 | sh:property [
103 | sh:path rami:hasDataSpecification ;
104 | sh:minCount 0 ;
105 | sh:nodeKind sh:IRI ; # class Reference is not part of the ontology
106 | sh:severity sh:Violation ;
107 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
108 | ] ;
109 |
110 | sh:property [
111 | sh:path rami:hasSubmodel ;
112 | sh:class rami:Submodel ;
113 | sh:minCount 0 ;
114 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
115 | ] ;
116 |
117 | # Submodel inherits from HasKind
118 | sh:property [
119 | sh:path rami:hasKind ;
120 | sh:minCount 0 ;
121 | sh:maxCount 1 ;
122 | sh:someOf [
123 | sh:constraint [
124 | sh:nodeKind sh:Type ;
125 | ] ;
126 | sh:constraint [
127 | sh:nodeKind rami:Instance ;
128 | ] ;
129 | ] ;
130 | sh:severity sh:Violation ;
131 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
132 | ] .
--------------------------------------------------------------------------------
/schema/PropertyShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: .
6 | @prefix dcterms: .
7 | @prefix rami: .
8 |
9 |
10 | <#RamiPropertyShape>
11 | a sh:PropertyShape ;
12 | <<<<<<< HEAD
13 | sh:path rami:property ;
14 | sh:datatype xsd:string ;
15 | =======
16 | sh:path rami:property ;
17 | sh:datatype xsd:string ;
18 | >>>>>>> details_of_the_AAS_1.1
19 | sh:minCount 0 ;
20 | sh:maxCount 1 ;
21 |
22 | sh:property [
23 | sh:path rami:value ;
24 | sh:class rami:PropertyValueType ;
25 | sh:minCount 0 ;
26 | sh:maxCount 1 ;
27 | sh:message "value of the PropertyInstance"@en
28 | ] ;
29 |
30 | sh:property [
31 | sh:path rami:valueID ;
32 | sh:class rami:Reference ;
33 | sh:minCount 0 ;
34 | sh:maxCount 1 ;
35 | <<<<<<< HEAD
36 | sh:message "refers to the global unique identifier"@en
37 | ] ;
38 |
39 | #################################
40 |
41 | # inherits from DataElement (and DataElement inherits from SubmodelElement
42 | # (SubmodelElements inherits from:
43 | # HasDataSpecification; Referable; Qualifiable; HasSemantics; HasKind))
44 | =======
45 | sh:severity sh:Violation ;
46 | sh:message "rami:valueID refers to the global unique identifier and needs to be instance of rami:Reference."@en
47 | ] ;
48 |
49 | ##################################
50 | # inherits from DataElement (and DataElement inherits from SubmodelElement
51 | # (SubmodelElements inherits from:
52 | # HasDataSpecification; Referable; Qualifiable; HasSemantics; HasKind))
53 | ##################################
54 | >>>>>>> details_of_the_AAS_1.1
55 |
56 | # DataSpecification:
57 | sh:property [
58 | sh:path rami:hasDataSpecification ;
59 | sh:minCount 0 ;
60 | sh:nodeKind sh:URI ;
61 | sh:severity sh:Violation ;
62 | sh:message "rami:hasDataSpecification must point to a proper URI."@en ;
63 | ] ;
64 |
65 | sh:property [
66 | sh:path rami:hasSubmodel ;
67 | sh:class rami:Submodel ;
68 | sh:minCount 0 ;
69 | sh:message "A DataSpecification entity can have a rami:hasSubmodel relation to a rami:Submodel."@en ;
70 | ] ;
71 |
72 | # Referable:
73 | sh:property [
74 | <<<<<<< HEAD
75 | sh:path rami:administration ;
76 | sh:minCount 0 ;
77 | sh:maxCount 1 ;
78 | sh:class rami:AdministrativeInformation ;
79 | sh:severity sh:Violation ;
80 | sh:message ""@en ;
81 | ] ;
82 |
83 | =======
84 | sh:path rami:idShort ;
85 | sh:valueDatatype xsd:string ;
86 | sh:minCount 0 ;
87 | sh:maxCount 1 ;
88 | sh:severity sh:violation ;
89 | sh:message "..."@en ;
90 | ] ;
91 |
92 | sh:property [
93 | sh:path rami:category ;
94 | sh:valueDatatype xsd:string ;
95 | sh:minCount 0 ;
96 | sh:maxCount 1 ;
97 | sh:severity sh:violation ;
98 | sh:message "..."@en ;
99 | ] ;
100 |
101 | sh:property [
102 | sh:path rami:description ;
103 | sh:valueDatatype xsd:langString ;
104 | sh:minCount 0 ;
105 | sh:maxCount 1 ;
106 | sh:severity sh:violation ;
107 | sh:message "..."@en ;
108 | ] ;
109 |
110 | sh:property [
111 | sh:path rami:parent ;
112 | sh:class rami:Referable ;
113 | sh:minCount 0 ;
114 | sh:maxCount 1 ;
115 | sh:severity sh:violation ;
116 | sh:message "..."@en ;
117 | ] ;
118 |
119 |
120 | >>>>>>> details_of_the_AAS_1.1
121 | # Qualifiable:
122 | sh:constraint [
123 | sh:nodeKind sh:IRI ;
124 | sh:message "Each rami object must be a URI."@en ;
125 | <<<<<<< HEAD
126 | ] ;
127 | =======
128 | ] ;
129 | >>>>>>> details_of_the_AAS_1.1
130 |
131 | sh:property [
132 | sh:path rami:qualifier ;
133 | sh:minCount 0 ;
134 | sh:constraint [
135 | sh:nodeKind sh:URI ;
136 | ] ;
137 | sh:severity sh:Violation ;
138 | sh:message "rami:qualifier must be point to a proper URI."@en ;
139 | ] ;
140 |
141 | # HasSemantics:
142 | <<<<<<< HEAD
143 | sh:property [
144 | sh:path rami:semanticId ;
145 | sh:nodeKind sh:URI ;
146 | sh:minCount 1 ;
147 | sh:maxCount 1 ;
148 | sh:severity sh:Violation ;
149 | sh:message "Every submodel element needs exactly one semantic definition (semanticId in HasSemantics)"@en ;
150 | ] ;
151 | =======
152 | # sh:property [
153 | # sh:path rami:semanticId ;
154 | # sh:nodeKind sh:URI ;
155 | # sh:minCount 1 ;
156 | # sh:maxCount 1 ;
157 | # sh:severity sh:Violation ;
158 | # sh:message "Every submodel element needs exactly one semantic definition (semanticId in HasSemantics)"@en ;
159 | # ] ;
160 | #########################################
161 | # semanticID is specified by RDF itself #
162 | #########################################
163 | >>>>>>> details_of_the_AAS_1.1
164 |
165 | # HasKind:
166 | sh:property [
167 | sh:path rami:hasKind ;
168 | sh:minCount 0 ;
169 | sh:maxCount 1 ;
170 | <<<<<<< HEAD
171 | sh:someOf [
172 | sh:constraint [
173 | sh:nodeKind sh:Type ;
174 | ] ;
175 | sh:constraint [
176 | sh:nodeKind rami:Instance ;
177 | ] ;
178 | ] ;
179 | =======
180 | sh:someOf [
181 | sh:constraint [
182 | sh:nodeKind sh:Type ;
183 | ] ;
184 | sh:constraint [
185 | sh:nodeKind rami:Instance ;
186 | ] ;
187 | ] ;
188 | >>>>>>> details_of_the_AAS_1.1
189 | sh:severity sh:Violation ;
190 | sh:message "rami:hasKind must be either a rami:Instance or a rami:Type ."@en ;
191 | ] .
--------------------------------------------------------------------------------
/schema/QualifiableShape.ttl:
--------------------------------------------------------------------------------
1 | @prefix owl: .
2 | @prefix rdf: .
3 | @prefix rdfs: .
4 | @prefix sh: .
5 | @prefix xsd: