Skip to content

Commit 01c5ea8

Browse files
author
Rand McKinney
committed
Finish manifeststore diagram
1 parent be1e225 commit 01c5ea8

File tree

7 files changed

+87
-103
lines changed

7 files changed

+87
-103
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ The reference documentation is generated from JSON schema files in the `_data` d
2323
The schema in `ManifestStore_schema_edited.json` has the following manual edits:
2424
- `ResourceStore` object definition removed.
2525
- Properties of type `ResourceStore` are removed: `Ingredient.resources` and `Manifest.resources`.
26-
- Corrected issues with missing or malformatted shortlinks in descriptions.
26+
- Corrected issues with missing or mis-formatted shortlinks in descriptions.
27+
- Removed `Manifest.claim_generator_hints` property.
28+
- Removed `DateT` object and modified the one property that referred to it, `Metadata.dateTime` to specify a date/time string with ISO 8601 format.
29+
2730

2831
### How to update the JSON schema
2932

_data/ManifestStore_schema_edited.json

+2-19
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@
135135
}
136136
}
137137
},
138-
"DateT": {
139-
"type": "string",
140-
"description": "DateT store date strings in CBOR with datetime Tag(0) This helper class should be used where the C2PA spec specifies a tagged CBOR datatime."
141-
},
142138
"HashedUri": {
143139
"description": "Hashed Uri structure as defined by C2PA spec It is annotated to produce the correctly tagged cbor serialization",
144140
"type": "object",
@@ -316,13 +312,6 @@
316312
"default": "c2pa/0.25.2",
317313
"type": "string"
318314
},
319-
"claim_generator_hints": {
320-
"type": [
321-
"object",
322-
"null"
323-
],
324-
"additionalProperties": true
325-
},
326315
"claim_generator_info": {
327316
"type": [
328317
"array",
@@ -491,14 +480,8 @@
491480
]
492481
},
493482
"dateTime": {
494-
"anyOf": [
495-
{
496-
"$ref": "#/definitions/DateT"
497-
},
498-
{
499-
"type": "null"
500-
}
501-
]
483+
"type": "string",
484+
"description": "A date time in ISO 8601 format."
502485
},
503486
"reference": {
504487
"anyOf": [

_includes/horiz-line.html

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<polyline points="{{include.x-start}},{{include.y}} {{include.x-finish}},{{include.y}}"
2+
style="fill:none;stroke:black;stroke-width:2" />

_includes/prop.html

-8
This file was deleted.

_includes/property.html

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<div style="position: absolute; left: {{include.x}}px; top: {{include.y}}px; font-size: 90%; ">
2+
3+
{% if include.type=="object" and include.obj %}
4+
<div style="display: inline; font-family: 'Courier New', Courier, monospace; font-weight: bold;">{{include.name}}</div>
5+
<div class="manifest-object"><a href="#{{include.obj | downcase}}">{{include.obj}}</a></div>
6+
7+
{% elsif include.type=="object_array" %}
8+
<div style="display: inline;"><span style="font-family: 'Courier New', Courier, monospace; font-weight: bold;">{{include.name}}</span>: Array of </div>
9+
<div class="manifest-object"><a href="#{{include.obj | downcase}}">{{include.obj}}</a></div>
10+
11+
{% elsif include.type=="scalar" %}
12+
{%- if include.desc -%}
13+
<span style="font-family: 'Courier New', Courier, monospace; font-weight: bold;">{{include.name}}</span>{% unless include.desc=="NA" %}: {{include.desc}}{%endunless%}
14+
{%- else -%}
15+
{%- for term in site.data.ManifestStore_schema_edited.definitions -%}
16+
{%- if term.first=="Manifest" -%} <!-- {% comment %} Only for Manifest object currently, could be generalized {% endcomment %} -->
17+
{%- for property in term.last.properties -%}
18+
{% if property.first==include.name %}
19+
<div style="display: table-cell; font-family: 'Courier New', Courier, monospace; font-weight: bold;">{{property.first}}</div>
20+
<div style="display: table-cell; line-height: 100%; padding-top: 0;">{%- if property.last.description -%} {{property.last.description | prepend: ": " | markdownify | remove: "<p>" | remove: "</p>" }} {%- else -%}: <i>Description TBD</i>. {%- endif -%}</div>
21+
{% endif %}
22+
{% endfor %}
23+
{%- endif -%}
24+
{%- endfor -%}
25+
{%- endif -%}
26+
{% endif %}
27+
28+
</div>

_includes/vert-line.html

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<polyline points="{{include.x}},{{include.y-start}} {{include.x}},{{include.y-finish}}"
2+
style="fill:none;stroke:black;stroke-width:2" />

pages/manifest-diagram.md

+49-75
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,68 @@
1-
2-
**ManifestStore**
3-
{: style="margin-bottom: 0;"}
1+
<div class="manifest-object" style="margin-bottom: 0; font-size: 110%;"><a href="#manifeststore">ManifestStore</a></div>
42

53
<div style="position: relative;" markdown="1" >
6-
{% include prop.html name="<code>active_manifest</code>: <i>UUID</i>" x="65" y="25" %}
7-
{% include prop.html name="<code>manifests</code>" x="65" y="65" %}
8-
{% include prop.html name="<i>UUID</i>:" obj="Manifest" x="145" y="125" %}
9-
{% include prop.html name="<i>UUID</i>:" obj="Manifest" x="145" y="165" %}
10-
{% include prop.html name="..." x="145" y="200" %}
11-
{% include prop.html name="<code>validation_status</code>: Array of " obj="ValidationStatus" x="65" y="245" %}
4+
{% include property.html type="scalar" name="active_manifest" desc="<i>UUID</i>" x="65" y="25" %}
5+
{% include property.html type="scalar" name="manifests" desc="NA" x="65" y="65" %}
126

13-
<svg height="300" width="300" style="margin-top: 0;">
14-
<polyline points="20,0 20,260 60,260"
15-
style="fill:none;stroke:black;stroke-width:2" /> <!-- Large "L -->
16-
17-
<polyline points="20,40 60,40"
18-
style="fill:none;stroke:black;stroke-width:2" /> <!-- 1st horiz from large "L" -->
7+
{% include property.html type="object" name="<i>UUID</i>:" obj="Manifest" x="145" y="125" %}
8+
{% include property.html type="object" name="<i>UUID</i>:" obj="Manifest" x="145" y="165" %}
9+
{% include property.html type="scalar" name="..." desc="NA" x="145" y="200" %}
10+
{% include property.html type="object_array" name="validation_status" obj="ValidationStatus" x="65" y="245" %}
1911

20-
<polyline points="20,80 60,80"
21-
style="fill:none;stroke:black;stroke-width:2" /> <!-- 2d horiz from large "L" -->
12+
<svg height="300" width="300" style="margin-top: 0;">
13+
{% include vert-line.html x="20" y-start="0" y-finish="260" %}
14+
{% include horiz-line.html y="40" x-start="20" x-finish="60" %}
15+
{% include horiz-line.html y="80" x-start="20" x-finish="60" %}
16+
{% include horiz-line.html y="260" x-start="20" x-finish="60" %}
2217

23-
<polyline points="100,100 100,220 100,220, 140,220"
24-
style="fill:none;stroke:black;stroke-width:2" /> <!-- Small "L -->
18+
{% include horiz-line.html y="40" x-start="20" x-finish="60" %}
19+
{% include horiz-line.html y="40" x-start="20" x-finish="60" %}
2520

26-
<polyline points="100,140 140,140"
27-
style="fill:none;stroke:black;stroke-width:2" /> <!-- 1st horiz from small "L" -->
21+
{% include vert-line.html x="100" y-start="100" y-finish="220" %} <!-- small vertical -->
2822

29-
<polyline points="100,180 140,180"
30-
style="fill:none;stroke:black;stroke-width:2" /> <!-- 2d horiz from small "L" -->
23+
{% include horiz-line.html y="140" x-start="100" x-finish="140" %}
24+
{% include horiz-line.html y="180" x-start="100" x-finish="140" %}
25+
{% include horiz-line.html y="220" x-start="100" x-finish="140" %}
3126
</svg>
3227
</div>
3328

34-
**Manifest**
35-
{: style="margin-bottom: 0;"}
29+
<div class="manifest-object" style="margin-bottom: 0; font-size: 110%;"><a href="#manifest">Manifest</a></div>
3630

3731
<div style="position: relative;" markdown="1" >
38-
{% include prop.html name="<code>claim_generator</code>" x="65" y="25" %}
39-
{% include prop.html name="<code>title</code>" x="65" y="65" %}
40-
{% include prop.html name="<code>label</code>" x="65" y="105" %}
41-
{% include prop.html name="<code>format</code>" x="65" y="145" %}
42-
{% include prop.html name="<code>instance_id</code>" x="65" y="185" %}
43-
{% include prop.html name="<code>thumbnail:</code>" obj="ResourceRef" x="65" y="225" %}
44-
{% include prop.html name="<code>ingredients</code>: Array of" obj="Ingredient" x="65" y="265" %}
45-
{% include prop.html name="<code>assertions</code>: Array of" obj="ManifestAssertion" x="65" y="305" %}
46-
{% include prop.html name="<code>signature_info</code>" obj="SignatureInfo" x="65" y="345" %}
47-
48-
<svg height="400" width="300" style="margin-top: 0;">
49-
<polyline points="20,0 20,360 60,360"
50-
style="fill:none;stroke:black;stroke-width:2" /> <!-- Large "L -->
32+
{% include property.html type="scalar" name="title" x="65" y="20" %}
33+
{% include property.html type="scalar" name="label" x="65" y="60" %}
34+
{% include property.html type="scalar" name="format" x="65" y="100" %}
35+
{% include property.html type="scalar" name="credentials" x="65" y="140" %}
36+
{% include property.html type="scalar" name="instance_id" x="65" y="180" %}
37+
{% include property.html type="scalar" name="redactions" x="65" y="220" %}
38+
{% include property.html type="scalar" name="claim_generator" x="65" y="260" %}
39+
40+
{% include property.html type="object" name="claim_generator_info" obj="ClaimGeneratorInfo" x="65" y="310" %}
41+
42+
{% include property.html type="object" name="thumbnail" obj="ResourceRef" x="65" y="350" %}
43+
{% include property.html type="object_array" name="ingredients" obj="Ingredient" x="65" y="390" %}
44+
{% include property.html type="object_array" name="assertions" obj="ManifestAssertion" x="65" y="430" %}
45+
{% include property.html type="object" name="signature_info" obj="SignatureInfo" x="65" y="470" %}
46+
47+
<svg height="500" width="300" style="margin-top: 0;">
48+
{% include vert-line.html x="20" y-start="0" y-finish="485" %}
5149

52-
<polyline points="20,40 60,40"
53-
style="fill:none;stroke:black;stroke-width:2" /> <!-- 1st horiz from large "L" -->
54-
55-
<polyline points="20,80 60,80"
56-
style="fill:none;stroke:black;stroke-width:2" /> <!-- 2d horiz from large "L" -->
57-
58-
<polyline points="20,120 60,120"
59-
style="fill:none;stroke:black;stroke-width:2" />
60-
61-
<polyline points="20,160 60,160"
62-
style="fill:none;stroke:black;stroke-width:2" />
63-
64-
<polyline points="20,200 60,200"
65-
style="fill:none;stroke:black;stroke-width:2" />
66-
67-
<polyline points="20,240 60,240"
68-
style="fill:none;stroke:black;stroke-width:2" />
69-
70-
<polyline points="20,280 60,280"
71-
style="fill:none;stroke:black;stroke-width:2" />
72-
73-
<polyline points="20,320 60,320"
74-
style="fill:none;stroke:black;stroke-width:2" />
50+
{% include horiz-line.html y="35" x-start="20" x-finish="60" %}
51+
{% include horiz-line.html y="75" x-start="20" x-finish="60" %}
52+
{% include horiz-line.html y="115" x-start="20" x-finish="60" %}
53+
{% include horiz-line.html y="155" x-start="20" x-finish="60" %}
54+
{% include horiz-line.html y="195" x-start="20" x-finish="60" %}
55+
{% include horiz-line.html y="235" x-start="20" x-finish="60" %}
56+
{% include horiz-line.html y="275" x-start="20" x-finish="60" %}
57+
{% include horiz-line.html y="325" x-start="20" x-finish="60" %}
58+
{% include horiz-line.html y="370" x-start="20" x-finish="60" %}
59+
{% include horiz-line.html y="405" x-start="20" x-finish="60" %}
60+
{% include horiz-line.html y="405" x-start="20" x-finish="60" %}
61+
{% include horiz-line.html y="445" x-start="20" x-finish="60" %}
62+
{% include horiz-line.html y="485" x-start="20" x-finish="60" %}
7563
</svg>
7664
</div>
7765

78-
To add: claim_generator_hints, claim_generator_info, credentials, redactions
79-
80-
<!--
81-
{% assign schema = site.data.ManifestStore_schema_edited %}
82-
83-
{% for term in schema.definitions %}
84-
{% if term.first=="Manifest" %}
85-
{% assign entity = term.last %}
8666

87-
{%- for property in entity.properties -%}
88-
- {{property.first}}
8967

90-
{% endfor %}
91-
{% endif %}
92-
{% endfor %}
93-
-->
9468

0 commit comments

Comments
 (0)