Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1645108
Adding RelationshipElementShape.ttl and modify rami.ttl
bweengener Mar 22, 2019
dbfbeae
Adding OperationShape.ttl and modify other shapes
bweengener Mar 22, 2019
37803d3
Adding OperationVariableShape and modify rami.ttl for all shapes
bweengener Mar 22, 2019
c25e173
finish draft
bweengener Mar 22, 2019
201abde
Fixing
bweengener Mar 22, 2019
8c42c6f
Fixing minor Typos
bweengener Mar 22, 2019
71ab10f
Modify rami voc
bweengener Mar 25, 2019
d0414ae
Updating rami.ttl
bweengener Mar 25, 2019
06426b4
Adding some tests + fixing some shapes (invalid syntax)
bweengener Mar 25, 2019
bbe2095
Modify ontology and writing some tests
bweengener Mar 25, 2019
f0bbb8c
Adjustments that have been noticed through UML comparison
bweengener Mar 26, 2019
76e995b
Further adjustments that have been noticed through UML comparison
bweengener Mar 27, 2019
90f2732
Adding all AccessControlShapes (see chapter 5 in aas-in-detail
bweengener Mar 27, 2019
44d229c
Adding all AccessControlShapes (see chapter 5 in aas-in-detail)
bweengener Mar 27, 2019
958b43f
Merge remote-tracking branch 'origin/ben' into ben
bweengener Mar 27, 2019
099c6a3
Modify rami.ttl to fit with AccessControlShapes
bweengener Mar 27, 2019
b2b26f8
Minor adjustments that have been noticed through UML comparison (chap…
bweengener Mar 27, 2019
b229521
Further adjustments caused by UML comparison
bweengener Mar 28, 2019
951607c
Adding raspberry example (filestructure)
bweengener Mar 28, 2019
1209346
Modify AAS example for Raspberry Pi 3b+
bweengener Mar 28, 2019
e51c924
Delete some comments in shapes
bweengener Mar 28, 2019
4029d9a
DRAFT (EXAMPLE.ttl)
bweengener Mar 29, 2019
834ba92
first iteration: lessons learned key to URI, kind and properties
sebbader Mar 29, 2019
f6f656f
Begin transform the AAS example (XML) into RDF Model using RDF/TURTLE
bweengener Mar 29, 2019
faca645
second attempt of an AAS example
bweengener Apr 1, 2019
3d9f48b
Editing AAS definition
bweengener Apr 1, 2019
bd56f30
Adding first property (technical data specification [clocking speed])
bweengener Apr 1, 2019
a362cad
second prop
bweengener Apr 1, 2019
576e8e7
Adding wifi-prop with concept.-description
bweengener Apr 1, 2019
b86c565
Adding all technical specification
bweengener Apr 1, 2019
f183438
Finish AAS (without RDF) of Raspberry Pi 3b+, that is readable by AAS…
bweengener Apr 1, 2019
71ca5fe
Finish AAS (without RDF) of Raspberry Pi 3b+, that is readable by AAS…
bweengener Apr 1, 2019
e90905e
Merge remote-tracking branch 'origin/ben' into ben
bweengener Apr 1, 2019
5d2d16a
First attempt of AAS in RDF/TTL
bweengener Apr 1, 2019
5e28c63
Adding all DOCUMENTATION Submodels (pdfs) of the AASX
bweengener Apr 2, 2019
44c9009
Fixing minor typos
bweengener Apr 2, 2019
4ffd622
Adding all TECHNICAL-DATA SubmodelElements
bweengener Apr 2, 2019
b266028
Adding all ASSET-IDENTIFICATION SubmodelElements of AASX
bweengener Apr 2, 2019
6e41ecb
Making adjustments regarding semanticID (semanticID identifies the co…
bweengener Apr 3, 2019
e21bf0f
Modify SubmodelElements to fit with new concept (described in comment…
bweengener Apr 3, 2019
204c916
Fixing some typos
bweengener Apr 3, 2019
2f3f43d
Adding comment and label for rami:Reference
bweengener Apr 4, 2019
dc41b49
Adding py-script to convert conceptDescriptions
bweengener Apr 4, 2019
31febc7
Modify rami-vocabulary for shapes
bweengener Apr 4, 2019
29e12ab
Adding conceptDescriptions in AAS-example + modify shapes
bweengener Apr 4, 2019
f5f1cca
IMPORTANT: IRDIs are not parseable with linked-data-fu (use URIs inst…
bweengener Apr 8, 2019
e6e2be5
First draft of a ruleset
bweengener Apr 8, 2019
8b956fd
Adding rules that detect a powered_device and specify further rules f…
bweengener Apr 8, 2019
6745947
Adding rules regarding processor and architecture + minor fixes in rd…
bweengener Apr 8, 2019
b555c13
Fixing some minor typos and adding rules to detect if the asset is a …
bweengener Apr 8, 2019
a2a3cac
Adding rule that detects if it is possible to host a MySQL database o…
bweengener Apr 8, 2019
0d069a8
Fixing minor typos
bweengener Apr 9, 2019
53d358e
Adding rules to detect assets that are carriable by humans + adding d…
bweengener Apr 9, 2019
d939203
Update README
bweengener Apr 9, 2019
06a799d
Update README.md
bweengener Apr 9, 2019
ce01c11
Update README
bweengener Apr 10, 2019
a80ac2b
Update README
bweengener Apr 10, 2019
08368c6
Adding .gitignore
bweengener Apr 10, 2019
4a61f18
Split rami-ruleset into rami-rl.n3 (for general rules [based on model…
bweengener Apr 10, 2019
5645c38
Merge remote-tracking branch 'origin/ben' into ben
bweengener Apr 10, 2019
c8b27db
Merge branch 'ben'
bweengener Apr 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
.idea
*.log
2,017 changes: 2,017 additions & 0 deletions Converter/conceptDescriptions.xml

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions Converter/conceptDrescriptionParser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from xml.etree import ElementTree


class AAS:
id_short = "{http://www.admin-shell.io/aas/1/0}idShort"
description = "{http://www.admin-shell.io/aas/1/0}description"
identification = "{http://www.admin-shell.io/aas/1/0}identification"
embedded_data_specification = "{http://www.admin-shell.io/aas/1/0}embeddedDataSpecification"
data_specification_content = "{http://www.admin-shell.io/aas/1/0}dataSpecificationContent"
preferred_name = "{http://www.admin-shell.io/IEC61360/1/0}preferredName"
short_name = "{http://www.admin-shell.io/IEC61360/1/0}shortName"
unit = "{http://www.admin-shell.io/IEC61360/1/0}unit"
source_of_definiton = "{http://www.admin-shell.io/IEC61360/1/0}sourceOfDefinition"
datatype = "{http://www.admin-shell.io/IEC61360/1/0}dataType"
definition = "{http://www.admin-shell.io/IEC61360/1/0}definition"


for concept_description in ElementTree.parse("conceptDescriptions.xml").getroot():

uri = None
id_short = None
preferred_name = None
short_name = None
definition = None
isCaseOf = None

for child in concept_description:
if child.tag == AAS.id_short:
id_short = child.text
elif child.tag == AAS.identification:
uri = child.text
elif child.tag == AAS.embedded_data_specification:
for prop in child:
if prop.tag == AAS.data_specification_content:
for propchild in prop[0]:
if propchild.tag == AAS.preferred_name:
preferred_name = propchild.text
elif propchild.tag == AAS.short_name:
short_name = propchild.text
elif propchild.tag == AAS.datatype:
isCaseOf = str(propchild.text).lower()
elif propchild.tag == AAS.definition:
definition = propchild[0].text
rdf = ""
rdf += "<"+str(uri)+">\n"
rdf += " a rami:conceptDictionary ;\n"
rdf += " rami:idShort \""+id_short+"\"^^xsd:string ;\n"
rdf += " rdfs:label \""+id_short+"-ConceptDictionary\"^^xsd:string ;\n"
rdf += " rdfs:coment \"The ConceptDictionary contains the ConceptDescription of the property '"+str(id_short)+"'\"@en ;\n"
rdf += " rami:hasConceptDescription [\n"
rdf += " a rami:conceptDescription ;\n"
if preferred_name is not None and str(preferred_name).strip(" ").strip("\n") is not "" :
rdf += " rami:preferredName \""+preferred_name+"\"@en ;\n"
else :
if short_name is not None:
rdf += " rami:preferredName \"" + short_name + "\"@en ;\n"
if short_name is not None:
rdf += " rami:shortName \""+short_name+"\"^^xsd:string ;\n"
if definition is not None:
rdf += " rami:definition \""+definition+"\"@en ;\n"
rdf += " ] ; \n"
rdf += " rami:hasDataSpecification _:DataSpecificationIEC61360 ."

print(rdf)
51 changes: 49 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,49 @@
# RAMIVocabulary
Repository containing the developing of the RAMI vocabulary
# RAMIOntology
Repository containing the developing of the RAMI vocabulary.

The Reference Architecture Model Industry 4.0 that was developed by the [**`Platform Industry 4.0`**](https://www.plattform-i40.de/PI40/Navigation/DE/Home/home.html) is a three-dimensional map showing how to approach the issue of Industry 4.0 in a structured manner. RAMI ensures that all participants involved in Industry 4.0 discussions understand each other. The concept of the RAMI is based on data and is closely associated with the Industrial Data Space (IDS).

The main question is: *Who provides the data for intepretation?* It is the "digital-twin" of each asset. The official name for this is **Asset-Administration-Shell** (AAS).
The AAS provides organizations the opportunity to share data and exchange it in "value chains"/"value networks".

![example](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ0v_gGsBH7qGsdDBYS_z-OuqsvYXvjgImxHlZLQZ_Rv6oCtdqjYQ "AAS example")

The RAMIOntology is based on the document [**`details_of_the_AAS.pdf`**](https://www.zvei.org/fileadmin/user_upload/Presse_und_Medien/Publikationen/2018/November/Details_of-the_Asset_Administration_Shell/Details_of-the_Asset_Administration_Shell.PDF). This document specifies the structural principles of the AAS and and outlines a metamodel. The goal of this document was to specify mandatory and optional attributes using RDF-serialization. Furthermore it was necessary to check all dependecies and modify the metamodel to provide a transparent model that can be integrated into the reference architecture model.

The [**`shapes`**](schema/) in this repository are available for validation and are all based on the metamodel. There were some iterations, so they don't match 100%. The annotated version of this document can be downloaded [here](http://116.203.149.114/2018-verwaltungsschale-im-detail-annotated-umls.pdf).

The Ontology contains the vocabulary that is necessary for the RAMI-AAS.

Use the [shacl-playground](http://shacl.org/playground/) to check if your RDF-model is conform to the shape.

We tested some shapes using the shacl playground. The tested files are stored with their output in the [tests-directory](tests).

***
## The Example
The **`Raspberry Pi 3b+`** was used as an example of an asset that is described in an AAS
- we created a valid [**`AASX-archive`**](RaspberryPi3bPlus_EXAMPLE/Raspberry_Pi_3b_plus.aasx)
- this AASX-archive contains a [**`XML-model`**](RaspberryPi3bPlus_EXAMPLE/Raspberry_Pi_3b_plus/aasx/iais_fraunhofer_de_en_aas_examples/iais_fraunhofer_de_en_aas_examples_raspberry_pi_3b_plus.aas.xml) which contains all conceptDescriptions and information about the asset
- we created also a [**`RDF-model`**](RaspberryPi3bPlus_EXAMPLE/rdfttlsolution.ttl)
- based on the [**`modified metamodel`**](http://116.203.149.114/2018-verwaltungsschale-im-detail-annotated-umls.pdf)
- conform to [**`shapes`**](schema/)

The information content is almost the same. The models match from the raw data, but the asset can still be displayed more clearly with all dependencies by using RDF.

### Reasoning
We created a rami-ruleset that contains:
- basic rules that are extensions of the metamodel

In addition we created a domain-specific-ruleset for all computing devices, i.e. Raspberry Pis
These rules detect if the asset is for example:
- a computer
- carriable by a human
- a powered device
- PoE suppliable
- ...

We evaluated the rdf-model of the Raspberry Pi 3b+. The output file is called [**`rdfttlsolution_with_reasoning.nt`**](RaspberryPi3bPlus_EXAMPLE/evaluated/rdfttlsolution_with_reasoning.nt) and contains around 334 derived triples.

***
We used [Linked-Data-Fu](https://linked-data-fu.github.io) for reasoning.

We edited the Ontology with [Protégé](https://protege.stanford.edu).
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="xml" ContentType="text/xml" /><Default Extension="jpg" ContentType="image/jpeg" /><Default Extension="pdf" ContentType="application/pdf" /><Override PartName="/aasx/aasx-origin" ContentType="text/plain" /></Types>
5 changes: 5 additions & 0 deletions RaspberryPi3bPlus_EXAMPLE/Raspberry_Pi_3b_plus/_rels/.rels
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://www.admin-shell.io/aasx/relationships/aasx-origin" Target="/aasx/aasx-origin" Id="R15e3f3de7cb643e7" />
<Relationship Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail" Target="/RASPBERRY_PI_3B_PLUS_001.jpg" Id="R3c534e7bd5b14ad7" />
</Relationships>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://www.admin-shell.io/aasx/relationships/aas-spec" Target="/aasx/iais_fraunhofer_de_en_aas_examples/iais_fraunhofer_de_en_aas_examples_raspberry_pi_3b_plus.aas.xml" Id="Re6c8316736fc4ac4" />
</Relationships>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Intentionally empty.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://www.admin-shell.io/aasx/relationships/aas-suppl" Target="/aasx/documents/product_sheet.pdf" Id="Rd37d67ad7bdd44e5" />
<Relationship Type="http://www.admin-shell.io/aasx/relationships/aas-suppl" Target="/aasx/documents/review_and_guide.pdf" Id="Rd37d67ad7bdr44e5" />
</Relationships>
Loading