Re: RDF API

Hello Sergey et al.

First thanks to Sergey for having picked up SiRPAC where I left off
and keeping it in shape. My time goes currently updating the RDF::Parser
module [1].

I find the following proposal as the minimum Model API very interesting.
The question was whether something could be left out. Let me comment
the proposal below:

> public interface Model {
> 
>   public void setURI(String uri);
>   public String getURI(); // returns base URI
> 
>   public boolean contains(Triple t);
>   public void add(Triple t);
>   public void remove(Triple t);

We agree the data model consists of nodes and arcs. Now that there are
both add and remove methods for triples, I think they should exist
also for nodes as in the RADIX proposal [2].

>   public int size();

What is actually the size of the model? Is it the number of
nodes or arcs? This question becomes relevant as soon as we
run the set operations coming up below...

>   public Enumeration elements(); // enumeration of Triples
>   public Model find(Resource subject, Resource predicate, RDFNode
> object);
> 
>   public Model create(); // creates empty model of the same class
>   public Model duplicate();
> 
>   public Resource createResource(String str);
>   public Literal createLiteral(String str);
>   public Triple createTriple(Resource subject, Resource predicate,
> RDFnode object);
> 
>   public Model union(Model m);
>   public Model difference(Model m);
>   public Model intersection(Model m);

Indeed, the difference and intersection methods may result in nodes
only.

For example: remove a model of one triple (A,B,C) from model (A,D,E).
Is the result an empty model or one single node E?

Or: what is the intersection of (A,B,C) and (A,D,E)?

Regards,
Janne

[1] http://www.pro-solutions.com/download
[2] http://www.mailbase.ac.uk/lists/rdf-dev/1999-06/0002.html
--
Janne Saarela <js@pro-solutions.com>         Pro Solutions Ltd.
Phone/Finland: +358 (0)40 508 4767                   P.O.Box 34
Phone/France :  +33 (0)6.07.45.36.67         FIN-00131 Helsinki
Fax          : +358 (0)42 508 4767                      Finland

Received on Wednesday, 17 November 1999 10:23:25 UTC