cocina-models 0.22.1 → 0.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cd29c6b992de9819fa82a626bcafdea8f0f1e51b4560fa7d291cd4678fb41af
4
- data.tar.gz: ee995bb6243004e09108a727f8bf8024c78387232f1915d3e2cdc3d4ad071729
3
+ metadata.gz: 93d0b9a2418a1c864d36b39293f1e89935519609a9e592594494bc332c0cf601
4
+ data.tar.gz: 59d36afc29361ed9fb1c8d26eb4506bf60b13f697a246a482ac08ef89adaf12c
5
5
  SHA512:
6
- metadata.gz: 61268bb2e1ebf706e77f63878f82529910904efc8e549ccb9a6447dd53bcc7d28ff14f2d5b73f716791df9bdef6eea261e6b54145313a8640822a90386904187
7
- data.tar.gz: 6280645ddd62135e4e8b0a283c724a5b4dbadd737f2840f83549ccd60b5094bb47d8ca10bcbfdbf95184a7228083696a6e73a0df6a6de1a45fdc0fb73b1319dc
6
+ metadata.gz: e0b4a1d3455d766b58fd3888b84917844a1854e1949bfc201089cfe88eb5893863f2f6d479fe33ddd62165feba1b3777bf5cb5d688f90a48ca6ec7099e92918b
7
+ data.tar.gz: 58d2204a1b24673dd719c51ee1b2623e48a94f6d72b47aea4a33ae1a7687d58ff13ccc3e01f47e919b30bedeb6f8f48709e03b072cde91b695683598a15b7d9e
@@ -31,6 +31,16 @@
31
31
  "items": {
32
32
  "type": "string"
33
33
  }
34
+ },
35
+ "viewingDirection": {
36
+ "description": "The direction that a sequence of canvases should be displayed to the user",
37
+ "type": "string",
38
+ "enum": [
39
+ "left-to-right",
40
+ "right-to-left",
41
+ "top-to-bottom",
42
+ "bottom-to-top"
43
+ ]
34
44
  }
35
45
  }
36
46
  }
data/docs/schema.json CHANGED
@@ -1548,6 +1548,18 @@
1548
1548
  "string"
1549
1549
  ]
1550
1550
  }
1551
+ },
1552
+ "viewingDirection": {
1553
+ "description": "The direction that a sequence of canvases should be displayed to the user",
1554
+ "type": [
1555
+ "string"
1556
+ ],
1557
+ "enum": [
1558
+ "left-to-right",
1559
+ "right-to-left",
1560
+ "top-to-bottom",
1561
+ "bottom-to-top"
1562
+ ]
1551
1563
  }
1552
1564
  }
1553
1565
  },
data/docs/schema.md CHANGED
@@ -62,7 +62,7 @@ A group of Digital Repository Objects that indicate some type of conceptual grou
62
62
  | **precedingVersion** | *string* | Preceding version for the Collection within SDR. | `"example"` |
63
63
  | **structural:hasAgreement** | *string* | Agreement that covers the deposit of the Collection into SDR. | `"example"` |
64
64
  | **structural:hasMember** | *array* | Component digital repository objects or collections that are a part of this collection. | `[null]` |
65
- | **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]}]` |
65
+ | **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],"viewingDirection":"left-to-right"}]` |
66
66
  | **structural:isTargetOf** | *string* | An Annotation instance that applies to the Collection. | `"example"` |
67
67
  | **version** | *integer* | Version for the Collection within SDR. | `42` |
68
68
 
@@ -122,7 +122,7 @@ Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction
122
122
  | **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"}}]` |
123
123
  | **structural:hasAgreement** | *string* | Agreement that covers the deposit of the DRO into SDR. | `"example"` |
124
124
  | **structural:hasMember** | *array* | Component or 'children' digital repository objects that are a part or portion of this 'parent' or aggregate DRO. | `[null]` |
125
- | **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]}]` |
125
+ | **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],"viewingDirection":"left-to-right"}]` |
126
126
  | **structural:isMemberOf** | *string* | Collection that this DRO is a member of | `"example"` |
127
127
  | **structural:isTargetOf** | *string* | An Annotation instance that applies to the DRO. | `"example"` |
128
128
  | **version** | *integer* | Version for the DRO within SDR. | `42` |
@@ -250,6 +250,7 @@ A sequence or ordering of resources within a Collection or Object.
250
250
  | **label** | *string* | Label for the sequence or ordering. | `"example"` |
251
251
  | **members** | *array* | Identifiers for Members in their stated Order for the Sequence. | `[null]` |
252
252
  | **startMember** | *string* | Identifier for the first member of the sequence. | `"example"` |
253
+ | **viewingDirection** | *string* | The direction that a sequence of canvases should be displayed to the user<br/> **one of:**`"left-to-right"` or `"right-to-left"` or `"top-to-bottom"` or `"bottom-to-top"` | `"left-to-right"` |
253
254
 
254
255
 
255
256
  ## <a name="resource-Title">Title</a>
@@ -69,7 +69,7 @@ module Cocina
69
69
  attribute(:administrative, Administrative.default { Administrative.new })
70
70
  # Allowing description to be omittable for now (until rolled out to consumers),
71
71
  # but I think it's actually required for every DRO
72
- attribute :description, Description.optional.default(nil)
72
+ attribute :description, Description.optional.meta(omittable: true)
73
73
  attribute(:identification, Identification.default { Identification.new })
74
74
  attribute(:structural, Structural.default { Structural.new })
75
75
 
@@ -16,6 +16,8 @@ module Cocina
16
16
 
17
17
  # Subschema for access concerns
18
18
  class Access < Struct
19
+ attribute :access, Types::String.default('dark')
20
+ .enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
19
21
  end
20
22
 
21
23
  # Subschema for administrative concerns
@@ -42,7 +44,7 @@ module Cocina
42
44
  attribute(:administrative, Administrative.default { Administrative.new })
43
45
  # Allowing description to be omittable for now (until rolled out to consumers),
44
46
  # but I think it's actually required for every DRO
45
- attribute :description, Description.optional.default(nil)
47
+ attribute :description, Description.optional.meta(omittable: true)
46
48
  attribute(:identification, Identification.default { Identification.new })
47
49
  attribute(:structural, Structural.default { Structural.new })
48
50
 
@@ -34,6 +34,8 @@ module Cocina
34
34
  end
35
35
 
36
36
  attribute :embargo, Embargo.optional.meta(omittable: true)
37
+ attribute :access, Types::String.default('dark')
38
+ .enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
37
39
  end
38
40
 
39
41
  # Subschema for administrative concerns
@@ -54,6 +56,7 @@ module Cocina
54
56
  class Structural < Struct
55
57
  attribute :contains, Types::Strict::Array.of(FileSet).meta(omittable: true)
56
58
  attribute :isMemberOf, Types::Strict::String.meta(omittable: true)
59
+ attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
57
60
  end
58
61
 
59
62
  attribute :externalIdentifier, Types::Strict::String
@@ -64,7 +67,7 @@ module Cocina
64
67
  attribute(:administrative, Administrative.default { Administrative.new })
65
68
  # Allowing description to be omittable for now (until rolled out to consumers),
66
69
  # but I think it's actually required for every DRO
67
- attribute :description, Description.optional.default(nil)
70
+ attribute :description, Description.optional.meta(omittable: true)
68
71
  attribute(:identification, Identification.default { Identification.new })
69
72
  attribute(:structural, Structural.default { Structural.new })
70
73
 
@@ -12,7 +12,7 @@ module Cocina
12
12
  attribute(:administrative, AdminPolicy::Administrative.default { AdminPolicy::Administrative.new })
13
13
  # Allowing description to be omittable for now (until rolled out to consumers),
14
14
  # but I think it's actually required for every DRO
15
- attribute :description, Description.optional.default(nil)
15
+ attribute :description, Description.optional.meta(omittable: true)
16
16
  attribute(:identification, AdminPolicy::Identification.default { AdminPolicy::Identification.new })
17
17
  attribute(:structural, AdminPolicy::Structural.default { AdminPolicy::Structural.new })
18
18
 
@@ -13,7 +13,7 @@ module Cocina
13
13
  attribute(:administrative, Collection::Administrative.default { Collection::Administrative.new })
14
14
  # Allowing description to be omittable for now (until rolled out to consumers),
15
15
  # but I think it's actually required for every DRO
16
- attribute :description, Description.optional.default(nil)
16
+ attribute :description, Description.optional.meta(omittable: true)
17
17
  attribute(:identification, Collection::Identification.default { Collection::Identification.new })
18
18
  attribute(:structural, Collection::Structural.default { Collection::Structural.new })
19
19
 
@@ -13,7 +13,7 @@ module Cocina
13
13
  attribute(:administrative, DRO::Administrative.default { DRO::Administrative.new })
14
14
  # Allowing description to be omittable for now (until rolled out to consumers),
15
15
  # but I think it's actually required for every DRO
16
- attribute :description, Description.optional.default(nil)
16
+ attribute :description, Description.optional.meta(omittable: true)
17
17
  attribute(:identification, DRO::Identification.default { DRO::Identification.new })
18
18
  attribute(:structural, DRO::Structural.default { DRO::Structural.new })
19
19
 
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ # Metadata for a sequence. See http://sul-dlss.github.io/cocina-models/maps/Sequence.json
6
+ class Sequence < Struct
7
+ attribute :viewingDirection, Types::String.enum('left-to-right',
8
+ 'right-to-left',
9
+ 'top-to-bottom',
10
+ 'bottom-to-top').optional
11
+ end
12
+ end
13
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.22.1'
5
+ VERSION = '0.22.2'
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.22.1
4
+ version: 0.22.2
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-02-13 00:00:00.000000000 Z
11
+ date: 2020-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -188,6 +188,7 @@ files:
188
188
  - lib/cocina/models/request_admin_policy.rb
189
189
  - lib/cocina/models/request_collection.rb
190
190
  - lib/cocina/models/request_dro.rb
191
+ - lib/cocina/models/sequence.rb
191
192
  - lib/cocina/models/types.rb
192
193
  - lib/cocina/models/version.rb
193
194
  - lib/cocina/models/vocab.rb