cocina-models 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,220 @@
1
+
2
+ ## <a name="resource-Agent">Agent</a>
3
+
4
+
5
+ An Agent - Person, Group, Organization, or other Acting body.
6
+
7
+ ### Attributes
8
+
9
+ | Name | Type | Description | Example |
10
+ | ------- | ------- | ------- | ------- |
11
+ | **name** | *string* | Primary label or name for an Agent. | `"example"` |
12
+ | **sunetID** | *string* | Stanford University NetID for the Agent. | `"example"` |
13
+
14
+
15
+ ## <a name="resource-Collection">Digital Repository Collection</a>
16
+
17
+
18
+ A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system.
19
+
20
+ ### Attributes
21
+
22
+ | Name | Type | Description | Example |
23
+ | ------- | ------- | ------- | ------- |
24
+ | **@context** | *string* | URI for the JSON-LD context definitions. | `"example"` |
25
+ | **@type** | *string* | The content type of the Collection. Selected from an established set of values.<br/> **one of:**`"http://cocina.sul.stanford.edu/models/collection.jsonld"` or `"http://cocina.sul.stanford.edu/models/curated-collection.jsonld"` or `"http://cocina.sul.stanford.edu/models/user-collection.jsonld"` or `"http://cocina.sul.stanford.edu/models/exhibit.jsonld"` or `"http://cocina.sul.stanford.edu/models/series.jsonld"` | `"http://cocina.sul.stanford.edu/models/collection.jsonld"` |
26
+ | **access:access** | *string* | Access level for the Collection.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
27
+ | **access:copyright** | *string* | The human readable copyright statement that applies to the Collection. | `"example"` |
28
+ | **access:download** | *string* | Download level for the Collection metadata.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
29
+ | **access:embargoReleaseDate** | *date-time* | Date when the Collection is released from an embargo, if an embargo exists. | `"2015-01-01T12:00:00Z"` |
30
+ | **access:license** | *string* | The license governing reuse of the Collection. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.). | `"example"` |
31
+ | **access:reuseAndReproductionStatement** | *string* | The human readable reuse and reproduction statement that applies to the Collection. | `"example"` |
32
+ | **access:termsOfUse** | *string* | License or terms of use governing reuse of the Collection. Should be a text statement. | `"example"` |
33
+ | **administrative:created** | *date-time* | When the resource in SDR was created. | `"2015-01-01T12:00:00Z"` |
34
+ | **administrative:deleted** | *boolean* | If the resource has been deleted (but not purged). | `true` |
35
+ | **administrative:gravestoneMessage** | *string* | Message describing why the object was deleted. | `"example"` |
36
+ | **administrative:isDescribedBy** | *string* | PURL/XML file that is a traditional representation of the metadata for the Collection. | `"example"` |
37
+ | **administrative:lastUpdated** | *date-time* | When the resource in SDR was last updated. | `"2015-01-01T12:00:00Z"` |
38
+ | **administrative:partOfProject** | *string* | Administrative or Internal project this resource is a part of. | `"example"` |
39
+ | **administrative:remediatedBy** | *array* | The Agent (User, Group, Application, Department, other) that remediated a Collection in SDR. | `[{"name":"example","sunetID":"example"}]` |
40
+ | **administrative:sdrPreserve** | *boolean* | If this resource should be sent to Preservation. | `true` |
41
+ | **citation** | *string* | Citation for the resource, including identifier, label, version, and a persistent URL to the object with SDR at the very least. | `"example"` |
42
+ | **dedupeIdentifier** | *string* | Identifier retrieved from identification.sourceId that stands for analog or source identifier that this resource is a digital representation of. | `"example"` |
43
+ | **depositor:name** | *string* | Primary label or name for an Agent. | `"example"` |
44
+ | **depositor:sunetID** | *string* | Stanford University NetID for the Agent. | `"example"` |
45
+ | **externalIdentifier** | *string* | Identifier for the resource within the SDR architecture but outside of the repository. DRUID or UUID depending on resource type. Constant across resource versions. What clients will use calling the repository. Same as `identification.identifier` | `"example"` |
46
+ | **followingVersion** | *string* | Following version for the Collection within SDR. | `"example"` |
47
+ | **identification:DOI** | *string* | Digital Object Identifier (DOI) for the Collection within this repository. | `"example"` |
48
+ | **identification:catalogLinks/catalog** | *string* | Catalog that is the source of the linked record. | `"example"` |
49
+ | **identification:catalogLinks/catalogRecordId** | *string* | Record identifier that is unique within the context of the linked record's catalog. | `"example"` |
50
+ | **identification:catalogLinks/deliverMetadata** | *boolean* | If the linked record should be automatically updated when the Collection descriptive metadata changes. | `true` |
51
+ | **identification:catalogLinks/deriveMetadata** | *boolean* | If the Collection descriptive metadata should be automatically updated when the linked record changes. | `true` |
52
+ | **identification:catalogLinks/recordSchema** | *string* | Metadata schema of the linked record. | `"example"` |
53
+ | **identification:catalogLinks/recordScope** | *string* | Whether the linked record describes a resource that is broader than, equivalent to, or narrower than the resource the Collection represents.<br/> **one of:**`"broader"` or `"equivalent"` or `"narrower"` | `"broader"` |
54
+ | **identification:identifier** | *string* | Identifier for the Collection within the Stanford Digital Repository system | `"example"` |
55
+ | **identification:sameAs** | *string* | Another object, either external or internal to the system (if duplication occurs) that is the same digital resource as this Collection. | `"example"` |
56
+ | **identification:sdrUUID** | *string* | UUID previously minted for the resource within SDR2 / Fedora 3. | `"example"` |
57
+ | **identification:sourceId** | *string* | A source resource or object (perhaps but not necessarily analog or physical) that the Collection is a digital representation of. | `"example"` |
58
+ | **internalIdentifier** | *string* | Identifier for the resource within the repository. UUID, unique for each new version of a repository resource. | `"example"` |
59
+ | **label** | *string* | Primary processing label (can be same as title) for a Collection. | `"example"` |
60
+ | **precedingVersion** | *string* | Preceding version for the Collection within SDR. | `"example"` |
61
+ | **structural:hasAgreement** | *string* | Agreement that covers the deposit of the Collection into SDR. | `"example"` |
62
+ | **structural:hasMember** | *array* | Component digital repository objects or collections that are a part of this collection. | `[null]` |
63
+ | **structural:hasMemberOrders** | *array* | Provided sequences or orderings of members of the Collection, including some metadata about each sequence (i.e. sequence label, sequence type, if the sequence is primary, etc.). | `[{"@context":"example","@type":"http://cocina.sul.stanford.edu/models/sequence.jsonld","label":"example","startMember":"example","members":[null]}]` |
64
+ | **structural:isTargetOf** | *string* | An Annotation instance that applies to the Collection. | `"example"` |
65
+ | **version** | *integer* | Version for the Collection within SDR. | `42` |
66
+
67
+
68
+ ## <a name="resource-DRO">Digital Repository Object</a>
69
+
70
+
71
+ Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction is describable for our domain’s purposes, i.e. for management needs within our system.
72
+
73
+ ### Attributes
74
+
75
+ | Name | Type | Description | Example |
76
+ | ------- | ------- | ------- | ------- |
77
+ | **@context** | *string* | URI for the JSON-LD context definitions. | `"example"` |
78
+ | **@type** | *string* | The content type of the DRO. Selected from an established set of values.<br/> **one of:**`"http://cocina.sul.stanford.edu/models/object.jsonld"` or `"http://cocina.sul.stanford.edu/models/3d.jsonld"` or `"http://cocina.sul.stanford.edu/models/agreement.jsonld"` or `"http://cocina.sul.stanford.edu/models/book.jsonld"` or `"http://cocina.sul.stanford.edu/models/document.jsonld"` or `"http://cocina.sul.stanford.edu/models/geo.jsonld"` or `"http://cocina.sul.stanford.edu/models/image.jsonld"` or `"http://cocina.sul.stanford.edu/models/page.jsonld"` or `"http://cocina.sul.stanford.edu/models/photograph.jsonld"` or `"http://cocina.sul.stanford.edu/models/manuscript.jsonld"` or `"http://cocina.sul.stanford.edu/models/map.jsonld"` or `"http://cocina.sul.stanford.edu/models/media.jsonld"` or `"http://cocina.sul.stanford.edu/models/track.jsonld"` or `"http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld"` or `"http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld"` | `"http://cocina.sul.stanford.edu/models/object.jsonld"` |
79
+ | **access:access** | *string* | Access level for the DRO.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
80
+ | **access:copyright** | *string* | The human readable copyright statement that applies to the DRO. | `"example"` |
81
+ | **access:download** | *string* | Download level for the DRO metadata.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
82
+ | **access:embargoReleaseDate** | *date-time* | Date when the DRO is released from an embargo, if an embargo exists. | `"2015-01-01T12:00:00Z"` |
83
+ | **access:license** | *string* | The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.). | `"example"` |
84
+ | **access:reuseAndReproductionStatement** | *string* | The human readable reuse and reproduction statement that applies to the DRO. | `"example"` |
85
+ | **access:termsOfUse** | *string* | License or terms of use governing reuse of the DRO. Should be a text statement. | `"example"` |
86
+ | **access:visibility** | *integer* | Percentage of the DRO that is visibility during an embargo period | `42` |
87
+ | **administrative:created** | *date-time* | When the resource in SDR was created. | `"2015-01-01T12:00:00Z"` |
88
+ | **administrative:deleted** | *boolean* | If the resource has been deleted (but not purged). | `true` |
89
+ | **administrative:gravestoneMessage** | *string* | Message describing why the object was deleted. | `"example"` |
90
+ | **administrative:isDescribedBy** | *string* | Pointer to the PURL/XML file that is a traditional representation of the metadata for the DRO. | `"example"` |
91
+ | **administrative:lastUpdated** | *date-time* | When the resource in SDR was last updated. | `"2015-01-01T12:00:00Z"` |
92
+ | **administrative:partOfProject** | *string* | Administrative or Internal project this resource is a part of. | `"example"` |
93
+ | **administrative:remediatedBy** | *array* | The Agent (User, Group, Application, Department, other) that remediated a DRO in SDR. | `[{"name":"example","sunetID":"example"}]` |
94
+ | **administrative:sdrPreserve** | *boolean* | If this resource should be sent to Preservation. | `true` |
95
+ | **citation** | *string* | Citation for the resource, including identifier, label, version, and a persistent URL to the object with SDR at the very least. | `"example"` |
96
+ | **dedupeIdentifier** | *string* | Identifier retrieved from identification.sourceId that stands for analog or source identifier that this resource is a digital representation of. | `"example"` |
97
+ | **depositor:name** | *string* | Primary label or name for an Agent. | `"example"` |
98
+ | **depositor:sunetID** | *string* | Stanford University NetID for the Agent. | `"example"` |
99
+ | **externalIdentifier** | *string* | Identifier for the resource within the SDR architecture but outside of the repository. DRUID or UUID depending on resource type. Constant across resource versions. What clients will use calling the repository. Same as `identification.identifier` | `"example"` |
100
+ | **followingVersion** | *string* | Following version for the Object within SDR. | `"example"` |
101
+ | **identification:catalogLinks/catalog** | *string* | Catalog that is the source of the linked record. | `"example"` |
102
+ | **identification:catalogLinks/catalogRecordId** | *string* | Record identifier that is unique within the context of the linked record's catalog. | `"example"` |
103
+ | **identification:catalogLinks/deliverMetadata** | *boolean* | If the linked record should be automatically updated when the DRO descriptive metadata changes. | `true` |
104
+ | **identification:catalogLinks/deriveMetadata** | *boolean* | If the DRO descriptive metadata should be automatically updated when the linked record changes. | `true` |
105
+ | **identification:catalogLinks/recordSchema** | *string* | Metadata schema of the linked record. | `"example"` |
106
+ | **identification:catalogLinks/recordScope** | *string* | Whether the linked record describes a resource that is broader than, equivalent to, or narrower than the resource the DRO represents.<br/> **one of:**`"broader"` or `"equivalent"` or `"narrower"` | `"broader"` |
107
+ | **identification:doi** | *string* | Digital Object Identifier (DOI) for the DRO within this repository. | `"example"` |
108
+ | **identification:identifier** | *string* | Identifier for the Digital Repository Object within the Stanford Digital Repository system | `"example"` |
109
+ | **identification:sameAs** | *string* | Another object, either external or internal to the system (if duplication occurs) that is the same digital resource as this DRO. | `"example"` |
110
+ | **identification:sdrUUID** | *string* | UUID previously minted for the resource within SDR2 / Fedora 3. | `"example"` |
111
+ | **identification:sourceId** | *string* | A source resource or object (perhaps but not necessarily analog or physical) that the DRO is a digital representation of. | `"example"` |
112
+ | **internalIdentifier** | *string* | Identifier for the resource within the repository. UUID, unique for each new version of a repository resource. | `"example"` |
113
+ | **label** | *string* | Primary processing label (can be same as title) for a DRO. | `"example"` |
114
+ | **permissions:approvalRequired** | *boolean* | Indicates if approval is required to deposit or manage the resource in SDR. | `true` |
115
+ | **permissions:approvers** | *array* | Agents who are required to approve deposit or management of this resource in SDR. | `[{"name":"example","sunetID":"example"}]` |
116
+ | **precedingVersion** | *string* | Preceding version for the Object within SDR. | `"example"` |
117
+ | **structural:contains** | *array* | Filesets that contain the digital representations (Files) of the DRO. | `[{"@context":"example","@type":"http://cocina.sul.stanford.edu/models/fileset.jsonld","depositor":{"name":"example","sunetID":"example"},"label":"example","externalIdentifier":"example","internalIdentifier":"example","version":42,"precedingVersion":"example","followingVersion":"example","access":{"access":"world","download":"world"},"administrative":{"created":"2015-01-01T12:00:00Z","deleted":true,"gravestoneMessage":"example","lastUpdated":"2015-01-01T12:00:00Z","partOfProject":"example","sdrPreserve":true,"remediatedBy":[{"name":"example","sunetID":"example"}]},"identification":{"identifier":"example","sdrUUID":"example"},"structural":{"contains":[{"@context":"example","@type":"http://cocina.sul.stanford.edu/models/file.jsonld","depositor":{"name":"example","sunetID":"example"},"externalIdentifier":"example","filename":"example","format":"example","hasMessageDigests":[{"type":"md5","digest":"example"}],"hasMimeType":"example","label":"example","presentation":{"height":42,"width":42},"size":42,"internalIdentifier":"example","use":"example","version":42,"precedingVersion":"example","followingVersion":"example","access":{"access":"world","download":"world"},"administrative":{"created":"2015-01-01T12:00:00Z","deleted":true,"gravestoneMessage":"example","lastUpdated":"2015-01-01T12:00:00Z","partOfProject":"example","sdrPreserve":true,"shelve":true,"remediatedBy":[{"name":"example","sunetID":"example"}]},"identification":{"filename":"example","identifier":"example","sdrUUID":"example"},"structural":{"isContainedBy":"example","isTargetOf":"example"}}],"isContainedBy":"example","isTargetOf":"example"}}]` |
118
+ | **structural:hasAgreement** | *string* | Agreement that covers the deposit of the DRO into SDR. | `"example"` |
119
+ | **structural:hasMember** | *array* | Component or 'children' digital repository objects that are a part or portion of this 'parent' or aggregate DRO. | `[null]` |
120
+ | **structural:hasMemberOrders** | *array* | Provided sequences or orderings of members of the Object, including some metadata about each sequence (i.e. sequence label, sequence type, if the sequence is primary, etc.). | `[{"@context":"example","@type":"http://cocina.sul.stanford.edu/models/sequence.jsonld","label":"example","startMember":"example","members":[null]}]` |
121
+ | **structural:isTargetOf** | *string* | An Annotation instance that applies to the DRO. | `"example"` |
122
+ | **version** | *integer* | Version for the DRO within SDR. | `42` |
123
+
124
+
125
+ ## <a name="resource-File">File</a>
126
+
127
+
128
+ Binaries that are the basis of what our domain manages. Binaries here do not include metadata files generated for the domain's own management purposes.
129
+
130
+ ### Attributes
131
+
132
+ | Name | Type | Description | Example |
133
+ | ------- | ------- | ------- | ------- |
134
+ | **@context** | *string* | URI for the JSON-LD context definitions. | `"example"` |
135
+ | **@type** | *string* | The content type of the File.<br/> **one of:**`"http://cocina.sul.stanford.edu/models/file.jsonld"` | `"http://cocina.sul.stanford.edu/models/file.jsonld"` |
136
+ | **access:access** | *string* | Access level for the File.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
137
+ | **access:download** | *string* | Download level for the File binary.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
138
+ | **administrative:created** | *date-time* | When the resource in SDR was created. | `"2015-01-01T12:00:00Z"` |
139
+ | **administrative:deleted** | *boolean* | If the resource has been deleted (but not purged). | `true` |
140
+ | **administrative:gravestoneMessage** | *string* | Message describing why the resource was deleted. | `"example"` |
141
+ | **administrative:lastUpdated** | *date-time* | When the resource in SDR was last updated. | `"2015-01-01T12:00:00Z"` |
142
+ | **administrative:partOfProject** | *string* | Administrative or Internal project this resource is a part of. | `"example"` |
143
+ | **administrative:remediatedBy** | *array* | The Agent (User, Group, Application, Department, other) that remediated this File in SDR. | `[{"name":"example","sunetID":"example"}]` |
144
+ | **administrative:sdrPreserve** | *boolean* | If this resource should be sent to Preservation. | `true` |
145
+ | **administrative:shelve** | *boolean* | If this resource should be sent to Stacks. | `true` |
146
+ | **depositor:name** | *string* | Primary label or name for an Agent. | `"example"` |
147
+ | **depositor:sunetID** | *string* | Stanford University NetID for the Agent. | `"example"` |
148
+ | **externalIdentifier** | *string* | Identifier for the resource within the SDR architecture but outside of the repository. UUID. Constant across resource versions. What clients will use calling the repository. Same as `identification.identifier` | `"example"` |
149
+ | **filename** | *string* | Filename for a file. Can be same as label. | `"example"` |
150
+ | **followingVersion** | *string* | Following version for the File within SDR. | `"example"` |
151
+ | **format** | *string* | Format of the File. | `"example"` |
152
+ | **hasMessageDigests/digest** | *string* | The digest value | `"example"` |
153
+ | **hasMessageDigests/type** | *string* | The algorithm that was used<br/> **one of:**`"md5"` or `"sha1"` | `"md5"` |
154
+ | **hasMimeType** | *string* | MIME Type of the File. | `"example"` |
155
+ | **identification:filename** | *string* | Filename for the File from originating systems. | `"example"` |
156
+ | **identification:identifier** | *string* | Identifier for the File within the Stanford Digital Repository system | `"example"` |
157
+ | **identification:sdrUUID** | *string* | UUID previously minted for the resource within SDR2 / Fedora 3. | `"example"` |
158
+ | **internalIdentifier** | *string* | Identifier for the resource within the repository. UUID, unique for each new version of a repository resource. | `"example"` |
159
+ | **label** | *string* | Primary processing label (can be same as title) for a File. | `"example"` |
160
+ | **precedingVersion** | *string* | Preceding version for the File within SDR. | `"example"` |
161
+ | **presentation:height** | *integer* | Height in pixels | `42` |
162
+ | **presentation:width** | *integer* | Width in pixels | `42` |
163
+ | **size** | *integer* | Size of the File (binary) in bytes. | `42` |
164
+ | **structural:isContainedBy** | *string* | Fileset that contains this File. | `"example"` |
165
+ | **structural:isTargetOf** | *string* | An Annotation instance that applies to this File. | `"example"` |
166
+ | **use** | *string* | Use for the File. | `"example"` |
167
+ | **version** | *integer* | Version for the File within SDR. | `42` |
168
+
169
+
170
+ ## <a name="resource-Fileset">Fileset</a>
171
+
172
+
173
+ Relevant groupings of Files. Also called a File Grouping.
174
+
175
+ ### Attributes
176
+
177
+ | Name | Type | Description | Example |
178
+ | ------- | ------- | ------- | ------- |
179
+ | **@context** | *string* | URI for the JSON-LD context definitions. | `"example"` |
180
+ | **@type** | *string* | The content type of the Fileset.<br/> **one of:**`"http://cocina.sul.stanford.edu/models/fileset.jsonld"` | `"http://cocina.sul.stanford.edu/models/fileset.jsonld"` |
181
+ | **access:access** | *string* | Access level for the Fileset.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
182
+ | **access:download** | *string* | Download level for the Fileset metadata.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
183
+ | **administrative:created** | *date-time* | When the resource in SDR was created. | `"2015-01-01T12:00:00Z"` |
184
+ | **administrative:deleted** | *boolean* | If the resource has been deleted (but not purged). | `true` |
185
+ | **administrative:gravestoneMessage** | *string* | Message describing why the resource was deleted. | `"example"` |
186
+ | **administrative:lastUpdated** | *date-time* | When the resource in SDR was last updated. | `"2015-01-01T12:00:00Z"` |
187
+ | **administrative:partOfProject** | *string* | Administrative or Internal project this resource is a part of. | `"example"` |
188
+ | **administrative:remediatedBy** | *array* | The Agent (User, Group, Application, Department, other) that remediated a Fileset in SDR. | `[{"name":"example","sunetID":"example"}]` |
189
+ | **administrative:sdrPreserve** | *boolean* | If this resource should be sent to Preservation. | `true` |
190
+ | **depositor:name** | *string* | Primary label or name for an Agent. | `"example"` |
191
+ | **depositor:sunetID** | *string* | Stanford University NetID for the Agent. | `"example"` |
192
+ | **externalIdentifier** | *string* | Identifier for the resource within the SDR architecture but outside of the repository. UUID. Constant across resource versions. What clients will use calling the repository. Same as `identification.identifier` | `"example"` |
193
+ | **followingVersion** | *string* | Following version for the Fileset within SDR. | `"example"` |
194
+ | **identification:identifier** | *string* | Identifier for the Fileset within the Stanford Digital Repository system | `"example"` |
195
+ | **identification:sdrUUID** | *string* | UUID previously minted for the resource within SDR2 / Fedora 3. | `"example"` |
196
+ | **internalIdentifier** | *string* | Identifier for the resource within the repository. UUID, unique for each new version of a repository resource. | `"example"` |
197
+ | **label** | *string* | Primary processing label (can be same as title) for a Fileset. | `"example"` |
198
+ | **precedingVersion** | *string* | Preceding version for the Fileset within SDR. | `"example"` |
199
+ | **structural:contains** | *array* | Files that are members of the fileset. | `[{"@context":"example","@type":"http://cocina.sul.stanford.edu/models/file.jsonld","depositor":{"name":"example","sunetID":"example"},"externalIdentifier":"example","filename":"example","format":"example","hasMessageDigests":[{"type":"md5","digest":"example"}],"hasMimeType":"example","label":"example","presentation":{"height":42,"width":42},"size":42,"internalIdentifier":"example","use":"example","version":42,"precedingVersion":"example","followingVersion":"example","access":{"access":"world","download":"world"},"administrative":{"created":"2015-01-01T12:00:00Z","deleted":true,"gravestoneMessage":"example","lastUpdated":"2015-01-01T12:00:00Z","partOfProject":"example","sdrPreserve":true,"shelve":true,"remediatedBy":[{"name":"example","sunetID":"example"}]},"identification":{"filename":"example","identifier":"example","sdrUUID":"example"},"structural":{"isContainedBy":"example","isTargetOf":"example"}}]` |
200
+ | **structural:isContainedBy** | *string* | Parent DRO that is represented by the files in this Fileset. | `"example"` |
201
+ | **structural:isTargetOf** | *string* | An Annotation instance that applies to this Fileset. | `"example"` |
202
+ | **version** | *integer* | Version for the Fileset within SDR. | `42` |
203
+
204
+
205
+ ## <a name="resource-Sequence">Resource Sequence</a>
206
+
207
+
208
+ A sequence or ordering of resources within a Collection or Object.
209
+
210
+ ### Attributes
211
+
212
+ | Name | Type | Description | Example |
213
+ | ------- | ------- | ------- | ------- |
214
+ | **@context** | *string* | URI for the JSON-LD context definitions. | `"example"` |
215
+ | **@type** | *string* | The type of Sequence.<br/> **one of:**`"http://cocina.sul.stanford.edu/models/sequence.jsonld"` or `"http://cocina.sul.stanford.edu/models/primary-sequence.jsonld"` | `"http://cocina.sul.stanford.edu/models/sequence.jsonld"` |
216
+ | **label** | *string* | Label for the sequence or ordering. | `"example"` |
217
+ | **members** | *array* | Identifiers for Members in their stated Order for the Sequence. | `[null]` |
218
+ | **startMember** | *string* | Identifier for the first member of the sequence. | `"example"` |
219
+
220
+
@@ -56,11 +56,16 @@ module Cocina
56
56
  # which workflow to start when registering (used by Web Archive apos to start wasCrawlPreassemblyWF)
57
57
  attribute :registration_workflow, Types::String.optional.default(nil)
58
58
 
59
+ # Allowing hasAdminPolicy to be omittable for now (until rolled out to consumers),
60
+ # but I think it's actually required for every Admin Policy
61
+ attribute :hasAdminPolicy, Types::Coercible::String.optional.default(nil)
62
+
59
63
  def self.from_dynamic(dyn)
60
64
  params = {
61
65
  default_object_rights: dyn['default_object_rights'],
62
66
  registration_workflow: dyn['registration_workflow']
63
67
  }
68
+ params[:hasAdminPolicy] = dyn['hasAdminPolicy']
64
69
  Administrative.new(params)
65
70
  end
66
71
  end
@@ -26,7 +26,7 @@ module Cocina
26
26
 
27
27
  # Subschema for administrative concerns
28
28
  class Administrative < Dry::Struct
29
- attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).meta(omittable: true)
29
+ attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).default([].freeze)
30
30
  # Allowing hasAdminPolicy to be omittable for now (until rolled out to consumers),
31
31
  # but I think it's actually required for every DRO
32
32
  attribute :hasAdminPolicy, Types::Coercible::String.optional.default(nil)
@@ -39,7 +39,7 @@ module Cocina
39
39
 
40
40
  # Subschema for administrative concerns
41
41
  class Administrative < Dry::Struct
42
- attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).meta(omittable: true)
42
+ attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).meta(omittable: true).default([].freeze)
43
43
  # Allowing hasAdminPolicy to be omittable for now (until rolled out to consumers),
44
44
  # but I think it's actually required for every DRO
45
45
  attribute :hasAdminPolicy, Types::Coercible::String.optional.default(nil)
@@ -58,9 +58,11 @@ module Cocina
58
58
  # Structural sub-schema for the DRO
59
59
  class Structural < Dry::Struct
60
60
  attribute :contains, Types::Strict::Array.of(FileSet).meta(omittable: true)
61
+ attribute :isMemberOf, Types::Strict::String.meta(omittable: true)
61
62
 
62
63
  def self.from_dynamic(dyn)
63
64
  params = {}
65
+ params[:isMemberOf] = dyn['isMemberOf'] if dyn['isMemberOf']
64
66
  params[:contains] = dyn['contains'].map { |fs| FileSet.from_dynamic(fs) } if dyn['contains']
65
67
  Structural.new(params)
66
68
  end
@@ -12,6 +12,37 @@ module Cocina
12
12
  Vocab.file
13
13
  ].freeze
14
14
 
15
+ # Represents access controls on the file
16
+ class Access < Dry::Struct
17
+ attribute :access, Types::String.default('dark')
18
+ .enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
19
+
20
+ def self.from_dynamic(dyn)
21
+ return unless dyn
22
+
23
+ params = {}
24
+ params[:access] = dyn['access'] if dyn['access']
25
+
26
+ Access.new(params)
27
+ end
28
+ end
29
+
30
+ # Represents the administration of the file
31
+ class Administrative < Dry::Struct
32
+ attribute :sdrPreserve, Types::Params::Bool.optional.default(false)
33
+ attribute :shelve, Types::Params::Bool.optional.default(false)
34
+
35
+ def self.from_dynamic(dyn)
36
+ return unless dyn
37
+
38
+ params = {
39
+ sdrPreserve: dyn['sdrPreserve'],
40
+ shelve: dyn['shelve']
41
+ }
42
+ Administrative.new(params)
43
+ end
44
+ end
45
+
15
46
  class Identification < Dry::Struct
16
47
  end
17
48
 
@@ -39,6 +70,8 @@ module Cocina
39
70
  attribute :width, Types::Coercible::Integer.optional.default(nil)
40
71
 
41
72
  def self.from_dynamic(dyn)
73
+ return unless dyn
74
+
42
75
  params = {
43
76
  height: dyn['height'],
44
77
  width: dyn['width']
@@ -48,14 +81,16 @@ module Cocina
48
81
  end
49
82
  end
50
83
 
84
+ attribute(:access, Access.optional.default { Access.new })
85
+ attribute(:administrative, Administrative.default { Administrative.new })
51
86
  attribute :externalIdentifier, Types::Strict::String
52
87
  attribute :type, Types::String.enum(*TYPES)
53
88
  attribute :label, Types::Strict::String
54
89
  attribute :filename, Types::String.optional.default(nil)
55
90
  attribute :use, Types::String.enum('original', 'preservation', 'access').optional.default(nil)
56
91
  attribute :size, Types::Coercible::Integer.optional.default(nil)
57
- attribute :hasMessageDigests, Types::Strict::Array.of(Fixity).default([])
58
- attribute :presentation, Presentation.optional.default(Presentation.new)
92
+ attribute :hasMessageDigests, Types::Strict::Array.of(Fixity).default([].freeze)
93
+ attribute(:presentation, Presentation.optional.default { Presentation.new })
59
94
  attribute :version, Types::Coercible::Integer
60
95
  attribute(:identification, Identification.default { Identification.new })
61
96
  attribute(:structural, Structural.default { Structural.new })
@@ -69,10 +104,10 @@ module Cocina
69
104
  size: dyn['size'],
70
105
  use: dyn['use']
71
106
  }
72
- params[:presentation] = Presentation.from_dynamic(dyn['presentation']) if dyn['presentation']
73
- if dyn['hasMessageDigests']
74
- params[:hasMessageDigests] = dyn['hasMessageDigests'].map { |p| Fixity.from_dynamic(p) }
75
- end
107
+ params[:administrative] = Administrative.from_dynamic(dyn['administrative'])
108
+ params[:presentation] = Presentation.from_dynamic(dyn['presentation'])
109
+ params[:access] = Access.from_dynamic(dyn['access'])
110
+ params[:hasMessageDigests] = Array(dyn['hasMessageDigests']).map { |p| Fixity.from_dynamic(p) }
76
111
  File.new(params)
77
112
  end
78
113
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.14.0'
5
+ VERSION = '0.15.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocina-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-30 00:00:00.000000000 Z
11
+ date: 2020-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -164,11 +164,15 @@ files:
164
164
  - docs/maps/File.json
165
165
  - docs/maps/Fileset.json
166
166
  - docs/maps/README.md
167
+ - docs/maps/ReleaseTag.json
167
168
  - docs/maps/Sequence.json
169
+ - docs/meta.json
168
170
  - docs/sampleETD/foxml-export.xml
169
171
  - docs/sampleETD/foxml.xml
170
172
  - docs/sampleETD/xn109qc9773_bibframe.ttl
171
173
  - docs/sampleETD/xn109qc9773_taco.json
174
+ - docs/schema.json
175
+ - docs/schema.md
172
176
  - lib/cocina/models.rb
173
177
  - lib/cocina/models/admin_policy.rb
174
178
  - lib/cocina/models/checkable.rb
@@ -198,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
202
  - !ruby/object:Gem::Version
199
203
  version: '0'
200
204
  requirements: []
201
- rubygems_version: 3.0.3
205
+ rubygems_version: 3.0.6
202
206
  signing_key:
203
207
  specification_version: 4
204
208
  summary: Data models for the SDR