ldp.html
changeset 87 671fe85a872b
parent 86 77b0b00ab6d3
child 88 a02636c16f05
--- a/ldp.html	Fri Mar 15 13:17:37 2013 -0400
+++ b/ldp.html	Sun Mar 17 16:29:18 2013 -0400
@@ -600,9 +600,76 @@
 			to the container.</p>
 
 	<p>Sometimes it is useful to use a subject
-			other than the container itself as the membership subject and to use
-			a predicate other than <code>rdfs:member</code> as the membership predicate, as illustrated
-			below.</p>
+	other than the container itself as the membership subject and to use
+	a predicate other than <code>rdfs:member</code> as the membership predicate. Let's
+	start with a domain resoruce for a person's net worth, as illustrated below:</p>
+			
+<pre class="example" id="ldpc-ex-membership-full"># The following is a partial representation of
+#   http://example.org/netWorth/nw1
+@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
+@prefix o: &lt;http://example.org/ontology/&gt;.
+&lt;&gt;
+   a o:NetWorth;
+   o:netWorthOf &lt;http://example.org/users/JohnZSmith&gt;;
+   o:asset 
+      &lt;assetContainer/a1&gt;,
+      &lt;assetContainer/a2&gt;;
+   o:liability 
+      &lt;liabilityContainer/l1&gt;,
+      &lt;liabilityContainer/l2&gt;,
+      &lt;liabilityContainer/l3&gt;.
+</pre>
+	<p>From this example, there is a <code>rdf:type</code> of <code>o:NetWorth</code> indicating the
+	resource represents an instance of a person's net worth and <code>o:netWorthOf</code> predicate indicating 
+	the associated person.  There are two sets of same-subject, same-predicate pairings; one for assets and
+	one for liabilities.  It would be helpful to be able to associate these multi-valued sets using a URL
+	for them to assist with managing these, this is done by associating containers with them as 
+	illustrated below:
+	</p>
+
+<pre class="example" id="ldpc-ex-membership-full"># The following is an elaborated representation of
+#   http://example.org/netWorth/nw1
+@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
+@prefix o: &lt;http://example.org/ontology/&gt;.
+&lt;&gt;
+   a o:NetWorth;
+   o:netWorthOf &lt;http://example.org/users/JohnZSmith&gt;;
+   o:asset 
+      &lt;assetContainer/a1&gt;,
+      &lt;assetContainer/a2&gt;;
+   o:liability 
+      &lt;liabilityContainer/l1&gt;,
+      &lt;liabilityContainer/l2&gt;,
+      &lt;liabilityContainer/l3&gt;.
+
+&lt;assetContainer/&gt;
+   a ldp:Container;
+   dcterms:title "The assets of JohnZSmith";
+   ldp:membershipSubject &lt;.&gt;;
+   ldp:membershipPredicate o:asset.
+
+&lt;liabilityContainer/&gt;
+   a ldp:Container;
+   dcterms:title "The liabilities of JohnZSmith";
+   ldp:membershipSubject &lt;.&gt;;
+   ldp:membershipPredicate o:liability.
+</pre>
+
+	<p>The essential structure of the container is
+	the same, but in this example, the membership subject is not the
+	container itself – it is a separate net worth resource. The
+	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
+	<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,
+	that design will not work because it is unspecified to which predicate the POST
+	should add a membership triple. Having separate <code>http://example.org/netWorth/nw1/assetContainer/</code> 
+	and <code>http://example.org/netWorth/nw1/liabilityContainer/</code> container
+	resources allows both assets and liabilities to be created.
+	</p>
 
 <pre class="example" id="ldpc-ex-membership-subj">
 # The following is the representation of
@@ -619,20 +686,6 @@
    a o:NetWorth;
    o:asset &lt;a1&gt;, &lt;a2&gt;.</pre>
 
-	<p>
-		The essential structure of the container is
-		the same, but in this example, the membership subject is not the
-		container itself – it is a separate net worth resource. The
-		membership predicate is <code>o:asset</code> – a predicate from the domain model. A POST to
-		this 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 we didn’t just make <code>http://example.org/netWorth/nw1</code> a container 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, that design will not work
-		because it is unspecified to which predicate the POST should add a
-		membership triple. Having separate <code>http://example.org/netWorth/nw1/assetContainer/</code> and <code>http://example.org/netWorth/nw1/liabilityContainer/</code> container resources allows both assets and
-		liabilities to be created.
-	</p>
 	<p>In this example, clients cannot simply guess
 			which resource is the membership subject and which predicate is the
 			membership predicate, so the example includes this information in
@@ -1219,6 +1272,7 @@
 </p>
 <blockquote><em><a href="http://www.w3.org/TR/2013/WD-ldp-20130307/">Second Public Working Draft</a></em></blockquote>
 <ul>
+	<li>2013-03-17 - Inserted examples 2&3, a more complete NetWorth resource (SS)</li>
 	<li>2013-03-15 - Update LDPC glossary term based on Cody's feedback (SS)</li>
 	<li>2013-03-15 - Additional fix in 5.2.2 for ISSUE-34 (SS)</li>
 	<li>2013-03-15 - Remove reference to closed issues that don't require edits: ISSUE-27 & ISSUE-45 (SS)</li>