cocina-models 0.29.0 → 0.33.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +51 -0
  3. data/.github/pull_request_template.md +8 -1
  4. data/.rubocop.yml +14 -3
  5. data/README.md +21 -13
  6. data/cocina-models.gemspec +6 -1
  7. data/docs/index.html +20 -0
  8. data/docs/maps/DRO.json +1 -1
  9. data/exe/generator +9 -0
  10. data/lib/cocina/generator.rb +7 -0
  11. data/lib/cocina/generator/generator.rb +80 -0
  12. data/lib/cocina/generator/schema.rb +105 -0
  13. data/lib/cocina/generator/schema_array.rb +24 -0
  14. data/lib/cocina/generator/schema_base.rb +71 -0
  15. data/lib/cocina/generator/schema_ref.rb +16 -0
  16. data/lib/cocina/generator/schema_value.rb +38 -0
  17. data/lib/cocina/generator/vocab.rb +63 -0
  18. data/lib/cocina/models.rb +54 -25
  19. data/lib/cocina/models/access.rb +14 -0
  20. data/lib/cocina/models/admin_policy.rb +13 -56
  21. data/lib/cocina/models/admin_policy_administrative.rb +11 -0
  22. data/lib/cocina/models/administrative.rb +14 -0
  23. data/lib/cocina/models/applies_to.rb +9 -0
  24. data/lib/cocina/models/catalog_link.rb +4 -1
  25. data/lib/cocina/models/collection.rb +21 -31
  26. data/lib/cocina/models/collection_identification.rb +9 -0
  27. data/lib/cocina/models/contributor.rb +14 -0
  28. data/lib/cocina/models/description.rb +16 -7
  29. data/lib/cocina/models/descriptive_admin_metadata.rb +12 -0
  30. data/lib/cocina/models/descriptive_basic_value.rb +21 -0
  31. data/lib/cocina/models/descriptive_structured_value.rb +9 -0
  32. data/lib/cocina/models/descriptive_value.rb +23 -0
  33. data/lib/cocina/models/descriptive_value_required.rb +23 -0
  34. data/lib/cocina/models/dro.rb +34 -70
  35. data/lib/cocina/models/dro_access.rb +22 -0
  36. data/lib/cocina/models/dro_structural.rb +14 -0
  37. data/lib/cocina/models/embargo.rb +16 -0
  38. data/lib/cocina/models/event.rb +15 -0
  39. data/lib/cocina/models/file.rb +20 -36
  40. data/lib/cocina/models/file_administrative.rb +10 -0
  41. data/lib/cocina/models/file_set.rb +8 -15
  42. data/lib/cocina/models/file_set_structural.rb +9 -0
  43. data/lib/cocina/models/geographic.rb +10 -0
  44. data/lib/cocina/models/identification.rb +11 -0
  45. data/lib/cocina/models/message_digest.rb +17 -0
  46. data/lib/cocina/models/presentation.rb +12 -0
  47. data/lib/cocina/models/release_tag.rb +12 -7
  48. data/lib/cocina/models/request_admin_policy.rb +15 -3
  49. data/lib/cocina/models/request_collection.rb +21 -4
  50. data/lib/cocina/models/request_dro.rb +32 -11
  51. data/lib/cocina/models/request_dro_structural.rb +13 -0
  52. data/lib/cocina/models/request_file.rb +15 -6
  53. data/lib/cocina/models/request_file_set.rb +7 -9
  54. data/lib/cocina/models/request_file_set_structural.rb +9 -0
  55. data/lib/cocina/models/request_identification.rb +11 -0
  56. data/lib/cocina/models/sequence.rb +3 -5
  57. data/lib/cocina/models/source.rb +14 -0
  58. data/lib/cocina/models/validator.rb +28 -0
  59. data/lib/cocina/models/version.rb +1 -1
  60. data/lib/cocina/models/vocab.rb +45 -60
  61. data/openapi.yml +1003 -0
  62. metadata +116 -19
  63. data/.travis.yml +0 -23
  64. data/docs/README.md +0 -9
  65. data/docs/_config.yml +0 -1
  66. data/docs/meta.json +0 -9
  67. data/docs/schema.json +0 -1654
  68. data/docs/schema.md +0 -268
  69. data/lib/cocina/models/admin_policy_attributes.rb +0 -21
  70. data/lib/cocina/models/collection_attributes.rb +0 -22
  71. data/lib/cocina/models/dro_attributes.rb +0 -22
  72. data/lib/cocina/models/file_attributes.rb +0 -25
  73. data/lib/cocina/models/file_set_attributes.rb +0 -16
  74. data/lib/cocina/models/types.rb +0 -10
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class FileAdministrative < Struct
6
+ attribute :sdrPreserve, Types::Strict::Bool.default(true)
7
+ attribute :shelve, Types::Strict::Bool.default(false)
8
+ end
9
+ end
10
+ end
@@ -2,26 +2,19 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Metadata for a file set.
6
- # See http://sul-dlss.github.io/cocina-models/maps/Fileset.json
7
5
  class FileSet < Struct
8
6
  include Checkable
9
7
 
10
- TYPES = [
11
- Vocab.fileset
12
- ].freeze
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/fileset.jsonld'].freeze
13
9
 
14
- class Identification < Struct
15
- end
16
-
17
- # Structural sub-schema that contains File (unlike the one in RequestFileSet which contains RequestFile)
18
- class Structural < Struct
19
- attribute :contains, Types::Strict::Array.of(Cocina::Models::File).meta(omittable: true)
20
- end
21
-
22
- include FileSetAttributes
10
+ # The content type of the Fileset.
11
+ attribute :type, Types::Strict::String.enum(*FileSet::TYPES)
23
12
  attribute :externalIdentifier, Types::Strict::String
24
- attribute(:structural, Structural.default { Structural.new })
13
+ # Primary processing label for a Fileset.
14
+ attribute :label, Types::Strict::String
15
+ # Version for the Fileset within SDR.
16
+ attribute :version, Types::Strict::Integer
17
+ attribute :structural, FileSetStructural.optional.meta(omittable: true)
25
18
  end
26
19
  end
27
20
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class FileSetStructural < Struct
6
+ attribute :contains, Types::Strict::Array.of(File).meta(omittable: true)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class Geographic < Struct
6
+ # Geographic ISO 19139 XML metadata
7
+ attribute :iso19139, Types::Strict::String
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class Identification < Struct
6
+ # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
7
+ attribute :sourceId, Types::Strict::String.meta(omittable: true)
8
+ attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class MessageDigest < Struct
6
+ include Checkable
7
+
8
+ TYPES = %w[md5
9
+ sha1].freeze
10
+
11
+ # The algorithm that was used
12
+ attribute :type, Types::Strict::String.enum(*MessageDigest::TYPES)
13
+ # The digest value Base64 encoded
14
+ attribute :digest, Types::Strict::String
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class Presentation < Struct
6
+ # Height in pixels
7
+ attribute :height, Types::Strict::Integer.meta(omittable: true)
8
+ # Width in pixels
9
+ attribute :width, Types::Strict::Integer.meta(omittable: true)
10
+ end
11
+ end
12
+ end
@@ -2,14 +2,19 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Subschema for release tags
6
5
  class ReleaseTag < Struct
7
- attribute :to, Types::Strict::String.enum('Searchworks', 'Earthworks')
8
- attribute :what, Types::Strict::String.enum('self', 'collection')
9
- # we use 'when' other places, but that's reserved word, so 'date' it is!
10
- attribute :date, Types::Params::DateTime
11
- attribute :who, Types::Strict::String
12
- attribute :release, Types::Strict::Bool
6
+ # Who did this release
7
+ # example: petucket
8
+ attribute :who, Types::Strict::String.meta(omittable: true)
9
+ # What is being released. This item or the whole collection.
10
+ # example: self
11
+ attribute :what, Types::Strict::String.enum('self', 'collection').meta(omittable: true)
12
+ # When did this action happen
13
+ attribute :date, Types::Params::DateTime.meta(omittable: true)
14
+ # What platform is it released to
15
+ # example: Searchworks
16
+ attribute :to, Types::Strict::String.meta(omittable: true)
17
+ attribute :release, Types::Strict::Bool.default(false)
13
18
  end
14
19
  end
15
20
  end
@@ -2,10 +2,22 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # A request to create an AdminPolicy object.
6
- # This is the same as an AdminPolicy, but without externalIdentifier (as that wouldn't have been created yet).
7
5
  class RequestAdminPolicy < Struct
8
- include AdminPolicyAttributes
6
+ include Checkable
7
+
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze
9
+
10
+ # example: item
11
+ attribute :type, Types::Strict::String.enum(*RequestAdminPolicy::TYPES)
12
+ attribute :label, Types::Strict::String
13
+ attribute :version, Types::Strict::Integer
14
+ attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new })
15
+ attribute :description, Description.optional.meta(omittable: true)
16
+
17
+ def self.new(attributes = default_attributes, safe = false, validate = true, &block)
18
+ Validator.validate(self, attributes.with_indifferent_access) if validate && name
19
+ super(attributes, safe, &block)
20
+ end
9
21
  end
10
22
  end
11
23
  end
@@ -2,11 +2,28 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # A request to create a digital repository collection.
6
- # This is the same as a Collection, but without externalIdentifier (as that wouldn't have been created yet).
7
- # See http://sul-dlss.github.io/cocina-models/maps/Collection.json
8
5
  class RequestCollection < Struct
9
- include CollectionAttributes
6
+ include Checkable
7
+
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/collection.jsonld',
9
+ 'http://cocina.sul.stanford.edu/models/curated-collection.jsonld',
10
+ 'http://cocina.sul.stanford.edu/models/user-collection.jsonld',
11
+ 'http://cocina.sul.stanford.edu/models/exhibit.jsonld',
12
+ 'http://cocina.sul.stanford.edu/models/series.jsonld'].freeze
13
+
14
+ # example: item
15
+ attribute :type, Types::Strict::String.enum(*RequestCollection::TYPES)
16
+ attribute :label, Types::Strict::String
17
+ attribute :version, Types::Strict::Integer
18
+ attribute(:access, Access.default { Access.new })
19
+ attribute :administrative, Administrative.optional.meta(omittable: true)
20
+ attribute :description, Description.optional.meta(omittable: true)
21
+ attribute :identification, CollectionIdentification.optional.meta(omittable: true)
22
+
23
+ def self.new(attributes = default_attributes, safe = false, validate = true, &block)
24
+ Validator.validate(self, attributes.with_indifferent_access) if validate && name
25
+ super(attributes, safe, &block)
26
+ end
10
27
  end
11
28
  end
12
29
  end
@@ -2,19 +2,40 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # A request to create a digital repository object.
6
- # This is the same as a DRO, but without externalIdentifier (as that wouldn't have been created yet)
7
- # See http://sul-dlss.github.io/cocina-models/maps/DRO.json
8
5
  class RequestDRO < Struct
9
- # Structural sub-schema that contains RequestFileSet (unlike the DRO which contains FileSet)
10
- class Structural < Struct
11
- attribute :contains, Types::Strict::Array.of(RequestFileSet).meta(omittable: true)
12
- attribute :isMemberOf, Types::Strict::String.meta(omittable: true)
13
- attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
14
- end
6
+ include Checkable
7
+
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/object.jsonld',
9
+ 'http://cocina.sul.stanford.edu/models/3d.jsonld',
10
+ 'http://cocina.sul.stanford.edu/models/agreement.jsonld',
11
+ 'http://cocina.sul.stanford.edu/models/book.jsonld',
12
+ 'http://cocina.sul.stanford.edu/models/document.jsonld',
13
+ 'http://cocina.sul.stanford.edu/models/geo.jsonld',
14
+ 'http://cocina.sul.stanford.edu/models/image.jsonld',
15
+ 'http://cocina.sul.stanford.edu/models/page.jsonld',
16
+ 'http://cocina.sul.stanford.edu/models/photograph.jsonld',
17
+ 'http://cocina.sul.stanford.edu/models/manuscript.jsonld',
18
+ 'http://cocina.sul.stanford.edu/models/map.jsonld',
19
+ 'http://cocina.sul.stanford.edu/models/media.jsonld',
20
+ 'http://cocina.sul.stanford.edu/models/track.jsonld',
21
+ 'http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld',
22
+ 'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'].freeze
15
23
 
16
- include DroAttributes
17
- attribute(:structural, Structural.default { Structural.new })
24
+ # example: item
25
+ attribute :type, Types::Strict::String.enum(*RequestDRO::TYPES)
26
+ attribute :label, Types::Strict::String
27
+ attribute :version, Types::Strict::Integer
28
+ attribute :access, DROAccess.optional.meta(omittable: true)
29
+ attribute :administrative, Administrative.optional.meta(omittable: true)
30
+ attribute :description, Description.optional.meta(omittable: true)
31
+ attribute(:identification, RequestIdentification.default { RequestIdentification.new })
32
+ attribute :structural, RequestDROStructural.optional.meta(omittable: true)
33
+ attribute :geographic, Geographic.optional.meta(omittable: true)
34
+
35
+ def self.new(attributes = default_attributes, safe = false, validate = true, &block)
36
+ Validator.validate(self, attributes.with_indifferent_access) if validate && name
37
+ super(attributes, safe, &block)
38
+ end
18
39
  end
19
40
  end
20
41
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class RequestDROStructural < Struct
6
+ attribute :contains, Types::Strict::Array.of(RequestFileSet).meta(omittable: true)
7
+ attribute :hasMemberOrders, Types::Strict::Array.of(Sequence).meta(omittable: true)
8
+ # example: druid:bc123df4567
9
+ attribute :isMemberOf, Types::Strict::String.meta(omittable: true)
10
+ attribute :hasAgreement, Types::Strict::String.meta(omittable: true)
11
+ end
12
+ end
13
+ end
@@ -2,14 +2,23 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # a request to create a File object.
6
- # This is the same as a File, but without externalIdentifier (as that wouldn't have been created yet)
7
- # See http://sul-dlss.github.io/cocina-models/maps/File.json
8
5
  class RequestFile < Struct
9
- include FileAttributes
10
- # externalIdentifier is used when submitting files to the SDR API to identify the file so that the
11
- # uploaded files can be associated with the DRO.
6
+ include Checkable
7
+
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/file.jsonld'].freeze
9
+
10
+ attribute :type, Types::Strict::String.enum(*RequestFile::TYPES)
11
+ attribute :label, Types::Strict::String
12
+ attribute :filename, Types::Strict::String
13
+ attribute :size, Types::Strict::Integer.meta(omittable: true)
14
+ attribute :version, Types::Strict::Integer
15
+ attribute :hasMimeType, Types::Strict::String.meta(omittable: true)
12
16
  attribute :externalIdentifier, Types::Strict::String.meta(omittable: true)
17
+ attribute :use, Types::Strict::String.meta(omittable: true)
18
+ attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
19
+ attribute(:access, Access.default { Access.new })
20
+ attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
21
+ attribute :presentation, Presentation.optional.meta(omittable: true)
13
22
  end
14
23
  end
15
24
  end
@@ -2,17 +2,15 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # A request to create a FileSet object.
6
- # This is the same as a FileSet, but without externalIdentifier (as that wouldn't have been created yet)
7
- # See http://sul-dlss.github.io/cocina-models/maps/FileSet.json
8
5
  class RequestFileSet < Struct
9
- # Structural sub-schema that contains RequestFile (unlike the one in FileSet which contains File)
10
- class Structural < Struct
11
- attribute :contains, Types::Strict::Array.of(RequestFile).meta(omittable: true)
12
- end
6
+ include Checkable
13
7
 
14
- include FileSetAttributes
15
- attribute(:structural, Structural.default { Structural.new })
8
+ TYPES = ['http://cocina.sul.stanford.edu/models/fileset.jsonld'].freeze
9
+
10
+ attribute :type, Types::Strict::String.enum(*RequestFileSet::TYPES)
11
+ attribute :label, Types::Strict::String
12
+ attribute :version, Types::Strict::Integer
13
+ attribute(:structural, RequestFileSetStructural.default { RequestFileSetStructural.new })
16
14
  end
17
15
  end
18
16
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class RequestFileSetStructural < Struct
6
+ attribute :contains, Types::Strict::Array.of(RequestFile).meta(omittable: true)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class RequestIdentification < Struct
6
+ # example: sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026
7
+ attribute :sourceId, Types::Strict::String
8
+ attribute :catalogLinks, Types::Strict::Array.of(CatalogLink).meta(omittable: true)
9
+ end
10
+ end
11
+ end
@@ -2,12 +2,10 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- # Metadata for a sequence. See http://sul-dlss.github.io/cocina-models/maps/Sequence.json
6
5
  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
6
+ attribute :members, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
7
+ # The direction that a sequence of canvases should be displayed to the user
8
+ attribute :viewingDirection, Types::Strict::String.enum('right-to-left', 'left-to-right').meta(omittable: true)
11
9
  end
12
10
  end
13
11
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class Source < Struct
6
+ # Code representing the value source.
7
+ attribute :code, Types::Strict::String.meta(omittable: true)
8
+ # URI for the value source.
9
+ attribute :uri, Types::Strict::String.meta(omittable: true)
10
+ # String describing the value source.
11
+ attribute :value, Types::Strict::String.meta(omittable: true)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ # Perform validation against openapi
6
+ class Validator
7
+ def self.validate(clazz, attributes)
8
+ method_name = clazz.name.split('::').last
9
+ request_operation = root.request_operation(:post, "/validate/#{method_name}")
10
+ request_operation.validate_request_body('application/json', attributes)
11
+ rescue OpenAPIParser::OpenAPIError => e
12
+ raise ValidationError, e.message
13
+ end
14
+
15
+ # rubocop:disable Style/ClassVars
16
+ def self.root
17
+ @@root ||= OpenAPIParser.parse(YAML.load_file(openapi_path))
18
+ end
19
+ # rubocop:enable Style/ClassVars
20
+ private_class_method :root
21
+
22
+ def self.openapi_path
23
+ ::File.expand_path('../../../openapi.yml', __dir__)
24
+ end
25
+ private_class_method :openapi_path
26
+ end
27
+ end
28
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.29.0'
5
+ VERSION = '0.33.0'
6
6
  end
7
7
  end
@@ -4,111 +4,96 @@ module Cocina
4
4
  module Models
5
5
  # A digital repository object. See http://sul-dlss.github.io/cocina-models/maps/DRO.json
6
6
  class Vocab
7
- ROOT = 'http://cocina.sul.stanford.edu/models/'
8
-
9
- ### Object types ###
7
+ def self.three_dimensional
8
+ 'http://cocina.sul.stanford.edu/models/3d.jsonld'
9
+ end
10
10
 
11
- # This is the most generic type
12
- def self.object
13
- "#{ROOT}object.jsonld"
11
+ def self.admin_policy
12
+ 'http://cocina.sul.stanford.edu/models/admin_policy.jsonld'
14
13
  end
15
14
 
16
15
  def self.agreement
17
- "#{ROOT}agreement.jsonld"
16
+ 'http://cocina.sul.stanford.edu/models/agreement.jsonld'
18
17
  end
19
18
 
20
- def self.document
21
- "#{ROOT}document.jsonld"
19
+ def self.book
20
+ 'http://cocina.sul.stanford.edu/models/book.jsonld'
22
21
  end
23
22
 
24
- def self.geo
25
- "#{ROOT}geo.jsonld"
23
+ def self.collection
24
+ 'http://cocina.sul.stanford.edu/models/collection.jsonld'
26
25
  end
27
26
 
28
- def self.page
29
- "#{ROOT}page.jsonld"
27
+ def self.curated_collection
28
+ 'http://cocina.sul.stanford.edu/models/curated-collection.jsonld'
30
29
  end
31
30
 
32
- def self.photograph
33
- "#{ROOT}photograph.jsonld"
31
+ def self.document
32
+ 'http://cocina.sul.stanford.edu/models/document.jsonld'
34
33
  end
35
34
 
36
- def self.manuscript
37
- "#{ROOT}manuscript.jsonld"
35
+ def self.exhibit
36
+ 'http://cocina.sul.stanford.edu/models/exhibit.jsonld'
38
37
  end
39
38
 
40
- def self.map
41
- "#{ROOT}map.jsonld"
39
+ def self.file
40
+ 'http://cocina.sul.stanford.edu/models/file.jsonld'
42
41
  end
43
42
 
44
- def self.track
45
- "#{ROOT}track.jsonld"
43
+ def self.fileset
44
+ 'http://cocina.sul.stanford.edu/models/fileset.jsonld'
46
45
  end
47
46
 
48
- def self.webarchive_binary
49
- "#{ROOT}webarchive-binary.jsonld"
47
+ def self.geo
48
+ 'http://cocina.sul.stanford.edu/models/geo.jsonld'
50
49
  end
51
50
 
52
- def self.webarchive_seed
53
- "#{ROOT}webarchive-seed.jsonld"
51
+ def self.image
52
+ 'http://cocina.sul.stanford.edu/models/image.jsonld'
54
53
  end
55
54
 
56
- # For time based media
57
- def self.media
58
- "#{ROOT}media.jsonld"
55
+ def self.manuscript
56
+ 'http://cocina.sul.stanford.edu/models/manuscript.jsonld'
59
57
  end
60
58
 
61
- def self.image
62
- "#{ROOT}image.jsonld"
59
+ def self.map
60
+ 'http://cocina.sul.stanford.edu/models/map.jsonld'
63
61
  end
64
62
 
65
- def self.book
66
- "#{ROOT}book.jsonld"
63
+ def self.media
64
+ 'http://cocina.sul.stanford.edu/models/media.jsonld'
67
65
  end
68
66
 
69
- def self.three_dimensional
70
- "#{ROOT}3d.jsonld"
67
+ def self.object
68
+ 'http://cocina.sul.stanford.edu/models/object.jsonld'
71
69
  end
72
70
 
73
- ### File type ###
74
-
75
- def self.file
76
- "#{ROOT}file.jsonld"
71
+ def self.page
72
+ 'http://cocina.sul.stanford.edu/models/page.jsonld'
77
73
  end
78
74
 
79
- ### Fileset type ###
80
-
81
- def self.fileset
82
- "#{ROOT}fileset.jsonld"
75
+ def self.photograph
76
+ 'http://cocina.sul.stanford.edu/models/photograph.jsonld'
83
77
  end
84
78
 
85
- ### Collection types ###
86
-
87
- # The most generic type of collection
88
- def self.collection
89
- "#{ROOT}collection.jsonld"
79
+ def self.series
80
+ 'http://cocina.sul.stanford.edu/models/series.jsonld'
90
81
  end
91
82
 
92
- def self.curated_collection
93
- "#{ROOT}curated-collection.jsonld"
83
+ def self.track
84
+ 'http://cocina.sul.stanford.edu/models/track.jsonld'
94
85
  end
95
86
 
96
87
  def self.user_collection
97
- "#{ROOT}user-collection.jsonld"
98
- end
99
-
100
- def self.exhibit
101
- "#{ROOT}exhibit.jsonld"
88
+ 'http://cocina.sul.stanford.edu/models/user-collection.jsonld'
102
89
  end
103
90
 
104
- def self.series
105
- "#{ROOT}series.jsonld"
91
+ def self.webarchive_binary
92
+ 'http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld'
106
93
  end
107
94
 
108
- ### Admin Policy type ###
109
-
110
- def self.admin_policy
111
- "#{ROOT}admin_policy.jsonld"
95
+ def self.webarchive_seed
96
+ 'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld'
112
97
  end
113
98
  end
114
99
  end