Browse Source

pass contexts to processing

Taco 1 year ago
parent
commit
1f3dc894e3
2 changed files with 148 additions and 67 deletions
  1. 100 60
      entitlements.html
  2. 48 7
      entitlements.org

+ 100 - 60
entitlements.html

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2018-03-30 Fri 16:45 -->
6
+<!-- 2018-03-30 Fri 17:09 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title>&lrm;</title>
@@ -234,45 +234,45 @@ for the JavaScript code in this tag.
234 234
 <h2>Table of Contents</h2>
235 235
 <div id="text-table-of-contents">
236 236
 <ul>
237
-<li><a href="#org4aad9da">1. Introduction</a></li>
238
-<li><a href="#org732f502">2. Data Model</a>
237
+<li><a href="#orga6d51e4">1. Introduction</a></li>
238
+<li><a href="#orge2a2818">2. Data Model</a>
239 239
 <ul>
240
-<li><a href="#org750f88f">2.1. Example wallet profile</a>
240
+<li><a href="#org6656845">2.1. Example wallet profile</a>
241 241
 <ul>
242
-<li><a href="#org6b1252b">2.1.1. Things to further investigate</a></li>
242
+<li><a href="#orgc5958ba">2.1.1. Things to further investigate</a></li>
243 243
 </ul>
244 244
 </li>
245
-<li><a href="#orgb42fdaf">2.2. Example request</a>
245
+<li><a href="#orgf1897dc">2.2. Example request</a>
246 246
 <ul>
247
-<li><a href="#orgfd70e94">2.2.1. Things to further investigate</a></li>
247
+<li><a href="#orgcb60792">2.2.1. Things to further investigate</a></li>
248 248
 </ul>
249 249
 </li>
250 250
 </ul>
251 251
 </li>
252
-<li><a href="#orgbb4d8bd">3. Data Comparison</a>
252
+<li><a href="#org31d317a">3. Data Comparison</a>
253 253
 <ul>
254 254
 <li>
255 255
 <ul>
256
-<li><a href="#org4ce69fb">3.0.1. Things to further investigate</a></li>
256
+<li><a href="#org95edd4f">3.0.1. Things to further investigate</a></li>
257 257
 </ul>
258 258
 </li>
259 259
 </ul>
260 260
 </li>
261
-<li><a href="#org89988ca">4. Visualization</a>
261
+<li><a href="#orgbe43276">4. Visualization</a>
262 262
 <ul>
263
-<li><a href="#org2c0a953">4.1. Request</a></li>
264
-<li><a href="#org0019e27">4.2. Contexts</a>
263
+<li><a href="#org217ca68">4.1. Request</a></li>
264
+<li><a href="#org1c7ab82">4.2. Contexts</a>
265 265
 <ul>
266
-<li><a href="#org1c97e2e">4.2.1. Things to further investigate</a></li>
266
+<li><a href="#org5f5862d">4.2.1. Things to further investigate</a></li>
267 267
 </ul>
268 268
 </li>
269 269
 </ul>
270 270
 </li>
271
-<li><a href="#org03acc03">5. Interaction</a>
271
+<li><a href="#org4cf1be2">5. Interaction</a>
272 272
 <ul>
273 273
 <li>
274 274
 <ul>
275
-<li><a href="#orgefe12f1">5.0.1. Things to further investigate</a></li>
275
+<li><a href="#org9d5fad8">5.0.1. Things to further investigate</a></li>
276 276
 </ul>
277 277
 </li>
278 278
 </ul>
@@ -280,8 +280,8 @@ for the JavaScript code in this tag.
280 280
 </ul>
281 281
 </div>
282 282
 </div>
283
-<div id="outline-container-org4aad9da" class="outline-2">
284
-<h2 id="org4aad9da"><span class="section-number-2">1</span> Introduction</h2>
283
+<div id="outline-container-orga6d51e4" class="outline-2">
284
+<h2 id="orga6d51e4"><span class="section-number-2">1</span> Introduction</h2>
285 285
 <div class="outline-text-2" id="text-1">
286 286
 <p>
287 287
 The purpose of this document is to investigate possible User Interaction designs for Decode task 4.4.
@@ -314,12 +314,12 @@ A preliminary definition of 6 context types (ordered from the self outwards, but
314 314
 </div>
315 315
 </div>
316 316
 
317
-<div id="outline-container-org732f502" class="outline-2">
318
-<h2 id="org732f502"><span class="section-number-2">2</span> Data Model</h2>
317
+<div id="outline-container-orge2a2818" class="outline-2">
318
+<h2 id="orge2a2818"><span class="section-number-2">2</span> Data Model</h2>
319 319
 <div class="outline-text-2" id="text-2">
320 320
 </div>
321
-<div id="outline-container-org750f88f" class="outline-3">
322
-<h3 id="org750f88f"><span class="section-number-3">2.1</span> Example wallet profile</h3>
321
+<div id="outline-container-org6656845" class="outline-3">
322
+<h3 id="org6656845"><span class="section-number-3">2.1</span> Example wallet profile</h3>
323 323
 <div class="outline-text-3" id="text-2-1">
324 324
 <p>
325 325
 This sample wallet profile datastructure consists of multiple contexts.
@@ -338,7 +338,7 @@ It overrides the default privacy level specified by the property type.
338 338
 </p>
339 339
 
340 340
 <div class="org-src-container">
341
-<pre class="src src-js" id="org4edda41"><span style="color: #4f97d7; font-weight: bold;">var</span> <span style="color: #7590db;">profile</span> = <span style="color: #4f97d7;">{</span>
341
+<pre class="src src-js" id="org684e7d9"><span style="color: #4f97d7; font-weight: bold;">var</span> <span style="color: #7590db;">profile</span> = <span style="color: #4f97d7;">{</span>
342 342
     contexts : 
343 343
     <span style="color: #bc6ec5;">[</span>
344 344
         <span style="color: #2d9574;">{</span>
@@ -397,8 +397,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>JSON.stringify<span st
397 397
 </div>
398 398
 </div>
399 399
 
400
-<div id="outline-container-org6b1252b" class="outline-4">
401
-<h4 id="org6b1252b"><span class="section-number-4">2.1.1</span> Things to further investigate</h4>
400
+<div id="outline-container-orgc5958ba" class="outline-4">
401
+<h4 id="orgc5958ba"><span class="section-number-4">2.1.1</span> Things to further investigate</h4>
402 402
 <div class="outline-text-4" id="text-2-1-1">
403 403
 <ul class="org-ul">
404 404
 <li>Apply default weights to each property type, these can be overridden by attributing a privacy level to the property</li>
@@ -410,8 +410,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>JSON.stringify<span st
410 410
 </div>
411 411
 </div>
412 412
 
413
-<div id="outline-container-orgb42fdaf" class="outline-3">
414
-<h3 id="orgb42fdaf"><span class="section-number-3">2.2</span> Example request</h3>
413
+<div id="outline-container-orgf1897dc" class="outline-3">
414
+<h3 id="orgf1897dc"><span class="section-number-3">2.2</span> Example request</h3>
415 415
 <div class="outline-text-3" id="text-2-2">
416 416
 <p>
417 417
 This sample application request consists of an application name, a set of required property types and a set of optional property types.
@@ -421,7 +421,7 @@ and the cumulative privacy weight by adding the privacy levels of each property
421 421
 </p>
422 422
 
423 423
 <div class="org-src-container">
424
-<pre class="src src-js" id="org6875f9e"><span style="color: #4f97d7; font-weight: bold;">var</span> <span style="color: #7590db;">request</span> = <span style="color: #4f97d7;">{</span>
424
+<pre class="src src-js" id="org71aadcf"><span style="color: #4f97d7; font-weight: bold;">var</span> <span style="color: #7590db;">request</span> = <span style="color: #4f97d7;">{</span>
425 425
     application : <span style="color: #2d9574;">"decodeapp:facebook"</span>,
426 426
     preferred_context_type : <span style="color: #bc6ec5;">[</span><span style="color: #a45bad;">3</span>,<span style="color: #a45bad;">4</span>,<span style="color: #a45bad;">5</span><span style="color: #bc6ec5;">]</span>,<span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">i think facebook would think they apply to these three contexts (self,family and friends)</span>
427 427
     required : <span style="color: #bc6ec5;">[</span><span style="color: #2d9574;">"decode:name"</span>, <span style="color: #2d9574;">"decode:email"</span>, <span style="color: #2d9574;">"decode:address"</span><span style="color: #bc6ec5;">]</span>,
@@ -433,8 +433,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>data<span style="color
433 433
 </div>
434 434
 </div>
435 435
 
436
-<div id="outline-container-orgfd70e94" class="outline-4">
437
-<h4 id="orgfd70e94"><span class="section-number-4">2.2.1</span> Things to further investigate</h4>
436
+<div id="outline-container-orgcb60792" class="outline-4">
437
+<h4 id="orgcb60792"><span class="section-number-4">2.2.1</span> Things to further investigate</h4>
438 438
 <div class="outline-text-4" id="text-2-2-1">
439 439
 <ul class="org-ul">
440 440
 <li>Create a generator that seeds a request with random required and optional property types</li>
@@ -446,8 +446,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>data<span style="color
446 446
 </div>
447 447
 
448 448
 
449
-<div id="outline-container-orgbb4d8bd" class="outline-2">
450
-<h2 id="orgbb4d8bd"><span class="section-number-2">3</span> Data Comparison</h2>
449
+<div id="outline-container-org31d317a" class="outline-2">
450
+<h2 id="org31d317a"><span class="section-number-2">3</span> Data Comparison</h2>
451 451
 <div class="outline-text-2" id="text-3">
452 452
 <p>
453 453
 During the interaction we want to give the user insight into a couple of things;
@@ -463,7 +463,7 @@ In below ruby code a comparison is made by on creating the intersection and its
463 463
 </p>
464 464
 
465 465
 <div class="org-src-container">
466
-<pre class="src src-ruby" id="org4475901"><span style="color: #4f97d7;">require</span> <span style="color: #2d9574;">'json'</span>
466
+<pre class="src src-ruby" id="org567012f"><span style="color: #4f97d7;">require</span> <span style="color: #2d9574;">'json'</span>
467 467
   <span style="color: #4f97d7;">require</span> <span style="color: #2d9574;">'nokogiri'</span> <span style="color: #2aa1ae; background-color: #292e34;">#</span><span style="color: #2aa1ae; background-color: #292e34;">for creating xml</span>
468 468
 
469 469
   request = <span style="color: #ce537a; font-weight: bold;">JSON</span>.parse<span style="color: #4f97d7;">(</span>request_data<span style="color: #4f97d7;">)</span>
@@ -484,8 +484,8 @@ In below ruby code a comparison is made by on creating the intersection and its
484 484
 </div>
485 485
 </div>
486 486
 
487
-<div id="outline-container-org4ce69fb" class="outline-4">
488
-<h4 id="org4ce69fb"><span class="section-number-4">3.0.1</span> Things to further investigate</h4>
487
+<div id="outline-container-org95edd4f" class="outline-4">
488
+<h4 id="org95edd4f"><span class="section-number-4">3.0.1</span> Things to further investigate</h4>
489 489
 <div class="outline-text-4" id="text-3-0-1">
490 490
 <ul class="org-ul">
491 491
 <li>Calculate the weight (sum of privacy levels of the properties it contains) of each context before and after giving permission</li>
@@ -504,8 +504,8 @@ request is size 3
504 504
 </div>
505 505
 </div>
506 506
 
507
-<div id="outline-container-org89988ca" class="outline-2">
508
-<h2 id="org89988ca"><span class="section-number-2">4</span> Visualization</h2>
507
+<div id="outline-container-orgbe43276" class="outline-2">
508
+<h2 id="orgbe43276"><span class="section-number-2">4</span> Visualization</h2>
509 509
 <div class="outline-text-2" id="text-4">
510 510
 <p>
511 511
 We want to visualize the following things;
@@ -524,7 +524,7 @@ Different tones within the hue can be mapped to each privacy level.
524 524
 </p>
525 525
 
526 526
 <div class="org-src-container">
527
-<pre class="src src-java" id="org2de3b0a"><span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">color definitions</span>
527
+<pre class="src src-java" id="org9bf75b0"><span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">color definitions</span>
528 528
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">a3</span> = #<span style="color: #a45bad;">3A3B58</span>;
529 529
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">b3</span> = #<span style="color: #a45bad;">734246</span>;
530 530
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">d3</span> = #B4561F;
@@ -608,7 +608,7 @@ Below snippet exemplifies a color for the SELF context with a privacy level SECR
608 608
 </p>
609 609
 
610 610
 <div class="org-src-container">
611
-<pre class="src src-java" id="orge2b0f77"><span style="color: #ce537a; font-weight: bold;">void</span> <span style="color: #bc6ec5; font-weight: bold;">draw</span><span style="color: #4f97d7;">(){</span>
611
+<pre class="src src-java" id="org2c57c1d"><span style="color: #ce537a; font-weight: bold;">void</span> <span style="color: #bc6ec5; font-weight: bold;">draw</span><span style="color: #4f97d7;">(){</span>
612 612
   size<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">100</span>,<span style="color: #a45bad;">100</span><span style="color: #bc6ec5;">)</span>;
613 613
   background<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">0</span><span style="color: #bc6ec5;">)</span>;
614 614
   noStroke<span style="color: #bc6ec5;">()</span>;
@@ -712,7 +712,7 @@ void draw(){
712 712
 </script> <canvas id="ob-16a3bfeaae0796f9c0bb86df72e7c664178dbee9"></canvas>
713 713
 
714 714
 <div class="org-src-container">
715
-<pre class="src src-java" id="orgff9edb3"><span style="color: #ce537a; font-weight: bold;">void</span> <span style="color: #bc6ec5; font-weight: bold;">draw</span><span style="color: #4f97d7;">(){</span>
715
+<pre class="src src-java" id="org7d6f2ed"><span style="color: #ce537a; font-weight: bold;">void</span> <span style="color: #bc6ec5; font-weight: bold;">draw</span><span style="color: #4f97d7;">(){</span>
716 716
   size<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">100</span>,<span style="color: #a45bad;">100</span><span style="color: #bc6ec5;">)</span>;
717 717
   background<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">0</span><span style="color: #bc6ec5;">)</span>;
718 718
   noStroke<span style="color: #bc6ec5;">()</span>;
@@ -816,12 +816,13 @@ void draw(){
816 816
 </script> <canvas id="ob-aa9a4cb8275feb0ce1c5423b4f8d6a81fa9e4a49"></canvas>
817 817
 </div>
818 818
 
819
-<div id="outline-container-org2c0a953" class="outline-3">
820
-<h3 id="org2c0a953"><span class="section-number-3">4.1</span> Request</h3>
819
+<div id="outline-container-org217ca68" class="outline-3">
820
+<h3 id="org217ca68"><span class="section-number-3">4.1</span> Request</h3>
821 821
 <div class="outline-text-3" id="text-4-1">
822 822
 <div class="org-src-container">
823
-<pre class="src src-java" id="orgc49a9cd"><span style="color: #ce537a; font-weight: bold;">Request</span> <span style="color: #7590db;">r</span> = parseRequest<span style="color: #4f97d7;">(</span>doc<span style="color: #4f97d7;">)</span>;
823
+<pre class="src src-java" id="org93259cc"><span style="color: #ce537a; font-weight: bold;">Request</span> <span style="color: #7590db;">r</span> = parseRequest<span style="color: #4f97d7;">(</span>doc<span style="color: #4f97d7;">)</span>;
824 824
 <span style="color: #ce537a; font-weight: bold;">Diff</span><span style="color: #4f97d7;">[]</span> <span style="color: #7590db;">d</span> = parseDiffs<span style="color: #4f97d7;">(</span>doc<span style="color: #4f97d7;">)</span>;
825
+<span style="color: #ce537a; font-weight: bold;">Context</span><span style="color: #4f97d7;">[]</span> <span style="color: #7590db;">c</span> = parseProfile<span style="color: #4f97d7;">(</span>doc<span style="color: #4f97d7;">)</span>;
825 826
 
826 827
 size<span style="color: #4f97d7;">(</span><span style="color: #a45bad;">200</span>,<span style="color: #a45bad;">200</span><span style="color: #4f97d7;">)</span>;
827 828
 background<span style="color: #4f97d7;">(</span><span style="color: #a45bad;">0</span><span style="color: #4f97d7;">)</span>;
@@ -833,7 +834,7 @@ text<span style="color: #4f97d7;">(</span>r.application, <span style="color: #a4
833 834
 </div>
834 835
 
835 836
 <script src="processing.js"></script>
836
- <script type="text/processing" data-processing-target="ob-c42de876a926aece02f5fc38d4531fc842438852">
837
+ <script type="text/processing" data-processing-target="ob-5526b37e71e6fc325c46270b443c073478ef0ab8">
837 838
 class Request
838 839
 {
839 840
   public String application;
@@ -862,9 +863,23 @@ class Diff
862 863
   } 
863 864
 }
864 865
 
866
+//TODO: add Profile / Context / Property classes here
867
+class Context
868
+{
869
+  public String title;
870
+  public int plSum;
871
+
872
+  public Context(String title, int plSum)
873
+  {
874
+    this.title = title;
875
+    this.plSum = plSum;
876
+  }
877
+}
878
+
865 879
 XMLElement doc = new XMLElement(this, 'diff.xml');
880
+
866 881
 //create typed versions because this is java :-(
867
-void parseRequest(xml)
882
+Request parseRequest(xml)
868 883
 {
869 884
   XMLElement req = xml.getChild(0);
870 885
   String name = req.getChild(0).getContent();
@@ -883,8 +898,13 @@ void parseRequest(xml)
883 898
   return r;
884 899
 }
885 900
 
901
+Context[] parseProfile(xml)
902
+{
903
+  return null;
904
+}
905
+
886 906
 //create typed versions because this is java :-(
887
-void parseDiffs(xml)
907
+Diff[] parseDiffs(xml)
888 908
 {
889 909
   XMLElement diffsEl = xml.getChild(1);
890 910
   Diff[] diffs = new Diff[diffsEl.getChildCount()];
@@ -911,6 +931,7 @@ void parseDiffs(xml)
911 931
 }
912 932
 Request r = parseRequest(doc);
913 933
 Diff[] d = parseDiffs(doc);
934
+Context[] c = parseProfile(doc);
914 935
 
915 936
 size(200,200);
916 937
 background(0);
@@ -918,19 +939,19 @@ noFill();
918 939
 stroke(255);
919 940
 ellipse(56, 46, 55, 55);
920 941
 text(r.application, 10, 10);
921
-</script> <canvas id="ob-c42de876a926aece02f5fc38d4531fc842438852"></canvas>
942
+</script> <canvas id="ob-5526b37e71e6fc325c46270b443c073478ef0ab8"></canvas>
922 943
 </div>
923 944
 </div>
924 945
 
925
-<div id="outline-container-org0019e27" class="outline-3">
926
-<h3 id="org0019e27"><span class="section-number-3">4.2</span> Contexts</h3>
946
+<div id="outline-container-org1c7ab82" class="outline-3">
947
+<h3 id="org1c7ab82"><span class="section-number-3">4.2</span> Contexts</h3>
927 948
 <div class="outline-text-3" id="text-4-2">
928 949
 <p>
929 950
 How do we visulize each context? Intend to do this in processing too.
930 951
 </p>
931 952
 
932 953
 <div class="org-src-container">
933
-<pre class="src src-java" id="orgd7065d4"><span style="color: #ce537a; font-weight: bold;">Request</span> <span style="color: #7590db;">r</span> = parseRequest<span style="color: #4f97d7;">(</span>doc<span style="color: #4f97d7;">)</span>;
954
+<pre class="src src-java" id="org0bf6c35"><span style="color: #ce537a; font-weight: bold;">Request</span> <span style="color: #7590db;">r</span> = parseRequest<span style="color: #4f97d7;">(</span>doc<span style="color: #4f97d7;">)</span>;
934 955
 <span style="color: #ce537a; font-weight: bold;">Diff</span><span style="color: #4f97d7;">[]</span> <span style="color: #7590db;">d</span> = parseDiffs<span style="color: #4f97d7;">(</span>doc<span style="color: #4f97d7;">)</span>;
935 956
 <span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">draw the difference for each context with the request</span>
936 957
 size<span style="color: #4f97d7;">(</span><span style="color: #a45bad;">200</span>,<span style="color: #a45bad;">200</span><span style="color: #4f97d7;">)</span>;
@@ -943,7 +964,7 @@ text<span style="color: #4f97d7;">(</span>d<span style="color: #bc6ec5;">[</span
943 964
 </div>
944 965
 
945 966
 <script src="processing.js"></script>
946
- <script type="text/processing" data-processing-target="ob-1233b6269f6ad9dae9260cd0fea081e8622a0cf4">
967
+ <script type="text/processing" data-processing-target="ob-ffb0bd11bfee301d2643b23f19a7cda5418f1c1f">
947 968
 class Request
948 969
 {
949 970
   public String application;
@@ -972,9 +993,23 @@ class Diff
972 993
   } 
973 994
 }
974 995
 
996
+//TODO: add Profile / Context / Property classes here
997
+class Context
998
+{
999
+  public String title;
1000
+  public int plSum;
1001
+
1002
+  public Context(String title, int plSum)
1003
+  {
1004
+    this.title = title;
1005
+    this.plSum = plSum;
1006
+  }
1007
+}
1008
+
975 1009
 XMLElement doc = new XMLElement(this, 'diff.xml');
1010
+
976 1011
 //create typed versions because this is java :-(
977
-void parseRequest(xml)
1012
+Request parseRequest(xml)
978 1013
 {
979 1014
   XMLElement req = xml.getChild(0);
980 1015
   String name = req.getChild(0).getContent();
@@ -993,8 +1028,13 @@ void parseRequest(xml)
993 1028
   return r;
994 1029
 }
995 1030
 
1031
+Context[] parseProfile(xml)
1032
+{
1033
+  return null;
1034
+}
1035
+
996 1036
 //create typed versions because this is java :-(
997
-void parseDiffs(xml)
1037
+Diff[] parseDiffs(xml)
998 1038
 {
999 1039
   XMLElement diffsEl = xml.getChild(1);
1000 1040
   Diff[] diffs = new Diff[diffsEl.getChildCount()];
@@ -1028,11 +1068,11 @@ noFill();
1028 1068
 stroke(255);
1029 1069
 ellipse(56, 46, 55, 55);
1030 1070
 text(d[0].context, 10, 10);
1031
-</script> <canvas id="ob-1233b6269f6ad9dae9260cd0fea081e8622a0cf4"></canvas>
1071
+</script> <canvas id="ob-ffb0bd11bfee301d2643b23f19a7cda5418f1c1f"></canvas>
1032 1072
 </div>
1033 1073
 
1034
-<div id="outline-container-org1c97e2e" class="outline-4">
1035
-<h4 id="org1c97e2e"><span class="section-number-4">4.2.1</span> Things to further investigate</h4>
1074
+<div id="outline-container-org5f5862d" class="outline-4">
1075
+<h4 id="org5f5862d"><span class="section-number-4">4.2.1</span> Things to further investigate</h4>
1036 1076
 <div class="outline-text-4" id="text-4-2-1">
1037 1077
 <ul class="org-ul">
1038 1078
 <li>How do we show relation between request and each context with color?</li>
@@ -1044,16 +1084,16 @@ text(d[0].context, 10, 10);
1044 1084
 </div>
1045 1085
 </div>
1046 1086
 
1047
-<div id="outline-container-org03acc03" class="outline-2">
1048
-<h2 id="org03acc03"><span class="section-number-2">5</span> Interaction</h2>
1087
+<div id="outline-container-org4cf1be2" class="outline-2">
1088
+<h2 id="org4cf1be2"><span class="section-number-2">5</span> Interaction</h2>
1049 1089
 <div class="outline-text-2" id="text-5">
1050 1090
 <p>
1051 1091
 We intend to investigate this in Processing as well.
1052 1092
 </p>
1053 1093
 </div>
1054 1094
 
1055
-<div id="outline-container-orgefe12f1" class="outline-4">
1056
-<h4 id="orgefe12f1"><span class="section-number-4">5.0.1</span> Things to further investigate</h4>
1095
+<div id="outline-container-org9d5fad8" class="outline-4">
1096
+<h4 id="org9d5fad8"><span class="section-number-4">5.0.1</span> Things to further investigate</h4>
1057 1097
 <div class="outline-text-4" id="text-5-0-1">
1058 1098
 <ul class="org-ul">
1059 1099
 <li>How does the end user actually accept the request? Is it by dragging the request onto the context?</li>
@@ -1065,7 +1105,7 @@ We intend to investigate this in Processing as well.
1065 1105
 </div>
1066 1106
 <div id="postamble" class="status">
1067 1107
 <p class="author">Author: Taco</p>
1068
-<p class="date">Created: 2018-03-30 Fri 16:45</p>
1108
+<p class="date">Created: 2018-03-30 Fri 17:09</p>
1069 1109
 <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
1070 1110
 </div>
1071 1111
 </body>

+ 48 - 7
entitlements.org

@@ -546,7 +546,7 @@ void draw(){
546 546
 #+END_EXPORT
547 547
 
548 548
 #+name: glue 
549
-#+BEGIN_SRC processing :exports none 
549
+#+BEGIN_SRC java :exports none 
550 550
 class Request
551 551
 {
552 552
   public String application;
@@ -575,9 +575,23 @@ class Diff
575 575
   } 
576 576
 }
577 577
 
578
+//TODO: add Profile / Context / Property classes here
579
+class Context
580
+{
581
+  public String title;
582
+  public int plSum;
583
+
584
+  public Context(String title, int plSum)
585
+  {
586
+    this.title = title;
587
+    this.plSum = plSum;
588
+  }
589
+}
590
+
578 591
 XMLElement doc = new XMLElement(this, 'diff.xml');
592
+
579 593
 //create typed versions because this is java :-(
580
-void parseRequest(xml)
594
+Request parseRequest(xml)
581 595
 {
582 596
   XMLElement req = xml.getChild(0);
583 597
   String name = req.getChild(0).getContent();
@@ -596,8 +610,14 @@ void parseRequest(xml)
596 610
   return r;
597 611
 }
598 612
 
613
+Context[] parseProfile(xml)
614
+{
615
+  //TODO: implement this! so that we can finally start on the real visualization
616
+  return null;
617
+}
618
+
599 619
 //create typed versions because this is java :-(
600
-void parseDiffs(xml)
620
+Diff[] parseDiffs(xml)
601 621
 {
602 622
   XMLElement diffsEl = xml.getChild(1);
603 623
   Diff[] diffs = new Diff[diffsEl.getChildCount()];
@@ -629,6 +649,7 @@ void parseDiffs(xml)
629 649
 #+BEGIN_SRC java
630 650
 Request r = parseRequest(doc);
631 651
 Diff[] d = parseDiffs(doc);
652
+Context[] c = parseProfile(doc);
632 653
 
633 654
 size(200,200);
634 655
 background(0);
@@ -647,7 +668,7 @@ text(r.application, 10, 10);
647 668
 #+RESULTS: draw_request
648 669
 #+BEGIN_EXPORT html
649 670
 <script src="processing.js"></script>
650
- <script type="text/processing" data-processing-target="ob-c42de876a926aece02f5fc38d4531fc842438852">
671
+ <script type="text/processing" data-processing-target="ob-5526b37e71e6fc325c46270b443c073478ef0ab8">
651 672
 class Request
652 673
 {
653 674
   public String application;
@@ -676,9 +697,23 @@ class Diff
676 697
   } 
677 698
 }
678 699
 
700
+//TODO: add Profile / Context / Property classes here
701
+class Context
702
+{
703
+  public String title;
704
+  public int plSum;
705
+
706
+  public Context(String title, int plSum)
707
+  {
708
+    this.title = title;
709
+    this.plSum = plSum;
710
+  }
711
+}
712
+
679 713
 XMLElement doc = new XMLElement(this, 'diff.xml');
714
+
680 715
 //create typed versions because this is java :-(
681
-void parseRequest(xml)
716
+Request parseRequest(xml)
682 717
 {
683 718
   XMLElement req = xml.getChild(0);
684 719
   String name = req.getChild(0).getContent();
@@ -697,8 +732,13 @@ void parseRequest(xml)
697 732
   return r;
698 733
 }
699 734
 
735
+Context[] parseProfile(xml)
736
+{
737
+  return null;
738
+}
739
+
700 740
 //create typed versions because this is java :-(
701
-void parseDiffs(xml)
741
+Diff[] parseDiffs(xml)
702 742
 {
703 743
   XMLElement diffsEl = xml.getChild(1);
704 744
   Diff[] diffs = new Diff[diffsEl.getChildCount()];
@@ -725,6 +765,7 @@ void parseDiffs(xml)
725 765
 }
726 766
 Request r = parseRequest(doc);
727 767
 Diff[] d = parseDiffs(doc);
768
+Context[] c = parseProfile(doc);
728 769
 
729 770
 size(200,200);
730 771
 background(0);
@@ -732,7 +773,7 @@ noFill();
732 773
 stroke(255);
733 774
 ellipse(56, 46, 55, 55);
734 775
 text(r.application, 10, 10);
735
-</script> <canvas id="ob-c42de876a926aece02f5fc38d4531fc842438852"></canvas>
776
+</script> <canvas id="ob-5526b37e71e6fc325c46270b443c073478ef0ab8"></canvas>
736 777
 #+END_EXPORT
737 778
 
738 779
 ** Contexts