Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Settings
- return
- {
- # Database settings
- 'ORACLE_SID' => 'VGER',
- 'ORACLE_HOME' => '/oracle/app/oracle/product/11.2.0.3/db_1',
- 'db_params' => 'host=localhost;sid=VGER',
- 'db_username' => '',
- 'db_password' => '',
- # If needed, the tablespace can be set to for example xxxdb
- 'db_tablespace' => '',
- # Keyword server address and port. Only used if the set specification contains a keyword term.
- 'keyword_host' => 'localhost',
- 'keyword_port' => '11460',
- # Debug mode (0=off, 1=on, 2=verbose). Writes some debugging information into Apache error log.
- 'debug' => 1,
- 'repository_name' => 'Test repository',
- 'base_url' => 'http://server.nowhere.com/cgi-bin/oai-pmh.cgi',
- # Link to original record. {ID} is replaced with the record ID.
- 'link_url' => 'http://server.nowhere.com/cgi-bin/Pwebrecon.cgi?DB=local&v1=1&Search_Arg=001A+{ID}&Search_Code=CMD&CNT=10',
- # Whether links as above will be created in the records.
- # 0 = no
- # 1 = yes
- 'create_links' => 1,
- # Repository id and delimiter used to create OAI-PMH style identifiers from the record id (e.g. oai:server.nowhere.com:12345)
- 'repository_id' => 'server.nowhere.com',
- 'id_delimiter' => ':',
- # Allowed IP addresses (leave empty [] for no limitations)
- # Delimiter for ranges is dash e.g. '192.168.0.1-192.168.0.5'
- 'allowed_ips' => ['127.0.0.1', '127.0.0.2'],
- # Deletion files (e.g. /m1/voyager/xxxdb/rpt/deleted.bib.marc)
- 'deleted_bib_file' => ['/m1/voyager/xxxdb/rpt/deleted.bib.marc', '/m1/voyager/xxxdb/local/rpt/deleted.bib.marc'],
- # Deleted MFHD file is only needed when include_holdings below is > 0 and file name is customized.
- # Normally not needed as it is determined from the path of deleted.bib.marc.
- #'deleted_mfhd_file' => ['/m1/voyager/xxxdb/rpt/deleted.mfhd.marc', '/m1/voyager/xxxdb/local/rpt/deleted.mfhd.marc'],
- 'deleted_auth_file' => '/m1/voyager/xxxdb/rpt/deleted.auth.marc',
- # Whether to return metadata for deleted records
- # 0 = no metadata is returned (standard-compliant)
- # 1 = metadata is returned (not standard-compliant)
- 'return_deleted_metadata' => 0,
- # Whether to return anything when a set is not specified
- # 0 = do not return anything
- # 1 = return all records
- 'return_all_for_empty_set' => 0,
- # Maximum number of records returned for a single query (next set can be requested with the resumptionToken)
- 'max_records' => 300,
- # How often the script will send the client a line feed to keep the connection from timing out if the query takes a long time.
- 'keep_alive_interval' => 30,
- # Which fields to strip from the records
- # (wildcard = #, e.g 100 = complete field, 100d = just subfield d of field 100, 9## = all fields beginning with 9)
- 'strip_fields' => ['903', '999'],
- # Whether to include holdings and availability information in the returned (bibliographic) records
- # 0 = don't include holdings information
- # 1 = include holdings information
- # 2 = include holdings and availability information (for Primo)
- 'include_holdings' => 0,
- # Whether to include suppressed holdings (0 = no, 1 = yes)
- 'include_suppressed_holdings' => 0,
- # Institution code in the holdings information (e.g. the database name xxxdb)
- 'holdings_institution_code' => 'xxxdb',
- # Sets
- # id: the set spec
- # name: description
- # record_type: A = authority records
- # B = bibliographic records (default)
- #
- # The rules below are only available for bibliographic records with the exception of filter procedure.
- #
- # rec_formats: Comma-separated list of types of record and bibliographic levels (leader positions 6-7,
- # for example 'am' for monographic material).
- # Either character can be replaced with _ (underscore) to indicate any value.
- # Prepend an entry with ! to make it NOT match the given format.
- # locations: Comma-separated list of location id's.
- # Prepend an entry with ! to make it NOT match the given location.
- # create_locations: Comma-separated list of happening location id's of record creation.
- # Prepend an entry with ! to make it NOT match the given location.
- # happening_locations: Comma-separated list of happening location id's of record manipulation (any event in BIB_HISTORY).
- # Prepend an entry with ! to make it NOT match the given location.
- # Note: As this matches any action type, it is typically only usable with further filtering in filter procedure.
- # keyword: A keysrv word search command. Examples:
- # IN("FIN","041A")
- # IN("ELE*","036A")
- # AND(IN("ELE*","036A"),IN("ELE*","036A"))
- # IN(PHRASE("1600","LUKU"),"650A") # ("1600-luku")
- # Special characters: Å = \xC3\x80, Ä = \xC3\x81, Ö = \xC3\x82
- # Note that the commands must not include extra spaces etc. keysrv is very strict with the syntax.
- # filter: A procedure that's executed for each record. The procedure must return 1 if the record is accepted.
- # The procedure will get three parameters: marc data, bib ID and database connection handle.
- # mfhd_callno: NORMALIZED call number.
- # pub_places: Comma-separated list of publication places (008 positions 15-17).
- # Wildcards _ (single character) and % (any number of characters) can be used.
- # Prepend an entry with ! to make it NOT match the given publication place.
- # languages: Comma-separated list of languages (008 positions 35-37).
- # Wildcards _ (single character) and % (any number of characters) can be used.
- # Prepend an entry with ! to make it NOT match the given language.
- # suppressed: 0 = records suppressed in OPAC are not returned
- # any other value = records suppressed in OPAC are returned
- #
- # component_parts: 0 = fetch component parts if they match other rules
- # 1 = fetch component parts if their host items match the keyword rule
- # 2 = fetch component parts for all matching host items
- #
- # rule_operator: and = all of rec_formats, locations, mfhd_callno, pub_places, languages in the set must match
- # or = any of rec_formats, locations, mfhd_callno, pub_places, languages in the set must match
- #
- # Example:
- # id => 'elektra', name => 'Elektra collection', rec_formats => '', locations => '', keyword => 'IN("ELE*","036A")',
- # filter => sub {
- # my ($marcdata, $rec_id, $dbh) = @_;
- # my $f041a = get_subfield(get_field($marcdata, '041'), 'a');
- # return ($f041a && $f041a =~ /^FIN$/i) ? 1 : 0;
- # },
- # component_parts => 0
- 'sets' => [
- {id => 'ethesis', name => 'Electronic thesis', record_type => 'B', rec_formats => '', locations => '259', keyword => '', filter => undef, mfhd_callno => '', component_parts => 0},
- {id => 'elektra', name => 'Elektra collection', record_type => 'B', rec_formats => '', locations => '',
- keyword => 'OR(IN("ELE0*","036A"),IN("ELE1*","036A"),IN("ELE2*","036A"),IN("ELE3*","036A"),IN("ELE4*","036A"),IN("ELE5*","036A"),IN("ELE6*","036A"),IN("ELE7*","036A"),IN("ELE8*","036A"),IN("ELE9*","036A"))',
- filter => undef, mfhd_callno => '', component_parts => 0},
- {id => 'auth', name => 'Authority records', record_type => 'A'},
- {id => 'serials', name => 'Serials', rec_formats => '_b,_s', locations => '',
- keyword => '', filter => undef, mfhd_callno => '', component_parts => 0},
- {id => 'books', name => 'Books', rec_formats => 'a_,t_,!_b,!_s', locations => '',
- keyword => '', filter => undef, mfhd_callno => '', component_parts => 0},
- {id => 'books:arabic', name => 'Arabic books', rec_formats => 'a_,t_,!_b,!_s', locations => '',
- keyword => 'IN("DCLN*","035A")', filter => undef, mfhd_callno => '', component_parts => 0},
- {id => 'books:us', name => 'U.S. books', rec_formats => 'a_,t_,!_b,!_s', locations => '',
- keyword => '', filter => undef, mfhd_callno => '', pub_places => 'uc,up,us,vi,__u', component_parts => 0},
- {id => 'books:us:eng', name => 'U.S. books in English', rec_formats => 'a_,t_,!_b,!_s', locations => '',
- keyword => '', filter => undef, mfhd_callno => '', pub_places => 'uc,up,us,vi,__u', languages => 'eng', component_parts => 0},
- ],
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement