- From: Benjamin Adrian <benjamin.adrian@dfki.de>
- Date: Thu, 12 May 2011 13:05:14 +0200
- To: Niklas Lindström <lindstream@gmail.com>, RDFa WG <public-rdfa-wg@w3.org>
Hi Niklas
Thanks for your comments.
> A question though. Does `set` replace an existing triple with the same
> subject and predicate? In most RDF API:s write operations are
> primarily `add` and `remove`. Sometimes a `set`, or more explicitly
> `replace` exist to do what `set` here is doing.
You are right. This is underspecified. I think we should follow your
proposal and add these methods:
Projection.add (property, value)
Projection.remove (property, optional value)
> 
> Also, how does one create a relation -- i.e. give a URI reference as
> object? A string that looks like a URI won't do, since string
> *literals* (neither a plain nor of type xsd:anyURI) are not the same
> as a reference. (That's basic RDF of course, but it might not be
> intuitive for a newcomer.)
The basic idea underlying Projections is that they just contain simple
and untyped string values. So, yes you would create a relations like
foaf:knows by calling:
ben.add("foaf:knows", "http://purl.org/NET/dust/foaf#self");
You can then create a projection by calling:
rdf.getProjection("http://purl.org/NET/dust/foaf#self")
> 
> (The last issue should reasonably be aligned with an eventual addition
> of the suggested "getRel(s)/getRev(s)" methods on Projection, with the
> difference that a new `addRel` probably should accept as object either
> a string representing the URI reference or another Projection.)
I agree partially, we might overload the method Projection.add
(property, value) to let value be either a projection, a list of
projections, a string, or a list of strings. This keeps the API as small
as possible.
> 
> (I really should find the time to implement how I think this should
> look using Nathan's new rdfi.js...)
Yes, I know :) . It is also written on a postIt on my monitor.
Best regards,
Ben
-- 
__________________________________________
Benjamin Adrian
Email : benjamin.adrian@dfki.de
WWW : http://www.dfki.uni-kl.de/~adrian/
Tel.: +49631 20575 1450
Twitter: http://twitter.com/BenBanBun
Skype: benbanbun
__________________________________________
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschäftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
__________________________________________
Received on Thursday, 12 May 2011 11:08:08 UTC