Skip to content
Snippets Groups Projects
Commit 51967af3 authored by Aurélien Lamercerie's avatar Aurélien Lamercerie
Browse files

CTS update: generate property for relation without instance (+ link between...

CTS update: generate property for relation without instance (+ link between instances in a new specific rule)
parent b73afaef
No related branches found
No related tags found
No related merge requests found
...@@ -264,6 +264,7 @@ cts:batch_execution ...@@ -264,6 +264,7 @@ cts:batch_execution
sh:rule cts:instantiate-composite-in-list-by-extension-1 ; sh:rule cts:instantiate-composite-in-list-by-extension-1 ;
sh:rule cts:instantiate-composite-in-list-by-extension-2 ; sh:rule cts:instantiate-composite-in-list-by-extension-2 ;
sh:rule cts:link-classes-by-relation-property ; sh:rule cts:link-classes-by-relation-property ;
sh:rule cts:link-instances-by-relation-property ;
sh:rule cts:link-to-scope-entry ; sh:rule cts:link-to-scope-entry ;
sh:rule cts:specify-axis-of-atom-list-net ; sh:rule cts:specify-axis-of-atom-list-net ;
sh:rule cts:update-batch-execution-rules ; sh:rule cts:update-batch-execution-rules ;
...@@ -271,10 +272,6 @@ cts:batch_execution ...@@ -271,10 +272,6 @@ cts:batch_execution
sh:rule cts:update-net-extension-rules ; sh:rule cts:update-net-extension-rules ;
sh:rule cts:update-preprocessing-rules ; sh:rule cts:update-preprocessing-rules ;
. .
cts:batch_execution_1
rdf:type cts:batch_execution ;
rdfs:label "batch execution 1" ;
.
cts:bypass-reification cts:bypass-reification
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
...@@ -1111,7 +1108,7 @@ CONSTRUCT { ...@@ -1111,7 +1108,7 @@ CONSTRUCT {
?newPropertyUri rdfs:subPropertyOf ?parentProperty. ?newPropertyUri rdfs:subPropertyOf ?parentProperty.
?newPropertyUri rdfs:label ?relationConcept. ?newPropertyUri rdfs:label ?relationConcept.
?newPropertyUri sys:from_structure ?req. ?newPropertyUri sys:from_structure ?req.
?sourceInstanceUri ?newPropertyUri ?targetInstanceUri. # -- old --- ?sourceInstanceUri ?newPropertyUri ?targetInstanceUri.
} }
WHERE { WHERE {
# Relation Net (net1) # Relation Net (net1)
...@@ -1124,11 +1121,11 @@ WHERE { ...@@ -1124,11 +1121,11 @@ WHERE {
?relationObject net:has_parent_property ?parentProperty. ?relationObject net:has_parent_property ?parentProperty.
?relationObject net:has_property_uri ?newPropertyUri. ?relationObject net:has_property_uri ?newPropertyUri.
# -- Source Object # -- Source Object
?net1 net:has_source ?sourceObject. # -- old --- ?net1 net:has_source ?sourceObject.
?sourceObject net:has_instance_uri ?sourceInstanceUri. # -- old --- ?sourceObject net:has_instance_uri ?sourceInstanceUri.
# -- Target Object # -- Target Object
?net1 net:has_target ?targetObject. # -- old --- ?net1 net:has_target ?targetObject.
?targetObject net:has_instance_uri ?targetInstanceUri. # -- old --- ?targetObject net:has_instance_uri ?targetInstanceUri.
}""" ; }""" ;
sh:order 3.31 ; sh:order 3.31 ;
. .
...@@ -1148,6 +1145,7 @@ cts:generation ...@@ -1148,6 +1145,7 @@ cts:generation
sh:rule cts:generate-event-class ; sh:rule cts:generate-event-class ;
sh:rule cts:generate-relation-property ; sh:rule cts:generate-relation-property ;
sh:rule cts:link-classes-by-relation-property ; sh:rule cts:link-classes-by-relation-property ;
sh:rule cts:link-instances-by-relation-property ;
. .
cts:init-conjunctive-atom-list-net cts:init-conjunctive-atom-list-net
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1381,6 +1379,42 @@ WHERE { ...@@ -1381,6 +1379,42 @@ WHERE {
}""" ; }""" ;
sh:order 3.33 ; sh:order 3.33 ;
. .
cts:link-instances-by-relation-property
rdf:type sh:SPARQLRule ;
rdfs:label "add-event" ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX unl: <https://unl.tetras-libre.fr/rdf/schema#>
PREFIX net: <https://unsel.tetras-libre.fr/tenet/semantic-net#>
PREFIX cprm: <https://unsel.tetras-libre.fr/tenet/config/parameters#>
PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
CONSTRUCT {
?sourceInstanceUri ?newPropertyUri ?targetInstanceUri.
}
WHERE {
# Relation Net (net1)
?net1 a net:Instance.
?net1 net:type net:relation.
?net1 net:relationOf ?relationMother.
?net1 net:has_structure ?req.
# -- Relation Object
?net1 net:has_relation ?relationObject.
?relationObject net:has_parent_property ?parentProperty.
?relationObject net:has_property_uri ?newPropertyUri.
# -- Source Object
?net1 net:has_source ?sourceObject.
?sourceObject net:has_instance_uri ?sourceInstanceUri.
# -- Target Object
?net1 net:has_target ?targetObject.
?targetObject net:has_instance_uri ?targetInstanceUri.
}""" ;
sh:order 3.33 ;
.
cts:link-to-scope-entry cts:link-to-scope-entry
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment