added some of transaction time example
authorSandro Hawke <sandro@hawke.org>
Tue, 15 May 2012 00:05:01 -0400
changeset 372 3c2c909d3312
parent 371 0aef4842028e
child 373 0ce5c7f9152c
added some of transaction time example
rdf-spaces/index.html
--- a/rdf-spaces/index.html	Mon May 14 23:21:27 2012 -0400
+++ b/rdf-spaces/index.html	Tue May 15 00:05:01 2012 -0400
@@ -124,6 +124,28 @@
     
     .example-def { border:1px solid black; padding: 1em; }
 
+    /* --- borrowed from  EXAMPLES --- */
+.exvoc {
+    border: 1px solid #90A0B0;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+.exvoc::before {
+    content:    "Vocabulary Defined For This Example";
+    display:    block;
+    width:      450px;
+    background: #90A0B0;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.schema {
+   color: #8090A0;
+}
     </style> 
 	
   </head>
@@ -146,7 +168,7 @@
   <div class="alert">
     <h2>Editor's Draft Status</h2>
     
-    <p>Closing in on FPWD IMHO, but definitely not there yet.  The
+    <p>Closing in on FPWD IMHO, but not there yet.  The
     "@@@" flags mark the places where I'm pretty sure something is
     needed before FPWD.</p>
 
@@ -413,6 +435,8 @@
 
 
     <p>@@@ we want to be able to dump the database and load it in a different system</p>
+
+    <p>@@@ This doesn't seem to belong here.   Maybe we have Federated Phonebook use cases, and *other* ones, too?</p>
   </section>
 
 
@@ -668,6 +692,11 @@
     which its <a>default graph</a> is the <a>merge</a> of all its
     <a>named graph</a>s.</p>
 
+    <p>We define the union and merge of quadsets (and thus datasets)
+    as the set merge of their constituent triples and quads; in the
+    case of a merge, it is after any shared blank nodes have been
+    renamed apart.</p>
+
   </section>
 
 
@@ -1116,7 +1145,66 @@
   <section id="example-transtime">
     <h2>Showing Change History (v6)</h2>
 
-    <p>@@@ Show how to address <a href="#uc-transtime" class="sectionRef"></a></p>
+    <p>To keep versions, as required by <a href="#uc-transtime"
+    class="sectionRef"></a>, we simply copy the old data into a new
+    named graph and record some metadata about it.</p>
+
+    <p>In this example, we handle this by defining the following vocabulary:</p>
+
+    <div class="exvoc">
+
+      @@@ tdb   can we define each property separately with any sense, or just the block, together?
+
+    </div>
+      
+    <p>If Marvin changes, rather absurdly, changes his email address
+    every day, to include the date, we might have a dataset like
+    this:</p>
+
+    <pre class="example">@prefix transt: &lt;http://example.org/ns/transaction-time>.
+@prefix hq: &lt;http://example.org/ns/phonebook>.
+@prefix v:  &lt;http://www.w3.org/2006/vcard/ns#>.
+@prefix : &lt;>.
+
+:g32201 {  
+   #... various data, then:
+   [] a v:VCard
+      v:fn "Marvin Mover" ;
+      v:email "marvin-0101@example.org". 
+   #... more data from other people
+}
+[] a transt:Snapshot;
+   transt:source &lt;http://div14.example.org/phonefeed>;
+   transt:result :g32201;
+   transt:starts "2012-01-01T00:00:00"^^xs:dateTime;
+   transt:ends "2012-01-02T00:00:00"^^xs:dateTime.
+
+:g32202 {  
+   #... various data, then:
+   [] a v:VCard
+      v:fn "Marvin Mover" ;
+      v:email "marvin-0102@example.org". 
+   #... more data from other people
+}
+[] a transt:Snapshot;
+   transt:source &lt;http://div14.example.org/phonefeed>;
+   transt:result :g32202;
+   transt:starts "2012-01-02T00:00:00"^^xs:dateTime;
+   transt:ends "2012-01-03T00:00:00"^^xs:dateTime.
+
+# the current data
+&lt;http://div14.example.org/phonefeed> {
+   #... various data, then:
+   [] a v:VCard
+      v:fn "Marvin Mover" ;
+      v:email "marvin-0103@example.org". 
+   #... more data from other people
+}
+
+</pre>
+
+<p>@@@ or should we put the data directly into a genid graph, so that
+metadata about it is less likely to change or be wrong...?  On the other hand, there's ALSO some nice potential for metadata about the feed space.</p>
 
   </section>
 
@@ -1133,7 +1221,7 @@
 
     <p>In this example, we handle this by defining the following vocabulary:</p>
 
-    <div class="example-def">
+    <div class="exvoc">
       
       <p>This "valid-time" vocabulary allows a data publisher to
       express a time range during which the triples in some space are
@@ -1142,13 +1230,13 @@
       range.</p>
 
       <dl>
-	<dt>(rdf:space Sp) vt:starts (xs:dateTime T1)</dt>
+	<dt><span class="schema">(rdf:space Sp)</span> vt:starts <span class="schema">(xs:dateTime T1)</span></dt>
 	<dd>Claims that all the triples in Sp are valid starting at T1, ending at some unspecified period of time.</dd>
-	<dt>(rdf:space Sp) vt:end (xs:dateTime T2)</dt>
+	<dt><span class="schema">(rdf:space Sp)</span> vt:end <span class="schema">(xs:dateTime T2)</span></dt>
 	<dd>Claims that all the triples in Sp are valid until just before T2, starting at some unspecified time.</dd>
       </dl>
 
-      <p>In general, these two predicates should be used together,
+      <p>In general, these two predicates need to be used together,
       providing both vt:starts and vt:ends values for a space.  In
       this case, { ?sp vt:starts ?t1; vt:ends ?t2 } claims that all
       the triples in ?sp are in effect for all points in time t such
@@ -1356,7 +1444,7 @@
 <section class="appendix informative" id="changes">
   <h2>Changes</h2>
   <ul>
-    <li>2012-05-14: Fill in the use cases, removing some of the text that was there and which can go into the example.  Redid the trig grammar, adding spaceName, changing formatting.  Added valid-time example.</li>
+    <li>2012-05-14: Fill in the use cases, removing some of the text that was there and which can go into the example.  Redid the trig grammar, adding spaceName, changing formatting.  Added valid-time example.  Added some of transaction-time example.</li>
     <li>2012-05-13: Fill in the example's skeleton, add a few issues/ideas on trig</li>
     <li>2012-05-11: Rewriting and reorganizing Concepts; some more work on Usecases and Example; removed the Detailed Example since it needs to be so re-written; renamed 'reflection' to 'folding'; reworked the Semanics</li>
     <li>2012-05-10: Wrote a short intro.  Started writing the Use Cases section for real.   Added grammar for N-Quads and Trig.  Did a first draft of the semantics.</li>