[RDF] The model of dynamic properties

Jonas Liljegren jonas@rit.se
23 Feb 2001 23:26:04 +0100


The latest bug in Wraf is the reason for this post.

It manifests as an undefined value of LS:level in the Person Demo.
LS:level is a dynamic property.  It was previously a method provided
by the Base interface:

http://uxn.nu/wraf/RDF-Service/doc/html/api/RDF/Service/Interface/Base/V01.html#level()


The problem occures during the schema initialization (triggerd by a
link in the Demo). It defines the Person to be a class:

sub do_initiate_db
{
    my $model = $s->get_model(NS_LD.'#M1');

    $model->get(NS_LD.'/Class#Person')->set( [NS_RDFS.'Class'] );
    $model->get(NS_LD.'/Property#first_name')->set( [NS_RDF.'Property'] );
    $model->get(NS_LD.'/Property#last_name')->set( [NS_RDF.'Property'] );

    return "DB initiated";
}


The set() method completely defines the resource.  If the resource
currently has other properties, they are removed.  but properties
defined in other models should not be removed.


During the process of set(), the Person resource is initialized (ie,
set up with the properties returned from the interfaces).  The
LS:level property is initialized to '1'.

But this propery is shortly after removed, because it's not specified
by set().  (The Person set() above only sets the type to RDFS:Class.)
This is allowed since the statement is created in the working model
(ie, LD:#M1).



Of, course, you should never be allowed to remove dynamic
properties.  They should only be modified by their dependencies.





But now for the 'question'
..........................


This raised for me the question of what the model for the dynamic
properties should be.  Who is stating the statement?  It's a
combination of:

  - The model of the program code
  - The model of all data used as input

My previous thought, if I remember, was to create a custom model for
the specific combination, and put the data about the involved models
as metadata for that model.

I think that the agent property of the model will be used as a base
for trust.  For dynamic properties, a group could be used as agent.
The first time the group is encounterd, we could check each agent.
But then we could trust the group.  That would mean that the agent
would be a bag of agents.

Should every dynamic property be placed in a unique model?  Or should
we group properties that has identical metadata, maby within the same
session?  But the session doesn't have a clear connection to the
dynamic properties, other than maby as the model for a part of the
source data.  Ah, thats it!  A new session results in a new source
model and a new dynamic model.

Thank you for your time! ;-)

-- 
/ Jonas Liljegren

The Wraf project http://www.uxn.nu/wraf/
Sponsored by http://www.rit.se/