-
Notifications
You must be signed in to change notification settings - Fork 1
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
Illustrative content #168
Illustrative content #168
Changes from all commits
902e01e
ff554a1
2e51559
d5a03d9
d15fda5
ffebf3b
ee41f41
a9bd175
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,22 +18,29 @@ def generate | |
|
||
def physical_descriptions | ||
extent_terms = item.instance.query.path_all([[BF.extent, BF.Extent]]) | ||
extent_physical_description = extent_terms.sort.map do |extent_term| | ||
|
||
# can have multiple illustrativeContent, but only using one | ||
illustrative_content_uri = item.instance.query.path_first_uri([BF.illustrativeContent]) || | ||
item.work.query.path_first_uri([BF.illustrativeContent]) | ||
if illustrative_content_uri | ||
other_physical_details = LiteralOrRemoteResolver.resolve_label(term: illustrative_content_uri, item: item) | ||
end | ||
extent_physical_descriptions = extent_terms.sort.map do |extent_term| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. refactor: |
||
{ | ||
extents: item.instance.query.path_all_literal([RDF::RDFS.label], subject_term: extent_term).sort, | ||
# Can be multiple notes, but only using one. | ||
materials_specified: item.instance.query.path_first_literal([[BF.note, BF.Note], | ||
RDF::RDFS.label], subject_term: extent_term) | ||
RDF::RDFS.label], subject_term: extent_term), | ||
other_physical_details: other_physical_details | ||
} | ||
end | ||
dimensions = { | ||
dimensions: item.instance.query.path_all_literal([BF.dimensions]).sort | ||
} | ||
if extent_physical_description.length == 1 && dimensions[:dimensions].length == 1 | ||
return [extent_physical_description.first.merge(dimensions)] | ||
dimensions = item.instance.query.path_all_literal([BF.dimensions]).sort | ||
if extent_physical_descriptions.length == 1 && dimensions.length == 1 | ||
return [extent_physical_descriptions.first.merge(dimensions: dimensions)] | ||
end | ||
|
||
extent_physical_description + [dimensions] | ||
extent_physical_descriptions << { dimensions: dimensions } if dimensions.present? | ||
extent_physical_descriptions | ||
Comment on lines
+37
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. refactor: |
||
end | ||
|
||
def media_types | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ticket said to default this to 'a'