@@ -2586,10 +2586,10 @@ <h2>Data Indexing</h2>
2586
2586
< section class ="informative changed ">
2587
2587
< h2 > Node Identifier Indexing</ h2 >
2588
2588
2589
- < p > In addition to index maps, JSON-LD introduces the notion of < a > id maps</ a >
2589
+ < p > In addition to < a > index maps</ a > , JSON-LD introduces the notion of < a > id maps</ a >
2590
2590
for structuring data. The id indexing feature allows an author to
2591
2591
structure data using a simple key-value map where the keys map
2592
- to < a > IRIs</ a > . This enables direct access to associated node objects
2592
+ to < a > IRIs</ a > . This enables direct access to associated < a > node objects</ a >
2593
2593
instead of having to scan an array in search of a specific item.
2594
2594
In JSON-LD such data can be specified by associating the
2595
2595
< code > @id</ code > < a > keyword</ a > with a
@@ -2627,14 +2627,61 @@ <h2>Node Identifier Indexing</h2>
2627
2627
-->
2628
2628
</ pre >
2629
2629
2630
- < p > In the example above, the < strong > post</ strong > < a > term</ a > has
2631
- been marked as an < a > id map</ a > . The < strong > http://example.com/posts/1/en</ strong > and
2632
- < strong > http://example.com/posts/1/de</ strong > keys will be interpreted
2630
+ < p > In the example above, the < code > post</ code > < a > term</ a > has
2631
+ been marked as an < a > id map</ a > . The < code > http://example.com/posts/1/en</ code > and
2632
+ < code > http://example.com/posts/1/de</ code > keys will be interpreted
2633
2633
as the < code > @id</ code > property of the < a > node object</ a > value.</ p >
2634
2634
2635
2635
< p > The interpretation of the data above is exactly the same
2636
2636
as that in < a class ="sectionRef " href ="#data-indexing "> </ a >
2637
- using a JSON-LD processor:</ p >
2637
+ using a JSON-LD processor.</ p >
2638
+ </ section >
2639
+
2640
+ < section class ="informative changed ">
2641
+ < h2 > Node Type Indexing</ h2 >
2642
+
2643
+ < p > In addition to < a data-lt ="id map "> id</ a > and < a > index maps</ a > , JSON-LD introduces the notion of < a > type maps</ a >
2644
+ for structuring data. The type indexing feature allows an author to
2645
+ structure data using a simple key-value map where the keys map
2646
+ to < a > IRIs</ a > . This enables data to be structured based on the < code > @type</ code >
2647
+ of specific < a > node objects</ a > .
2648
+ In JSON-LD such data can be specified by associating the
2649
+ < code > @type</ code > < a > keyword</ a > with a
2650
+ < code > @container</ code > declaration in the context:</ p >
2651
+
2652
+ < pre class ="example " data-transform ="updateExample "
2653
+ title ="Indexing data in JSON-LD by node identifiers ">
2654
+ <!--
2655
+ {
2656
+ "@context":
2657
+ {
2658
+ "schema": "http://schema.org/",
2659
+ "name": "schema:name",
2660
+ "affiliation": {
2661
+ "@id": "schema:affiliation",
2662
+ ****"@container": "@type"****
2663
+ }
2664
+ },
2665
+ "name": "Manu Sporny",
2666
+ "affiliation": {
2667
+ ****"schema:Corporpation"****: {
2668
+ "@id": "http://digitalbazaar.com/",
2669
+ "name": "Digital Bazaar"
2670
+ },
2671
+ ****"schema:ProfessionalService"****: {
2672
+ "@id": "https://spec-ops.io",
2673
+ "name": "Spec-Ops"
2674
+ }
2675
+
2676
+ }
2677
+ }
2678
+ -->
2679
+ </ pre >
2680
+
2681
+ < p > In the example above, the < code > affiliation</ code > < a > term</ a > has
2682
+ been marked as an < a > type map</ a > . The < code > schema:Corporpation</ code > and
2683
+ < code > schema:ProfessionalService</ code > keys will be interpreted
2684
+ as the < code > @type</ code > property of the < a > node object</ a > value.</ p >
2638
2685
</ section >
2639
2686
2640
2687
< section class ="informative ">
@@ -3250,7 +3297,21 @@ <h2>Id Maps</h2>
3250
3297
and the values MUST be < a > node objects</ a > .</ p >
3251
3298
3252
3299
< p > If the value contains a property expanding to < code > @id</ code > , it's value MUST
3253
- be equivalent to the referencing key. Otherwise, the key is used as
3300
+ be equivalent to the referencing key. Otherwise, the property from the value is used as
3301
+ the < code > @id</ code > of the < a > node object</ a > value when expanding.</ p >
3302
+ </ section >
3303
+
3304
+ < section class ="changed ">
3305
+ < h2 > Type Maps</ h2 >
3306
+
3307
+ < p > An < a > type map</ a > is used to associate an < a > IRI</ a > with a value that allows easy
3308
+ programatic access. An < a > id map</ a > may be used as a term value within a < a > node object</ a > if the < a > term</ a >
3309
+ is defined with < code > @container</ code > set to < code > @id</ code > . The keys of an < a > id map</ a > MUST be < a > IRIs</ a >
3310
+ (< a > relative IRI</ a > , < a > compact IRI</ a > (including < a > blank node identifiers</ a > ), or < a > absolute IRI</ a > )
3311
+ and the values MUST be < a > node objects</ a > .</ p >
3312
+
3313
+ < p > If the value contains a property expanding to < code > @id</ code > , it's value MUST
3314
+ be equivalent to the referencing key. Otherwise, the property from the value is used as
3254
3315
the < code > @id</ code > of the < a > node object</ a > value when expanding.</ p >
3255
3316
</ section >
3256
3317
@@ -3519,17 +3580,16 @@ <h2>Changes since 1.0 Recommendation of 16 January 2014</h2>
3519
3580
< li > An < a > expanded term definition</ a > can now have an
3520
3581
< code > @context</ code > property, which defines a < a > context</ a > used for values of
3521
3582
a < a > property</ a > identified with such a < a > term</ a > .</ li >
3583
+ < li > < code > @container</ code > values within an < a > expanded term definition</ a > may now
3584
+ include < code > @id</ code > and < code > @type</ code > , corresponding to < a > id maps</ a > and < a > type maps</ a > .</ li >
3522
3585
</ ul >
3523
3586
</ section >
3524
3587
3525
3588
< section class ="appendix informative ">
3526
3589
< h4 > Open Issues</ h4 >
3527
3590
< p > The following is a list of open issues being worked on for the next release.</ p >
3528
- < p class ="issue " data-number ="12 "> </ p >
3529
3591
< p class ="issue " data-number ="195 "> </ p >
3530
3592
< p class ="issue " data-number ="246 "> </ p >
3531
- < p class ="issue " data-number ="247 "> </ p >
3532
- < p class ="issue " data-number ="262 "> </ p >
3533
3593
< p class ="issue " data-number ="269 "> </ p >
3534
3594
< p class ="issue " data-number ="271 "> </ p >
3535
3595
< p class ="issue " data-number ="272 "> </ p >
0 commit comments