ACTION-120 (Part 2) Added concepts of containers (basic, direct and indirect) to LDPC intro
authorsspeiche
Tue, 04 Feb 2014 20:30:48 -0500
changeset 452 c4b538b7e57f
parent 451 f68e4a59fba1
child 453 a70c321daf12
ACTION-120 (Part 2) Added concepts of containers (basic, direct and indirect) to LDPC intro
ldp.html
--- a/ldp.html	Tue Feb 04 17:11:33 2014 -0500
+++ b/ldp.html	Tue Feb 04 20:30:48 2014 -0500
@@ -435,6 +435,7 @@
 		format [[TURTLE]].</p>
 	<p>Commonly used namespace prefixes:</p>
 	<pre style="word-wrap: break-word; white-space: pre-wrap;">	@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
+	@prefix foaf:     &lt;http://xmlns.com/foaf/0.1/&gt;.
 	@prefix rdf:     &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;.
 	@prefix rdfs:    &lt;http://www.w3.org/2000/01/rdf-schema#&gt;.
 	@prefix ldp:     &lt;http://www.w3.org/ns/ldp#&gt;.
@@ -1027,11 +1028,6 @@
 <section id="ldpc">
 <h1>Linked Data Platform Containers</h1>
 
-<div class="ldp-issue-pending">
-This section is current "under construction" while editors are trying to thoroughly complete edits for 
-<a href="https://www.w3.org/2012/ldp/track/actions/120">ACTION-120</a>.
-</div>
-
 <section class="informative" id="ldpc-informative">		
 <h2>Informative</h2>
 	<p>Many HTTP applications and sites have organizing
@@ -1099,12 +1095,13 @@
     </figure>
 
 	<p>This example is very straightforward - the
-			membership predicate is <code>rdfs:member</code> and the other
-			consistent membership value is the container's
-			URI, occurring in the subject position of the triples. 
-			A POST to this container will create a new resource
-			and add it to the list of members by adding a new membership triple
-			to the container.</p>
+	membership predicate is <code>rdfs:member</code> and the other
+	consistent membership value is the container's
+	URI, occurring in the subject position of the triples. 
+	A POST to this container will create a new resource
+	and add it to the list of members by adding a new membership triple
+	to the container.  This type of container is also refered to as
+	<a title="Linked Data Platform Basic Container">LDP Basic Container</a>.</p>
 
 	<p>Sometimes it is useful to use a subject
 	other than the container itself as the consistent membership value, and/or to use
@@ -1155,18 +1152,24 @@
       &lt;liabilityContainer/l3&gt;.
 
 &lt;assetContainer/&gt;
-   a ldp:Container;
+   a ldp:Container, ldp:DirectContainer;
    dcterms:title "The assets of JohnZSmith";
    ldp:containerResource &lt;&gt;;
    ldp:containsRelation o:asset;
-   ldp:insertedContentRelation ldp:MemberSubject.
+   ldp:insertedContentRelation ldp:MemberSubject;
+   ldp:contains &lt;assetContainer/a1&gt;,
+      &lt;assetContainer/a2&gt;.
 
 &lt;liabilityContainer/&gt;
-   a ldp:Container;
+   a ldp:Container, ldp:DirectContainer;
    dcterms:title "The liabilities of JohnZSmith";
    ldp:containerResource &lt;&gt;;
    ldp:containsRelation o:liability;
-   ldp:insertedContentRelation ldp:MemberSubject.
+   ldp:insertedContentRelation ldp:MemberSubject;
+   ldp:contains
+      &lt;liabilityContainer/l1&gt;,
+      &lt;liabilityContainer/l2&gt;,
+      &lt;liabilityContainer/l3&gt;..
 </pre>
 
 	<p>The essential structure of the container is
@@ -1175,7 +1178,7 @@
 	membership predicates are <code>o:asset</code> and <code>o:liability</code> – predicates
 	from the domain model. A POST of an asset representation to the asset container will create a new
 	asset and add it to the list of	members by adding a new membership triple
-	to the container. You might wonder why
+	to the resource and containment triple to the container. You might wonder why
 	<code>http://example.org/netWorth/nw1</code> isn't made a container itself and POST
 	the new asset directly there. That would be a fine design if <code>http://example.org/netWorth/nw1</code>
 	had only assets, but if it has separate predicates for assets and liabilities,
@@ -1184,6 +1187,11 @@
 	and <code>http://example.org/netWorth/nw1/liabilityContainer/</code> container
 	resources allows both assets and liabilities to be created.
 	</p>
+	<p>This type of container is refered to as an <a title="Linked Data Platform Direct Container">LDP Direct Container</a>.  An
+	 <a title="Linked Data Platform Basic Container">LDP Basic Container</a> is a constrained form of 
+	 <a title="Linked Data Platform Direct Container">LDP Direct Container</a> where the 
+	 membership predicate is <code>ldp:contains</code> and the container resource is the container itself.
+	</p>
 
 <pre class="example" id="ldpc-ex-membership-subj"># The following is the representation of
 #   http://example.org/netWorth/nw1/assetContainer/
@@ -1193,7 +1201,7 @@
 @prefix o: &lt;http://example.org/ontology/&gt;.
 
 &lt;&gt;
-   a ldp:Container;
+   a ldp:Container, ldp:DirectContainer;
    ldp:containerResource &lt;http://example.org/netWorth/nw1&gt;;
    ldp:containsRelation o:asset;
    ldp:insertedContentRelation ldp:MemberSubject.
@@ -1203,38 +1211,81 @@
    o:asset &lt;a1&gt;, &lt;a2&gt;.</pre>
 
 	<p>In this example, clients cannot correctly guess
-			at the membership triples, so the example includes this information in
-			triples whose subject is the LDPC resource itself.
+	at the membership triples, so the example includes this information in
+	triples whose subject is the LDPC resource itself.
 	</p>
+	
+	<p>Additionally, we could extend our net worth example to include a container for
+	advisors (people) that have managed the assets and liabilities.  We have decided
+	to identify these advisors with URLs that contain a fragment (hash) to represent
+	these real-world resources, not the documents that decribe them.</p>
+	
+<pre class="example" id="ldpc-ex-membership-full"># The following is an elaborated representation of
+#   http://example.org/netWorth/nw1/
+# Adding o:advisor but eaving off o:asset and o:liability for brevity.
+<!-- @base is here only so it's easier to paste into validators for checking -->
+# @base &lt;http://example.org/netWorth/nw1/&gt;
+@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
+@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
+@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt;.
+@prefix o: &lt;http://example.org/ontology/&gt;.
+&lt;&gt;
+   a o:NetWorth;
+   o:netWorthOf &lt;http://example.org/users/JohnZSmith&gt;;
+   o:advisor
+   	 &lt;advisorContainer/bob#me&gt;,
+   	 &lt;advisorContainer/marsha#me&gt;.
+   	 
+&lt;advisorContainer/&gt;
+   a ldp:Container, ldp:IndirectContainer;
+   dcterms:title "The assets of JohnZSmith";
+   ldp:containerResource &lt;&gt;;
+   ldp:containsRelation o:asset;
+   ldp:insertedContentRelation foaf:primaryTopic;
+   ldp:contains
+   	 &lt;advisorContainer/bob&gt;,
+   	 &lt;advisorContainer/marsha&gt;.
+</pre>	
+	
+	<p>To handle this type of indirection, the triple with predicate of <code>ldp:insertedContentRelation</code> and object of 
+	<code>foaf:primaryTopic</code> informs clients that when POSTing to this container, they will include a triple of the
+	form (LDPR, foaf:primaryTopic, LDPR#me) to inform the server which URI to use for the membership triple.</p>
+	
+	<p>This type of container is also refered to as an <a title="Linked Data Platform Indirect Container">LDP Indirect Container</a>. 
+	It is similar to a an <a title="Linked Data Platform Direct Container">LDP Direct Container</a> 
+	but it allows an indirection with the ability to list as member a resource, such as a URI representing a real-world object,
+	that is different from the resource that is created.</p>
 
-
-<div class="ldp-issue-pending">
-<p>Still editing for ACTION-120 -- table work in progress, fate unknown</p>
-
-	<p>Talking about 3 kinds of containers: Basic, Direct and Indirect.</p>
+	<p><a href="#fig-ldpc-types"></a> illustrates the 3 types: Basic, Direct and Indirect, along
+	with their relationship to types of LDPRs.  It is not expected that there will be a container
+	with a <code>rdf:type</code> solely of <code>ldp:Container</code>.</p>
 	
 	 <figure id="fig-ldpc-types">
         <img src="images/ldpc1.png" alt="Types of Linked Data Platform Containers" />
         <figcaption>Types of Linked Data Platform Containers</figcaption>
     </figure>
+
+<div class="ldp-issue-pending">
+<p>Still editing for ACTION-120 -- table work in progress, fate unknown</p>
 	
-	<p>
-	The following table illustrates some key differences between <a title="membership">membership</a> and 
-	<a title="containment">containment</a> triples.
+	<p>The following table illustrates some differences between <a title="membership">membership</a> and 
+	<a title="containment">containment</a> triples.  For details on the normative behavior, see appropriate sections
+	below.
 	</p>
 	<table border="1" id="ldpc-mbrcntdiff">
-		<thead><tr><th>Request</th><th>Membership</th><th>Containment</th></tr></thead>
-		<tr><td>LDPR created in LDPC</td><td>New triple based on type of container</td><td>New triple: 
+		<thead><tr><th rowspan="2">Completed Request</th><th colspan="2">Effects</th></tr>
+		       <tr><th>Membership</th><th>Containment</th></tr></thead>
+		<tr><td>LDPR created in LDPC</td><td>New triple based on type of container (see following rows)</td><td>New triple: 
 			(LDPC, ldp:contains, LDPR)</td></tr>
 		<tr><td>LDPR created in LDP-BC</td><td>New triple: (LDPC, ldp:contains, LDPR)</td><td>Same</td></tr>
-		<tr><td>LDPR created in LDP-DC</td><td>New triple links LDP-RR to created LDPR. LDP-RR URI may be same as LDP-DC.</td>
-			<td>New triple: (LDPC, ldp:contains, LDPR).</td></tr>
-		<tr><td>LDPR created in LDP-IC</td><td>New triple links LDP-RR to content indicated URI.</td>
-			<td>New triple: (LDPC, ldp:contains, LDPR).</td></tr>
-		<tr><td>LDPR is deleted</td><td>Triples may be removed.</td><td>Triples are removed.
+		<tr><td>LDPR created in LDP-DC</td><td>New triple links LDP-RR to created LDPR. LDP-RR URI may be same as LDP-DC</td>
+			<td>New triple: (LDPC, ldp:contains, LDPR)</td></tr>
+		<tr><td>LDPR created in LDP-IC</td><td>New triple links LDP-RR to content indicated URI</td>
+			<td>New triple: (LDPC, ldp:contains, LDPR)</td></tr>
+		<tr><td>LDPR is deleted</td><td>Triples may be removed</td><td>Triples are removed
 			</td></tr>
-		<tr><td>LDPC is deleted</td><td>Triples and member resources may be removed.</td><td>Triples of form 
-			(LDPC, ldp:contains, LDPR) and LDPRs are removed.</td></tr>
+		<tr><td>LDPC is deleted</td><td>Triples and member resources may be removed</td><td>Triples of form 
+			(LDPC, ldp:contains, LDPR) and contained LDPRs are removed</td></tr>
 
 	</table>
 </div>	
@@ -1277,7 +1328,7 @@
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
 
 &lt;http://example.org/container1/&gt;
-   a ldp:Container;
+   a ldp:Container, ldp:DirectContainer;
    dcterms:title "A Linked Data Platform Container of Acme Resources";
    ldp:containerResource &lt;http://example.org/container1/&gt;;
    ldp:containsRelation rdfs:member;
@@ -1335,7 +1386,7 @@
 @prefix o: &lt;http://example.org/ontology/&gt;.
 
 &lt;&gt;
-   a ldp:Container;
+   a ldp:Container, ldp:DirectContainer;
    dcterms:title "The assets of JohnZSmith";
    ldp:containerResource &lt;http://example.org/netWorth/nw1&gt;;
    ldp:containsRelation o:asset;
@@ -1379,6 +1430,12 @@
 	</section><!-- Was 5.1.2 / #ldpc-ordering -->
 </section>
 
+<div class="ldp-issue-pending">
+This section is current "under construction" while editors are trying to thoroughly complete edits for 
+<a href="https://www.w3.org/2012/ldp/track/actions/120">ACTION-120</a>.
+</div>
+
+
 <section id="ldpc-general">
 <h2>General</h2>
 	<p>The Linked Data Platform does not define how clients
@@ -2154,6 +2211,7 @@
 <!-- <blockquote><em><a href="http://www.w3.org/TR/2013/WD-ldp-20130930/">Candidate Recommendation Draft</a></em></blockquote> wah -->
 <!-- <blockquote><em><a href="http://www.w3.org/TR/2013/WD-ldp-20130730/">Last Call Draft</a></em></blockquote> -->
 <ul>
+	<li>2014-02-04 - ACTION-120 (Part 2) Added concepts of containers (basic, direct and indirect) to LDPC intro (SS)</li>
 	<li>2014-01-30 - ACTION-120 (Part 1) Added concepts of containers (basic, direct and indirect) (SS)</li>
 	<li>2014-01-30 - ACTION-123 Added concepts of LDP-RDF-Resource and LDP-Binary-Resource (SS)</li>
 	<li>2014-01-29 - Fix up conformance section to use new LDP client section (SS)</li>