From 6097004b79bf60fa45bf7003fea9332982c73fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Lamercerie?= <aurelien.lamercerie@laposte.net> Date: Mon, 15 Nov 2021 19:48:20 +0100 Subject: [PATCH] CTS Update: clean code --- config/transduction-schemes.ttl | 53 ++++----------------------------- 1 file changed, 5 insertions(+), 48 deletions(-) diff --git a/config/transduction-schemes.ttl b/config/transduction-schemes.ttl index 334cb8cf..74fecc29 100644 --- a/config/transduction-schemes.ttl +++ b/config/transduction-schemes.ttl @@ -166,16 +166,10 @@ CONSTRUCT { ?newEventUri rdfs:subClassOf ?eventClassUri. ?newEventUri rdfs:label ?eventLabel. ?newEventUri sys:from_structure ?req. - # Instantiation !!! TODO !!! - # -- old --- ?mainInstanceUri a ?newEventUri. - # -- old --- ?mainInstanceUri rdfs:label ?mainInstance. - # -- old --- ?mainInstanceUri sys:from_structure ?req. # Object Property ?newEventObjectPropertyUri a owl:ObjectProperty. ?newEventObjectPropertyUri rdfs:subPropertyOf ?eventObjectPropertyUri. ?newEventObjectPropertyUri rdfs:label ?verbConcept. - # -- old --- ?newEventObjectPropertyUri rdfs:domain ?actorUri. - # -- old --- ?newEventObjectPropertyUri rdfs:range ?targetUri. ?newEventObjectPropertyUri sys:from_structure ?req. ?actorInstanceUri ?newEventObjectPropertyUri ?targetInstanceUri. } @@ -215,7 +209,7 @@ WHERE { BIND (uri( ?o1) AS ?eventObjectPropertyUri). BIND (uri( ?o2) AS ?newEventObjectPropertyUri). }""" ; - sh:order 3.1 ; + sh:order 3.31 ; . cts:add-state-property rdf:type sh:SPARQLRule ; @@ -237,16 +231,10 @@ CONSTRUCT { ?newStatePropertyUri rdfs:subClassOf ?statePropertyClassUri. ?newStatePropertyUri rdfs:label ?statePropertyLabel. ?newStatePropertyUri sys:from_structure ?req. - # Instantiation !!! TODO !!! - # -- old --- ?mainInstanceUri a ?newStatePropertyUri. - # -- old --- ?mainInstanceUri rdfs:label ?mainInstance. - # -- old --- ?mainInstanceUri sys:from_structure ?req. # Object Property ?newStatePropertyObjectPropertyUri a owl:ObjectProperty. ?newStatePropertyObjectPropertyUri rdfs:subPropertyOf ?statePropertyObjectPropertyUri. ?newStatePropertyObjectPropertyUri rdfs:label ?verbConcept. - # -- old --- ?newStatePropertyObjectPropertyUri rdfs:domain ?actorUri. - # -- old --- ?newStatePropertyObjectPropertyUri rdfs:range ?targetUri. ?newStatePropertyObjectPropertyUri sys:from_structure ?req. ?actorInstanceUri ?newStatePropertyObjectPropertyUri ?targetInstanceUri. } @@ -286,7 +274,7 @@ WHERE { BIND (uri( ?o1) AS ?statePropertyObjectPropertyUri). BIND (uri( ?o2) AS ?newStatePropertyObjectPropertyUri). }""" ; - sh:order 3.1 ; + sh:order 3.31 ; . cts:batch_execution rdf:type owl:Class ; @@ -380,22 +368,6 @@ WHERE { # -- Feature ?featureObject a net:Object. ?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 ; . @@ -784,7 +756,7 @@ WHERE { BIND (concat(?o1, '#', ?verbConcept) AS ?o2). BIND (uri( ?o2) AS ?newEventObjectPropertyUri). }""" ; - sh:order 3.3 ; + sh:order 3.32 ; . cts:compute-domain-range-of-state-property-object-properties rdf:type sh:SPARQLRule ; @@ -842,7 +814,7 @@ WHERE { BIND (concat(?o1, '#', ?verbConcept) AS ?o2). BIND (uri( ?o2) AS ?objectPropertyUri). }""" ; - sh:order 3.3 ; + sh:order 3.32 ; . cts:compute-instance-uri-of-net-object rdf:type sh:SPARQLRule ; @@ -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 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 { # Classification ?newClassUri rdfs:subClassOf ?parentUri. @@ -1196,21 +1168,6 @@ WHERE { ?net1 net:has_item ?compositeObject. ?compositeObject net:has_class_uri ?newClassUri. ?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 ; . -- GitLab