Re: wildcard resource representation

Richard Cyganiak wrote:
> On 1 Aug 2007, at 02:57, Garret Wilson wrote:
>> That means that the rules applies to some identified resource. But is 
>> there any convention for identifying "any resource"? I see several 
>> options:
>
> That's why we have blank nodes.
>
> [] a eg:Rule;
>     eg:appliesTo [ a rdfs:Resource ];
>     .
>
> This says that the rule applies to "anything that has rdf:type 
> rdfs:Resource".
>
> Since, in fact, *everything* is of type rdfs:Resource, this is 
> redundant, and can be stated simply as
>
> [] a eg:Rule;
>     eg:appliesTo [];
>     .
>
> "This rule applies to anything."

Are you sure about that? This is interesting, because I would have 
thought that the above says, "This rule applies to a resource, but we 
don't know which one it is because it isn't identified."

>
> The nice thing about this is that you can do things like:
>
> [] a eg:Rule;
>     eg:appliesTo [ a foaf:Person; foaf:name "Garret" ];
>     .
>
> "This rule applies only to people called Garret."

Does it apply to all people named "Garret", or only to a single person 
(we don't know which) named "Garret"?

Try this:

<http://example/org/singers/BritneySpears> a foaf:Person;
    eg:hasChild [ a foaf:Person; foaf:name "Sean" ];
    .

Or just in case I got the N3 wrong, here it is in RDF/XML:

<foaf:Person rdf:about="http://example/org/singers/BritneySpears">
  <eg:hasChild>
    <foaf:Person foaf:name="Sean"/>
  </eg:hasChild>
</foaf:Person>

Does this mean that Britney Spears has as children all the people in the 
world named "Sean"? Or does it simply mean that Britney Spears has a 
single child; we don't have a URI identifier for this child, but we know 
his name is Sean? I would think the latter, and the implications of your 
first interpretation would probably disrupt a lot of ontologies.

>
>>    * If I assume that the resources are people with emails, I could use
>>      <mailto:*.*>. But that doesn't seem general enough---it's almost
>>      too much of a hack.
>
> I'm pretty sure this violates a couple of RFCs.

(I meant <mailto:*@*>, of course.) Yeah, I thought it might violate a 
couple of RFCs, too, but I couldn't find any. If you do, please let me know.

>
>>    * Maybe there's a wildcard URI out there---that is, perhaps
>>      <urn:uuid:1234...> is universally agreed upon as the wildcard
>>      resource. But I'm not holding my breath that this exists.
>
> That's a bit like asking "Is there a wildcard number around? Maybe 
> 1234 is universally adgreed upon as the wildcard number?"

Perhaps not numbers in general, but with numbers used as IDs it is 
certainly common practice. Think of a multi-threaded produce/consume 
list where you need to kill the consuming thread; it's common to send 
some predefined "kill" object to be consumed by the other thread. Also, 
if you have a method returning only positive integers, you might send -1 
to mean error (or to mean "all"). Using a number outside the valid range 
to mean other things is common. When numbers are used as IDs, you expect 
them to have unique properties anyway, so using one UUID to mean 
something different like "all things" shouldn't be a problem.

>>    * Maybe I could create my own wildcard URI: <eg:wildcard>. But that
>>      seems too specific to my ontology.
>
> "Maybe I could define my own wildcard number ..." ;-)

Some Java libraries do something similar sometimes by using 
Integer.MAX_INTEGER to mean "infinity".

Garret

Received on Wednesday, 1 August 2007 14:37:31 UTC