Re: Networth example with ldp:contains

On 13 Jan 2014, at 18:39, Roger Menday <roger.menday@uk.fujitsu.com> wrote:

> 
> hello, 
> 
> Following up on the long call this afternoon ...
> 
> In the following two examples, where/why is it necessary to use client preference for materializing ldp:contains ? 
> 
> 1. 'DirectContainer' case (such as a Networth in the spec): 
> 
> <>
>   a o:NetWorth;
>   o:netWorthOf <http://example.org/users/JohnZSmith>;
>   o:asset 
>      <assetContainer/a1>,
>      <assetContainer/a2>;
>   o:liability 
>      <liabilityContainer/l1>,
>      <liabilityContainer/l2>,
>      <liabilityContainer/l3>.
> 
> <assetContainer/>
>   a ldp:DirectContainer;
>   dcterms:title "The assets of JohnZSmith";
>   ldp:containerResource <>;
>   ldp:containsRelation o:asset.
> 
> <liabilityContainer/>
>   a ldp:DirectContainer;
>   dcterms:title "The liabilities of JohnZSmith";
>   ldp:containerResource <>;
>   ldp:containsRelation o:liability.
> 
> POSTing to  the LDPCs (<assetContainer/>, <liabilityContainer/>) creates new Assets and Liabilities. 
> The response has the Location: of these newly created resources.
> If I GET the LDPR, I see domain-specific <asset> and <liabilities> triples.
> If I GET the LDPC, I see ldp:contains triples. 

yes, I think that is the best way to do things: Have the LDPC list 
its ldp:contains relations, and have other resources ( eg the Networth 
one shown above) contain the "membership triples". 

The advantage here is that there is no duplication and each resource
does what it is meant for. Your Networth resource above lists the 
Networth facts, and the LDPCs <assetContainer/> and <liabilityContainer/>
list the ldp:contains relations. A client that did not deal with LDP would
probably not end up in <assetContainer/> or <liabilityContainer/>, but
just follow the domain specific o: ontology .


> 
> 
> 2. 'SimpleContainer' case:
> 
> <>
>   a o:Box, ldp:SimpleContainer;
>   o:boxOwner <http://example.org/users/JohnZSmith>;
>   ldp:contains
>      <item/m1>,
>      <item/m2>;
> 
> In this case, the LDPR and LDPC are the same thing, and by the ldp:contains triples are found when GETting. 
> There isn't a duplication issue. 

exactly.

:-)

> 
> Roger 
> 
> 
> 

Social Web Architect
http://bblfish.net/

Received on Tuesday, 14 January 2014 12:39:40 UTC