W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 1999

Re: RDF API 1.0 Draft / Triple vs. Statement?

From: Jonas Liljegren <jonas@paranormal.o.se>
Date: Sat, 18 Dec 1999 20:55:10 +0100
Message-ID: <385BE69E.FA0CCE78@paranormal.o.se>
To: Sergey Melnik <melnik@DB.Stanford.EDU>, RDF Intrest Group <www-rdf-interest@w3.org>

Sergey Melnik wrote:
> Jonas Liljegren wrote:
> > I experimented a bit with names in my RDF schema editor:
> >         http://paranormal.o.se/perl/proj/rdf/schema_editor/
> >
> > I soon changed the names to nodes and arcs, like:
> >         get_nodes_of_type( $type )
> >         get_node_by_uri( $uri )
> >         arc_exist( $uri )
> > etc...
> In order to avoid a combinatorial explosion of the number of methods to
> implement by an RDF model, the API [1] contains a single generic access
> method find(s, p, o). If a parameter is left null, it matches
> everything. Specific methods like the ones above can be provided as
> static methods on top of the generic one.

There isn't that many combinations for three objects.

I have a couple of methods from the resource class. Some ar used more
than others. Given the resource object $r, these are some of the
methods, actualy used in my prototype:

$r->get_arcs_by_subject( $pred )
$r->get_arcs_by_object( $pred )
$r->get_subjects( $pred )
$r->get_objects( $pred )
$r->has_property( $pred )

These are the most common. As you see, I never came to the situation
there I even wanted to use the other combinations. There should of
course exist a find method as the one you use. But I wouldn't want to
be without my shortcuts.

> > > Thus, a SchemaModel (which will extend the VirtualModel), could be asked
> > > for something like
> > >
> > >         boolean isProperty = sm.find(r, RDF.type, RDF.Property).size() > 0;
> >
> > That would not work. A resource could be an instance of property
> > without having the type Property. Take a look at this, for example:
> Sure it could. But if there is a "ground fact" (s, p, o) in the schema
> model, the information (p, RDF.type, RDF.Property) can be easily
> derived. A "virtual model" can deliver triples not explicitly contained
> as facts.

Should those triples be created in advance? Should they be created on
the fly during a find()? should those tiples be deleted after the

I would rather just make type a special case for find, defined in the
schema layer. Why create a virtual model?

/ Jonas  -  http://paranormal.o.se/perl/proj/rdf/schema_editor/
Received on Saturday, 18 December 1999 14:55:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:21 UTC