Re: Help on RDF model design

> 
> On Fri, May 31, 2002 at 03:31:15PM -0600, Uche Ogbuji wrote:
> >I do obliquely address this very question in the articles above.  I tend to 
> >prefer to point to a resource, which can then be described using vCard, foaf, 
> >etc.  It can be a blank node (anonymous resource) or one could use a mailbox 
> >to ID it.
> 
> But is there a way to future-proof the system?  Say there isn't an
> identifying URI for authors, so I put 'dc:creator="Arthur Conan
> Doyle"' all over the place.  Six months from now, someone creates
> Biographical RDF and defines URIs for historical figures, so Conan
> Doyle can now be referenced by a URI.  Should software look at
> dc:creator and try to guess if its value looks like a URI, or is the
> only choice to issue version 2.0 of the model and try to upgrade all
> the 1.0 RDF files?

That's where blank or anonymous nodes come in.  In my article, I use something 
like:

<Issue rdf:about='&rit;i2001030423'>
  <dc:creator rdf:resource='mailto:Alexandre.Fayolle@logilab.fr'/>
</Issue>

<rdf:Description rdf:about='mailto:Alexandre.Fayolle@logilab.fr'>
  <foaf:name>Alexandre Fayolle</foaf:name>
</rdf:Description>

I could just as well have used

<Issue rdf:about='&rit;i2001030423'>
  <dc:creator rdf:parseType='Resource'>
    <foaf:name>Alexandre Fayolle</foaf:name>
    <foaf:mbox rdf:resource='mailto:Alexandre.Fayolle@logilab.fr'/>
  </dc:creator>
</Issue>

Which makes the creator object anonymous and thus, I think, avoids the problem 
you bring up.  Wehen someone comes along and creates a URI for all, there are 
many ways to deal with that.  Either just add a foo:id statement to each 
creator node pointing to the assigned URI, or, more cleanly, create new nodes 
with the new URIs, and establish a "same-as" relationship of some sort between 
that and the equivalent legacy blank node.

Clear as mud?  :-)


> >  <rdf:Description rdf:about="http://..."
> >    rev:date="1999-04-14" rev:author="A.M. Kuchling"
> >    rev:item="book1" rev:item="book2"/>
> 
> That's legal RDF?  (If rewritten to avoid the duplicate XML attribute,
> of course.)

Oops.  Of course you need to use child elements instead of attributes then.

It is perfectly legal RDF.


> Why were Bags introduced at all, then?

You'll have to ask those who introduced them  :-).  Seriously.  It seemed a 
good idea to me too, at first\.  You quickly realize that they is no way for 
one size of container paradigm to fit all, and that in any case, RDF MS 1.0 
gives us a pretty shaky container paradigm.


> Sequences
> obviously are needed in order to preserve order,

Nope.  This is easily handled using blank nodes:


<rdf:Description rdf:about="http://..." rev:date="1999-04-14" rev:author="A.M. 
Kuchling">
  <rev:item rdf:parseType="Resource">
    <rdf:value rdf:resource="foo:book1"/>
    <rev:index>1</rev:index>
  </rev:item>
  <rev:item rdf:parseType="Resource">
    <rdf:value rdf:resource="foo:book2"/>
    <rev:index>2</rev:index>
  </rev:item>
</rdf:Description>

No sequences in sight.

To give a further example that might be of interst to you: I wrote an RDF 
vocab for XBEL, and an XBEL -> RDF stylesheet a couple of months ago as part 
of BookerT, the bookmark manager demo in 4Suite.  I use blank nodes and 
indices rather than sequences much as above.  A sample file is attached.


> but Bags don't seem
> to add anything if property values can be specified multiple times.

Well, you can make a statement about a bag itself.  For a quick and dirty 
example:

"Ada and Obi wrote 'Tropic Nights'"

"Ada and Obi wrote 'Tropic Nights'".  The Authors's effort on that book is 
rated as A+.

The latter statement in old RDF M&S 1.0 thinking might be represented using a 
bag of autors from the book, and then this bag itself is the subject of a 
statement giving the rating.

Of course, you can do this just as well using those handy old blank nodes.

Received on Friday, 31 May 2002 19:19:41 UTC