Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Description #167

Merged
merged 15 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/cocina/models/descriptive_basic_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class DescriptiveBasicValue < Struct
attribute :uri, Types::Strict::String.meta(omittable: true)
attribute :standard, Standard.optional.meta(omittable: true)
attribute :encoding, Standard.optional.meta(omittable: true)
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
# The preferred display label to use for the descriptive element in access systems.
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
Expand Down
1 change: 1 addition & 0 deletions lib/cocina/models/descriptive_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class DescriptiveValue < Struct
attribute :uri, Types::Strict::String.meta(omittable: true)
attribute :standard, Standard.optional.meta(omittable: true)
attribute :encoding, Standard.optional.meta(omittable: true)
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
# The preferred display label to use for the descriptive element in access systems.
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
Expand Down
4 changes: 2 additions & 2 deletions lib/cocina/models/descriptive_value_language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class DescriptiveValueLanguage < Struct
# String describing the standard or encoding.
attribute :value, Types::Strict::String.meta(omittable: true)
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
# The version of the standard or encoding.
# The version of the value standard.
attribute :version, Types::Strict::String.meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
attribute :valueScript, Standard.optional.meta(omittable: true)
end
end
Expand Down
3 changes: 3 additions & 0 deletions lib/cocina/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ class Event < Struct
attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
# Description of the event (creation, publication, etc.).
attribute :type, Types::Strict::String.meta(omittable: true)
# The preferred display label to use for the event in access systems.
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
attribute :date, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/cocina/models/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Language < Struct
attribute :uri, Types::Strict::String.meta(omittable: true)
attribute :standard, Standard.optional.meta(omittable: true)
attribute :encoding, Standard.optional.meta(omittable: true)
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
# The preferred display label to use for the descriptive element in access systems.
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
Expand Down
7 changes: 7 additions & 0 deletions lib/cocina/models/related_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ module Models
class RelatedResource < Struct
# The relationship of the related resource to the described resource.
attribute :type, Types::Strict::String.meta(omittable: true)
# Status of the related resource relative to other related resources.
attribute :status, Types::Strict::String.meta(omittable: true)
# The preferred display label to use for the related resource in access systems.
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
attribute :title, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
attribute :event, Types::Strict::Array.of(Event).meta(omittable: true)
attribute :form, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :language, Types::Strict::Array.of(Language).meta(omittable: true)
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :standard, Standard.optional.meta(omittable: true)
attribute :subject, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
# Stanford persistent URL associated with the related resource.
attribute :purl, Types::Strict::String.meta(omittable: true)
attribute :access, DescriptiveAccessMetadata.optional.meta(omittable: true)
# The version of the related resource.
attribute :version, Types::Strict::String.meta(omittable: true)
end
end
end
4 changes: 2 additions & 2 deletions lib/cocina/models/standard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class Standard < Struct
# String describing the standard or encoding.
attribute :value, Types::Strict::String.meta(omittable: true)
attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
# The version of the standard or encoding.
# The version of the value standard.
attribute :version, Types::Strict::String.meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
end
end
end
1 change: 1 addition & 0 deletions lib/cocina/models/title.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Title < Struct
attribute :uri, Types::Strict::String.meta(omittable: true)
attribute :standard, Standard.optional.meta(omittable: true)
attribute :encoding, Standard.optional.meta(omittable: true)
attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
attribute :source, Source.optional.meta(omittable: true)
# The preferred display label to use for the descriptive element in access systems.
attribute :displayLabel, Types::Strict::String.meta(omittable: true)
Expand Down
38 changes: 33 additions & 5 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ components:
description: Status of the contributor relative to other parallel contributors
(e.g. the primary author among a group of contributors).
type: string
# type: integer
role:
description: Relationships of the contributor to the resource or to an event
in its history.
Expand Down Expand Up @@ -300,7 +301,7 @@ components:
$ref: "#/components/schemas/Event"
form:
description: Characteristics of the resource's physical, digital, and intellectual
form and genre.
form and genre, and of its process of creation.
type: array
items:
$ref: "#/components/schemas/DescriptiveValue"
Expand Down Expand Up @@ -435,6 +436,7 @@ components:
description: Status of the descriptive element value relative to other instances
of the element.
type: string
# type: integer (uncomment when issue #154 is resolved)
code:
description: Code value of the descriptive element.
type: string
Expand All @@ -448,6 +450,11 @@ components:
encoding:
# description: Encoding schema, standard, or syntax to which the value conforms.
$ref: "#/components/schemas/Standard"
identifier:
description: Identifiers and URIs associated with the descriptive element.
type: array
items:
$ref: "#/components/schemas/DescriptiveValue"
source:
$ref: "#/components/schemas/Source"
displayLabel:
Expand Down Expand Up @@ -685,6 +692,9 @@ components:
type:
description: Description of the event (creation, publication, etc.).
type: string
displayLabel:
description: The preferred display label to use for the event in access systems.
type: string
date:
description: Dates associated with the event.
type: array
Expand All @@ -700,6 +710,11 @@ components:
type: array
items:
$ref: "#/components/schemas/DescriptiveValue"
identifier:
description: Identifiers and URIs associated with the event.
type: array
items:
$ref: "#/components/schemas/DescriptiveValue"
note:
description: Other information about the event.
type: array
Expand Down Expand Up @@ -912,6 +927,13 @@ components:
type:
description: The relationship of the related resource to the described resource.
type: string
status:
description: Status of the related resource relative to other related resources.
type: string
# type: integer
displayLabel:
description: The preferred display label to use for the related resource in access systems.
type: string
title:
description: Titles of the related resource.
type: array
Expand All @@ -930,7 +952,7 @@ components:
$ref: "#/components/schemas/Event"
form:
description: Characteristics of the related resource's physical, digital, and intellectual
form and genre.
form and genre, and of its process of creation.
type: array
items:
$ref: "#/components/schemas/DescriptiveValue"
Expand All @@ -950,6 +972,9 @@ components:
type: array
items:
$ref: "#/components/schemas/DescriptiveValue"
standard:
# description: Descriptive or content standards to which the value conforms.
$ref: "#/components/schemas/Standard"
subject:
description: Terms associated with the intellectual content of the related resource.
type: array
Expand All @@ -961,6 +986,9 @@ components:
format: uri
access:
$ref: "#/components/schemas/DescriptiveAccessMetadata"
version:
description: The version of the related resource.
type: string
ReleaseTag:
description: A tag that indicates the item or collection should be released.
type: object
Expand Down Expand Up @@ -1244,7 +1272,7 @@ components:
example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026'
Standard:
description: Property model for indicating the encoding, standard, or syntax
to which a value conforms.
to which a value conforms (e.g. RDA).
type: object
additionalProperties: false
properties:
Expand All @@ -1263,8 +1291,8 @@ components:
type: array
items:
$ref: "#/components/schemas/DescriptiveValue"
source:
$ref: "#/components/schemas/Source"
version:
description: The version of the standard or encoding.
type: string
source:
$ref: "#/components/schemas/Source"