Browse Source

added extra example

Taco 1 year ago
parent
commit
f53b3b3683
2 changed files with 195 additions and 72 deletions
  1. 161 57
      entitlements.html
  2. 34 15
      entitlements.org

+ 161 - 57
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 15:36 -->
6
+<!-- 2018-03-30 Fri 15:53 -->
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="#org15ab15e">1. Introduction</a></li>
238
-<li><a href="#orgd482c29">2. Data Model</a>
237
+<li><a href="#org1683eda">1. Introduction</a></li>
238
+<li><a href="#org7d8691a">2. Data Model</a>
239 239
 <ul>
240
-<li><a href="#orgfba8656">2.1. Example wallet profile</a>
240
+<li><a href="#org6999cbc">2.1. Example wallet profile</a>
241 241
 <ul>
242
-<li><a href="#org6fa08df">2.1.1. Things to further investigate</a></li>
242
+<li><a href="#org59bf55d">2.1.1. Things to further investigate</a></li>
243 243
 </ul>
244 244
 </li>
245
-<li><a href="#org1005725">2.2. Example request</a>
245
+<li><a href="#orgfc37aa9">2.2. Example request</a>
246 246
 <ul>
247
-<li><a href="#org5572de9">2.2.1. Things to further investigate</a></li>
247
+<li><a href="#orgdeee581">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="#org3a15dbc">3. Data Comparison</a>
252
+<li><a href="#org1a0dad8">3. Data Comparison</a>
253 253
 <ul>
254 254
 <li>
255 255
 <ul>
256
-<li><a href="#org9528d8c">3.0.1. Things to further investigate</a></li>
256
+<li><a href="#org265c8e7">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="#org77cee61">4. Visualization</a>
261
+<li><a href="#org159334f">4. Visualization</a>
262 262
 <ul>
263
-<li><a href="#orga21033c">4.1. Request</a></li>
264
-<li><a href="#org33ec9b4">4.2. Contexts</a>
263
+<li><a href="#org148b768">4.1. Request</a></li>
264
+<li><a href="#orgf41a1fc">4.2. Contexts</a>
265 265
 <ul>
266
-<li><a href="#orga81317e">4.2.1. Things to further investigate</a></li>
266
+<li><a href="#orgafd0271">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="#org95cb6ee">5. Interaction</a>
271
+<li><a href="#org7574ff3">5. Interaction</a>
272 272
 <ul>
273 273
 <li>
274 274
 <ul>
275
-<li><a href="#orgd411ff5">5.0.1. Things to further investigate</a></li>
275
+<li><a href="#org0f8ecae">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-org15ab15e" class="outline-2">
284
-<h2 id="org15ab15e"><span class="section-number-2">1</span> Introduction</h2>
283
+<div id="outline-container-org1683eda" class="outline-2">
284
+<h2 id="org1683eda"><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-orgd482c29" class="outline-2">
318
-<h2 id="orgd482c29"><span class="section-number-2">2</span> Data Model</h2>
317
+<div id="outline-container-org7d8691a" class="outline-2">
318
+<h2 id="org7d8691a"><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-orgfba8656" class="outline-3">
322
-<h3 id="orgfba8656"><span class="section-number-3">2.1</span> Example wallet profile</h3>
321
+<div id="outline-container-org6999cbc" class="outline-3">
322
+<h3 id="org6999cbc"><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="orgedbd104"><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="org94454db"><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>
@@ -395,8 +395,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>JSON.stringify<span st
395 395
 </div>
396 396
 </div>
397 397
 
398
-<div id="outline-container-org6fa08df" class="outline-4">
399
-<h4 id="org6fa08df"><span class="section-number-4">2.1.1</span> Things to further investigate</h4>
398
+<div id="outline-container-org59bf55d" class="outline-4">
399
+<h4 id="org59bf55d"><span class="section-number-4">2.1.1</span> Things to further investigate</h4>
400 400
 <div class="outline-text-4" id="text-2-1-1">
401 401
 <ul class="org-ul">
402 402
 <li>Apply default weights to each property type, this means the same as attributing a privacy level to the property</li>
@@ -408,8 +408,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>JSON.stringify<span st
408 408
 </div>
409 409
 </div>
410 410
 
411
-<div id="outline-container-org1005725" class="outline-3">
412
-<h3 id="org1005725"><span class="section-number-3">2.2</span> Example request</h3>
411
+<div id="outline-container-orgfc37aa9" class="outline-3">
412
+<h3 id="orgfc37aa9"><span class="section-number-3">2.2</span> Example request</h3>
413 413
 <div class="outline-text-3" id="text-2-2">
414 414
 <p>
415 415
 This sample application request consists of an application name, a set of required property types and a set of optional property types.
@@ -419,7 +419,7 @@ and the cumulative privacy weight by adding the privacy levels of each property
419 419
 </p>
420 420
 
421 421
 <div class="org-src-container">
422
-<pre class="src src-js" id="orgb0fa4fa"><span style="color: #4f97d7; font-weight: bold;">var</span> <span style="color: #7590db;">request</span> = <span style="color: #4f97d7;">{</span>
422
+<pre class="src src-js" id="orgcc46a38"><span style="color: #4f97d7; font-weight: bold;">var</span> <span style="color: #7590db;">request</span> = <span style="color: #4f97d7;">{</span>
423 423
     application : <span style="color: #2d9574;">"decodeapp:facebook"</span>,
424 424
     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>
425 425
     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>,
@@ -431,8 +431,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>data<span style="color
431 431
 </div>
432 432
 </div>
433 433
 
434
-<div id="outline-container-org5572de9" class="outline-4">
435
-<h4 id="org5572de9"><span class="section-number-4">2.2.1</span> Things to further investigate</h4>
434
+<div id="outline-container-orgdeee581" class="outline-4">
435
+<h4 id="orgdeee581"><span class="section-number-4">2.2.1</span> Things to further investigate</h4>
436 436
 <div class="outline-text-4" id="text-2-2-1">
437 437
 <ul class="org-ul">
438 438
 <li>Create a generator that seeds a request with random required and optional property types</li>
@@ -443,8 +443,8 @@ process.stdout.write<span style="color: #4f97d7;">(</span>data<span style="color
443 443
 </div>
444 444
 </div>
445 445
 
446
-<div id="outline-container-org3a15dbc" class="outline-2">
447
-<h2 id="org3a15dbc"><span class="section-number-2">3</span> Data Comparison</h2>
446
+<div id="outline-container-org1a0dad8" class="outline-2">
447
+<h2 id="org1a0dad8"><span class="section-number-2">3</span> Data Comparison</h2>
448 448
 <div class="outline-text-2" id="text-3">
449 449
 <p>
450 450
 During the interaction we want to give the user insight into a couple of things;
@@ -460,7 +460,7 @@ In below ruby code a comparison is made by on creating the intersection and its
460 460
 </p>
461 461
 
462 462
 <div class="org-src-container">
463
-<pre class="src src-ruby" id="org690ade6"><span style="color: #4f97d7;">require</span> <span style="color: #2d9574;">'json'</span>
463
+<pre class="src src-ruby" id="org3ed52b2"><span style="color: #4f97d7;">require</span> <span style="color: #2d9574;">'json'</span>
464 464
   <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>
465 465
 
466 466
   request = <span style="color: #ce537a; font-weight: bold;">JSON</span>.parse<span style="color: #4f97d7;">(</span>request_data<span style="color: #4f97d7;">)</span>
@@ -481,8 +481,8 @@ In below ruby code a comparison is made by on creating the intersection and its
481 481
 </div>
482 482
 </div>
483 483
 
484
-<div id="outline-container-org9528d8c" class="outline-4">
485
-<h4 id="org9528d8c"><span class="section-number-4">3.0.1</span> Things to further investigate</h4>
484
+<div id="outline-container-org265c8e7" class="outline-4">
485
+<h4 id="org265c8e7"><span class="section-number-4">3.0.1</span> Things to further investigate</h4>
486 486
 <div class="outline-text-4" id="text-3-0-1">
487 487
 <ul class="org-ul">
488 488
 <li>Calculate the weight (sum of privacy levels of the properties it contains) of each context before and after giving permission</li>
@@ -501,8 +501,8 @@ request is size 3
501 501
 </div>
502 502
 </div>
503 503
 
504
-<div id="outline-container-org77cee61" class="outline-2">
505
-<h2 id="org77cee61"><span class="section-number-2">4</span> Visualization</h2>
504
+<div id="outline-container-org159334f" class="outline-2">
505
+<h2 id="org159334f"><span class="section-number-2">4</span> Visualization</h2>
506 506
 <div class="outline-text-2" id="text-4">
507 507
 <p>
508 508
 We want to visualize the following things;
@@ -521,7 +521,7 @@ Different tones within the hue can be mapped to each privacy level.
521 521
 </p>
522 522
 
523 523
 <div class="org-src-container">
524
-<pre class="src src-java" id="orgf66c893"><span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">color definitions</span>
524
+<pre class="src src-java" id="org4a27867"><span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">color definitions</span>
525 525
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">a3</span> = #<span style="color: #a45bad;">3A3B58</span>;
526 526
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">b3</span> = #<span style="color: #a45bad;">734246</span>;
527 527
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">d3</span> = #B4561F;
@@ -566,9 +566,9 @@ Different tones within the hue can be mapped to each privacy level.
566 566
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">g2</span> = #FFDB03;
567 567
 
568 568
 <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">colors</span><span style="color: #4f97d7;">[][]</span> = <span style="color: #4f97d7;">{</span>
569
-  <span style="color: #bc6ec5;">{</span>a0,a1,a2,a3,a4,a5<span style="color: #bc6ec5;">}</span>,
570 569
   <span style="color: #bc6ec5;">{</span>b0,b1,b2,b3,b4,b5<span style="color: #bc6ec5;">}</span>,
571 570
   <span style="color: #bc6ec5;">{</span>c0,c1,c2,c3,c4,c5<span style="color: #bc6ec5;">}</span>,
571
+  <span style="color: #bc6ec5;">{</span>a0,a1,a2,a3,a4,a5<span style="color: #bc6ec5;">}</span>,
572 572
   <span style="color: #bc6ec5;">{</span>d0,d1,d2,d3,d4,d5<span style="color: #bc6ec5;">}</span>,
573 573
   <span style="color: #bc6ec5;">{</span>e0,e1,e2,e3,e4,e5<span style="color: #bc6ec5;">}</span>,
574 574
   <span style="color: #bc6ec5;">{</span>f0,f1,f2,f3,f4,f5<span style="color: #bc6ec5;">}</span>,
@@ -605,13 +605,13 @@ Below snippet exemplifies a color for the SELF context with a privacy level SECR
605 605
 </p>
606 606
 
607 607
 <div class="org-src-container">
608
-<pre class="src src-java" id="org092d7c8"><span style="color: #ce537a; font-weight: bold;">void</span> <span style="color: #bc6ec5; font-weight: bold;">draw</span><span style="color: #4f97d7;">(){</span>
608
+<pre class="src src-java" id="orgd366df3"><span style="color: #ce537a; font-weight: bold;">void</span> <span style="color: #bc6ec5; font-weight: bold;">draw</span><span style="color: #4f97d7;">(){</span>
609 609
   size<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">100</span>,<span style="color: #a45bad;">100</span><span style="color: #bc6ec5;">)</span>;
610 610
   background<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">0</span><span style="color: #bc6ec5;">)</span>;
611 611
   noStroke<span style="color: #bc6ec5;">()</span>;
612 612
   <span style="color: #ce537a; font-weight: bold;">int</span> <span style="color: #7590db;">level</span> = <span style="color: #a45bad;">PrivacyLevel</span>.SECRET;
613 613
   <span style="color: #ce537a; font-weight: bold;">int</span> <span style="color: #7590db;">contextType</span> = <span style="color: #a45bad;">ContextType</span>.SELF;
614
-  <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">secret_self</span> = getColor<span style="color: #bc6ec5;">(</span>level, contextType<span style="color: #bc6ec5;">)</span>;<span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">should be dark red</span>
614
+  <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">secret_self</span> = getColor<span style="color: #bc6ec5;">(</span>level, contextType<span style="color: #bc6ec5;">)</span>;<span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">expect dark red</span>
615 615
   fill<span style="color: #bc6ec5;">(</span>secret_self<span style="color: #bc6ec5;">)</span>;
616 616
   ellipse<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">50</span>,<span style="color: #a45bad;">50</span>,<span style="color: #a45bad;">50</span>,<span style="color: #a45bad;">50</span><span style="color: #bc6ec5;">)</span>;
617 617
 <span style="color: #4f97d7;">}</span>
@@ -619,7 +619,7 @@ Below snippet exemplifies a color for the SELF context with a privacy level SECR
619 619
 </div>
620 620
 
621 621
 <script src="processing.js"></script>
622
- <script type="text/processing" data-processing-target="ob-e4084f25c6566c618f6cc091e4920fd86e9b1c21">
622
+ <script type="text/processing" data-processing-target="ob-16a3bfeaae0796f9c0bb86df72e7c664178dbee9">
623 623
 //color definitions
624 624
 color a3 = #3A3B58;
625 625
 color b3 = #734246;
@@ -665,9 +665,9 @@ color f2 = #8F4330;
665 665
 color g2 = #FFDB03;
666 666
 
667 667
 color colors[][] = {
668
-  {a0,a1,a2,a3,a4,a5},
669 668
   {b0,b1,b2,b3,b4,b5},
670 669
   {c0,c1,c2,c3,c4,c5},
670
+  {a0,a1,a2,a3,a4,a5},
671 671
   {d0,d1,d2,d3,d4,d5},
672 672
   {e0,e1,e2,e3,e4,e5},
673 673
   {f0,f1,f2,f3,f4,f5},
@@ -702,18 +702,122 @@ void draw(){
702 702
   noStroke();
703 703
   int level = PrivacyLevel.SECRET;
704 704
   int contextType = ContextType.SELF;
705
-  color secret_self = getColor(level, contextType);//should be dark red
705
+  color secret_self = getColor(level, contextType);//expect dark red
706 706
   fill(secret_self);
707 707
   ellipse(50,50,50,50);
708 708
 }
709
-</script> <canvas id="ob-e4084f25c6566c618f6cc091e4920fd86e9b1c21"></canvas>
709
+</script> <canvas id="ob-16a3bfeaae0796f9c0bb86df72e7c664178dbee9"></canvas>
710
+
711
+<div class="org-src-container">
712
+<pre class="src src-java" id="orgec0fb67"><span style="color: #ce537a; font-weight: bold;">void</span> <span style="color: #bc6ec5; font-weight: bold;">draw</span><span style="color: #4f97d7;">(){</span>
713
+  size<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">100</span>,<span style="color: #a45bad;">100</span><span style="color: #bc6ec5;">)</span>;
714
+  background<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">0</span><span style="color: #bc6ec5;">)</span>;
715
+  noStroke<span style="color: #bc6ec5;">()</span>;
716
+  <span style="color: #ce537a; font-weight: bold;">int</span> <span style="color: #7590db;">level</span> = <span style="color: #a45bad;">PrivacyLevel</span>.PUBLIC;
717
+  <span style="color: #ce537a; font-weight: bold;">int</span> <span style="color: #7590db;">contextType</span> = <span style="color: #a45bad;">ContextType</span>.WORK;
718
+  <span style="color: #ce537a; font-weight: bold;">color</span> <span style="color: #7590db;">work_public</span> = getColor<span style="color: #bc6ec5;">(</span>level, contextType<span style="color: #bc6ec5;">)</span>;<span style="color: #2aa1ae; background-color: #292e34;">//</span><span style="color: #2aa1ae; background-color: #292e34;">expect light blueish</span>
719
+  fill<span style="color: #bc6ec5;">(</span>work_public<span style="color: #bc6ec5;">)</span>;
720
+  ellipse<span style="color: #bc6ec5;">(</span><span style="color: #a45bad;">50</span>,<span style="color: #a45bad;">50</span>,<span style="color: #a45bad;">50</span>,<span style="color: #a45bad;">50</span><span style="color: #bc6ec5;">)</span>;
721
+<span style="color: #4f97d7;">}</span>
722
+</pre>
723
+</div>
724
+
725
+<script src="processing.js"></script>
726
+ <script type="text/processing" data-processing-target="ob-aa9a4cb8275feb0ce1c5423b4f8d6a81fa9e4a49">
727
+//color definitions
728
+color a3 = #3A3B58;
729
+color b3 = #734246;
730
+color d3 = #B4561F;
731
+color c3 = #336F60;
732
+color f3 = #7A3E2A;
733
+color g3 = #A48137;
734
+color e2 = #97BBCB;
735
+color a4 = #3B4257;
736
+color b4 = #6A4345;
737
+color d4 = #86451F;
738
+color c4 = #345A48;
739
+color f4 = #A92F21;
740
+color g4 = #BC983B;
741
+color a5 = #3D4358;
742
+color b5 = #402623;
743
+color d5 = #85442D;
744
+color c5 = #3B403A;
745
+color f5 = #7A150B;
746
+color g5 = #252F2B;
747
+color a1 = #597099;
748
+color e4 = #0A3878;
749
+color b1 = #D16365;
750
+color d1 = #FFD43B;
751
+color c1 = #B7BF98;
752
+color e1 = #CAD2C8;
753
+color e0 = #F5EDE5;
754
+color f1 = #D17978;
755
+color g1 = #FDD23E;
756
+color a0 = #C5C3CC;
757
+color e3 = #0485B1;
758
+color b0 = #FFDCD6;
759
+color d0 = #FFE9BE;
760
+color c0 = #F0E9D5;
761
+color f0 = #E4C8BF;
762
+color g0 = #FBE6BA;
763
+color a2 = #3D4B79;
764
+color e5 = #084064;
765
+color b2 = #974244;
766
+color d2 = #F8AA08;
767
+color c2 = #4E937F;
768
+color f2 = #8F4330;
769
+color g2 = #FFDB03;
770
+
771
+color colors[][] = {
772
+  {b0,b1,b2,b3,b4,b5},
773
+  {c0,c1,c2,c3,c4,c5},
774
+  {a0,a1,a2,a3,a4,a5},
775
+  {d0,d1,d2,d3,d4,d5},
776
+  {e0,e1,e2,e3,e4,e5},
777
+  {f0,f1,f2,f3,f4,f5},
778
+  {g0,g1,g2,g3,g4,g5}
779
+};
780
+
781
+class PrivacyLevel {
782
+  public static int SECRET = 5; //passwords, keys etc. 
783
+  public static int PRIVATE = 4;//ssn etc, strict need to know basis stuff 
784
+  public static int INTIMATE = 3;//e.g. stuff you share with family 
785
+  public static int AFFILIATE = 2;//e.g. stuff you share with work, project etc 
786
+  public static int PUBLIC = 1;//e.g. stuff that everybody may know, your e.g. twitter handle 
787
+  public static int COMMONS = 0;//stuff that is intended for the public good / commons, anonimized IoT stuff 
788
+}
789
+
790
+class ContextType {
791
+  public static int SELF = 5; //stuff that applies strictly to yourself 
792
+  public static int FAMILY = 4;//stuff that applies to you and your family (hopefully not facebook pics)
793
+  public static int FRIENDS = 3;//stuff you share with friends 
794
+  public static int WORK = 2;//stuff you share in a professional context
795
+  public static int HOBBY = 1;//stuff you share in the context of a pastime
796
+  public static int OTHER = 0;//stuff that doesn't fit in any of the other types 
797
+}
798
+
799
+public int getColor(int privacy_level, int context_type)
800
+{
801
+  return colors[context_type][privacy_level];
802
+}
803
+void draw(){
804
+  size(100,100);
805
+  background(0);
806
+  noStroke();
807
+  int level = PrivacyLevel.PUBLIC;
808
+  int contextType = ContextType.WORK;
809
+  color work_public = getColor(level, contextType);//expect light blueish
810
+  fill(work_public);
811
+  ellipse(50,50,50,50);
812
+}
813
+</script> <canvas id="ob-aa9a4cb8275feb0ce1c5423b4f8d6a81fa9e4a49"></canvas>
710 814
 </div>
711 815
 
712
-<div id="outline-container-orga21033c" class="outline-3">
713
-<h3 id="orga21033c"><span class="section-number-3">4.1</span> Request</h3>
816
+<div id="outline-container-org148b768" class="outline-3">
817
+<h3 id="org148b768"><span class="section-number-3">4.1</span> Request</h3>
714 818
 <div class="outline-text-3" id="text-4-1">
715 819
 <div class="org-src-container">
716
-<pre class="src src-java" id="orgc280181"><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>;
820
+<pre class="src src-java" id="orga96025b"><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>;
717 821
 <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>;
718 822
 
719 823
 size<span style="color: #4f97d7;">(</span><span style="color: #a45bad;">200</span>,<span style="color: #a45bad;">200</span><span style="color: #4f97d7;">)</span>;
@@ -815,15 +919,15 @@ text(r.application, 10, 10);
815 919
 </div>
816 920
 </div>
817 921
 
818
-<div id="outline-container-org33ec9b4" class="outline-3">
819
-<h3 id="org33ec9b4"><span class="section-number-3">4.2</span> Contexts</h3>
922
+<div id="outline-container-orgf41a1fc" class="outline-3">
923
+<h3 id="orgf41a1fc"><span class="section-number-3">4.2</span> Contexts</h3>
820 924
 <div class="outline-text-3" id="text-4-2">
821 925
 <p>
822 926
 How do we visulize each context? Intend to do this in processing too.
823 927
 </p>
824 928
 
825 929
 <div class="org-src-container">
826
-<pre class="src src-java" id="org9010900"><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>;
930
+<pre class="src src-java" id="org5d1f33d"><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>;
827 931
 <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>;
828 932
 <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>
829 933
 size<span style="color: #4f97d7;">(</span><span style="color: #a45bad;">200</span>,<span style="color: #a45bad;">200</span><span style="color: #4f97d7;">)</span>;
@@ -924,8 +1028,8 @@ text(d[0].context, 10, 10);
924 1028
 </script> <canvas id="ob-1233b6269f6ad9dae9260cd0fea081e8622a0cf4"></canvas>
925 1029
 </div>
926 1030
 
927
-<div id="outline-container-orga81317e" class="outline-4">
928
-<h4 id="orga81317e"><span class="section-number-4">4.2.1</span> Things to further investigate</h4>
1031
+<div id="outline-container-orgafd0271" class="outline-4">
1032
+<h4 id="orgafd0271"><span class="section-number-4">4.2.1</span> Things to further investigate</h4>
929 1033
 <div class="outline-text-4" id="text-4-2-1">
930 1034
 <ul class="org-ul">
931 1035
 <li>How do we show relation between request and each context with color?</li>
@@ -937,16 +1041,16 @@ text(d[0].context, 10, 10);
937 1041
 </div>
938 1042
 </div>
939 1043
 
940
-<div id="outline-container-org95cb6ee" class="outline-2">
941
-<h2 id="org95cb6ee"><span class="section-number-2">5</span> Interaction</h2>
1044
+<div id="outline-container-org7574ff3" class="outline-2">
1045
+<h2 id="org7574ff3"><span class="section-number-2">5</span> Interaction</h2>
942 1046
 <div class="outline-text-2" id="text-5">
943 1047
 <p>
944 1048
 We intend to investigate this in Processing as well.
945 1049
 </p>
946 1050
 </div>
947 1051
 
948
-<div id="outline-container-orgd411ff5" class="outline-4">
949
-<h4 id="orgd411ff5"><span class="section-number-4">5.0.1</span> Things to further investigate</h4>
1052
+<div id="outline-container-org0f8ecae" class="outline-4">
1053
+<h4 id="org0f8ecae"><span class="section-number-4">5.0.1</span> Things to further investigate</h4>
950 1054
 <div class="outline-text-4" id="text-5-0-1">
951 1055
 <ul class="org-ul">
952 1056
 <li>How does the end user actually accept the request? Is it by dragging the request onto the context?</li>
@@ -958,7 +1062,7 @@ We intend to investigate this in Processing as well.
958 1062
 </div>
959 1063
 <div id="postamble" class="status">
960 1064
 <p class="author">Author: Taco</p>
961
-<p class="date">Created: 2018-03-30 Fri 15:36</p>
1065
+<p class="date">Created: 2018-03-30 Fri 15:53</p>
962 1066
 <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
963 1067
 </div>
964 1068
 </body>

+ 34 - 15
entitlements.org

@@ -264,9 +264,9 @@ color f2 = #8F4330;
264 264
 color g2 = #FFDB03;
265 265
 
266 266
 color colors[][] = {
267
-  {a0,a1,a2,a3,a4,a5},
268 267
   {b0,b1,b2,b3,b4,b5},
269 268
   {c0,c1,c2,c3,c4,c5},
269
+  {a0,a1,a2,a3,a4,a5},
270 270
   {d0,d1,d2,d3,d4,d5},
271 271
   {e0,e1,e2,e3,e4,e5},
272 272
   {f0,f1,f2,f3,f4,f5},
@@ -299,7 +299,7 @@ public int getColor(int privacy_level, int context_type)
299 299
 
300 300
 Below snippet exemplifies a color for the SELF context with a privacy level SECRET, and should be a dark red color.
301 301
 
302
-#+name: color_example_src
302
+#+name: color_example_src_1
303 303
 #+BEGIN_SRC java
304 304
 void draw(){
305 305
   size(100,100);
@@ -307,19 +307,19 @@ void draw(){
307 307
   noStroke();
308 308
   int level = PrivacyLevel.SECRET;
309 309
   int contextType = ContextType.SELF;
310
-  color secret_self = getColor(level, contextType);//should be dark red
310
+  color secret_self = getColor(level, contextType);//expect dark red
311 311
   fill(secret_self);
312 312
   ellipse(50,50,50,50);
313 313
 }
314 314
 #+END_SRC
315 315
 
316
-#+name: color_example
316
+#+name: color_example_1
317 317
 #+BEGIN_SRC processing :noweb yes
318 318
 <<colors>>
319
-<<color_example_src>>
319
+<<color_example_src_1>>
320 320
 #+END_SRC 
321 321
 
322
-#+RESULTS: color_example
322
+#+RESULTS: color_example_1
323 323
 #+BEGIN_EXPORT html
324 324
 <script src="processing.js"></script>
325 325
  <script type="text/processing" data-processing-target="ob-e4084f25c6566c618f6cc091e4920fd86e9b1c21">
@@ -412,10 +412,30 @@ void draw(){
412 412
 </script> <canvas id="ob-e4084f25c6566c618f6cc091e4920fd86e9b1c21"></canvas>
413 413
 #+END_EXPORT
414 414
 
415
-#+RESULTS: colors
415
+#+name: color_example_src_2
416
+#+BEGIN_SRC java
417
+void draw(){
418
+  size(100,100);
419
+  background(0);
420
+  noStroke();
421
+  int level = PrivacyLevel.PUBLIC;
422
+  int contextType = ContextType.WORK;
423
+  color work_public = getColor(level, contextType);//expect light blueish
424
+  fill(work_public);
425
+  ellipse(50,50,50,50);
426
+}
427
+#+END_SRC
428
+
429
+#+name: color_example_2
430
+#+BEGIN_SRC processing :noweb yes
431
+<<colors>>
432
+<<color_example_src_2>>
433
+#+END_SRC 
434
+
435
+#+RESULTS: color_example_2
416 436
 #+BEGIN_EXPORT html
417 437
 <script src="processing.js"></script>
418
- <script type="text/processing" data-processing-target="ob-a8ca6153dc3f4dcea5960a1d135a98b56cb78842">
438
+ <script type="text/processing" data-processing-target="ob-760b680df1e803a95f5ec520fa92b091eca605c2">
419 439
 //color definitions
420 440
 color a3 = #3A3B58;
421 441
 color b3 = #734246;
@@ -485,25 +505,24 @@ class ContextType {
485 505
   public static int FRIENDS = 3;//stuff you share with friends 
486 506
   public static int WORK = 2;//stuff you share in a professional context
487 507
   public static int HOBBY = 1;//stuff you share in the context of a pastime
488
-  public static int WORLD = 0;//stuff that is intended for the public good / commons 
508
+  public static int OTHER = 0;//stuff that doesn't fit in any of the other types 
489 509
 }
490 510
 
491 511
 public int getColor(int privacy_level, int context_type)
492 512
 {
493 513
   return colors[context_type][privacy_level];
494 514
 }
495
-
496 515
 void draw(){
497 516
   size(100,100);
498 517
   background(0);
499 518
   noStroke();
500
-  int level = PrivacyLevel.SECRET;
501
-  int contextType = ContextType.SELF;
502
-  color private_self = getColor(level, contextType);//should be dark red
503
-  fill(private_self);
519
+  int level = PrivacyLevel.PUBLIC;
520
+  int contextType = ContextType.WORK;
521
+  color secret_self = getColor(level, contextType);//should be light blueish
522
+  fill(secret_self);
504 523
   ellipse(50,50,50,50);
505 524
 }
506
-</script> <canvas id="ob-a8ca6153dc3f4dcea5960a1d135a98b56cb78842"></canvas>
525
+</script> <canvas id="ob-760b680df1e803a95f5ec520fa92b091eca605c2"></canvas>
507 526
 #+END_EXPORT
508 527
 
509 528
 #+name: glue