earthcubearchitecture-project418 / services

RPC services package for Project 418
0 stars 2 forks source link

Query for details on a resource #4

Closed fils closed 6 years ago

fils commented 6 years ago

Can this be done on an array of reosurces?

prefix schema: <http://schema.org/>
SELECT ?val ?desc ?pubname ?puburl
WHERE
{
  BIND(<http://opencoredata.org/id/dataset/bcd15975-680c-47db-a062-ac0bb6e66816> AS ?ID)
  ?ID schema:publisher ?pub .
  ?pub schema:name ?pubname .
  ?pub schema:url ?puburl .
  ?ID schema:variableMeasured ?res  .
  ?res a schema:PropertyValue .
  ?res schema:value ?val   .
  ?res schema:description ?desc     
} 
ashepherd commented 6 years ago

I'll do up a BIND VALUES example here

ashepherd commented 6 years ago

prefix schema: http://schema.org/ SELECT ?val ?desc ?pubname ?puburl WHERE { VALUES ?ID { https://www.bco-dmo.org/dataset/3300 http://opencoredata.org/id/dataset/bcd15975-680c-47db-a062-ac0bb6e66816 } ?ID schema:variableMeasured ?res . OPTIONAL { ?res a schema:PropertyValue . ?res schema:value ?val . ?res schema:description ?desc
} OPTIONAL { ?ID schema:publisher ?pub . OPTIONAL { ?pub schema:name ?pubname } OPTIONAL { ?pub schema:url ?puburl } } }