This commit is contained in:
Roger Rutishauser 2024-10-03 19:45:41 +02:00
parent 873a9f9dd2
commit ea82d96615

View File

@ -10,7 +10,7 @@ include_toc: true
#### Finde alle Classes
```
``` turtle
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?type
WHERE {
@ -20,7 +20,7 @@ WHERE {
#### Finde alle Classes mit bestimmten Prefix
```
``` turtle
PREFIX bc: <http://base22.com/ont/bc#>
SELECT DISTINCT ?type
WHERE {
@ -31,14 +31,14 @@ WHERE {
#### Select all Triples
```
``` turtle
select ?s ?p ?o
where {?s ?p ?o}
```
#### Select Triples with rdf:type as ?p
```
``` turtle
select ?s ?p ?o
where {
?s rdf:type ?o .
@ -47,7 +47,7 @@ where {
#### Select Triples with rdf:type and multiple ?o
```
``` turtle
select ?s ?p ?o
where {
values ?o { <http://fedora.info/definitions/v4/repository#ArchivalGroup> <http://www.loc.gov/premis/rdf/v3/File> }
@ -57,7 +57,7 @@ where {
#### Count
```
``` turtle
prefix rico: <https://www.ica.org/standards/RiC/ontology#>
SELECT (count (?c) as ?cCount)
WHERE {
@ -69,7 +69,7 @@ WHERE {
#### Select resource with needle in 2nd level of haystack
```
``` turtle
prefix rico: <https://www.ica.org/standards/RiC/ontology#>
SELECT ?s
WHERE {
@ -83,7 +83,7 @@ WHERE {
#### Events zwischen Start- und Enddatum
```
``` turtle
# Events zwischen Start- und Enddatum
# ***********************************
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@ -143,7 +143,7 @@ order by desc(?dateend)
### RANDOM select example 1
```
``` turtle
# select all unitdate values of any resource
prefix rico: <https://www.ica.org/standards/RiC/ontology#>
@ -169,7 +169,7 @@ ORDER BY ASC (?resource)
### Delete Triples where ?s ?p ?o contains string
```
``` turtle
DELETE
{ ?s ?p ?o }
WHERE