aspace_client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +7 -0
  2. data/lib/aspace_client.rb +15 -0
  3. data/lib/aspace_client/archivesspace_json_schema.rb +210 -0
  4. data/lib/aspace_client/asutils.rb +142 -0
  5. data/lib/aspace_client/client_enum_source.rb +30 -0
  6. data/lib/aspace_client/exceptions.rb +15 -0
  7. data/lib/aspace_client/helpers.rb +0 -0
  8. data/lib/aspace_client/json_schema_concurrency_fix.rb +52 -0
  9. data/lib/aspace_client/json_schema_utils.rb +414 -0
  10. data/lib/aspace_client/jsonmodel.rb +342 -0
  11. data/lib/aspace_client/jsonmodel_client.rb +528 -0
  12. data/lib/aspace_client/jsonmodel_i18n_mixin.rb +77 -0
  13. data/lib/aspace_client/jsonmodel_type.rb +478 -0
  14. data/lib/aspace_client/memoryleak.rb +59 -0
  15. data/lib/aspace_client/schemas/abstract_agent.rb +51 -0
  16. data/lib/aspace_client/schemas/abstract_agent_relationship.rb +12 -0
  17. data/lib/aspace_client/schemas/abstract_archival_object.rb +96 -0
  18. data/lib/aspace_client/schemas/abstract_classification.rb +44 -0
  19. data/lib/aspace_client/schemas/abstract_name.rb +23 -0
  20. data/lib/aspace_client/schemas/abstract_note.rb +13 -0
  21. data/lib/aspace_client/schemas/accession.rb +174 -0
  22. data/lib/aspace_client/schemas/accession_parts_relationship.rb +31 -0
  23. data/lib/aspace_client/schemas/accession_sibling_relationship.rb +31 -0
  24. data/lib/aspace_client/schemas/active_edits.rb +23 -0
  25. data/lib/aspace_client/schemas/advanced_query.rb +12 -0
  26. data/lib/aspace_client/schemas/agent_contact.rb +25 -0
  27. data/lib/aspace_client/schemas/agent_corporate_entity.rb +32 -0
  28. data/lib/aspace_client/schemas/agent_family.rb +29 -0
  29. data/lib/aspace_client/schemas/agent_person.rb +31 -0
  30. data/lib/aspace_client/schemas/agent_relationship_associative.rb +28 -0
  31. data/lib/aspace_client/schemas/agent_relationship_earlierlater.rb +28 -0
  32. data/lib/aspace_client/schemas/agent_relationship_parentchild.rb +26 -0
  33. data/lib/aspace_client/schemas/agent_relationship_subordinatesuperior.rb +26 -0
  34. data/lib/aspace_client/schemas/agent_software.rb +22 -0
  35. data/lib/aspace_client/schemas/archival_object.rb +60 -0
  36. data/lib/aspace_client/schemas/archival_record_children.rb +15 -0
  37. data/lib/aspace_client/schemas/boolean_field_query.rb +13 -0
  38. data/lib/aspace_client/schemas/boolean_query.rb +13 -0
  39. data/lib/aspace_client/schemas/classification.rb +10 -0
  40. data/lib/aspace_client/schemas/classification_term.rb +38 -0
  41. data/lib/aspace_client/schemas/classification_tree.rb +17 -0
  42. data/lib/aspace_client/schemas/collection_management.rb +27 -0
  43. data/lib/aspace_client/schemas/container.rb +29 -0
  44. data/lib/aspace_client/schemas/container_location.rb +19 -0
  45. data/lib/aspace_client/schemas/date.rb +19 -0
  46. data/lib/aspace_client/schemas/date_field_query.rb +14 -0
  47. data/lib/aspace_client/schemas/deaccession.rb +20 -0
  48. data/lib/aspace_client/schemas/defaults.rb +104 -0
  49. data/lib/aspace_client/schemas/digital_object.rb +64 -0
  50. data/lib/aspace_client/schemas/digital_object_component.rb +53 -0
  51. data/lib/aspace_client/schemas/digital_object_tree.rb +19 -0
  52. data/lib/aspace_client/schemas/digital_record_children.rb +15 -0
  53. data/lib/aspace_client/schemas/enumeration.rb +29 -0
  54. data/lib/aspace_client/schemas/enumeration_migration.rb +14 -0
  55. data/lib/aspace_client/schemas/event.rb +88 -0
  56. data/lib/aspace_client/schemas/extent.rb +17 -0
  57. data/lib/aspace_client/schemas/external_document.rb +12 -0
  58. data/lib/aspace_client/schemas/external_id.rb +11 -0
  59. data/lib/aspace_client/schemas/field_query.rb +15 -0
  60. data/lib/aspace_client/schemas/file_version.rb +26 -0
  61. data/lib/aspace_client/schemas/group.rb +17 -0
  62. data/lib/aspace_client/schemas/instance.rb +27 -0
  63. data/lib/aspace_client/schemas/job.rb +57 -0
  64. data/lib/aspace_client/schemas/location.rb +36 -0
  65. data/lib/aspace_client/schemas/location_batch.rb +45 -0
  66. data/lib/aspace_client/schemas/merge_request.rb +48 -0
  67. data/lib/aspace_client/schemas/name_corporate_entity.rb +15 -0
  68. data/lib/aspace_client/schemas/name_family.rb +13 -0
  69. data/lib/aspace_client/schemas/name_form.rb +15 -0
  70. data/lib/aspace_client/schemas/name_person.rb +19 -0
  71. data/lib/aspace_client/schemas/name_software.rb +14 -0
  72. data/lib/aspace_client/schemas/note_abstract.rb +17 -0
  73. data/lib/aspace_client/schemas/note_bibliography.rb +29 -0
  74. data/lib/aspace_client/schemas/note_bioghist.rb +22 -0
  75. data/lib/aspace_client/schemas/note_chronology.rb +28 -0
  76. data/lib/aspace_client/schemas/note_citation.rb +32 -0
  77. data/lib/aspace_client/schemas/note_definedlist.rb +25 -0
  78. data/lib/aspace_client/schemas/note_digital_object.rb +23 -0
  79. data/lib/aspace_client/schemas/note_index.rb +29 -0
  80. data/lib/aspace_client/schemas/note_index_item.rb +25 -0
  81. data/lib/aspace_client/schemas/note_multipart.rb +25 -0
  82. data/lib/aspace_client/schemas/note_orderedlist.rb +27 -0
  83. data/lib/aspace_client/schemas/note_outline.rb +20 -0
  84. data/lib/aspace_client/schemas/note_outline_level.rb +21 -0
  85. data/lib/aspace_client/schemas/note_singlepart.rb +24 -0
  86. data/lib/aspace_client/schemas/note_text.rb +17 -0
  87. data/lib/aspace_client/schemas/permission.rb +15 -0
  88. data/lib/aspace_client/schemas/preference.rb +16 -0
  89. data/lib/aspace_client/schemas/record_tree.rb +17 -0
  90. data/lib/aspace_client/schemas/repository.rb +32 -0
  91. data/lib/aspace_client/schemas/repository_with_agent.rb +14 -0
  92. data/lib/aspace_client/schemas/resource.rb +112 -0
  93. data/lib/aspace_client/schemas/resource_tree.rb +20 -0
  94. data/lib/aspace_client/schemas/rights_statement.rb +35 -0
  95. data/lib/aspace_client/schemas/subject.rb +30 -0
  96. data/lib/aspace_client/schemas/term.rb +16 -0
  97. data/lib/aspace_client/schemas/user.rb +56 -0
  98. data/lib/aspace_client/schemas/user_defined.rb +42 -0
  99. data/lib/aspace_client/schemas/vocabulary.rb +15 -0
  100. data/lib/aspace_client/validations.rb +434 -0
  101. data/lib/aspace_client/validator_cache.rb +47 -0
  102. data/lib/aspace_client/version.rb +3 -0
  103. metadata +244 -0
@@ -0,0 +1,59 @@
1
+ require 'atomic'
2
+ require 'thread'
3
+
4
+ module MemoryLeak
5
+
6
+ class Resources
7
+
8
+ @@refresh_mutex = Mutex.new
9
+
10
+ @@resources = {}
11
+ @@refresh_fns = {}
12
+ @@expiration_seconds = {}
13
+
14
+
15
+ def self.define(resource, refresh_fn, ttl, opts = {})
16
+ @@resources[resource] = Atomic.new(nil)
17
+ @@refresh_fns[resource] = refresh_fn
18
+ @@expiration_seconds[resource] = ttl if ttl
19
+
20
+ self.set(resource, opts[:init], 0)
21
+ end
22
+
23
+
24
+ def self.get(resource)
25
+ stale = (@@resources[resource].value.nil? ||
26
+ (@@expiration_seconds[resource] &&
27
+ (Time.now.to_i - @@resources[resource].value[:system_mtime]) > @@expiration_seconds[resource]))
28
+
29
+ self.refresh(resource) if stale
30
+
31
+ @@resources[resource].value[:value]
32
+ end
33
+
34
+
35
+ def self.refresh(resource)
36
+ # Two concurrent users might trigger some resource to be refreshed at
37
+ # around the same time (e.g. when two people create a new repository at
38
+ # once). We want both refreshes to run in sequence, so use a mutex to
39
+ # serialize them.
40
+ @@refresh_mutex.synchronize do
41
+ self.set(resource, @@refresh_fns[resource].call)
42
+ end
43
+ end
44
+
45
+
46
+ def self.set(resource, value, time = nil)
47
+ @@resources[resource].swap({:value => value, :system_mtime => (time || Time.now.to_i)})
48
+ end
49
+
50
+
51
+ def self.invalidate_all!
52
+ @@resources.values.each do |atom|
53
+ atom.update {|val| val.merge(:system_mtime => 0) if val}
54
+ end
55
+ end
56
+
57
+ end
58
+
59
+ end
@@ -0,0 +1,51 @@
1
+ {
2
+ :schema => {
3
+ "$schema" => "http://www.archivesspace.org/archivesspace.json",
4
+ "version" => 1,
5
+ "type" => "object",
6
+ "properties" => {
7
+ "uri" => {"type" => "string", "required" => false},
8
+
9
+ "title" => {
10
+ "type" => "string",
11
+ "readonly" => true
12
+ },
13
+
14
+ "is_linked_to_published_record" => {"type" => "boolean", "readonly" => true},
15
+
16
+ "agent_type" => {
17
+ "type" => "string",
18
+ "required" => false,
19
+ "enum" => ["agent_person", "agent_corporate_entity", "agent_software", "agent_family", "user"]
20
+ },
21
+
22
+ "agent_contacts" => {
23
+ "type" => "array",
24
+ "items" => {"type" => "JSONModel(:agent_contact) object"}
25
+ },
26
+
27
+ "linked_agent_roles" => {
28
+ "type" => "array",
29
+ "items" => {"type" => "string"},
30
+ "readonly" => true
31
+ },
32
+
33
+ "external_documents" => {"type" => "array", "items" => {"type" => "JSONModel(:external_document) object"}},
34
+
35
+ "system_generated" => {
36
+ "readonly" => true,
37
+ "type" => "boolean"
38
+ },
39
+
40
+ "notes" => {
41
+ "type" => "array",
42
+ "items" => {"type" => [{"type" => "JSONModel(:note_bioghist) object"}]},
43
+ },
44
+
45
+ "dates_of_existence" => {"type" => "array", "items" => {"type" => "JSONModel(:date) object"}},
46
+
47
+ "publish" => {"type" => "boolean"},
48
+
49
+ },
50
+ },
51
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ :schema => {
3
+ "$schema" => "http://www.archivesspace.org/archivesspace.json",
4
+ "version" => 1,
5
+ "type" => "object",
6
+ "subtype" => "ref",
7
+ "properties" => {
8
+ "description" => {"type" => "string", "maxLength" => 65000},
9
+ "dates" => {"type" => "JSONModel(:date) object"}
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ :schema => {
3
+ "$schema" => "http://www.archivesspace.org/archivesspace.json",
4
+ "version" => 1,
5
+ "type" => "object",
6
+ "properties" => {
7
+ "uri" => {"type" => "string", "required" => false},
8
+
9
+ "external_ids" => {"type" => "array", "items" => {"type" => "JSONModel(:external_id) object"}},
10
+
11
+ "title" => {"type" => "string", "minLength" => 1, "maxLength" => 16384, "ifmissing" => "error"},
12
+ "language" => {"type" => "string", "dynamic_enum" => "language_iso639_2"},
13
+
14
+ "publish" => {"type" => "boolean"},
15
+
16
+ "subjects" => {
17
+ "type" => "array",
18
+ "items" => {
19
+ "type" => "object",
20
+ "subtype" => "ref",
21
+ "properties" => {
22
+ "ref" => {
23
+ "type" => "JSONModel(:subject) uri",
24
+ "ifmissing" => "error"
25
+ },
26
+ "_resolved" => {
27
+ "type" => "object",
28
+ "readonly" => "true"
29
+ }
30
+ }
31
+ }
32
+ },
33
+
34
+ "linked_events" => {
35
+ "type" => "array",
36
+ "readonly" => "true",
37
+ "items" => {
38
+ "type" => "object",
39
+ "subtype" => "ref",
40
+ "properties" => {
41
+ "ref" => {
42
+ "type" => "JSONModel(:event) uri",
43
+ "ifmissing" => "error"
44
+ },
45
+ "_resolved" => {
46
+ "type" => "object",
47
+ "readonly" => "true"
48
+ }
49
+ }
50
+ }
51
+ },
52
+
53
+
54
+ "extents" => {"type" => "array", "items" => {"type" => "JSONModel(:extent) object"}},
55
+ "dates" => {"type" => "array", "items" => {"type" => "JSONModel(:date) object"}},
56
+ "external_documents" => {"type" => "array", "items" => {"type" => "JSONModel(:external_document) object"}},
57
+ "rights_statements" => {"type" => "array", "items" => {"type" => "JSONModel(:rights_statement) object"}},
58
+ "linked_agents" => {
59
+ "type" => "array",
60
+ "items" => {
61
+ "type" => "object",
62
+ "subtype" => "ref",
63
+ "properties" => {
64
+ "role" => {
65
+ "type" => "string",
66
+ "dynamic_enum" => "linked_agent_role",
67
+ "ifmissing" => "error",
68
+ },
69
+
70
+ "terms" => {"type" => "array", "items" => {"type" => "JSONModel(:term) uri_or_object"}},
71
+
72
+ "relator" => {
73
+ "type" => "string",
74
+ "dynamic_enum" => "linked_agent_archival_record_relators",
75
+ },
76
+
77
+ "title" => {"type" => "string"},
78
+
79
+ "ref" => {"type" => [{"type" => "JSONModel(:agent_corporate_entity) uri"},
80
+ {"type" => "JSONModel(:agent_family) uri"},
81
+ {"type" => "JSONModel(:agent_person) uri"},
82
+ {"type" => "JSONModel(:agent_software) uri"}],
83
+ "ifmissing" => "error"},
84
+ "_resolved" => {
85
+ "type" => "object",
86
+ "readonly" => "true"
87
+ }
88
+ }
89
+ }
90
+ },
91
+
92
+ "suppressed" => {"type" => "boolean", "readonly" => "true"},
93
+
94
+ },
95
+ },
96
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ :schema => {
3
+ "$schema" => "http://www.archivesspace.org/archivesspace.json",
4
+ "version" => 1,
5
+ "type" => "object",
6
+ "properties" => {
7
+ "uri" => {"type" => "string", "required" => false},
8
+
9
+ "identifier" => {"type" => "string", "maxLength" => 255, "ifmissing" => "error"},
10
+ "title" => {"type" => "string", "minLength" => 1, "maxLength" => 16384, "ifmissing" => "error"},
11
+ "description" => {"type" => "string", "maxLength" => 65000},
12
+
13
+ "publish" => {"type" => "boolean", "default" => true, "readonly" => true},
14
+
15
+ "path_from_root" => {
16
+ "type" => "array",
17
+ "readonly" => true,
18
+ "items" => {
19
+ "type" => "object",
20
+ "properties" => {
21
+ "identifier" => {"type" => "string", "maxLength" => 255, "ifmissing" => "error"},
22
+ "title" => {"type" => "string", "minLength" => 1, "maxLength" => 16384, "ifmissing" => "error"},
23
+ }
24
+ }
25
+ },
26
+
27
+ "creator" => {
28
+ "type" => "object",
29
+ "subtype" => "ref",
30
+ "properties" => {
31
+ "ref" => {"type" => [{"type" => "JSONModel(:agent_corporate_entity) uri"},
32
+ {"type" => "JSONModel(:agent_family) uri"},
33
+ {"type" => "JSONModel(:agent_person) uri"},
34
+ {"type" => "JSONModel(:agent_software) uri"}],
35
+ "ifmissing" => "error"},
36
+ "_resolved" => {
37
+ "type" => "object",
38
+ "readonly" => "true"
39
+ }
40
+ }
41
+ },
42
+ },
43
+ },
44
+ }
@@ -0,0 +1,23 @@
1
+ # Note: This schema isn't used directly: it's here for inheritance purposes
2
+ # only.
3
+ {
4
+ :schema => {
5
+ "$schema" => "http://www.archivesspace.org/archivesspace.json",
6
+ "version" => 1,
7
+ "type" => "object",
8
+ "properties" => {
9
+ "authority_id" => {"type" => "string", "maxLength" => 255},
10
+ "dates" => {"type" => "string", "maxLength" => 255},
11
+ "use_dates" => {"type" => "array", "items" => {"type" => "JSONModel(:date) object"}},
12
+ "qualifier" => {"type" => "string", "maxLength" => 255},
13
+ "source" => {"type" => "string", "dynamic_enum" => "name_source"},
14
+ "rules" => {"type" => "string", "dynamic_enum" => "name_rule"},
15
+
16
+ "authorized" => {"type" => "boolean", "default" => false},
17
+ "is_display_name" => {"type" => "boolean", "default" => false},
18
+
19
+ "sort_name" => {"type" => "string", "maxLength" => 255},
20
+ "sort_name_auto_generate" => {"type" => "boolean", "default" => true},
21
+ },
22
+ },
23
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ :schema => {
3
+ "$schema" => "http://www.archivesspace.org/archivesspace.json",
4
+ "version" => 1,
5
+ "type" => "object",
6
+ "properties" => {
7
+ "label" => {"type" => "string", "maxLength" => 65000},
8
+ "publish" => {"type" => "boolean"},
9
+ "persistent_id" => {"type" => "string", "maxLength" => 255},
10
+ "ingest_problem" => {"type" => "string", "maxLength" => 65000},
11
+ },
12
+ },
13
+ }
@@ -0,0 +1,174 @@
1
+ {
2
+ :schema => {
3
+ "$schema" => "http://www.archivesspace.org/archivesspace.json",
4
+ "version" => 1,
5
+ "type" => "object",
6
+ "uri" => "/repositories/:repo_id/accessions",
7
+ "properties" => {
8
+ "uri" => {"type" => "string", "required" => false},
9
+
10
+ "external_ids" => {"type" => "array", "items" => {"type" => "JSONModel(:external_id) object"}},
11
+
12
+ "title" => {"type" => "string", "maxLength" => 8192, "ifmissing" => nil},
13
+ "display_string" => {"type" => "string", "maxLength" => 8192, "readonly" => true},
14
+
15
+ "id_0" => {"type" => "string", "ifmissing" => "error", "maxLength" => 255},
16
+ "id_1" => {"type" => "string", "maxLength" => 255},
17
+ "id_2" => {"type" => "string", "maxLength" => 255},
18
+ "id_3" => {"type" => "string", "maxLength" => 255},
19
+
20
+ "content_description" => {"type" => "string", "maxLength" => 65000},
21
+ "condition_description" => {"type" => "string", "maxLength" => 65000},
22
+
23
+ "disposition" => {"type" => "string", "maxLength" => 65000},
24
+ "inventory" => {"type" => "string", "maxLength" => 65000},
25
+
26
+ "provenance" => {"type" => "string", "maxLength" => 65000},
27
+
28
+ "related_accessions" => {
29
+ "type" => "array",
30
+ "items" => {"type" => [{"type" => "JSONModel(:accession_parts_relationship) object"},
31
+ {"type" => "JSONModel(:accession_sibling_relationship) object"}]},
32
+ },
33
+
34
+
35
+ "accession_date" => {"type" => "date", "minLength" => 1, "ifmissing" => "error"},
36
+
37
+ "publish" => {"type" => "boolean"},
38
+
39
+ "classification" => {
40
+ "type" => "object",
41
+ "subtype" => "ref",
42
+ "properties" => {
43
+ "ref" => {
44
+ "type" => [{"type" => "JSONModel(:classification) uri"},
45
+ {"type" => "JSONModel(:classification_term) uri"}],
46
+ "ifmissing" => "error"
47
+ },
48
+ "_resolved" => {
49
+ "type" => "object",
50
+ "readonly" => "true"
51
+ }
52
+ }
53
+ },
54
+
55
+ "subjects" => {
56
+ "type" => "array",
57
+ "items" => {
58
+ "type" => "object",
59
+ "subtype" => "ref",
60
+ "properties" => {
61
+ "ref" => {
62
+ "type" => "JSONModel(:subject) uri",
63
+ "ifmissing" => "error"
64
+ },
65
+ "_resolved" => {
66
+ "type" => "object",
67
+ "readonly" => "true"
68
+ }
69
+ }
70
+ }
71
+ },
72
+
73
+ "linked_events" => {
74
+ "type" => "array",
75
+ "readonly" => "true",
76
+ "items" => {
77
+ "type" => "object",
78
+ "subtype" => "ref",
79
+ "properties" => {
80
+ "ref" => {
81
+ "type" => "JSONModel(:event) uri",
82
+ "ifmissing" => "error"
83
+ },
84
+ "_resolved" => {
85
+ "type" => "object",
86
+ "readonly" => "true"
87
+ }
88
+ }
89
+ }
90
+ },
91
+
92
+ "extents" => {"type" => "array", "items" => {"type" => "JSONModel(:extent) object"}},
93
+ "dates" => {"type" => "array", "items" => {"type" => "JSONModel(:date) object"}},
94
+ "external_documents" => {"type" => "array", "items" => {"type" => "JSONModel(:external_document) object"}},
95
+ "rights_statements" => {"type" => "array", "items" => {"type" => "JSONModel(:rights_statement) object"}},
96
+ "deaccessions" => {"type" => "array", "items" => {"type" => "JSONModel(:deaccession) object"}},
97
+ "collection_management" => {"type" => "JSONModel(:collection_management) object"},
98
+ "user_defined" => {"type" => "JSONModel(:user_defined) object"},
99
+
100
+ "related_resources" => {
101
+ "type" => "array",
102
+ "items" => {
103
+ "type" => "object",
104
+ "subtype" => "ref",
105
+ "properties" => {
106
+ "ref" => {
107
+ "type" => [{"type" => "JSONModel(:resource) uri"}],
108
+ "ifmissing" => "error"
109
+ },
110
+ "_resolved" => {
111
+ "type" => "object",
112
+ "readonly" => "true"
113
+ }
114
+ }
115
+ }
116
+ },
117
+
118
+ "suppressed" => {"type" => "boolean", "readonly" => "true"},
119
+
120
+ "acquisition_type" => {"type" => "string", "dynamic_enum" => "accession_acquisition_type"},
121
+
122
+ "resource_type" => {"type" => "string", "dynamic_enum" => "accession_resource_type"},
123
+
124
+ "restrictions_apply" => {"type" => "boolean", "default" => false},
125
+
126
+ "retention_rule" => {"type" => "string", "maxLength" => 65000},
127
+
128
+ "general_note" => {"type" => "string", "maxLength" => 65000},
129
+
130
+ "access_restrictions" => {"type" => "boolean", "default" => false},
131
+ "access_restrictions_note" => {"type" => "string", "maxLength" => 65000},
132
+
133
+ "use_restrictions" => {"type" => "boolean", "default" => false},
134
+ "use_restrictions_note" => {"type" => "string", "maxLength" => 65000},
135
+
136
+ "linked_agents" => {
137
+ "type" => "array",
138
+ "items" => {
139
+ "type" => "object",
140
+ "subtype" => "ref",
141
+ "properties" => {
142
+ "role" => {
143
+ "type" => "string",
144
+ "dynamic_enum" => "linked_agent_role",
145
+ "ifmissing" => "error"
146
+ },
147
+
148
+ "terms" => {"type" => "array", "items" => {"type" => "JSONModel(:term) uri_or_object"}},
149
+
150
+ "title" => {"type" => "string"},
151
+
152
+ "relator" => {
153
+ "type" => "string",
154
+ "dynamic_enum" => "linked_agent_archival_record_relators",
155
+ },
156
+
157
+ "ref" => {"type" => [{"type" => "JSONModel(:agent_corporate_entity) uri"},
158
+ {"type" => "JSONModel(:agent_family) uri"},
159
+ {"type" => "JSONModel(:agent_person) uri"},
160
+ {"type" => "JSONModel(:agent_software) uri"}],
161
+ "ifmissing" => "error"},
162
+ "_resolved" => {
163
+ "type" => "object",
164
+ "readonly" => "true"
165
+ }
166
+ }
167
+ }
168
+ },
169
+
170
+ "instances" => {"type" => "array", "items" => {"type" => "JSONModel(:instance) object"}},
171
+
172
+ },
173
+ },
174
+ }