-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PhysicalConstant and ConstantValue
- Loading branch information
1 parent
87d9228
commit 30fa6d0
Showing
19 changed files
with
904 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
qudtlib-constants-gen/src/main/resources/query/physicalConstants.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
PREFIX qudt: <http://qudt.org/schema/qudt/> | ||
PREFIX unit: <http://qudt.org/vocab/unit/> | ||
PREFIX constant: <http://qudt.org/vocab/constant/> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
|
||
SELECT DISTINCT ?constName ?localName ?label (?qk as ?iri) ("PhysicalConstant" as ?typeName) ?symbol | ||
where | ||
{ | ||
?qk a qudt:PhysicalConstant . | ||
{ | ||
select ?qk (MIN(STR(?labelVal)) as ?label) where { | ||
?qk a qudt:PhysicalConstant . | ||
optional { | ||
?qk rdfs:label ?labelVal . | ||
FILTER(LANG(?labelVal) = "en") | ||
} | ||
} GROUP BY ?qk ?symbol | ||
} | ||
{ | ||
select ?qk (GROUP_CONCAT(STR(?smb); separator=" or ") as ?symbol) where { | ||
?qk a qudt:PhysicalConstant . | ||
optional { | ||
?qk qudt:symbol ?smb . | ||
} | ||
} GROUP BY ?qk | ||
} | ||
BIND(REPLACE(STR(?qk), "^.+/", "") as ?localName) | ||
BIND(REPLACE(?localName, "-", "__") as ?constName) | ||
} order by ?qk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
qudtlib-init-rdf/src/main/resources/qudtlib/query/constantValue.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
PREFIX qudt: <http://qudt.org/schema/qudt/> | ||
PREFIX unit: <http://qudt.org/vocab/unit/> | ||
PREFIX kind: <http://qudt.org/vocab/quantitykind/> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
|
||
SELECT * where | ||
{ | ||
?constantValue | ||
a qudt:ConstantValue ; | ||
qudt:hasUnit ?unit ; | ||
qudt:value ?value . | ||
OPTIONAL { | ||
?constantValue qudt:standardUncertainty ?standardUncertainty ; | ||
} | ||
OPTIONAL { | ||
?constantValue qudt:deprecated ?deprecated ; | ||
} | ||
} order by ?constantValue |
16 changes: 16 additions & 0 deletions
16
qudtlib-init-rdf/src/main/resources/qudtlib/query/physicalConstant.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
PREFIX qudt: <http://qudt.org/schema/qudt/> | ||
PREFIX unit: <http://qudt.org/vocab/unit/> | ||
PREFIX kind: <http://qudt.org/vocab/quantitykind/> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
|
||
SELECT * where | ||
{ | ||
?physicalConstant | ||
a qudt:PhysicalConstant ; | ||
qudt:hasQuantityKind ?quantityKind ; | ||
qudt:quantityValue ?quantityValue ; | ||
rdfs:label ?label . | ||
OPTIONAL { | ||
?physicalConstant qudt:deprecated ?deprecated ; | ||
} | ||
} order by ?physicalConstant |
Oops, something went wrong.