Skip to content

Commit 5d7b6e6

Browse files
Adjust SPARQL queries
1 parent a8fb045 commit 5d7b6e6

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
PREFIX pmdco: <https://w3id.org/pmd/co/>
22

3-
SELECT (COUNT(?process) AS ?numberOfTests)
3+
SELECT (COUNT(DISTINCT ?process) AS ?numberOfTests)
44
WHERE {
55
?process a pmdco:PMD_0000974 .
6+
FILTER(CONTAINS(STR(?process), "_process"))
67
}

tensile_test_data/sparql/find_materials_tested.sparql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ PREFIX obo: <http://purl.obolibrary.org/obo/>
33

44
SELECT DISTINCT ?material_tested
55
WHERE {
6-
# material entity
7-
?mat pmdco:PMD_0020005 ?mat_part . # optional: if you want to follow testpiece->material links
86
# simpler: just take any identifier that denotes a material node
97
?id a pmdco:PMD_0000017 ;
108
obo:IAO_0000219 ?mat ;

tensile_test_data/sparql/show_Rp02_Rm_E_per_process.sparql

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
PREFIX pmdco: <https://w3id.org/pmd/co/>
22
PREFIX tto: <https://w3id.org/pmd/tto/>
33
PREFIX obo: <http://purl.obolibrary.org/obo/>
4+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
45

56
SELECT ?processId
67
(SAMPLE(?Rp02) AS ?Rp02) (SAMPLE(?Rp02_unit) AS ?Rp02_unit)
78
(SAMPLE(?Rm) AS ?Rm) (SAMPLE(?Rm_unit) AS ?Rm_unit)
89
(SAMPLE(?E) AS ?E) (SAMPLE(?E_unit) AS ?E_unit)
910
WHERE {
10-
# --- Parent tensile testing process ---
1111
?process a pmdco:PMD_0000974 .
1212

13-
# --- Process identifier (string) via Identifier pattern ---
13+
# Process identifier ONLY (exclude notes etc.)
1414
?pid a pmdco:PMD_0000017 ;
1515
obo:IAO_0000219 ?process ;
16-
pmdco:PMD_0060000 ?pid_vs .
16+
pmdco:PMD_0060000 ?pid_vs ;
17+
rdfs:label "Process identifier" .
1718
?pid_vs pmdco:PMD_0000006 ?processId .
1819

19-
# --- Rp0.2 (proof strength plastic extension rp02) ---
2020
OPTIONAL {
2121
?process obo:OBI_0000299 ?Rp02_smd .
2222
?Rp02_smd a pmdco:PMD_0000023 ;
@@ -27,7 +27,6 @@ WHERE {
2727
OPTIONAL { ?Rp02_svs pmdco:PMD_0000020 ?Rp02_unit }
2828
}
2929

30-
# --- Rm (tensile strength) ---
3130
OPTIONAL {
3231
?process obo:OBI_0000299 ?Rm_smd .
3332
?Rm_smd a pmdco:PMD_0000023 ;
@@ -38,7 +37,6 @@ WHERE {
3837
OPTIONAL { ?Rm_svs pmdco:PMD_0000020 ?Rm_unit }
3938
}
4039

41-
# --- E (elastic modulus) ---
4240
OPTIONAL {
4341
?process obo:OBI_0000299 ?E_smd .
4442
?E_smd a pmdco:PMD_0000023 ;

0 commit comments

Comments
 (0)