Re: AW: Fresnel instance and class lenses and lens specifity function

From: Emmanuel Pietriga <Emmanuel.Pietriga_at_lri.fr>
Date: Tue, 28 Jun 2005 15:40:44 +0200

Chris Bizer wrote:

>>Remember: in the end, what the selector specifies as a domain is a set
>>of instances. It is never a (set of) classe(s). When we consider classes
>>and write class-level selectors, we are actually talking about the
>>*instances* of those classes. Do we agree on that?
>>
>
>
> Yes, total agreement. I was just wondering how the browser knows that it
> should display for "ex:aClass"^^fresnel:selector either the RDF-S definition
> of the class or all instances of the class?

Ah! Now I understand your problem better. At least I think I do.



> As I understand it this FSL would return a node set containing one node the
> ex:aClass node.

No. If you have lensDomain "ex:aClass"^^fresnel:selector, this means
"the domain of this lens is all resources in the RDF model that have an
rdf:type ex:aClass".

If what you want as a domain is the single resource ex:aClass (i.e., the
class itself), then you use "*[uri(.)=ex:aClass]"^^fresnel:selector.



  How would the browser know what to do with this node without
> falling back to checking if it is of type rdf:Class or not?

That's the point. It does not have to do anything with it. Simple
selectors have to be interpreted by the browser, and this interpretation
depends on whether they are the object of an instnaceLensDomain
statement or a classLensDomain statement. But contrary to simple
selectors, FSL expressions contain all the information inside themselves
to be evaluated against the source RDF model. There is no ambiguity on
how to interpret them (see the above example).



>>I clearly see the meaning of the following:
>>
>># lens applies to single resource whose URI is foo:bar
>>:lens fresnel:instanceLensDomain foo:bar
>>
>># lens applies to resources (instances) of class foo:bar
>>:lens fresnel:classLensDomain foo:bar
>>
>
>
> Yes, and a lens applies to a set of resources which are not nessecary a
> class.
>
> :lens fresnel:instanceLensDomain "*[ex:age/text() > 3 ]"^^fresnel:selector
>
> This could apply to person and dog instances.

Yes indeed. No problem with that.




>>Translated to FSL selectors, we would have respectively:
>>
>># lens applies to single resource foo:bar
>>:lens fresnel:instanceLensDomain "*[uri(.)='foo:bar']"^^fresnel:selector
>>
>># lens applies to resources (instances) of class http://example.org
>>:lens fresnel:instanceLensDomain "foo:bar"^^fresnel:selector
>>
>>
>>And that is just fine. Now, what would the following mean? That is what
>>I do not understand.
>>
>>:lens fresnel:classLensDomain "*[uri(.)='foo:bar']"^^fresnel:selector
>>
>
>
> Foo:bar would be required to be a class and all instances of this class
> would be displayed.

This is redundant with the above example:

:lens fresnel:instanceLensDomain "foo:bar"^^fresnel:selector

and this redundancy is confusing.




>>:lens fresnel:classLensDomain "foo:bar"^^fresnel:selector
>
>
> The same as above, if I understand FSL right.

No. This is inconsistent. You can't have to fundamentally different FSL
expressions mean the same thing.

Besides, "foo:bar"^^fresnel:selector means "all resources that have an
rdf:type foo:bar". Considering that, the domain described by this last
example is "all resources that are instances of resources that have an
rdf:type foo:bar" (and which are very unlikely to be rdfs:Class
definitions).






>>>We also might want to diplay ontolgies (meaning the class as a resource
>>>not its instances).
>>
>>Yes indeed, but I do not see what would be the problem and why you would
>>need to have both classLensDomain and instanceLensDomain when using FSL
>>expressions as selectors. With simple RDF naming you would have:
>>
>># domain is the single resource foo:BarClass, which happens to be a
>>class, considered here as an instance of class rdfs:Class.
>>:lens fresnel:instanceLensDomain foo:BarClass
>>
>>With FSL, you would have:
>>:lens fresnel:instanceLensDomain
>>"*[uri(.)='foo:BarClass']"^^fresnel:selector
>>
>>You could even make sure that foo:BarClass is actually typed as an
>>rdfs:Class by writing:
>>:lens fresnel:instanceLensDomain
>>"rdfs:Class[uri(.)='foo:BarClass']"^^fresnel:selector
>>
>
>
> Yes. And
>
> :lens fresnel:classLensDomain "rdfs:Class[uri(.)='foo:BarClass']"^^fresnel:selector
>
>
> Would display the instances of the class.
>
> Right? ;-)
>
> Chris

The FSL expression returns "all resources of rdf:type rdfs:Class whose
URI is 'foo:BarClass'". So the domain would be "all instances of classes
whose URI is foo:BarClass". That would indeed display the instances of
the class.

As would the following:
:lens fresnel:instanceLensDomain "foo:BarClass"^^fresnel:selector

Which is slightly less complicated :-)



To summarize, I still do not see any reason for having classLensDomain
and instanceLensDomain when dealing with FSL and SPARQL expressions.

Reading the current version of the manual, a terminology consistency
issue arose, but before discussing it I want to close this discussion.
Do you still have concerns/problems/... about this?

-- 
Emmanuel Pietriga
INRIA Futurs - Projet In Situ    tel : +33 1 69 15 34 66
Bat 490, Université Paris-Sud    fax : +33 1 69 15 65 86
91405 ORSAY Cedex FRANCE     http://www.lri.fr/~pietriga
Received on Tue Jun 28 2005 - 13:38:14 EDT

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:40:51 EDT