[RDF] Transformation rules

Jonas Liljegren jonas@liljegren.org
06 Oct 2000 19:49:10 +0200


About implicit properties and translations

Given the path
  $person->contact->home->phone->value

> You shouldn't have to know exactly what the path to the information
> is.  This will hopefully give the same answer:
> 
>  $phone_str = $person->phone->value;
> 
> ... provided that the person only has one phone number.

This will probably depend on a lot of specified translation rules.
The inference will result in implicit (second order) properties.

  A --type--> Person
  A --contact--> B
  B --home--> C
  C --phone--> D
  D --value--> "0012345"

      ==>

  A --phone--> D
  D --type--> Home contact phone number


The same goes for the name:

  A --name--> E
  E --first--> F
  F --value--> 'Jonas'
  E --last--> G
  G --value--> 'Liljegren'

      ==>

  E --value--> H
  H --value--> 'Jonas Liljegren'
  H --type--> Full Name
  E --value--> I
  I --value--> 'Jonas'
  I --type--> First Name

A litral resource always has a value property.  That nice paradox
let's you separate multiple values by their metadata.  Since the
method value() is used to (recursively if necessery) retrieve the
contained data, we would have to use another method, value_li(), to
get the actual resource.  $res->value_li() will most of the time point
back to $res, allowing you to do strange things like
$literal->value_li->value_li->value_li->value.



How to actualy specify the transformation rules is beyond the scope
for Wraf 1.0.  This is just some preliminary plans for 2.0


-- 
/ Jonas  -  http://jonas.liljegren.org/myself/en/index.html