- From: Maxim Kolchin <kolchinmax@gmail.com>
- Date: Fri, 18 Dec 2015 16:46:48 +0300
- To: public-hydra@w3.org
Hi,
Is it possible to declare hydra:template value outside of
hydra:IriTemplate definition. In example, I want to define a template
for making SPARQL queries. Below is a snippet showing how I want to
represent it.
ApiDocumentation (accessible on /doc):
{
"@context": {
"hydra": "http://www.w3.org/ns/hydra/core#",
"sp": "http://spinrdf.org/sp#",
"ex": "http://example.com/"
},
"@id": "/doc",
"@type": "hydra:ApiDocumentation",
"hydra:entrypoint": "/api",
"hydra:supportedClass": [
{
"@id": "ex:EntryPoint",
"@type": "hydra:Class",
"hydra:supportedProperty": [
{
"hydra:property": {
"@id": "ex:SparqlEnpoint",
"@type": [ "hydra:TemplatedLink", "hydra:IriTemplate" ],
"hydra:mapping": [
{
"@type": "hydra:IriTemplateMapping",
"hydra:variable": "q",
"hydra:property": "sp:Select",
"hydra:required": true
}
],
"hydra:supportedOperation": [
{
"@type": "hydra:Operation",
"hydra:method": "GET",
"hydra:returns": "rdf:List"
}
]
}
}
]
}
]
}
EntryPoint (accessible on /api):
{
"@context": {
"hydra": "http://www.w3.org/ns/hydra/core#",
"ex": "http://example.com/"
},
"@id": "/api",
"@type": "ex:EntryPoint",
"ex:SparqlEndpoint": "/sparql?query={q}"
}
Thank you in advance!
Maxim
Received on Friday, 18 December 2015 13:47:57 UTC