Re: RDF API

I have been doing some RDF related development and making use of the GINF
version of SiRPAC that Sergey released recently. I would like to thank
Sergey, Dan , Jonas and others for the great work they have been doing and
contributing. I have a few comments on general API principles for RDF.

You can see there being three general styles of XML/RDF processing. In the
XML space they correspond to stream  processing(SAX),  infoset
processing(DOM) and the query/transformation  processing (XSLT). What would
the analogous processing styles be for RDF? I think it is important to
leverage the lessons learned in the XML API world for RDF.

org.w3c.rdf.stream
================
Sergey has added stream processing to SiRPAC which is GREAT!  The downside
I see to the stream processing API of SiRPAC is that it is a little high
level. It already instantiates specific classes and passes them to the
assert callback. I would prefer that there be a lower level callback
interface ala SAX that passed back the strings rather than an encapsulation
in org.w3c.rdf.Resource and friends.  Something like:

void assertResourceSubject(String subject, String predicate, String
subject);
void assertLiteralSubject(String subject, String predicate, String subject,
String lang);

If you do want to create the resources directly then I would want to pass
the parser a factory for creating the resources/literals.  An example of
why you would want this is to control duplicate resources. Mozilla enforces
a single  resource instance per address space. The current SiRPAC creates a
new resource instance every time it sees a URI. If you mediated resource
wrapper creation via a factory you could provide either policy, although I
would tend to want to have a single resource wrapper per address space.

org.w3c.rdf.infoset
================
The Infoset level corresponds to current wrapper objects of SiRPAC plus the
ones that most of the RDF implementations provide. Here I would want
something like what Mozilla supports with datasources (primitive and
composite). I like the idea from Ron Daniel's RADIX that a model should
itself be a resource that can appear as a node in another model.

Jonas (and Mozilla) both have a nice level of indirection between the
Infoset API and the infoset implementation . Mozilla's support for
notification would also be very nice. In general, Mozilla has a mature but
dense architecture and API for dealing with RDF . I would hope that the
RDF-IG API would be able to support all of the capabilities of the Mozilla
API and be compatable where appropriate.

org.w3c.rdf.query
===============

Don't have anything to say here...

Cordially from Corvallis,

Gabe Beged-Dov
http://www.jfinity.com/gabe

Received on Sunday, 14 November 1999 23:15:49 UTC