فهرست منبع

Update palette

Arkadiusz Ryś 2 سال پیش
والد
کامیت
d67e6c91b4

+ 4 - 0
data/configuration.toml

@@ -3,6 +3,7 @@ endpoint_sparql = "https://fuseki.rys.app/SystemDesignOntology2Layers/" # Fuseki
 #endpoint_sparql = "http://127.0.0.1:3030/Drivetrain/sparql" # Fuseki SPARQL endpoint for the drivetrain
 #endpoint_sparql = "http://127.0.0.1:8000/" # Fuseki SPARQL endpoint (default spendpoint dev uri)
 #endpoint_sparql = "https://fuseki.rys.app/example/" # Deployement endpoint
+
 example_prefix = '''
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@@ -47,6 +48,9 @@ namespace = "http://bipm.org/jcgm/vim4#"
 name = "swrl"
 namespace = "http://www.w3.org/2003/11/swrl#"
 # Digital Twin Design
+[[prefixes]]
+name = "artifacts_ftg"
+namespace = "http://ua.be/sdo2l/description/artifacts/FTG_ftg#"
 ## Drivetrain
 [[prefixes]]
 name = "dart"

+ 2 - 2
data/palette/find_class_property.toml

@@ -48,6 +48,6 @@ description = "Find all the classes using a property."
 visual_support = true
 
 [[replacements]]
-placeholder = "Property"
-suggestion  = "base:hasName"
+placeholder = "class"
+suggestion  = "ftg:hasName"
 description = "Which property do the classes need to have?"

+ 1 - 1
data/palette/find_individuals.toml

@@ -54,5 +54,5 @@ description = "What class of individual are you looking for?"
 
 [[replacements]]
 placeholder = "relation"
-suggestion  = "base:hasName"
+suggestion  = "rdf:type"
 description = "What is the relation you are looking for?"

+ 4 - 3
data/palette/find_older_versions.toml

@@ -39,8 +39,9 @@ PREFIX xopp:       <http://ua.be/sdo2l/vocabulary/formalisms/xopp#>
 PREFIX federation: <http://ua.be/sdo2l/vocabulary/federation#>
 '''
 query = '''
-SELECT ?older WHERE {
-  {{ artifact }} base:newVersionOf+ ?older
+SELECT ?old ?new WHERE {
+  {{ artifact }} base:nextVersionOf+ ?old .
+  OPTIONAL { {{ artifact }} owl:sameAs ?new }
 }
 '''
 description = "Find all the older versions of an artifact."
@@ -48,5 +49,5 @@ visual_support = true
 
 [[replacements]]
 placeholder = "artifact"
-suggestion  = "art:drivetrain-sensor-data-v2"
+suggestion  = "<http://ua.be/sdo2l/description/traces/my_pt#sketch-v2.xopp>"
 description = "For which artifact are you looking for older versions?"

+ 4 - 4
data/palette/find_pm_relation.toml

@@ -39,11 +39,11 @@ PREFIX xopp:       <http://ua.be/sdo2l/vocabulary/formalisms/xopp#>
 PREFIX federation: <http://ua.be/sdo2l/vocabulary/federation#>
 '''
 query = '''
-SELECT DISTINCT ?from ?output ?atname WHERE {
+SELECT DISTINCT * WHERE {
   ?from a {{ from_class }} .
   ?from {{ relation }} ?output .
   ?output a {{ to_class }} .
-  ?output {{ extra_relation }} ?atname .
+  OPTIONAL { ?output {{ extra_relation }} ?name }
 }
 '''
 description = "Find the PM."
@@ -56,7 +56,7 @@ description = "Which starting class?"
 
 [[replacements]]
 placeholder = "relation"
-suggestion  = "ftg:outputs"
+suggestion  = "ftg:hasOutput"
 description = "Relation between the classes?"
 
 [[replacements]]
@@ -66,5 +66,5 @@ description = "The ending class?"
 
 [[replacements]]
 placeholder = "extra_relation"
-suggestion  = "base:hasName"
+suggestion  = "base:hasGUID"
 description = "End class relation?"

+ 13 - 4
data/palette/match_artifact_formalism.toml

@@ -39,9 +39,18 @@ PREFIX xopp:       <http://ua.be/sdo2l/vocabulary/formalisms/xopp#>
 PREFIX federation: <http://ua.be/sdo2l/vocabulary/federation#>
 '''
 query = '''
-SELECT ?pmArtInstance ?formalism WHERE {
-  {{ artifact }} traces:relatesTo ?pmArtInstance .
-  ?pmArtInstance base:isDefinedBy ?formalism .
+SELECT DISTINCT ?t_guid ?f_guid ?element ?rel ?va ?location WHERE {
+   ?individual a ?type .
+   ?type rdfs:subClassOf* ftg:Transformation .
+   ?individual base:hasGUID ?t_guid .
+   ?individual ftg:hasOutput ?formalism .
+   ?formalism base:hasGUID ?f_guid .
+   ?formalism pm:occursAsArtifact ?iri .
+   ?element traces:relatesTo ?iri .
+   ?element a ?atype .
+   ?atype rdfs:subClassOf traces:Artifact .
+   OPTIONAL { ?element traces:hasLocation ?location }
+   ?element owl:sameAs {{ artifact }}
 }
 '''
 description = "Find the formalism corresponding to an artifact."
@@ -49,5 +58,5 @@ visual_support = true
 
 [[replacements]]
 placeholder = "artifact"
-suggestion  = "art:torque-profile"
+suggestion  = "<http://ua.be/sdo2l/description/traces/my_pt#sketch-v1.xopp>"
 description = "For which artifact do you want to find the formalism?"