[RDF] CVS Update
Jonas Liljegren
jonas@liljegren.org
23 Sep 2000 18:39:20 +0200
Will try to make an alfa release tomorrow.
The current code has an example program for adding persons, listing
persons and deleting persons. Each person has a first- and last name.
It seems to work fine. But there are many many things that are not yet
done.
The menu has a "Init db" option to register the Person class.
... What should I call the method for listing all the objects of a
spcific class? objects_list() is already used for listing the objects
for all arcs with a specific subj and pred. Maby call it
class_objects_list()? The idea was to always return "virtual models"
containing the result of selections, unless the mothod has the _list
prefix, in which case it should return a list reference instead.
There is another destinction between get_ find_ and create_
methods. The get_ methods will either find or create the node
depending on if it already exist or not. The create methods can
usualy generate a unique uri if non is specified.
You should be able to either use the object or the URI as a parameter
for method calls. That's not possible right now...
This is how all persons are listed:
[% persons = s.get_node("${NS_L}/Class#Person").objects_list %]
<table>
[% FOREACH person = persons %]
<tr>
<td>[% person.get_objects_list(s.get_node("${NS_L}/Property#first_name")).0.value %]
<td>[% person.get_objects_list(s.get_node("${NS_L}/Property#last_name")).0.value %]
</tr>
[% END %]
</table>
--
/ Jonas - http://jonas.liljegren.org/myself/en/index.html