Skip to content

Commit 3a12e3e

Browse files
Merge pull request #2389 from IIIF/rob_1029_2
Rob 10/29 part 2
2 parents d688363 + ef95d1f commit 3a12e3e

File tree

1 file changed

+82
-52
lines changed

1 file changed

+82
-52
lines changed

source/presentation/4.0/model.md

Lines changed: 82 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -553,18 +553,18 @@ A Point Selector _MAY_ have the following properties: [id](#id), [x](#x), [y](#y
553553
554554
Well-known text, or WKT, is an ISO standard method for describing 2 and 3 dimensional geometries. This selector thus goes beyond what the Web Annotation's SvgSelector enables by incorporating the z axis, as well as additional types of selection such as MULTIPOLYGON. Additional types, such as CIRCULARSTRING may also be supported.
555555

556-
The text representation is given in the `wktLiteral` property of the selector.
556+
The text representation is given in the `value` property of the selector.
557557

558558
__Properties__<br/>
559-
A WKT Selector _MUST_ have the following properties: [type](#type), and [wktLiteral](#wktLiteral).<br/><br/>
559+
A WKT Selector _MUST_ have the following properties: [type](#type), and [value](#value).<br/><br/>
560560
A WKT Selector _MAY_ have the following properties: [id](#id)
561561
{: .note}
562562

563563
```json
564564
{
565565
"id": "https://example.org/selectors/2",
566566
"type": "WktSelector",
567-
"wktLiteral": "POLYGON Z (0 0 0, 10 0.5 3.2 10 5.0 0, 0 0 0)"
567+
"value": "POLYGON Z (0 0 0, 10 0.5 3.2 10 5.0 0, 0 0 0)"
568568
}
569569
```
570570

@@ -836,9 +836,9 @@ Spot Lights _MAY_ have the following additional properties: [lookAt](#lookAt)
836836
"color": "#FFFFFF",
837837
"intensity": {
838838
"id": "https://example.org/iiif/spotlight/1/value",
839-
"type": "UnitValue",
839+
"type": "Quantity",
840840
"unit": "relative",
841-
"value": 0.5
841+
"quantityValue": 0.5
842842
}
843843
}
844844
```
@@ -923,9 +923,9 @@ Spot Audio Emitters _MAY_ have the following additional properties: [lookAt](#lo
923923
"angle": 45.0,
924924
"volume": {
925925
"id": "https://example.org/iiif/value/1",
926-
"type": "UnitValue",
926+
"type": "Quantity",
927927
"unit": "relative",
928-
"value": 1.0
928+
"quantityValue": 1.0
929929
}
930930
}
931931
```
@@ -1065,24 +1065,24 @@ Services will also have specific requirements as to additional properties based
10651065
{: .note}
10661066

10671067

1068-
#### Unit Value
1069-
{: #UnitValue}
1068+
#### Quantity
1069+
{: #Quantity}
10701070

1071-
> `"type": "UnitValue"`
1071+
> `"type": "Quantity"`
10721072
1073-
A UnitValue expresses a quantity through a numerical value and associated unit of measurement. The value of `unit` _MUST_ be drawn from the list of possible units, or a registered extension.
1073+
A Quantity expresses a quantity through a numerical value and associated unit of measurement. The value of `unit` _MUST_ be drawn from the list of possible units, or a registered extension. The definition of `unit` defines the [list of possible units](#unit).
10741074

10751075
__Properties__<br/>
1076-
A Unit Value _MUST_ have the following properties: [type](#type), [value](#value), and [unit](#unit).<br/><br/>
1077-
A Unit Value _MAY_ have the following properties: [id](#id) and [label](#label).
1076+
A Quantity _MUST_ have the following properties: [type](#type), [quantityValue](#value), and [unit](#unit).<br/><br/>
1077+
A Quantity _MAY_ have the following properties: [id](#id) and [label](#label).
10781078
{: .note}
10791079

10801080
{% include api/code_header.html %}
10811081
```json
10821082
{
10831083
"id": "https://example.org/iiif/unit/2",
1084-
"type": "UnitValue",
1085-
"value": 1.0,
1084+
"type": "Quantity",
1085+
"quantityValue": 1.0,
10861086
"unit": "m"
10871087
}
10881088
```
@@ -1522,11 +1522,11 @@ A floating point number giving the time of the point in seconds from the beginni
15221522
### intensity
15231523
{: #intensity}
15241524

1525-
This property sets the strength or brightness of a Light. The `value` of the referenced UnitValue indicates the desired intensity on a linear scale between 0.0 (no brightness) and 1.0 (as bright as the client will render). If this property is not specified, then the default intensity value is client-dependent.
1525+
This property sets the strength or brightness of a Light. The `value` of the referenced Quantity indicates the desired intensity on a linear scale between 0.0 (no brightness) and 1.0 (as bright as the client will render). If this property is not specified, then the default intensity value is client-dependent.
15261526

1527-
The value of this proerty _MUST_ be a UnitValue.
1528-
The `unit` property of the UnitValue _MUST_ be `relative`.
1529-
The `value` property of the UnitValue _MUST_ be between 0.0 and 1.0.
1527+
The value of this property _MUST_ be a Quantity.
1528+
The value of the `unit` property of the Quantity _MUST_ be `relative`.
1529+
The value of the `quantityValue` property of the Quantity _MUST_ be between 0.0 and 1.0.
15301530

15311531
* A Light _SHOULD_ have the `intensity` property.<br/>
15321532
Clients _SHOULD_ process the `intensity` property on a Light.
@@ -1535,8 +1535,8 @@ The `value` property of the UnitValue _MUST_ be between 0.0 and 1.0.
15351535
{
15361536
"intensity": {
15371537
"id": "https://example.org/iiif/intensity/1",
1538-
"type": "UnitValue",
1539-
"value": 0.5,
1538+
"type": "Quantity",
1539+
"quantityValue": 0.5,
15401540
"unit": "relative"}
15411541
}
15421542
```
@@ -2088,14 +2088,15 @@ The value of the quality parameter in the IIIF Image API URL structure, as recor
20882088
{ "quality": "default" }
20892089
```
20902090

2091-
### quantity
2091+
### quantityValue
2092+
{: #quantityValue}
20922093

2093-
The `quantity` property of a Unit Value conveys its numerical component.
2094+
The `quantityValue` property of a Quantity conveys its numerical component.
20942095

2095-
The value _MUST_ be a floating point number.
2096+
The value of `quantityValue` _MUST_ be a floating point number.
20962097

2097-
* A UnitValue _MUST_ have the `quantity` property.<br/>
2098-
Clients _MUST_ process the `quantity` property on a Unit Value.
2098+
* A Quantity _MUST_ have the `quantity` property.<br/>
2099+
Clients _MUST_ process the `quantity` property on a Quantity.
20992100

21002101
{% include api/code_header.html %}
21012102
``` json-doc
@@ -2386,26 +2387,27 @@ The value _MUST_ be a string, and the value _MUST_ be a URI.
23862387
### spatialScale
23872388
{: #spatialScale}
23882389

2389-
A single UnitValue that defines a real-world scale factor for the coordinate units of a Canvas or Scene. For a Canvas, this defines the physical distance corresponding to the length of a single Canvas coordinate unit. A Canvas with a `width` of 5000 and a `spatialScale` with `quantity` 0.00008 represents a physical space 0.4 meters wide. For a Scene, this defines the physical distance corresponding to the XYZ coordinate units, or in other words, the physical distance length of a unit vector in the 3D coordinate space. The value of `unit` _MUST_ be a length unit. In this specification, the only length unit defined is `m`, i.e., meters. Unless other values are defined externally as an [extension][prezi30-ldce], the value of `unit` _SHOULD_ always be `m`.
2390+
A single Quantity that defines a real-world scale factor for the coordinate units of a Canvas or Scene. For a Canvas, this defines the physical distance corresponding to the length of a single Canvas coordinate unit. A Canvas with a `width` of 5000 and a `spatialScale` with `quantityValue` of 0.00008 and a `unit` of `m` represents a physical space 0.4 meters wide. For a Scene, this defines the physical distance corresponding to the XYZ coordinate units, or in other words, the physical distance length of a unit vector in the 3D coordinate space. The value of `unit` _MUST_ be a length unit. In this specification, the only length unit defined is `m`, i.e., meters. Unless other values are defined externally as an [extension][prezi30-ldce], the value of `unit` _SHOULD_ always be `m`.
23902391

23912392
To assert a `spatialScale` for a Content Resource, the resource _MUST_ first be painted into a Container and the `spatialScale` is asserted on that Container. For example, a 3d model would be painted into a Scene, and then `spatialScale` is asserted on the Scene.
23922393

2394+
* A Canvas _MAY_ have the `spatialScale` property.<br/>
2395+
Clients _SHOULD_ process `spatialScale` on a Canvas.
2396+
* A Scene _MAY_ have the `spatialScale` property.<br/>
2397+
Clients _SHOULD_ process `spatialScale` on a Scene.
2398+
23932399
{% include api/code_header.html %}
23942400
``` json-doc
23952401
{
2396-
"type": "Scene",
2402+
"type": "Canvas",
23972403
"spatialScale": {
2398-
"type": "UnitValue",
2399-
"quantity": 22.0,
2404+
"type": "Quantity",
2405+
"quantityValue": 0.00008,
24002406
"unit": "m"
24012407
}
24022408
}
24032409
```
24042410

2405-
* A Canvas _MAY_ have the `spatialScale` property.<br/>
2406-
Clients _SHOULD_ process `spatialScale` on a Canvas.
2407-
* A Scene _MAY_ have the `spatialScale` property.<br/>
2408-
Clients _SHOULD_ process `spatialScale` on a Scene.
24092411

24102412
### start
24112413
{: #start}
@@ -2486,14 +2488,41 @@ The value _MUST_ be an array of JSON objects. Each item _MUST_ have the `id` and
24862488
### styleClass
24872489
{: #styleClass}
24882490

2489-
The name of a CSS class to apply when rendering the Specific Resource it is associated with.
2491+
The name of a CSS class to apply when rendering the Specific Resource the style class is associated with. This might change the color of the text, the background color, add borders to the element, change the font size or family, or any other CSS-based styling. The class definition is given using the `stylesheet` property, defined below, which can be used on an Annotation. While Specific Resources _MAY_ appear outside of Annotations, `styleClass` is not valid in these circumstances as there will not be a corresponding `stylesheet` to define the style. If the stylesheet does not define the class given in `styleClass`, then the class _MUST_ be ignored.
2492+
2493+
The value of the `styleClass` _MUST_ be a string.
2494+
2495+
For more information about `styleClass`, see the [Web Annotation Data Model](https://www.w3.org/TR/annotation-model/#styles).
24902496

2491-
FIXME: Get rid of styles completely???
2497+
* A Specific Resource _MAY_ have the `styleClass` property.<br/>
2498+
Clients _SHOULD_ process the `styleClass` property.
2499+
2500+
{% include api/code_header.html %}
2501+
``` json-doc
2502+
{ "styleClass": "red" }
2503+
```
24922504

24932505
### stylesheet
24942506
{: #stylesheet}
24952507

2496-
FIXME: Delete???
2508+
The `stylesheet` property conveys either a reference to an external CSS stylesheet document, or carries an embedded stylesheet. This stylesheet is used to resolve CSS classes for processing the `styleClass` directive on Specific Resources, described above.
2509+
2510+
The value for `stylesheet` _MUST_ be a JSON object. If the stylesheet is referenced, then the JSON object _MUST_ have the `id` and `type` properties. Conversely, if the stylesheet's content is embedded, then it _MUST_ have the `type` and `value` properties, and _MUST NOT_ have the `id` property. The value of `type` _MUST_ be "CssStylesheet".
2511+
2512+
For more information about `stylesheet`, see the [Web Annotation Data Model](https://www.w3.org/TR/annotation-model/#styles).
2513+
2514+
* An Annotation _MAY_ have the `stylesheet` property.<br/>
2515+
Clients _SHOULD_ process the `stylesheet` property on Annotations.
2516+
2517+
{% include api/code_header.html %}
2518+
``` json-doc
2519+
{ "stylesheet":
2520+
{
2521+
"type": "CssStylesheet",
2522+
"value": ".red { color: red }"
2523+
}
2524+
}
2525+
```
24972526

24982527

24992528
### summary
@@ -2555,7 +2584,7 @@ The value _MUST_ be an array of JSON objects.
25552584
### temporalScale
25562585
{: #temporalScale}
25572586

2558-
A single UnitValue that defines a multiplier or scale factor for the `duration` property of a Container, indicating that one second in "Container time" represents some other real world duration. A Canvas with a `duration` of 450 seconds and a `temporalScale` with `quantity` 1000 represents a real-world duration of 450,000 seconds (5.2 days), for example a time-lapse video of a growing plant. The value of `unit` _MUST_ be a time unit. In this specification, the only time unit defined is `s`, i.e., seconds. Unless other values are defined externally as an [extension][prezi30-ldce], the value of `unit` _SHOULD_ always be `s`.
2587+
A single Quantity that defines a multiplier or scale factor for the `duration` property of a Container, indicating that one second in "Container time" represents some other real world duration. A Canvas with a `duration` of 450 seconds and a `temporalScale` with `quantityValue` of 1000 and a `unit` of `s` represents a real-world duration of 450,000 seconds (5.2 days), for example a time-lapse video of a growing plant. The value of `unit` _MUST_ be a time unit. In this specification, the only time unit defined is `s`, i.e., seconds. Unless other values are defined externally as an [extension][prezi30-ldce], the value of `unit` _SHOULD_ always be `s`.
25592588

25602589
To assert a `temporalScale` for a Content Resource, the resource _MUST_ first be painted into a Container with a `duration` and the `temporalScale` is asserted on that Container. For example, an Audio file is painted into a Timeline, and then `temporalScale` is asserted on the Timeline.
25612590

@@ -2572,8 +2601,8 @@ To assert a `temporalScale` for a Content Resource, the resource _MUST_ first be
25722601
{
25732602
"type": "Canvas",
25742603
"temporalScale": {
2575-
"type": "UnitValue",
2576-
"quantity": 1000,
2604+
"type": "Quantity",
2605+
"quantityValue": 1000.0,
25772606
"unit": "s"
25782607
}
25792608
}
@@ -2717,7 +2746,7 @@ For compatibility with previous versions, clients _SHOULD_ accept `Sound` as a s
27172746

27182747
### unit
27192748

2720-
The unit of measurement of a quantity expressed by a UnitValue.
2749+
The unit of measurement of a quantity expressed by a Quantity.
27212750

27222751
The value _MUST_ be a string value. This specification defines the values in the table below. Others may be defined externally as an [extension][prezi30-ldce].
27232752

@@ -2727,9 +2756,14 @@ The value _MUST_ be a string value. This specification defines the values in th
27272756
| s | seconds |
27282757
| relative | relative |
27292758

2730-
* A UnitValue _MUST_ have the `unit` property
2759+
* A Quantity _MUST_ have the `unit` property.<br/>
2760+
Clients _SHOULD_ process the `unit` property on Quantity instances.
2761+
2762+
{% include api/code_header.html %}
2763+
``` json-doc
2764+
{ "unit": "m" }
2765+
```
27312766

2732-
FIXME: possible values are 'm' and 's' and 'relative'. Is relative always 0-1.0, or context-dependent (see def of intensity)? Allow extensions?
27332767

27342768
### value
27352769

@@ -2805,18 +2839,18 @@ The value _MUST_ be a string.
28052839
### volume
28062840
{: #volume}
28072841

2808-
The volume property represents the relative volume of an audio source. The `value` of the specified UnitValue represents the desired volume on a linear scale from 0.0 (silence) to 1.0 (maximum volume). If this property is not specified, then the default volume value is client-dependent.
2842+
The volume property represents the relative volume of an audio source. The `quantityValue` of the specified Quantity represents the desired volume on a linear scale from 0.0 (silence) to 1.0 (maximum volume). If this property is not specified, then the default volume value is client-dependent.
28092843

2810-
The value of this property _MUST_ be a UnitValue.
2811-
The `unit` property of the UnitValue _MUST_ be `relative`.
2812-
The `value` property of the UnitValue _MUST_ be between 0.0 and 1.0.
2844+
The value of this property _MUST_ be a Quantity.
2845+
The `unit` property of the Quantity _MUST_ be `relative`.
2846+
The `value` property of the Quantity _MUST_ be between 0.0 and 1.0.
28132847

28142848
* Audio resource types _SHOULD_ have the `volume` property.<br/>
28152849
Clients _SHOULD_ process the `volume` property on an Audio resource.
28162850

28172851
{% include api/code_header.html %}
28182852
``` json-doc
2819-
{ "volume": { "unit": "relative", "value": 0.5 } }
2853+
{ "volume": { "type": "Quantity", "unit": "relative", "quantityValue": 0.5 } }
28202854
```
28212855

28222856

@@ -2912,10 +2946,6 @@ __Incompatibility Warning__<br/>
29122946
The definition of `label` in the Web Annotation specification does not produce JSON conformant with the structure defined in this specification for languages. Given the absolute requirement for internationalized labels and the strong desire for consistently handling properties, the `label` property on Annotation model classes does not conform to the string requirement of the Web Annotation Data Model. This [issue has been filed with the W3C][github-webanno-437] and will hopefully be addressed in a future version of the standard.
29132947
{: .warning}
29142948

2915-
2916-
### FIXME: value, value, and value
2917-
2918-
29192949
The following properties are defined by both, and the IIIF representation is more specific than the Web Annotation Data Model but are not in conflict, or are never used on the same resource:
29202950

29212951
* `homepage`: In IIIF the home page of a resource is represented as a JSON object, whereas in the Web Annotation Data Model it can also be a string.

0 commit comments

Comments
 (0)