- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Mon, 17 Feb 2014 21:33:47 +0100
- To: <public-hydra@w3.org>
On Monday, February 17, 2014 7:53 PM, Ruben Verborgh wrote: > >> Basically, we have the choice between: > >> a) the subjects are the elements of the collection ("Actor") > >> b) the subjects are "related" to the elements of the collection > >> ("Movie starring actor") Clearly, a) is most strictly defined; > >> and b) is so loosely defined that we basically cannot infer > anything. [...] > >> This is why I'm strongly in favor of a). > > > > How would you, e.g., realize a full-text query using a)? > > hydra:freetextQuery. What does that mean? Map a IRI template variable to hydra:freetextQuery? No subject would have that property so a) wouldn't work, but probably you mean something else anyway. > or > > [ a hydra:SupportedProperty; hydra:property foaf:name; hydra:valueType > hydra:freetextQuery ]. And if it were to look at all properties and not just foaf:name? > > from a resource representation (aka document) POV it does > > make a lot of sense, IMO anyway. You query the representations based on > > property-value pairs and return the URLs that can be used to retrieve those > > representations. You look at it more from an RDF point of view in which you > > just look at the resources themselves in an (I would argue) abstract manner. > > Both have value depending on what you are trying to achieve and as you say > > it is possible to have both. > > I'm not sure I fully see the two different viewpoints. > Could you perhaps elaborate on what they are (when you have time)? Maybe showing it based on the movie example suffices. Assume we have two actors, Hanks and Hilton :-) Both would be referenced from a Hydra collection: <> hydra:member </hanks> , </hilton> . If you go and look up /hanks you would get something like </hanks> foaf:name "Tom Hanks" ; ex:movies </forrest-gump> . </forrest-gump> ex:blockbuster true . Dereferencing /hilton yields </hilton> foaf:name "Paris Hilton" ; ex:movies </house-of-wax> . </house-of-wax> ex:blockbuster false . Please note that Hilton's blockbuster isn't included here :-) Now we could go back to the collection and define <> hydra:search [ hydra:template "?blockbuster={blockbuster}" ; hydra:mapping [ hydra:variable "blockbuster" ; hydra:property ex:blockbuster ; ] ] The result of dereferencing /?blockbuster=true could now be defined to be (document POV) </?blockbuster=true> hydra:member </hanks> . Because if you'd go and dereference /hanks you would find a property-value pair ex:blockbuster true (even though it's subject isn't /hanks). That's similar to how Elasticsearch would, e.g., by default look at all "blockbuster" JSON properties and not just on the ones of the top-level object. I find that to be quite useful but I also see how you probably would like to restrict it in certain scenarios as you suggested. Does this clarify it? Does it make any sense to you? -- Markus Lanthaler @markuslanthaler
Received on Monday, 17 February 2014 20:34:19 UTC