From b5d41cdaaeaa762c759a4a255eb55bdc475900a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Lamercerie?=
 <aurelien.lamercerie@laposte.net>
Date: Thu, 9 Sep 2021 11:59:51 +0200
Subject: [PATCH] Add relation between classes/instances and requirements
 (relation sys:from_structure)

---
 config/transduction-schemes.ttl | 12 ++++++++++++
 frame/system-ontology.ttl       |  5 +++++
 2 files changed, 17 insertions(+)

diff --git a/config/transduction-schemes.ttl b/config/transduction-schemes.ttl
index 75a476c4..97bd4626 100644
--- a/config/transduction-schemes.ttl
+++ b/config/transduction-schemes.ttl
@@ -43,6 +43,7 @@ CONSTRUCT {
    # Classification
    ?subEntity23Uri rdfs:subClassOf ?mainEntityUri.
    ?subEntity23Uri rdfs:label ?subEntity23.
+   ?subEntity23Uri sys:from_structure ?req.
    ?subEntity23Uri  
 		owl:equivalentClass [	a owl:Class ;
                                 owl:intersectionOf ( ?subEntity2Uri ?subEntity3Uri ) ] .
@@ -53,6 +54,7 @@ WHERE {
    # net1: entity class list
    ?net1 a net:Instance.
    ?net1 net:type net:entity_class_list.
+   ?net1 net:has_structure ?req.
    ?net1 net:entityClass ?entityClass.
    ?net1 net:has_node ?uw2, ?uw3.
    ?net1 net:has_mainClass ?mainEntityObject.	
@@ -115,6 +117,7 @@ CONSTRUCT {
    # Classification
    ?subEntity23Uri rdfs:subClassOf ?mainEntityUri.
    ?subEntity23Uri rdfs:label ?subEntity23.
+   ?subEntity23Uri sys:from_structure ?req.
    ?subEntity23Uri  
 		owl:equivalentClass [	a owl:Class ;
                                 owl:unionOf ( ?subEntity2Uri ?subEntity3Uri ) ] .
@@ -125,6 +128,7 @@ WHERE {
    # net1: entity class list
    ?net1 a net:Instance.
    ?net1 net:type net:entity_class_list.
+   ?net1 net:has_structure ?req.
    ?net1 net:entityClass ?entityClass.
    ?net1 net:has_node ?uw2, ?uw3.
    ?net1 net:has_mainClass ?mainEntityObject.	
@@ -187,14 +191,17 @@ CONSTRUCT {
    # Classification
    ?mainEntityUri rdfs:subClassOf ?entityUri.
    ?mainEntityUri rdfs:label ?mainEntity.
+   ?mainEntityUri sys:from_structure ?req.
    # Instantiation
    ?mainInstanceUri a ?mainEntityUri.
    ?mainInstanceUri rdfs:label ?mainInstance.
+   ?mainInstanceUri sys:from_structure ?req.
 }
 WHERE {
    # net1: entity
    ?net1 a net:Instance.
    ?net1 net:type net:entity.
+   ?net1 net:has_structure ?req.
    ?net1 net:has_entity ?entityObject1.
    ?entityObject1 net:entityClass ?entityClass.	
    ?entityObject1 net:concept ?mainEntity.
@@ -234,12 +241,14 @@ CONSTRUCT {
    # Classification
    ?subFeatureUri rdfs:subClassOf ?featureUri.
    ?subFeatureUri rdfs:label ?featureConcept.
+   ?subFeatureUri sys:from_structure ?req.
    # Instantiation: no instance for feature
 }
 WHERE {
    # net1: feature
    ?net1 a net:Instance.
    ?net1 net:type net:feature.
+   ?net1 net:has_structure ?req.
    ?net1 net:featureClass ?featureClass.
    ?net1 net:concept ?featureConcept.	
    # Filter: entity not present in a class list
@@ -272,15 +281,18 @@ CONSTRUCT {
    # Classification
    ?subEntityUri rdfs:subClassOf ?mainEntityUri.
    ?subEntityUri rdfs:label ?subEntity.
+   ?subEntityUri sys:from_structure ?req.
    # -- old --- ?mainEntityUri rdfs:subClassOf ?entityUri.
    # -- old --- ?mainEntityUri rdfs:label ?mainEntity.
    # Instantiation (extension)
    ?mainInstanceUri rdf:type ?subEntityUri.
+   ?mainInstanceUri sys:from_structure ?req.
 }
 WHERE {
    # net1: entity class list
    ?net1 a net:Instance.
    ?net1 net:type net:entity_class_list.
+   ?net1 net:has_structure ?req.
    ?net1 net:entityClass ?entityClass.
    ?net1 net:has_mainClass ?mainEntityObject.	
    ?mainEntityObject net:concept ?mainEntity.
diff --git a/frame/system-ontology.ttl b/frame/system-ontology.ttl
index 59e42353..afd5ad5b 100644
--- a/frame/system-ontology.ttl
+++ b/frame/system-ontology.ttl
@@ -60,6 +60,11 @@ sys:eventProperty
   rdfs:label "event property" ;
   rdfs:subPropertyOf sys:property ;
 .
+sys:from_structure
+  rdf:type rdf:Property ;
+  rdfs:label "from structure" ;
+  rdfs:subPropertyOf sys:property ;
+.
 sys:has_actor
   rdf:type rdf:Property ;
   rdfs:label "has actor" ;
-- 
GitLab