forked from IndustryFusion/DigitalTwin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce external ontology handling.
With this PR external ontologies can be pulled and combined to create the KMS data. Every onology contains of a prefix, and three parts: prefix_entities.ttl, prefix_knowledge.ttl and prefix_shacl.ttl. Different ontologies can be pulled together with a make target: make ontology2kms ONTOLOGIES="base filter" would pull in base and filter ontologies and compile a joint kms structure. The PR provides: * Syncing of knowledge configmaps between debezium-bridge and semantic model * Added stakater/Reloader to restart debezium-bridge when new knowledge is deployed * Extended SPARQL parser to enable consistent inheritance of RDFS Types when creating SHACL constraints and rules * Tolerating of rdfs:subClassOf* path expression * Streamlining of Knowledge closure calculation across all tools and add explicit script to calculate knowledge closure (create_knowledge_closure.py) * Add explicit tool to execute SPARQL query (check_sparql_expression.py) * For the time being - drop the sh:ord based deterministic ordering of fields. It creates confusion but will be needed in future to allow forward compatibility. For the time being, deterministic ordering is achieved by lexical ordering by field names. Related EPIC: IndustryFusion#514 Related User Story: IndustryFusion#515 Signed-off-by: marcel <wagmarcel@web.de>
- Loading branch information
Showing
34 changed files
with
1,341 additions
and
1,275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,5 +114,4 @@ data: | |
"password": "POSTGRES_PASSWORD" | ||
} | ||
} | ||
knowledge.ttl: | | ||
{{ .Files.Get "kms/knowledge.ttl" | indent 4 }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
helm/charts/kafka-bridges/templates/knowledge-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
# yamllint disable rule:line-length | ||
# yamllint disable rule:braces | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: knowledge | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: knowledge | ||
data: | ||
{{- $configmap := (lookup "v1" "ConfigMap" .Release.Namespace "knowledge") }} | ||
{{- if $configmap }} | ||
{{- $knowledge := get $configmap.data "knowledge.ttl" }} | ||
knowledge.ttl: {{ $knowledge | quote }} | ||
{{- else }} | ||
knowledge.ttl: | | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX iff: <https://industry-fusion.com/types/v0.9/> | ||
PREFIX oee: <https://industry-fusion.com/oee/v0.9/> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
### Test classes | ||
iff:cutter_test rdfs:subClassOf iff:machine_test ; | ||
a rdfs:Class . | ||
iff:plasmacutter_test rdfs:subClassOf iff:cutter_test ; | ||
a rdfs:Class . | ||
### End of Test Content | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.