"#{BASE_URL}?verb=#{VERB}&metadataPrefix=#{METADATA_PREFIX}"
"&set=#{SET}"
oai_adl
identifier=########
- replace these numbers with the identifier of the record you are looking foradl:book|10
or adl:book%7C10
represents the 10th pageThe implementation of Adventist's OAI original feed had some odd behaviors, namely in regards to the resumption token. The following URL includes the code to work around the resumption token:
oai_hyku
OR oai_dc
03eb0062-8683-4b14-ac0b-a7a4e3d534af
) to target a specific workoai_dc
, oai_qdc
...OAI is included in hyku, via gems blacklight_oai_provider (https://github.com/projectblacklight/blacklight_oai_provider) and ruby-oai (https://github.com/code4lib/ruby-oai), with the default configuration implementing the oai_dc metadataPrefix. An xsxlt document is used to display the results. Right-click and view page source to see the unformatted xml.
This can be seen on any hyku app, without any additional configuration, using the url {tenant}/catalog/oai?verb=Identify
.
Customization points:
catalog_controller.rb
catalog_controller.rb
for any facetable terms. The pre-set configuration only defines sets for Admin Sets.solr_document.rb
. Available terms for oai_dc
are: contributor, coverage, creator, date, description, format, identifier, language, publisher, relation, rights, source, subject, title, type
repository name
, record prefix
, admin email
, and sample id
values used in the catalog_controller
config can be configured individually by tenant in the app's superadmin dashboard.Implementing a new metadataPrefix requires several oai gem overrides & customizations:
lib/oai/provider/metadata_format/xxxxxx.rb
, where xxxxxx
is the new format being defined. Normally in initialize
the array of terms is set as @fields =
.lib/oai/provider/model_decorator.rb
to define map_xxxxxx
, the mapping from Hyku terms to the terms specified in @fields, for the new metadataPrefix.application.rb
to require & load the new oai files. # OAI additions
Dir.glob(File.join(File.dirname(__FILE__), "../lib/oai/**/*.rb")).sort.each do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
lib/oai/provider/response/list_metadata_formats_decorator.rb
to include prefix == xxxxxx
Implementing mods
metadataPrefix varies somewhat from the above steps, as the oai gems do not define the xml so that needs to be added. A mods metadataPrefix has been implemented in jio and utk. Utk's mods implementation happened via this ticket: https://github.com/scientist-softserv/utk-hyku/issues/431
Differences from the above-described steps include:
mods.rb
. Instead, define a method encode
which will replace the field definitions as well as the mappings normally done in model_decorator.rb
: # Override to strip namespace and header out
def encode(model, record)
record.to_oai_mods
end
app/model/concerns/mods_solr_document.rb
which defines to_oai_mods
and returns the mods xml document for the object.