Skip to content

Basic Fuseki Queries

pboisver edited this page Apr 19, 2017 · 4 revisions

Here's a simple query for returning an object:

Worked with https://dlhs-fedora-dev.med.umich.edu/fuseki/test/query on 04/10/2017

PREFIX ko: <http://dlhs-fedora-dev-a.umms.med.umich.edu:8080/fcrepo/rest/> 
select *
WHERE {?s ?p ?o .
?s <http://fedora.info/definitions/v4/repository#hasParent> ko:99999-fk44q85q7c

}

Here's a query that get's you objects with one or more parents

SELECT *
WHERE {
  {
    ?subject <http://fedora.info/definitions/v4/repository#hasParent> <http://10.0.2.2:48080/fcrepo/rest/> 
  }
  union
  {
    ?subject <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8080/fcrepo/rest/> 
  }
}

Clone this wiki locally