Skip to content

Commit

Permalink
add general property sheet
Browse files Browse the repository at this point in the history
Signed-off-by: pogi7 <[email protected]>
  • Loading branch information
pogi7 committed Mar 19, 2024
1 parent 85ea780 commit 548e1c1
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
10 changes: 5 additions & 5 deletions src/sparql/components.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ PREFIX base: <http://example.com/tutorial2/vocabulary/base#>
PREFIX mission: <http://example.com/tutorial2/vocabulary/mission#>
PREFIX vim4: <http://bipm.org/jcgm/vim4#>

SELECT DISTINCT ?c1_id ?c1_name ?c1_mass ?c2_id ?c2_name
SELECT DISTINCT ?iri ?c2Iri ?c1_id ?c1_name ?c1_mass ?c2_id ?c2_name
WHERE {
?c1 a mission:Component ;
?iri a mission:Component ;
base:hasIdentifier ?c1_id ;
base:hasCanonicalName ?c1_name .
OPTIONAL {
?c1 base:isContainedIn ?c2 .
?c2 base:hasIdentifier ?c2_id ;
?iri base:isContainedIn ?c2Iri .
?c2Iri base:hasIdentifier ?c2_id ;
base:hasCanonicalName ?c2_name .
}
OPTIONAL {
?c1_mass_mag vim4:characterizes ?c1 ;
?c1_mass_mag vim4:characterizes ?iri ;
vim4:hasDoubleNumber ?c1_mass .
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/vision/sparql/components.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ PREFIX base: <http://example.com/tutorial2/vocabulary/base#>
PREFIX mission: <http://example.com/tutorial2/vocabulary/mission#>
PREFIX vim4: <http://bipm.org/jcgm/vim4#>

SELECT DISTINCT ?c1_id ?c1_name ?c1_mass ?c2_id ?c2_name
SELECT DISTINCT ?iri ?c2Iri ?c1_id ?c1_name ?c1_mass ?c2_id ?c2_name
WHERE {
?c1 a mission:Component ;
?iri a mission:Component ;
base:hasIdentifier ?c1_id ;
base:hasCanonicalName ?c1_name .
OPTIONAL {
?c1 base:isContainedIn ?c2 .
?c2 base:hasIdentifier ?c2_id ;
?iri base:isContainedIn ?c2Iri .
?c2Iri base:hasIdentifier ?c2_id ;
base:hasCanonicalName ?c2_name .
}
OPTIONAL {
?c1_mass_mag vim4:characterizes ?c1 ;
?c1_mass_mag vim4:characterizes ?iri ;
vim4:hasDoubleNumber ?c1_mass .
}
}
Expand Down
13 changes: 13 additions & 0 deletions src/vision/sparql/general-properties.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX base: <http://example.com/tutorial2/vocabulary/base#>

select distinct ?anyIri ?id ?name
WHERE {
BIND(<${iri}> AS ?anyIri)
?anyIri a owl:NamedIndividual ;
base:hasIdentifier ?id ;
base:hasCanonicalName ?name .
}
9 changes: 2 additions & 7 deletions src/vision/sparql/missions.sparql
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
PREFIX base: <http://example.com/tutorial2/vocabulary/base#>
PREFIX mission: <http://example.com/tutorial2/vocabulary/mission#>

SELECT DISTINCT ?m_id ?m_name ?o_id ?o_name
SELECT DISTINCT ?iri ?m_id ?m_name
WHERE {
?m a mission:Mission ;
?iri a mission:Mission ;
base:hasIdentifier ?m_id ;
base:hasCanonicalName ?m_name ;
mission:pursues [
a mission:Objective ;
base:hasIdentifier ?o_id ;
base:hasCanonicalName ?o_name
]
}
ORDER BY ?m_id ?o_id
4 changes: 2 additions & 2 deletions src/vision/sparql/objectives.sparql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PREFIX base: <http://example.com/tutorial2/vocabulary/base#>
PREFIX mission: <http://example.com/tutorial2/vocabulary/mission#>

SELECT DISTINCT ?o1_id ?o1_name ?o2_id ?o2_name
SELECT DISTINCT ?iri ?o1_id ?o1_name ?o2_id ?o2_name
WHERE {
?o1 a mission:Objective ;
?iri a mission:Objective ;
base:hasIdentifier ?o1_id ;
base:hasCanonicalName ?o1_name ;
base:aggregates [
Expand Down
4 changes: 2 additions & 2 deletions src/vision/sparql/requirements.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ PREFIX mission: <http://example.com/tutorial2/vocabulary/mission#>
PREFIX oml: <http://opencaesar.io/oml#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?r_id ?c_name ?i_name
SELECT DISTINCT ?iri ?r_id ?c_name ?i_name
WHERE {
?r a mission:Requirement ;
?iri a mission:Requirement ;
base:hasIdentifier ?r_id ;
mission:specifies [
a mission:Presents ;
Expand Down

0 comments on commit 548e1c1

Please sign in to comment.