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

CTS Update: clean code

parent c6036fee
No related branches found
No related tags found
No related merge requests found
...@@ -166,16 +166,10 @@ CONSTRUCT { ...@@ -166,16 +166,10 @@ CONSTRUCT {
?newEventUri rdfs:subClassOf ?eventClassUri. ?newEventUri rdfs:subClassOf ?eventClassUri.
?newEventUri rdfs:label ?eventLabel. ?newEventUri rdfs:label ?eventLabel.
?newEventUri sys:from_structure ?req. ?newEventUri sys:from_structure ?req.
# Instantiation !!! TODO !!!
# -- old --- ?mainInstanceUri a ?newEventUri.
# -- old --- ?mainInstanceUri rdfs:label ?mainInstance.
# -- old --- ?mainInstanceUri sys:from_structure ?req.
# Object Property # Object Property
?newEventObjectPropertyUri a owl:ObjectProperty. ?newEventObjectPropertyUri a owl:ObjectProperty.
?newEventObjectPropertyUri rdfs:subPropertyOf ?eventObjectPropertyUri. ?newEventObjectPropertyUri rdfs:subPropertyOf ?eventObjectPropertyUri.
?newEventObjectPropertyUri rdfs:label ?verbConcept. ?newEventObjectPropertyUri rdfs:label ?verbConcept.
# -- old --- ?newEventObjectPropertyUri rdfs:domain ?actorUri.
# -- old --- ?newEventObjectPropertyUri rdfs:range ?targetUri.
?newEventObjectPropertyUri sys:from_structure ?req. ?newEventObjectPropertyUri sys:from_structure ?req.
?actorInstanceUri ?newEventObjectPropertyUri ?targetInstanceUri. ?actorInstanceUri ?newEventObjectPropertyUri ?targetInstanceUri.
} }
...@@ -215,7 +209,7 @@ WHERE { ...@@ -215,7 +209,7 @@ WHERE {
BIND (uri( ?o1) AS ?eventObjectPropertyUri). BIND (uri( ?o1) AS ?eventObjectPropertyUri).
BIND (uri( ?o2) AS ?newEventObjectPropertyUri). BIND (uri( ?o2) AS ?newEventObjectPropertyUri).
}""" ; }""" ;
sh:order 3.1 ; sh:order 3.31 ;
. .
cts:add-state-property cts:add-state-property
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -237,16 +231,10 @@ CONSTRUCT { ...@@ -237,16 +231,10 @@ CONSTRUCT {
?newStatePropertyUri rdfs:subClassOf ?statePropertyClassUri. ?newStatePropertyUri rdfs:subClassOf ?statePropertyClassUri.
?newStatePropertyUri rdfs:label ?statePropertyLabel. ?newStatePropertyUri rdfs:label ?statePropertyLabel.
?newStatePropertyUri sys:from_structure ?req. ?newStatePropertyUri sys:from_structure ?req.
# Instantiation !!! TODO !!!
# -- old --- ?mainInstanceUri a ?newStatePropertyUri.
# -- old --- ?mainInstanceUri rdfs:label ?mainInstance.
# -- old --- ?mainInstanceUri sys:from_structure ?req.
# Object Property # Object Property
?newStatePropertyObjectPropertyUri a owl:ObjectProperty. ?newStatePropertyObjectPropertyUri a owl:ObjectProperty.
?newStatePropertyObjectPropertyUri rdfs:subPropertyOf ?statePropertyObjectPropertyUri. ?newStatePropertyObjectPropertyUri rdfs:subPropertyOf ?statePropertyObjectPropertyUri.
?newStatePropertyObjectPropertyUri rdfs:label ?verbConcept. ?newStatePropertyObjectPropertyUri rdfs:label ?verbConcept.
# -- old --- ?newStatePropertyObjectPropertyUri rdfs:domain ?actorUri.
# -- old --- ?newStatePropertyObjectPropertyUri rdfs:range ?targetUri.
?newStatePropertyObjectPropertyUri sys:from_structure ?req. ?newStatePropertyObjectPropertyUri sys:from_structure ?req.
?actorInstanceUri ?newStatePropertyObjectPropertyUri ?targetInstanceUri. ?actorInstanceUri ?newStatePropertyObjectPropertyUri ?targetInstanceUri.
} }
...@@ -286,7 +274,7 @@ WHERE { ...@@ -286,7 +274,7 @@ WHERE {
BIND (uri( ?o1) AS ?statePropertyObjectPropertyUri). BIND (uri( ?o1) AS ?statePropertyObjectPropertyUri).
BIND (uri( ?o2) AS ?newStatePropertyObjectPropertyUri). BIND (uri( ?o2) AS ?newStatePropertyObjectPropertyUri).
}""" ; }""" ;
sh:order 3.1 ; sh:order 3.31 ;
. .
cts:batch_execution cts:batch_execution
rdf:type owl:Class ; rdf:type owl:Class ;
...@@ -380,22 +368,6 @@ WHERE { ...@@ -380,22 +368,6 @@ WHERE {
# -- Feature # -- Feature
?featureObject a net:Object. ?featureObject a net:Object.
?featureObject net:has_class_uri ?featureUri. ?featureObject net:has_class_uri ?featureUri.
# -- old --- ?itemObject net:has_concept ?subEntity.
# -- old --- ?net1 net:has_parent ?parentObject.
# -- old --- ?parentObject net:has_parent_class ?parentClass. # -- old --- ?entityClass
# -- old --- ?featureObject net:objectType sys:Feature.
# -- old --- ?featureObject net:has_node ?featureUW.
# -- old --- ?featureObject net:has_parent_class ?featureClass.
# -- old --- ?featureObject net:has_concept ?featureConcept.
# -- old --- # URI: entity class
# -- old --- sys:Structure sys:has_frame_uri ?frameURI.
# -- old --- BIND (concat( ?frameURI, ?parentClass) AS ?c1).
# -- old --- BIND (concat(?frameURI, ?subEntity) AS ?c2). # -- old --- BIND (concat(?c1, '#', ?subEntity) AS ?c2).
# -- old --- BIND (uri(?c2) AS ?subEntityUri).
# -- old --- # URI: feature class
# -- old --- BIND (concat( ?frameURI, ?featureClass) AS ?f1).
# -- old --- BIND (concat(?frameURI, ?featureConcept) AS ?f2).
# -- old --- BIND (uri(?f2) AS ?featureUri).
}""" ; }""" ;
sh:order 3.22 ; sh:order 3.22 ;
. .
...@@ -784,7 +756,7 @@ WHERE { ...@@ -784,7 +756,7 @@ WHERE {
BIND (concat(?o1, '#', ?verbConcept) AS ?o2). BIND (concat(?o1, '#', ?verbConcept) AS ?o2).
BIND (uri( ?o2) AS ?newEventObjectPropertyUri). BIND (uri( ?o2) AS ?newEventObjectPropertyUri).
}""" ; }""" ;
sh:order 3.3 ; sh:order 3.32 ;
. .
cts:compute-domain-range-of-state-property-object-properties cts:compute-domain-range-of-state-property-object-properties
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -842,7 +814,7 @@ WHERE { ...@@ -842,7 +814,7 @@ WHERE {
BIND (concat(?o1, '#', ?verbConcept) AS ?o2). BIND (concat(?o1, '#', ?verbConcept) AS ?o2).
BIND (uri( ?o2) AS ?objectPropertyUri). BIND (uri( ?o2) AS ?objectPropertyUri).
}""" ; }""" ;
sh:order 3.3 ; sh:order 3.32 ;
. .
cts:compute-instance-uri-of-net-object cts:compute-instance-uri-of-net-object
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1174,7 +1146,7 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#> ...@@ -1174,7 +1146,7 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/> PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Add Composite Class in System Ontology (from Composite List net) # -- Add Composite Class in Ontology (from Composite List net)
CONSTRUCT { CONSTRUCT {
# Classification # Classification
?newClassUri rdfs:subClassOf ?parentUri. ?newClassUri rdfs:subClassOf ?parentUri.
...@@ -1196,21 +1168,6 @@ WHERE { ...@@ -1196,21 +1168,6 @@ WHERE {
?net1 net:has_item ?compositeObject. ?net1 net:has_item ?compositeObject.
?compositeObject net:has_class_uri ?newClassUri. ?compositeObject net:has_class_uri ?newClassUri.
?compositeObject net:has_concept ?compositeConcept. ?compositeObject net:has_concept ?compositeConcept.
# -- old --- ?parentObject net:has_mother_class ?motherClass.
# -- old --- ?parentObject net:has_parent_class ?parentClass.
# -- old --- ?parentObject net:has_concept ?parentConcept.
# -- old --- ?compositeObject net:has_instance ?compositeInstance.
# Filter -- old --- FILTER NOT EXISTS { ?net2 net:has_subClass ?mainEntity}
# -- old --- # URI (for classes)
# -- old --- sys:Structure sys:has_frame_uri ?frameURI.
# -- old --- BIND (concat( ?frameURI, ?parentConcept) AS ?s2).
# -- old --- BIND (concat( ?frameURI, ?compositeConcept) AS ?s3).
# -- old --- BIND (uri(?s2) AS ?parentUri).
# -- old --- BIND (uri(?s3) AS ?newClassUri).
# -- old --- # URI (for instance)
# -- old --- BIND (concat( ?frameURI, ?parentClass) AS ?s1).
# -- old --- BIND (concat(?s1, '#', ?compositeInstance) AS ?s4).
# -- old --- BIND (uri(?s4) AS ?instanceUri).
}""" ; }""" ;
sh:order 3.21 ; sh:order 3.21 ;
. .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment