Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
add SPARQL example
  • Loading branch information
jsimonclark authored Aug 8, 2024
1 parent 8050b1b commit ffe74fe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,24 @@ This domain ontology supports the creation of Linked Data in any RDF-supported f
]
}
```
This data can be read into an RDF graph and queried using SPARQL. For example, the following SPARQL query retrieves the value and unit for the diameter of the electrode:
```sparql
SELECT ?diameterValue ?measurementUnit
WHERE {
?electrode a <{echo.Electrode.iri}> ;
<{echo.hasProperty.iri}> ?property .
?property a <{echo.Diameter.iri}> ;
<{echo.hasNumericalPart.iri}> ?numericalPart ;
<{echo.hasMeasurementUnit.iri}> ?measurementUnit .
?numericalPart <{echo.hasNumericalValue.iri}> ?diameterValue .
}
```
and returns the result:
```
2 https://w3id.org/emmo#CentiMetre
```
## Reference IRIs

The table below contains a quick cheat sheet of IRIs for accessing different files from the ontology
Expand Down

0 comments on commit ffe74fe

Please sign in to comment.