Skip to content

Commit

Permalink
Property query proposal. See #6.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioggstream committed Dec 15, 2024
1 parent 5f5b21e commit 104fc45
Showing 1 changed file with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,44 @@ export function useRDFPropertyResolver(fieldUri: string | undefined): AsyncState
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT * WHERE {
SELECT DISTINCT
?fieldUri
?domain
?class
?comment
?controlledVocabulary
WHERE {
VALUES ?fieldUri { <${fieldUri}> }
VALUES ?_propertyClass { rdf:Property owl:DatatypeProperty owl:FunctionalProperty }
?fieldUri
rdfs:domain ?domain ;
rdfs:range ?class
a ?_propertyClass
.
OPTIONAL {
?fieldUri
rdfs:comment ?comment
rdfs:domain ?domain ;
rdfs:range ?class
.
FILTER(lang(?comment) = 'en')
OPTIONAL {
?class
<https://w3id.org/italia/onto/l0/controlledVocabulary> ?controlledVocabulary
.
}
}
OPTIONAL {
?class
<https://w3id.org/italia/onto/l0/controlledVocabulary> ?controlledVocabulary
?fieldUri
rdfs:comment ?comment
.
FILTER(lang(?comment) = 'en')
}
}
`,
{ skip: !fieldUri },
Expand Down

0 comments on commit 104fc45

Please sign in to comment.