From ffe74fea485b80632155dd6ffc07b041168ef327 Mon Sep 17 00:00:00 2001 From: Simon Clark <52653938+jsimonclark@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:00:22 +0200 Subject: [PATCH] Update README.md add SPARQL example --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index f9d1456..a4d4c48 100644 --- a/README.md +++ b/README.md @@ -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