W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2001

RE: rdfapi question

From: Balon, Corey <cbalon@grci.com>
Date: Tue, 8 May 2001 11:12:04 -0400
Message-ID: <BB6C143FF82AD411947600105A02DBE301697961@bambi.va.grci.com>
To: "'Chris Cera'" <cera@drexel.edu>
Cc: www-rdf-interest@w3.org
You're never guarenteed to even have to the superclass
declared before the subclass in the rdf. So, even if the
triples come out in order, you'll still have this problem

The two solutions off the top of my head:
1) do two passes. on pass one, create all the objects and keep
	a mapping from the object's URI to the object. In pass two
	do the relationships between the objects (looking up the objects
	in the map).
2) create the objects on the fly. If you have a class which is a subclass
	on an unknown class, create the parent class there, since you can
	assume it will come later. If you find it later, fill in the rest
	of its information


-----Original Message-----
From: Chris Cera [mailto:cera@drexel.edu]
Sent: Tuesday, May 08, 2001 10:46 AM
To: Brian McBride
Cc: Chris Cera; www-rdf-interest@w3.org
Subject: Re: rdfapi question


I'm creating a program to read a rdfs file and say I get the
predicate: http://www.w3.org/2000/01/rdf-schema#subClassOf, and I
want to create two local objects in another language that handle a
class relationship.  I basically want to create a Tree structure
of the class hiearchy defined in an rdf file.

First I want to create an rdfsclass object, then link it to its
superclass.  If the superclass wasn't already created, then I need
to create that.  My problem occurs in finding out if my local
superclass object has been created already, I then need to
traverse through all the class objects that I've created to see if
this one exists yet.  This process is to create a pointer to the 
superclass object.  I can't create a pointer in this programming
language if the other class doesn't exist yet, so searching of all
my class objects up until that point will need to be done to link
them properly.  

Since I'm trying to create a tree of the class hiearchy, I need the 
root nodes to come first, this way I can assume it exists and have 
no need to search another structure to see if I've created it
already.

Am I oblivious to something else or is this a common problem?  If
anyone has a proposed solution I would appreciate it if they could
please share it with me.  Thanks.
    

* Brian McBride <bwm@hplb.hpl.hp.com> [010508 14:23]:
> Hi Chris,
> 
> I'm afraid I don't have an answer for you, but I do have an interest in
RDF
> API's and understanding their requirements.  It would help my
understanding if
> you could explain why the order of the statements is significant in your
> application.
> 
> Brian
> 
> 
> Chris Cera wrote:
> > 
> > How can I get a model to dump the triples for an rdf schema in the
> > order they were declared in the file.  The files that I have
> > constructed have all declarations defined sequentially and I would
> > like to extract them in the same way.  Could somebody please email
> > me if you have dealt with this problem, or have a workaround that
> > is not too computationally expensive.  Thank you very much.
Received on Tuesday, 8 May 2001 11:12:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:49 GMT