diff --git a/app/models/ucla_metadata.rb b/app/models/ucla_metadata.rb index 6d009c55..afdf37b0 100644 --- a/app/models/ucla_metadata.rb +++ b/app/models/ucla_metadata.rb @@ -3,19 +3,20 @@ module UclaMetadata extend ActiveSupport::Concern included do - property :access_copy, predicate: ::RDF::URI.intern('http://www.europeana.eu/schemas/edm/object'), multiple: false do |index| + property :ark, predicate: ::RDF::Vocab::DC11.identifier, multiple: false do |index| index.as :stored_sortable end + # Item Overview property :alternative_title, predicate: ::RDF::Vocab::DC.alternative, multiple: true do |index| index.as :stored_searchable end - property :ark, predicate: ::RDF::Vocab::DC11.identifier, multiple: false do |index| - index.as :stored_sortable + property :uniform_title, predicate: ::RDF::URI.intern('http://purl.org/dc/elements/1.1/title') do |index| + index.as :stored_searchable, :facetable end - property :architect, predicate: ::RDF::Vocab::MARCRelators.arc do |index| + property :creator, predicate: ::RDF::URI.intern('http://purl.org/dc/elements/1.1/creator') do |index| index.as :stored_searchable, :facetable end @@ -23,143 +24,150 @@ module UclaMetadata index.as :stored_searchable, :facetable end - property :binding_note, predicate: ::RDF::URI.intern('http://marc21rdf.info/elements/5XX/M563__a'), multiple: false do |index| - index.as :stored_sortable + property :editor, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/edt') do |index| + index.as :stored_searchable, :facetable end - property :caption, predicate: ::RDF::Vocab::SCHEMA.caption do |index| - index.as :stored_searchable + property :photographer, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/pht.html') do |index| + index.as :stored_searchable, :facetable end - property :calligrapher, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/cll') do |index| + property :architect, predicate: ::RDF::Vocab::MARCRelators.arc do |index| index.as :stored_searchable, :facetable end - property :collation, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3077'), multiple: false do |index| - index.as :stored_sortable + property :illuminator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/ilu') do |index| + index.as :stored_searchable, :facetable end - property :condition_note, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3035'), multiple: false do |index| - index.as :stored_sortable + property :illustrator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/ill.html') do |index| + index.as :stored_searchable, :facetable end - property :contents_note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/marc/contentsNote') do |index| - index.as :stored_searchable + property :engraver, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/egr') do |index| + index.as :stored_searchable, :facetable end - property :colophon, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/Production') do |index| - index.as :stored_searchable + property :printmaker, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/prm') do |index| + index.as :stored_searchable, :facetable end - property :commentator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/cmm') do |index| + property :scribe, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/scr') do |index| index.as :stored_searchable, :facetable end - property :composer, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/cmp') do |index| + property :translator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/trl') do |index| index.as :stored_searchable, :facetable end - property :dimensions, predicate: ::RDF::Vocab::MODS.physicalExtent do |index| + property :rubricator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/rbr') do |index| index.as :stored_searchable, :facetable end - property :dlcs_collection_name, predicate: ::RDF::URI.intern('https://bib.schema.org/Collection') do |index| - index.as :displayable, :facetable + property :calligrapher, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/cll') do |index| + index.as :stored_searchable, :facetable end - property :editor, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/edt') do |index| + property :commentator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/cmm') do |index| index.as :stored_searchable, :facetable end - property :engraver, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/egr') do |index| + property :lyricist, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/lyr') do |index| index.as :stored_searchable, :facetable end - property :extent, predicate: ::RDF::Vocab::DC11.format do |index| + property :composer, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/cmp') do |index| index.as :stored_searchable, :facetable end - property :featured_image, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3080'), multiple: false do |index| - index.as :stored_sortable + property :normalized_date, predicate: ::RDF::Vocab::DC11.date do |index| + index.as :stored_searchable, :facetable end - property :finding_aid_url, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/findingAid') do |index| - index.as :displayable + property :place_of_origin, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/prp.html') do |index| + index.as :stored_searchable, :facetable end - property :foliation, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3076'), multiple: false do |index| - index.as :stored_sortable + property :publisher, predicate: ::RDF::URI.intern('http://purl.org/dc/elements/1.1/publisher') do |index| + index.as :stored_searchable end - property :funding_note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/marc/fundingInformation') do |index| + # Notes + property :summary, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/Summary') do |index| index.as :stored_searchable end - property :genre, predicate: ::RDF::Vocab::EDM.hasType do |index| - index.as :stored_searchable, :facetable + property :caption, predicate: ::RDF::Vocab::SCHEMA.caption do |index| + index.as :stored_searchable end - property :iiif_manifest_url, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#Manifest'), multiple: false do |index| - index.as :stored_sortable + property :provenance, predicate: ::RDF::URI.intern('http://purl.org/dc/terms/provenance') do |index| + index.as :stored_searchable end - property :iiif_range, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#Range'), multiple: false do |index| - index.as :stored_sortable + property :contents_note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/marc/contentsNote') do |index| + index.as :stored_searchable end - property :iiif_text_direction, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#viewingDirection'), multiple: false do |index| - index.as :stored_sortable + property :colophon, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/Production') do |index| + index.as :stored_searchable end - property :iiif_viewing_hint, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#ViewingHint'), multiple: false do |index| - index.as :stored_sortable + property :note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/lite/note') do |index| + index.as :stored_searchable end - property :illuminator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/ilu') do |index| + property :toc, predicate: ::RDF::URI.intern('http://purl.org/dc/terms/tableOfContents') do |index| + index.as :stored_searchable + end + + # Physical Description + property :extent, predicate: ::RDF::Vocab::DC11.format do |index| index.as :stored_searchable, :facetable end - property :illustrations_note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/marc/illustrations') do |index| - index.as :stored_searchable + property :dimensions, predicate: ::RDF::Vocab::MODS.physicalExtent do |index| + index.as :stored_searchable, :facetable end - property :illustrator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/ill.html') do |index| + property :support, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/BaseMaterial') do |index| index.as :stored_searchable, :facetable end - property :latitude, predicate: ::RDF::Vocab::EXIF.gpsLatitude do |index| - index.as :stored_searchable + property :medium, predicate: ::RDF::Vocab::DC.medium do |index| + index.as :stored_searchable, :facetable end - property :latitude, predicate: ::RDF::Vocab::EXIF.gpsLatitude do |index| - index.as :stored_searchable + property :page_layout, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe.html#p_layout') do |index| + index.as :symbol end - property :local_identifier, predicate: ::RDF::Vocab::Identifiers.local do |index| - index.as :displayable, :facetable + property :binding_note, predicate: ::RDF::URI.intern('http://marc21rdf.info/elements/5XX/M563__a'), multiple: false do |index| + index.as :stored_sortable end - # property :local_rights_statement, predicate: ::RDF::URI.intern('http://purl.org/dc/terms/rights') do |index| - # index.as :symbol - # end # This invokes License renderer from hyrax gem + property :condition_note, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3035'), multiple: false do |index| + index.as :stored_sortable + end - property :location, predicate: ::RDF::Vocab::DC.coverage do |index| - index.as :stored_searchable, :facetable + property :collation, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3077'), multiple: false do |index| + index.as :stored_sortable end - property :longitude, predicate: ::RDF::Vocab::EXIF.gpsLongitude do |index| - index.as :stored_searchable + property :foliation, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3076'), multiple: false do |index| + index.as :stored_sortable end - property :lyricist, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/lyr') do |index| - index.as :stored_searchable, :facetable + property :illustrations_note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/marc/illustrations') do |index| + index.as :stored_searchable end - property :masthead_parameters, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3078'), multiple: false do |index| - index.as :stored_sortable + # Keywords + property :genre, predicate: ::RDF::Vocab::EDM.hasType do |index| + index.as :stored_searchable, :facetable end - property :medium, predicate: ::RDF::Vocab::DC.medium do |index| + property :subject_topic, predicate: ::RDF::URI.intern('http://www.loc.gov/mods/rdf/v1#subjectTopic') do |index| index.as :stored_searchable, :facetable end @@ -167,108 +175,112 @@ module UclaMetadata index.as :stored_searchable, :facetable end - property :normalized_date, predicate: ::RDF::Vocab::DC11.date do |index| + property :subject_geographic, predicate: ::RDF::URI.intern('http://www.loc.gov/mods/rdf/v1#subjectGeographic') do |index| index.as :stored_searchable, :facetable end - property :note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/lite/note') do |index| - index.as :stored_searchable + property :subject_temporal, predicate: ::RDF::URI.intern('http://www.loc.gov/mods/rdf/v1#subjectTemporal') do |index| + index.as :stored_searchable, :facetable end - property :opac_url, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/unimarc/terms/ter%23e'), multiple: false do |index| - index.as :stored_sortable + property :location, predicate: ::RDF::Vocab::DC.coverage do |index| + index.as :stored_searchable, :facetable end - property :page_layout, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe.html#p_layout') do |index| - index.as :symbol + property :latitude, predicate: ::RDF::Vocab::EXIF.gpsLatitude do |index| + index.as :stored_searchable end - property :photographer, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/pht.html') do |index| - index.as :stored_searchable, :facetable + property :longitude, predicate: ::RDF::Vocab::EXIF.gpsLongitude do |index| + index.as :stored_searchable end - property :place_of_origin, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/prp.html') do |index| - index.as :stored_searchable, :facetable + # Find This Item + property :repository, predicate: ::RDF::Vocab::MODS.locationCopySublocation do |index| + index.as :stored_searchable end - property :preservation_copy, predicate: ::RDF::URI.intern('https://pcdm.org/models#hasFile'), multiple: false do |index| - index.as :stored_sortable + property :local_identifier, predicate: ::RDF::Vocab::Identifiers.local do |index| + index.as :displayable, :facetable end - property :printmaker, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/prm') do |index| - index.as :stored_searchable, :facetable + property :finding_aid_url, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/findingAid') do |index| + index.as :displayable end - property :provenance, predicate: ::RDF::URI.intern('http://purl.org/dc/terms/provenance') do |index| - index.as :stored_searchable + property :opac_url, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/unimarc/terms/ter%23e'), multiple: false do |index| + index.as :stored_sortable end - property :repository, predicate: ::RDF::Vocab::MODS.locationCopySublocation do |index| - index.as :stored_searchable + # Access Condition + property :services_contact, predicate: ::RDF::Vocab::EBUCore.hasRightsContact do |index| + index.as :displayable end - property :representative_image, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3079'), multiple: false do |index| - index.as :stored_sortable + property :rights_holder, predicate: ::RDF::Vocab::EBUCore.hasRightsHolder do |index| + index.as :stored_searchable end property :rights_country, predicate: ::RDF::Vocab::EBUCore.rightsType do |index| index.as :stored_searchable end - property :rights_holder, predicate: ::RDF::Vocab::EBUCore.hasRightsHolder do |index| + property :funding_note, predicate: ::RDF::URI.intern('http://bibfra.me/vocab/marc/fundingInformation') do |index| index.as :stored_searchable end - property :rubricator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/rbr') do |index| - index.as :stored_searchable, :facetable + property :access_copy, predicate: ::RDF::URI.intern('http://www.europeana.eu/schemas/edm/object'), multiple: false do |index| + index.as :stored_sortable end - property :scribe, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/scr') do |index| - index.as :stored_searchable, :facetable - end + # --------------- - property :services_contact, predicate: ::RDF::Vocab::EBUCore.hasRightsContact do |index| - index.as :displayable + property :dlcs_collection_name, predicate: ::RDF::URI.intern('https://bib.schema.org/Collection') do |index| + index.as :displayable, :facetable end - property :subject_topic, predicate: ::RDF::URI.intern('http://www.loc.gov/mods/rdf/v1#subjectTopic') do |index| - index.as :stored_searchable + property :featured_image, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3080'), multiple: false do |index| + index.as :stored_sortable end - property :subject_geographic, predicate: ::RDF::URI.intern('http://www.loc.gov/mods/rdf/v1#subjectGeographic') do |index| - index.as :stored_searchable + property :iiif_manifest_url, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#Manifest'), multiple: false do |index| + index.as :stored_sortable end - property :subject_temporal, predicate: ::RDF::URI.intern('http://www.loc.gov/mods/rdf/v1#subjectTemporal') do |index| - index.as :stored_searchable + property :iiif_range, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#Range'), multiple: false do |index| + index.as :stored_sortable end - property :summary, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/Summary') do |index| - index.as :stored_searchable + property :iiif_text_direction, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#viewingDirection'), multiple: false do |index| + index.as :stored_sortable end - property :support, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe/BaseMaterial') do |index| - index.as :stored_searchable, :facetable + property :iiif_viewing_hint, predicate: ::RDF::URI.intern('http://iiif.io/api/presentation/2#ViewingHint'), multiple: false do |index| + index.as :stored_sortable end - property :tagline, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3081'), multiple: false do |index| + property :masthead_parameters, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3078'), multiple: false do |index| index.as :stored_sortable end - property :toc, predicate: ::RDF::URI.intern('http://purl.org/dc/terms/tableOfContents') do |index| - index.as :stored_searchable + property :preservation_copy, predicate: ::RDF::URI.intern('https://pcdm.org/models#hasFile'), multiple: false do |index| + index.as :stored_sortable end - property :translator, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/trl') do |index| - index.as :stored_searchable, :facetable + property :representative_image, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3079'), multiple: false do |index| + index.as :stored_sortable end - property :uniform_title, predicate: ::RDF::URI.intern('http://purl.org/dc/elements/1.1/title') do |index| - index.as :stored_searchable, :facetable + property :tagline, predicate: ::RDF::URI.intern('http://iflastandards.info/ns/fr/frbr/frbrer/P3081'), multiple: false do |index| + index.as :stored_sortable end end end +# property :local_rights_statement, predicate: ::RDF::URI.intern('http://purl.org/dc/terms/rights') do |index| +# index.as :symbol +# end # This invokes License renderer from hyrax gem + # https://www.rubydoc.info/gems/solrizer/3.4.0/Solrizer/DefaultDescriptors#simple-class_method # displayable: https://www.rubydoc.info/gems/solrizer/3.4.0/Solrizer%2FDefaultDescriptors.displayable # stored_searchable https://www.rubydoc.info/gems/solrizer/3.4.0/Solrizer%2FDefaultDescriptors.stored_searchable diff --git a/spec/system/import_and_show_work_spec.rb b/spec/system/import_and_show_work_spec.rb index d9ee7040..0bce2687 100644 --- a/spec/system/import_and_show_work_spec.rb +++ b/spec/system/import_and_show_work_spec.rb @@ -30,7 +30,7 @@ expect(work.member_of_collections).to eq [collection] # displays expected fields on show work page - # these should match the value in the coordinates_example.csv + # these should match the value in the spec/fixtures/coordinates_example.csv work = Work.last expect(work.id).to eq "f62bn833bh-03031" @@ -123,7 +123,7 @@ # displays expected facets facet_headings = page.all(:css, 'h3.facet-field-heading').to_a.map(&:text) - expect(facet_headings).to contain_exactly("Subject", "Creator", "Resource Type", "Genre", "Names", "Location", "Normalized Date", "Extent", "Medium", "Dimensions", "Language", "Collection") + expect(facet_headings).to contain_exactly("Subject", "Creator", "Resource Type", "Genre", "Names", "Location", "Normalized Date", "Extent", "Medium", "Dimensions", "Language", "Collection", "Subject geographic", "Subject temporal") # # iiif manifest was cached # filename = Rails.root.join('tmp', work.date_modified.to_datetime.strftime('%Y-%m-%d_%H-%M-%S') + work.id)