exlibris-primo 0.1.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/README.md +111 -0
- data/Rakefile +2 -1
- data/lib/exlibris-primo.rb +4 -14
- data/lib/exlibris/primo.rb +13 -0
- data/lib/exlibris/primo/abstract.rb +28 -0
- data/lib/exlibris/primo/chain_gang/README.md +9 -0
- data/lib/exlibris/primo/chain_gang/base.rb +121 -0
- data/lib/exlibris/primo/chain_gang/record.rb +18 -0
- data/lib/exlibris/primo/chain_gang/search.rb +319 -0
- data/lib/exlibris/primo/chain_gang/user.rb +18 -0
- data/lib/exlibris/primo/config.rb +69 -0
- data/lib/exlibris/primo/eshelf.rb +115 -62
- data/lib/exlibris/primo/facet.rb +40 -0
- data/lib/exlibris/primo/facet_value.rb +40 -0
- data/lib/exlibris/primo/holding.rb +81 -152
- data/lib/exlibris/primo/link.rb +32 -0
- data/lib/exlibris/primo/namespaces.rb +44 -0
- data/lib/exlibris/primo/pnx/dedup_mgr.rb +91 -0
- data/lib/exlibris/primo/pnx/elements.rb +79 -0
- data/lib/exlibris/primo/pnx/frbr.rb +24 -0
- data/lib/exlibris/primo/pnx/holdings.rb +36 -0
- data/lib/exlibris/primo/pnx/links.rb +54 -0
- data/lib/exlibris/primo/pnx/openurl.rb +24 -0
- data/lib/exlibris/primo/pnx/subfields.rb +18 -0
- data/lib/exlibris/primo/record.rb +20 -106
- data/lib/exlibris/primo/request_attributes.rb +28 -0
- data/lib/exlibris/primo/review.rb +46 -0
- data/lib/exlibris/primo/reviews.rb +81 -0
- data/lib/exlibris/primo/search.rb +82 -0
- data/lib/exlibris/primo/source/aleph.rb +77 -31
- data/lib/exlibris/primo/tag.rb +34 -0
- data/lib/exlibris/primo/tags.rb +103 -0
- data/lib/exlibris/primo/version.rb +1 -1
- data/lib/exlibris/primo/web_service/client/base.rb +30 -0
- data/lib/exlibris/primo/web_service/client/base/endpoint.rb +29 -0
- data/lib/exlibris/primo/web_service/client/base/savon_client.rb +24 -0
- data/lib/exlibris/primo/web_service/client/base/savon_config.rb +19 -0
- data/lib/exlibris/primo/web_service/client/base/soap_actions.rb +55 -0
- data/lib/exlibris/primo/web_service/client/base/wsdl.rb +14 -0
- data/lib/exlibris/primo/web_service/client/eshelf.rb +22 -0
- data/lib/exlibris/primo/web_service/client/reviews.rb +15 -0
- data/lib/exlibris/primo/web_service/client/search.rb +15 -0
- data/lib/exlibris/primo/web_service/client/tags.rb +14 -0
- data/lib/exlibris/primo/web_service/request/base.rb +77 -0
- data/lib/exlibris/primo/web_service/request/base/base_elements.rb +71 -0
- data/lib/exlibris/primo/web_service/request/base/call.rb +19 -0
- data/lib/exlibris/primo/web_service/request/base/client.rb +45 -0
- data/lib/exlibris/primo/web_service/request/base/soap_action.rb +29 -0
- data/lib/exlibris/primo/web_service/request/eshelf.rb +71 -0
- data/lib/exlibris/primo/web_service/request/reviews.rb +57 -0
- data/lib/exlibris/primo/web_service/request/search.rb +49 -0
- data/lib/exlibris/primo/web_service/request/search/display_fields.rb +30 -0
- data/lib/exlibris/primo/web_service/request/search/languages.rb +32 -0
- data/lib/exlibris/primo/web_service/request/search/location.rb +15 -0
- data/lib/exlibris/primo/web_service/request/search/locations.rb +33 -0
- data/lib/exlibris/primo/web_service/request/search/query_term.rb +43 -0
- data/lib/exlibris/primo/web_service/request/search/query_terms.rb +40 -0
- data/lib/exlibris/primo/web_service/request/search/search_elements.rb +97 -0
- data/lib/exlibris/primo/web_service/request/search/sort_bys.rb +32 -0
- data/lib/exlibris/primo/web_service/request/tags.rb +56 -0
- data/lib/exlibris/primo/web_service/response/base.rb +28 -0
- data/lib/exlibris/primo/web_service/response/base/error.rb +25 -0
- data/lib/exlibris/primo/web_service/response/base/util.rb +19 -0
- data/lib/exlibris/primo/web_service/response/did_u_mean.rb +17 -0
- data/lib/exlibris/primo/web_service/response/eshelf.rb +68 -0
- data/lib/exlibris/primo/web_service/response/facets.rb +21 -0
- data/lib/exlibris/primo/web_service/response/records.rb +17 -0
- data/lib/exlibris/primo/web_service/response/reviews.rb +49 -0
- data/lib/exlibris/primo/web_service/response/search.rb +36 -0
- data/lib/exlibris/primo/web_service/response/search_stats.rb +48 -0
- data/lib/exlibris/primo/web_service/response/tags.rb +54 -0
- data/lib/exlibris/primo/write_attributes.rb +38 -0
- data/lib/exlibris/primo/xml_util.rb +63 -0
- data/test/{unit/eshelf_test.rb → bak/eshelf_test.rb.bak} +0 -0
- data/test/{unit/record_test.rb → bak/record_test.rb.bak} +0 -0
- data/test/{unit/searcher_test.rb → bak/searcher_test.rb.bak} +0 -0
- data/test/{unit/web_service_test.rb → bak/web_service_test.rb.bak} +0 -0
- data/test/config_test.rb +72 -0
- data/test/eshelf_test.rb +66 -0
- data/test/exlibris-primo_test.rb +0 -1
- data/test/facet_test.rb +27 -0
- data/test/facet_value_test.rb +62 -0
- data/test/holding_test.rb +26 -0
- data/test/link_test.rb +42 -0
- data/test/pnx/dedup_mgr_test.rb +16 -0
- data/test/pnx/elements_test.rb +16 -0
- data/test/pnx/frbr_test.rb +12 -0
- data/test/pnx/holdings_test.rb +53 -0
- data/test/pnx/links_test.rb +44 -0
- data/test/pnx/openurl_test.rb +10 -0
- data/test/record_test.rb +11 -0
- data/test/review_test.rb +15 -0
- data/test/reviews_test.rb +50 -0
- data/test/search_test.rb +328 -0
- data/test/source/aleph_test.rb +52 -0
- data/test/support/config.yml +35 -0
- data/test/tag_test.rb +12 -0
- data/test/tags_test.rb +65 -0
- data/test/test_helper.rb +536 -4
- data/test/vcr_cassettes/client_action_no_arguments.yml +38 -0
- data/test/vcr_cassettes/client_get_all_my_reviews.yml +49 -0
- data/test/vcr_cassettes/client_get_all_my_tags.yml +49 -0
- data/test/vcr_cassettes/client_get_eshelf.yml +13812 -0
- data/test/vcr_cassettes/client_get_record.yml +222 -0
- data/test/vcr_cassettes/client_get_reviews.yml +39 -0
- data/test/vcr_cassettes/client_get_tags.yml +42 -0
- data/test/vcr_cassettes/client_search_brief_isbn.yml +288 -0
- data/test/vcr_cassettes/client_search_brief_issn.yml +282 -0
- data/test/vcr_cassettes/client_too_many_arguments.yml +38 -0
- data/test/vcr_cassettes/eshelf.yml +13845 -0
- data/test/vcr_cassettes/eshelf_add_folder.yml +109 -0
- data/test/vcr_cassettes/eshelf_add_record.yml +14237 -0
- data/test/vcr_cassettes/eshelf_add_records.yml +14156 -0
- data/test/vcr_cassettes/eshelf_basket_id.yml +36 -0
- data/test/vcr_cassettes/eshelf_records.yml +13460 -0
- data/test/vcr_cassettes/eshelf_remove_folder.yml +76 -0
- data/test/vcr_cassettes/eshelf_remove_record.yml +13500 -0
- data/test/vcr_cassettes/eshelf_remove_records.yml +13741 -0
- data/test/vcr_cassettes/{web_service_single_document.yml → remote_record_call.yml} +12 -23
- data/test/vcr_cassettes/{searcher_dedupmrg_by_id.yml → remote_record_dedupmgr.yml} +19 -31
- data/test/vcr_cassettes/request_add_folder_to_eshelf.yml +43 -0
- data/test/vcr_cassettes/request_add_to_eshelf.yml +43 -0
- data/test/vcr_cassettes/request_did_u_mean_enabled.yml +48 -0
- data/test/vcr_cassettes/request_full_view.yml +222 -0
- data/test/vcr_cassettes/request_get_eshelf.yml +13812 -0
- data/test/vcr_cassettes/request_get_eshelf_structure.yml +36 -0
- data/test/vcr_cassettes/request_get_reviews.yml +39 -0
- data/test/vcr_cassettes/request_get_tags.yml +42 -0
- data/test/vcr_cassettes/request_remove_folder_from_eshelf.yml +43 -0
- data/test/vcr_cassettes/request_remove_from_eshelf.yml +43 -0
- data/test/vcr_cassettes/request_search_author.yml +1258 -0
- data/test/vcr_cassettes/request_search_did_u_mean.yml +48 -0
- data/test/vcr_cassettes/request_search_genre.yml +1321 -0
- data/test/vcr_cassettes/request_search_isbn.yml +288 -0
- data/test/vcr_cassettes/request_search_issn.yml +282 -0
- data/test/vcr_cassettes/request_search_locations.yml +288 -0
- data/test/vcr_cassettes/request_search_title.yml +1024 -0
- data/test/vcr_cassettes/request_search_title_author_genre.yml +708 -0
- data/test/vcr_cassettes/response_add_folder_to_eshelf.yml +43 -0
- data/test/vcr_cassettes/response_add_review.yml +39 -0
- data/test/vcr_cassettes/response_add_tag.yml +39 -0
- data/test/vcr_cassettes/response_add_to_eshelf.yml +43 -0
- data/test/vcr_cassettes/response_did_u_mean_disabled.yml +46 -0
- data/test/vcr_cassettes/response_did_u_mean_enabled.yml +48 -0
- data/test/vcr_cassettes/response_full_view.yml +222 -0
- data/test/vcr_cassettes/response_get_all_my_reviews.yml +49 -0
- data/test/vcr_cassettes/response_get_all_my_tags.yml +49 -0
- data/test/vcr_cassettes/response_get_eshelf.yml +13633 -0
- data/test/vcr_cassettes/response_get_eshelf_structure.yml +36 -0
- data/test/vcr_cassettes/response_get_reviews.yml +39 -0
- data/test/vcr_cassettes/response_get_reviews_by_rating.yml +49 -0
- data/test/vcr_cassettes/response_get_reviews_for_record.yml +39 -0
- data/test/vcr_cassettes/response_get_tags.yml +42 -0
- data/test/vcr_cassettes/response_get_tags_for_record.yml +42 -0
- data/test/vcr_cassettes/response_remove_folder_from_eshelf.yml +43 -0
- data/test/vcr_cassettes/response_remove_from_eshelf.yml +43 -0
- data/test/vcr_cassettes/response_remove_review.yml +39 -0
- data/test/vcr_cassettes/response_remove_tag.yml +39 -0
- data/test/vcr_cassettes/response_remove_user_tags.yml +39 -0
- data/test/vcr_cassettes/response_search.yml +288 -0
- data/test/vcr_cassettes/response_search_did_u_mean.yml +48 -0
- data/test/vcr_cassettes/reviews.yml +49 -0
- data/test/vcr_cassettes/reviews_add_review.yml +39 -0
- data/test/vcr_cassettes/reviews_check_empty_reviews_first.yml +39 -0
- data/test/vcr_cassettes/reviews_check_empty_reviews_last.yml +39 -0
- data/test/vcr_cassettes/reviews_rating.yml +168 -0
- data/test/vcr_cassettes/reviews_record.yml +49 -0
- data/test/vcr_cassettes/reviews_remove_review.yml +39 -0
- data/test/vcr_cassettes/reviews_reviews.yml +49 -0
- data/test/vcr_cassettes/reviews_user.yml +58 -0
- data/test/vcr_cassettes/search_chaining_author_title.yml +938 -0
- data/test/vcr_cassettes/search_chaining_contains_any.yml +1453 -0
- data/test/vcr_cassettes/search_chaining_contains_author_starts_with_title.yml +1055 -0
- data/test/vcr_cassettes/search_chaining_isbn.yml +288 -0
- data/test/vcr_cassettes/search_chaining_page_size_author.yml +5933 -0
- data/test/vcr_cassettes/search_did_u_mean.yml +48 -0
- data/test/vcr_cassettes/search_enable_highlighting.yml +1337 -0
- data/test/vcr_cassettes/search_isbn.yml +288 -0
- data/test/vcr_cassettes/search_languages.yml +1332 -0
- data/test/vcr_cassettes/search_locations.yml +1440 -0
- data/test/vcr_cassettes/search_record_id.yml +222 -0
- data/test/vcr_cassettes/search_record_id_chaining.yml +222 -0
- data/test/vcr_cassettes/search_sort_by.yml +1289 -0
- data/test/vcr_cassettes/search_sort_by_locations.yml +1387 -0
- data/test/vcr_cassettes/tags.yml +56 -0
- data/test/vcr_cassettes/tags_add_extra_tag.yml +39 -0
- data/test/vcr_cassettes/tags_add_tag.yml +39 -0
- data/test/vcr_cassettes/tags_add_tags.yml +111 -0
- data/test/vcr_cassettes/tags_check_1_tags.yml +56 -0
- data/test/vcr_cassettes/tags_check_2_tags.yml +68 -0
- data/test/vcr_cassettes/tags_check_empty_tags_first.yml +42 -0
- data/test/vcr_cassettes/tags_check_empty_tags_last.yml +42 -0
- data/test/vcr_cassettes/tags_remove_tag.yml +39 -0
- data/test/vcr_cassettes/tags_remove_tags.yml +111 -0
- data/test/vcr_cassettes/tags_remove_user_tags.yml +39 -0
- data/test/vcr_cassettes/tags_tags.yml +104 -0
- data/test/vcr_cassettes/tags_user.yml +73 -0
- data/test/web_service/client/abstract_test.rb +29 -0
- data/test/web_service/client/eshelf_test.rb +22 -0
- data/test/web_service/client/reviews_test.rb +31 -0
- data/test/web_service/client/savon_client_test.rb +17 -0
- data/test/web_service/client/search_benchmarks.rb +29 -0
- data/test/web_service/client/search_test.rb +44 -0
- data/test/web_service/client/soap_actions_test.rb +45 -0
- data/test/web_service/client/tags_test.rb +31 -0
- data/test/web_service/request/abstract_test.rb +68 -0
- data/test/web_service/request/base_elements_test.rb +231 -0
- data/test/web_service/request/build_xml_test.rb +23 -0
- data/test/web_service/request/client_test.rb +53 -0
- data/test/web_service/request/eshelf_test.rb +26 -0
- data/test/web_service/request/location_test.rb +25 -0
- data/test/web_service/request/query_term_test.rb +29 -0
- data/test/web_service/request/reviews_test.rb +27 -0
- data/test/web_service/request/search_test.rb +234 -0
- data/test/web_service/request/soap_action_test.rb +120 -0
- data/test/web_service/request/tags_test.rb +27 -0
- data/test/web_service/response/abstract_test.rb +200 -0
- data/test/web_service/response/did_u_mean_test.rb +44 -0
- data/test/web_service/response/error_test.rb +31 -0
- data/test/web_service/response/eshelf_test.rb +28 -0
- data/test/web_service/response/facets_test.rb +42 -0
- data/test/web_service/response/records_test.rb +56 -0
- data/test/web_service/response/reviews_test.rb +28 -0
- data/test/web_service/response/search_stats_test.rb +75 -0
- data/test/web_service/response/search_test.rb +40 -0
- data/test/web_service/response/tags_test.rb +28 -0
- data/test/xml_util_test.rb +23 -0
- metadata +456 -114
- data/README.rdoc +0 -68
- data/lib/exlibris/primo/related_link.rb +0 -20
- data/lib/exlibris/primo/rsrc.rb +0 -20
- data/lib/exlibris/primo/searcher.rb +0 -277
- data/lib/exlibris/primo/toc.rb +0 -20
- data/lib/exlibris/primo/web_service.rb +0 -203
- data/test/unit/searcher_benchmarks.rb +0 -74
- data/test/unit/web_service_benchmarks.rb +0 -58
- data/test/vcr_cassettes/eshelf_add_invalid_records.yml +0 -107
- data/test/vcr_cassettes/eshelf_add_same_record_twice.yml +0 -159
- data/test/vcr_cassettes/eshelf_add_to_empty_basket.yml +0 -107
- data/test/vcr_cassettes/eshelf_add_to_invalid_basket.yml +0 -55
- data/test/vcr_cassettes/eshelf_invalid_eshelf.yml +0 -55
- data/test/vcr_cassettes/eshelf_invalid_institution.yml +0 -55
- data/test/vcr_cassettes/eshelf_valid_eshelf.yml +0 -2553
- data/test/vcr_cassettes/eshelf_valid_eshelf_structure.yml +0 -47
- data/test/vcr_cassettes/record.yml +0 -212
- data/test/vcr_cassettes/record_invalid_record.yml +0 -55
- data/test/vcr_cassettes/record_sub_record.yml +0 -212
- data/test/vcr_cassettes/record_valid_record.yml +0 -212
- data/test/vcr_cassettes/searcher_base_holdings_by_id.yml +0 -212
- data/test/vcr_cassettes/searcher_diacritics1_by_id.yml +0 -207
- data/test/vcr_cassettes/searcher_diacritics2_by_id.yml +0 -232
- data/test/vcr_cassettes/searcher_holdings_by_id.yml +0 -212
- data/test/vcr_cassettes/searcher_invalid_id.yml +0 -55
- data/test/vcr_cassettes/searcher_rsrcs_by_id.yml +0 -270
- data/test/vcr_cassettes/searcher_search_by_isbn.yml +0 -278
- data/test/vcr_cassettes/searcher_search_by_issn.yml +0 -297
- data/test/vcr_cassettes/searcher_search_by_title_author_genre.yml +0 -671
- data/test/vcr_cassettes/searcher_test_bug_1361.yml +0 -224
- data/test/vcr_cassettes/searcher_test_problem_by_id.yml +0 -194
- data/test/vcr_cassettes/searcher_tocs_by_id.yml +0 -217
- data/test/vcr_cassettes/web_service_author_search.yml +0 -1269
- data/test/vcr_cassettes/web_service_bogus_200.yml +0 -392
- data/test/vcr_cassettes/web_service_brief_search.yml +0 -299
- data/test/vcr_cassettes/web_service_get_eshelf.yml +0 -11823
- data/test/vcr_cassettes/web_service_get_eshelf_structure_search.yml +0 -47
- data/test/vcr_cassettes/web_service_invalid_document.yml +0 -54
- data/test/vcr_cassettes/web_service_isbn_search.yml +0 -299
- data/test/vcr_cassettes/web_service_issn_search.yml +0 -293
- data/test/vcr_cassettes/web_service_problem_document.yml +0 -193
- data/test/vcr_cassettes/web_service_title_author_genre_search.yml +0 -719
- data/test/vcr_cassettes/web_service_title_search.yml +0 -1035
@@ -0,0 +1,52 @@
|
|
1
|
+
module Source
|
2
|
+
require 'test_helper'
|
3
|
+
class AlephTest < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
@record_id = "aleph002895625"
|
6
|
+
@source_id = "aleph"
|
7
|
+
@original_source_id = "USM01"
|
8
|
+
@source_record_id = "002895625"
|
9
|
+
@ils_api_id = "USM01002895625"
|
10
|
+
@library_code = "LIB_CODE2"
|
11
|
+
@collection = "Collection"
|
12
|
+
@call_number = "(0123456789)"
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_aleph_source
|
16
|
+
reset_primo_configuration
|
17
|
+
yaml_primo_configuration
|
18
|
+
assert_nothing_raised {
|
19
|
+
holding = Exlibris::Primo::Holding.new :record_id => @record_id, :original_id => @record_id,
|
20
|
+
:source_id => @source_id, :original_source_id => @original_source_id, :source_record_id => @source_record_id,
|
21
|
+
:ils_api_id => @ils_api_id, :library_code => @library_code, :collection => @collection, :call_number => @call_number,
|
22
|
+
:availability_status_code => "available", :title => "Aleph Title", :author => "Aleph Author",
|
23
|
+
:display_type => "Book"
|
24
|
+
assert_not_nil holding.source_config
|
25
|
+
assert_equal "LOCAL01", holding.source_config["local_base"]
|
26
|
+
assert_equal "Aleph", holding.source_config["class_name"]
|
27
|
+
assert_equal "Aleph", holding.source_class
|
28
|
+
aleph = holding.to_source
|
29
|
+
assert_kind_of Exlibris::Primo::Source::Aleph, aleph
|
30
|
+
assert_equal "http://aleph.library.edu", aleph.aleph_url
|
31
|
+
assert_equal "http://aleph.library.edu:1891/rest-dlf", aleph.aleph_rest_url
|
32
|
+
assert_equal "AlephSubLibrary1", aleph.sub_library_code
|
33
|
+
assert_equal "Library Decoded 2", aleph.sub_library
|
34
|
+
assert_equal "LIB_CODE2", aleph.library_code
|
35
|
+
assert_equal "Library Decoded 2", aleph.library
|
36
|
+
assert_equal "LOCAL01", aleph.local_base
|
37
|
+
assert_equal([aleph], aleph.expand)
|
38
|
+
assert((not aleph.dedup?))
|
39
|
+
assert_equal "http://aleph.library.edu/F?func=item-global"+
|
40
|
+
"&doc_library=USM01&local_base=LOCAL01&doc_number=002895625"+
|
41
|
+
"&sub_library=AlephSubLibrary1", aleph.url
|
42
|
+
assert_equal "http://aleph.library.edu/F?func=item-global"+
|
43
|
+
"&doc_library=USM01&local_base=LOCAL01&doc_number=002895625"+
|
44
|
+
"&sub_library=AlephSubLibrary1", aleph.request_url
|
45
|
+
assert_equal "http://aleph.library.edu:1891/rest-dlf/record/USM01002895625", aleph.rest_url
|
46
|
+
holding.availability_status_code = "unavailable"
|
47
|
+
aleph = holding.to_source
|
48
|
+
assert_nil aleph.request_url
|
49
|
+
}
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
base_url: "yaml_url"
|
2
|
+
institution: "YAML_INSTITUTION"
|
3
|
+
libraries:
|
4
|
+
"LIB_CODE1": "Library Decoded 1"
|
5
|
+
"LIB_CODE2": "Library Decoded 2"
|
6
|
+
"LIB_CODE3": "Library Decoded 3"
|
7
|
+
availability_statuses:
|
8
|
+
"available": "Available"
|
9
|
+
"requested": "Requested"
|
10
|
+
"unavailable": "Unavailable"
|
11
|
+
"check_holdings": "Check Availability"
|
12
|
+
"request_ill": "Request ILL"
|
13
|
+
"billed_as_lost": "Billed as Lost"
|
14
|
+
"offsite": "Available Offsite"
|
15
|
+
"processing": "In Processing"
|
16
|
+
"in_transit": "In Processing"
|
17
|
+
sources:
|
18
|
+
aleph:
|
19
|
+
class_name: Aleph
|
20
|
+
base_url: http://aleph.library.edu
|
21
|
+
rest_url: http://aleph.library.edu:1891/rest-dlf
|
22
|
+
local_base: LOCAL01
|
23
|
+
requestable_statuses:
|
24
|
+
- available
|
25
|
+
sub_library_codes:
|
26
|
+
LIB_CODE1: AlephSubLibrary1
|
27
|
+
LIB_CODE2: AlephSubLibrary1
|
28
|
+
LIB_CODE3: AlephSubLibrary2
|
29
|
+
source1:
|
30
|
+
class_name: Source1ClassName
|
31
|
+
source_config1: Some source 1 config
|
32
|
+
source_config2: Some other 1 source config
|
33
|
+
source2:
|
34
|
+
source_config1: Some source 2 config
|
35
|
+
source_config2: Some other source 2 config
|
data/test/tag_test.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
class TagTest < Test::Unit::TestCase
|
3
|
+
def test_new_tag
|
4
|
+
assert_nothing_raised {
|
5
|
+
tag = Exlibris::Primo::Tag.new(:raw_xml => "<Tag><value>spies</value><docId>nyu_aleph000062856</docId><userId/><status/></Tag>")
|
6
|
+
assert_equal "", tag.user_id
|
7
|
+
assert_equal "nyu_aleph000062856", tag.record_id
|
8
|
+
assert_equal "spies", tag.value
|
9
|
+
assert_equal "", tag.status
|
10
|
+
}
|
11
|
+
end
|
12
|
+
end
|
data/test/tags_test.rb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
class TagsTest < Test::Unit::TestCase
|
3
|
+
def setup
|
4
|
+
@base_url = "http://bobcatdev.library.nyu.edu"
|
5
|
+
@user_id = "N12162279"
|
6
|
+
@institution = "NYU"
|
7
|
+
@record_id = "nyu_aleph000062856"
|
8
|
+
@tags = ["tag1", "tag2", "tag 3"]
|
9
|
+
@tag = "tag4"
|
10
|
+
@extra_tag = "tag 5"
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_tags
|
14
|
+
tags = Exlibris::Primo::Tags.new(:base_url => @base_url,
|
15
|
+
:institution => @institution, :user_id => @user_id, :record_id => @record_id)
|
16
|
+
VCR.use_cassette('tags check empty tags first') do
|
17
|
+
assert_not_nil tags.tags
|
18
|
+
assert(tags.tags.empty?)
|
19
|
+
end
|
20
|
+
VCR.use_cassette('tags add tags') do
|
21
|
+
tags.add_tags @tags
|
22
|
+
end
|
23
|
+
VCR.use_cassette('tags add tag') do
|
24
|
+
tags.add_tag @tag
|
25
|
+
end
|
26
|
+
VCR.use_cassette('tags add extra tag') do
|
27
|
+
tags.add_tag @extra_tag
|
28
|
+
end
|
29
|
+
VCR.use_cassette('tags tags') do
|
30
|
+
assert_not_nil tags.tags
|
31
|
+
assert((not tags.tags.empty?))
|
32
|
+
end
|
33
|
+
VCR.use_cassette('tags user') do
|
34
|
+
assert_not_nil tags.user_tags
|
35
|
+
assert((not tags.user_tags.empty?))
|
36
|
+
end
|
37
|
+
VCR.use_cassette('tags record') do
|
38
|
+
assert_not_nil tags.record_tags
|
39
|
+
assert((not tags.record_tags.empty?))
|
40
|
+
end
|
41
|
+
VCR.use_cassette('tags remove tags') do
|
42
|
+
tags.remove_tags @tags
|
43
|
+
end
|
44
|
+
VCR.use_cassette('tags check 2 tags') do
|
45
|
+
assert_not_nil tags.tags
|
46
|
+
assert((not tags.tags.empty?))
|
47
|
+
assert_equal(2, tags.tags.size)
|
48
|
+
end
|
49
|
+
VCR.use_cassette('tags remove tag') do
|
50
|
+
tags.remove_tag @tag
|
51
|
+
end
|
52
|
+
VCR.use_cassette('tags check 1 tags') do
|
53
|
+
assert_not_nil tags.tags
|
54
|
+
assert((not tags.tags.empty?))
|
55
|
+
assert_equal(1, tags.tags.size)
|
56
|
+
end
|
57
|
+
VCR.use_cassette('tags remove user tags') do
|
58
|
+
tags.remove_user_tags
|
59
|
+
end
|
60
|
+
VCR.use_cassette('tags check empty tags last') do
|
61
|
+
assert_not_nil tags.tags
|
62
|
+
assert(tags.tags.empty?)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# Ignore simplecov when running on travis.
|
2
|
+
unless ENV['CI']
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
end
|
1
6
|
require 'test/unit'
|
2
7
|
require File.expand_path("../../lib/exlibris-primo.rb", __FILE__)
|
3
8
|
|
@@ -6,26 +11,26 @@ require File.expand_path("../../lib/exlibris-primo.rb", __FILE__)
|
|
6
11
|
# back. Useful for efficiency, also useful for
|
7
12
|
# testing code against API's that not everyone
|
8
13
|
# has access to -- the responses can be cached
|
9
|
-
# and re-used.
|
14
|
+
# and re-used.
|
10
15
|
require 'vcr'
|
11
16
|
require 'webmock'
|
12
17
|
|
13
18
|
# To allow us to do real HTTP requests in a VCR.turned_off, we
|
14
|
-
# have to tell webmock to let us.
|
19
|
+
# have to tell webmock to let us.
|
15
20
|
WebMock.allow_net_connect!(:net_http_connect_on_start => true)
|
16
21
|
|
17
22
|
without_ctx_tim = VCR.request_matchers.uri_without_param(:ctx_tim)
|
18
23
|
VCR.configure do |c|
|
19
24
|
c.cassette_library_dir = 'test/vcr_cassettes'
|
20
25
|
# webmock needed for HTTPClient testing
|
21
|
-
c.hook_into :webmock
|
26
|
+
c.hook_into :webmock
|
22
27
|
c.register_request_matcher(:uri_without_ctx_tim, &without_ctx_tim)
|
23
28
|
# c.debug_logger = $stderr
|
24
29
|
end
|
25
30
|
|
26
31
|
# Silly way to not have to rewrite all our tests if we
|
27
32
|
# temporarily disable VCR, make VCR.use_cassette a no-op
|
28
|
-
# instead of no-such-method.
|
33
|
+
# instead of no-such-method.
|
29
34
|
if ! defined? VCR
|
30
35
|
module VCR
|
31
36
|
def self.use_cassette(*args)
|
@@ -34,3 +39,530 @@ if ! defined? VCR
|
|
34
39
|
end
|
35
40
|
end
|
36
41
|
|
42
|
+
class Test::Unit::TestCase
|
43
|
+
def assert_request_children(request, expected_root, &block)
|
44
|
+
document = Nokogiri::XML(request.to_xml)
|
45
|
+
assert_kind_of Nokogiri::XML::Document, document
|
46
|
+
children = document.root.children
|
47
|
+
assert_equal 1, children.size
|
48
|
+
assert_equal "request", document.root.name
|
49
|
+
children.each do |child|
|
50
|
+
assert child.cdata?
|
51
|
+
request_document = Nokogiri::XML(child.inner_text)
|
52
|
+
assert_equal "http://www.exlibris.com/primo/xsd/wsRequest", request_document.namespaces["xmlns"]
|
53
|
+
assert_equal "http://www.exlibris.com/primo/xsd/primoview/uicomponents", request_document.namespaces["xmlns:uic"]
|
54
|
+
assert_equal expected_root, request_document.root.name
|
55
|
+
request_document.root.children.each do |sub_child|
|
56
|
+
yield sub_child
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
protected :assert_request_children
|
61
|
+
|
62
|
+
# Reversed expectation and actual because of ruby 1.8
|
63
|
+
def assert_request(request, expected_root, *expected_args)
|
64
|
+
document = Nokogiri::XML(request.to_xml)
|
65
|
+
request_document = Nokogiri::XML(document.root.children.first.inner_text)
|
66
|
+
assert_equal(request_document.root.children.size, expected_args.size)
|
67
|
+
assert_request_children(request, expected_root) do |child|
|
68
|
+
child_xml = xmlize(child)
|
69
|
+
assert_equal expected_args.shift, child_xml
|
70
|
+
end
|
71
|
+
end
|
72
|
+
protected :assert_request
|
73
|
+
|
74
|
+
def yaml_primo_configuration
|
75
|
+
Exlibris::Primo.configure do |config|
|
76
|
+
config.load_yaml File.expand_path("../support/config.yml", __FILE__)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def reset_primo_configuration
|
81
|
+
Exlibris::Primo.configure do |config|
|
82
|
+
config.base_url = nil
|
83
|
+
config.institution = nil
|
84
|
+
config.institutions = nil
|
85
|
+
config.libraries = nil
|
86
|
+
config.availability_statuses = nil
|
87
|
+
end
|
88
|
+
end
|
89
|
+
protected :reset_primo_configuration
|
90
|
+
|
91
|
+
def xmlize(element)
|
92
|
+
element.to_xml(
|
93
|
+
:encoding => 'UTF-8',
|
94
|
+
:indent => 0,
|
95
|
+
:save_with => Nokogiri::XML::Node::SaveOptions::AS_XML | Nokogiri::XML::Node::SaveOptions::NO_DECLARATION).strip
|
96
|
+
end
|
97
|
+
|
98
|
+
def dedupmgr_record_xml
|
99
|
+
"<record>"+
|
100
|
+
"<control>"+
|
101
|
+
"<sourcerecordid>$$V000932393$$Onyu_aleph000932393</sourcerecordid>"+
|
102
|
+
"<sourcerecordid>$$V002959842$$Onyu_aleph002959842</sourcerecordid>"+
|
103
|
+
"<sourceid>$$Vnyu_aleph$$Onyu_aleph000932393</sourceid>"+
|
104
|
+
"<sourceid>$$Vnyu_aleph$$Onyu_aleph002959842</sourceid>"+
|
105
|
+
"<recordid>dedupmrg17343091</recordid>"+
|
106
|
+
"<originalsourceid>$$VNYU01$$Onyu_aleph000932393</originalsourceid>"+
|
107
|
+
"<originalsourceid>$$VNYU01$$Onyu_aleph002959842</originalsourceid>"+
|
108
|
+
"<sourceformat>$$VMARC21$$Onyu_aleph000932393</sourceformat>"+
|
109
|
+
"<sourceformat>$$VMARC21$$Onyu_aleph002959842</sourceformat>"+
|
110
|
+
"<sourcesystem>$$VAleph$$Onyu_aleph000932393</sourcesystem>"+
|
111
|
+
"<sourcesystem>$$VAleph$$Onyu_aleph002959842</sourcesystem>"+
|
112
|
+
"<ilsapiid>$$VNYU01000932393$$Onyu_aleph000932393</ilsapiid>"+
|
113
|
+
"<ilsapiid>$$VNYU01002959842$$Onyu_aleph002959842</ilsapiid>"+
|
114
|
+
"</control>"+
|
115
|
+
"<display>"+
|
116
|
+
"<type>journal</type>"+
|
117
|
+
"<title>The New York times</title>"+
|
118
|
+
"<publisher>New-York N.Y. : H.J. Raymond & Co.</publisher>"+
|
119
|
+
"<creationdate>1857-</creationdate>"+
|
120
|
+
"<subject>New York (N.Y.) -- Newspapers; New York County (N.Y.) -- Newspapers; Electronic journals</subject>"+
|
121
|
+
"<language>eng</language>"+
|
122
|
+
"<relation>$$Cearlier_title $$VNew-York daily times</relation>"+
|
123
|
+
"<rights>Access is restricted to users affiliated with licensed institutions.</rights>"+
|
124
|
+
"<source>$$Vnyu_aleph$$Onyu_aleph000932393</source>"+
|
125
|
+
"<source>$$Vnyu_aleph$$Onyu_aleph002959842</source>"+
|
126
|
+
"<availlibrary>$$INYU$$LBWEB$$1Internet Resources$$2(Newspaper Electronic access )$$Scheck_holdings$$XNYU50$$YBWEB$$ZBNYUI$$Onyu_aleph000932393</availlibrary>"+
|
127
|
+
"<availlibrary>$$INYU$$LBOBST$$1Microform$$2(Film/Per Non-circulating )$$Scheck_holdings$$5N$$XNYU50$$YBOBST$$ZMFORM$$Onyu_aleph002959842</availlibrary>"+
|
128
|
+
"<availlibrary>$$ICU$$LCU$$1Microform Periodicals$$2(Non-circulating )$$Savailable$$31$$40$$5N$$60$$XNYU50$$YCU$$ZMICRP$$Onyu_aleph002959842</availlibrary>"+
|
129
|
+
"<availlibrary>$$ICU$$LCU$$1Periodicals$$2(Non-circulating )$$Savailable$$31$$40$$5N$$60$$XNYU50$$YCU$$ZPERIO$$Onyu_aleph002959842</availlibrary>"+
|
130
|
+
"<availlibrary>$$INYU$$LBWEB$$1Internet Resources$$2(Newspaper Electronic access )$$Scheck_holdings$$XNYU50$$YBWEB$$ZBNYUI$$Onyu_aleph002959842</availlibrary>"+
|
131
|
+
"<availlibrary>$$INYU$$LREI$$1Reference$$2(Newspaper Non-circulating )$$Scheck_holdings$$XNYU50$$YNREI$$ZREF$$Onyu_aleph002959842</availlibrary>"+
|
132
|
+
"<availlibrary>$$INS$$LNSSC$$1Periodicals$$2(Non-circulating )$$Scheck_holdings$$XNYU50$$YTNSSC$$ZPERIO$$Onyu_aleph002959842</availlibrary>"+
|
133
|
+
"<availinstitution>$$ICU$$Savailable</availinstitution>"+
|
134
|
+
"<availinstitution>$$INYU$$Scheck_holdings</availinstitution>"+
|
135
|
+
"<availinstitution>$$INS$$Scheck_holdings</availinstitution>"+
|
136
|
+
"<availpnx>available</availpnx>"+
|
137
|
+
"<lds01>NYU</lds01>"+
|
138
|
+
"<lds01>NYUAD</lds01>"+
|
139
|
+
"<lds01>NYU</lds01>"+
|
140
|
+
"<lds01>CU</lds01>"+
|
141
|
+
"<lds01>NS</lds01>"+
|
142
|
+
"<lds01>NYUAD</lds01>"+
|
143
|
+
"<lds02>nyu_aleph000932393</lds02>"+
|
144
|
+
"<lds02>nyu_aleph002959842</lds02>"+
|
145
|
+
"</display>"+
|
146
|
+
"<links>"+
|
147
|
+
"<linktoholdings>$$V$$Taleph_holdings$$Onyu_aleph000932393</linktoholdings>"+
|
148
|
+
"<linktoholdings>$$V$$Taleph_holdings$$Onyu_aleph002959842</linktoholdings>"+
|
149
|
+
"<backlink>$$V$$Taleph_backlink$$DMore bibliographic information$$Onyu_aleph000932393</backlink>"+
|
150
|
+
"<backlink>$$V$$Taleph_backlink$$DMore bibliographic information$$Onyu_aleph002959842</backlink>"+
|
151
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://proquest.umi.com/pqdweb?RQT=318&VName=PQD&clientid=9269&pmid=7818$$D1995 - Current Access via Proquest$$INYU$$Onyu_aleph000932393</linktorsrc>"+
|
152
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://proquest.umi.com/pqdweb?RQT=318&VName=PQD&clientid=9269&pmid=7818$$D1995 - Current Access via Proquest$$INYUAD$$Onyu_aleph000932393</linktorsrc>"+
|
153
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://www.nytimes.com/$$DOnline version:$$INYU$$Onyu_aleph002959842</linktorsrc>"+
|
154
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://www.nytimes.com/$$DOnline version:$$INYUAD$$Onyu_aleph002959842</linktorsrc>"+
|
155
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://web.lexis-nexis.com/universe$$DOnline access via Lexis-Nexis Academic Universe: Full-text available from 1980-$$INYU$$Onyu_aleph002959842</linktorsrc>"+
|
156
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://web.lexis-nexis.com/universe$$DOnline access via Lexis-Nexis Academic Universe: Full-text available from 1980-$$INYUAD$$Onyu_aleph002959842</linktorsrc>"+
|
157
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://www.umi.com/pqdauto$$DOnline access via ProQuest:$$INYU$$Onyu_aleph002959842</linktorsrc>"+
|
158
|
+
"<linktorsrc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://www.umi.com/pqdauto$$DOnline access via ProQuest:$$INYUAD$$Onyu_aleph002959842</linktorsrc>"+
|
159
|
+
"<linktotoc>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://toc.example.com$$DExample TOC$$INYUAD$$Onyu_aleph002959842</linktotoc>"+
|
160
|
+
"<addlink>$$V$$Uhttps://ezproxy.library.nyu.edu/login?url=http://addlink.example.com$$DExample Related Link$$INYUAD$$Onyu_aleph002959842</linktotoc>"+
|
161
|
+
"<openurl>$$V$$Topenurl_journal$$Onyu_aleph000932393</openurl>"+
|
162
|
+
"<openurl>$$V$$Topenurl_journal$$Onyu_aleph002959842</openurl>"+
|
163
|
+
"<openurlfulltext>$$V$$Topenurlfull_journal$$Onyu_aleph000932393</openurlfulltext>"+
|
164
|
+
"<openurlfulltext>$$V$$Topenurlfull_journal$$Onyu_aleph002959842</openurlfulltext>"+
|
165
|
+
"<linktoreview>$$TpersistentUrl$$DCopy item link</linktoreview>"+
|
166
|
+
"<linktouc>$$Tworldcat_oclc$$DCheck other libraries (WorldCat®)</linktouc>"+
|
167
|
+
"</links>"+
|
168
|
+
"<search>"+
|
169
|
+
"<creatorcontrib>Mellon Project.</creatorcontrib>"+
|
170
|
+
"<creatorcontrib>ProQuest Information and Learning Company.</creatorcontrib>"+
|
171
|
+
"<title>The New York times</title>"+
|
172
|
+
"<subject>New York (N.Y.) Newspapers</subject>"+
|
173
|
+
"<subject>New York County (N.Y.) Newspapers</subject>"+
|
174
|
+
"<subject>Electronic journals</subject>"+
|
175
|
+
"<subject>Niyū Yūrk (N.Y.)</subject>"+
|
176
|
+
"<subject>Niu-yüeh (N.Y.)</subject>"+
|
177
|
+
"<subject>Nyuyok (N.Y.)</subject>"+
|
178
|
+
"<subject>Nyu-Yorḳ (N.Y.)</subject>"+
|
179
|
+
"<subject>New York City (N.Y.)</subject>"+
|
180
|
+
"<subject>New Amsterdam (N.Y.)</subject>"+
|
181
|
+
"<subject>Nu Yorḳ (N.Y.)</subject>"+
|
182
|
+
"<subject>Nuyorḳ (N.Y.)</subject>"+
|
183
|
+
"<subject>Novi Jork (N.Y.)</subject>"+
|
184
|
+
"<subject>Nowy Jork (N.Y.)</subject>"+
|
185
|
+
"<subject>Nova Iorque (N.Y.)</subject>"+
|
186
|
+
"<subject>Ni͡u Ĭork (N.Y.)</subject>"+
|
187
|
+
"<subject>Nueva York (N.Y.)</subject>"+
|
188
|
+
"<general>H.J. Raymond & Co.],</general>"+
|
189
|
+
"<general>Latest issue consulted: Vol. 151, no. 52,028 (Feb. 13, 2002).</general>"+
|
190
|
+
"<general>[electronic resource].</general>"+
|
191
|
+
"<general>United States New York New York New York.</general>"+
|
192
|
+
"<sourceid>nyu_aleph</sourceid>"+
|
193
|
+
"<recordid>nyu_aleph000932393</recordid>"+
|
194
|
+
"<isbn>0362-4331</isbn>"+
|
195
|
+
"<rsrctype>journal</rsrctype>"+
|
196
|
+
"<creationdate>1857</creationdate>"+
|
197
|
+
"<creationdate>9999</creationdate>"+
|
198
|
+
"<addtitle>New York times on the web.</addtitle>"+
|
199
|
+
"<addtitle>New York times large type weekly</addtitle>"+
|
200
|
+
"<addtitle>New-York semi-weekly times</addtitle>"+
|
201
|
+
"<addtitle>New-York weekly times</addtitle>"+
|
202
|
+
"<addtitle>Semi-weekly times (New York, N.Y.)</addtitle>"+
|
203
|
+
"<addtitle>New York times on the Web</addtitle>"+
|
204
|
+
"<addtitle>Little times</addtitle>"+
|
205
|
+
"<addtitle>New-York daily times</addtitle>"+
|
206
|
+
"<searchscope>BWEB</searchscope>"+
|
207
|
+
"<searchscope>BWEB Internet Resources</searchscope>"+
|
208
|
+
"<searchscope>nyu_aleph</searchscope>"+
|
209
|
+
"<searchscope>NYU</searchscope>"+
|
210
|
+
"<searchscope>NYUAD</searchscope>"+
|
211
|
+
"<searchscope>BOBST</searchscope>"+
|
212
|
+
"<searchscope>IFA</searchscope>"+
|
213
|
+
"<searchscope>IFAC</searchscope>"+
|
214
|
+
"<searchscope>ISAW</searchscope>"+
|
215
|
+
"<searchscope>COUR</searchscope>"+
|
216
|
+
"<searchscope>REI</searchscope>"+
|
217
|
+
"<scope>BWEB</scope>"+
|
218
|
+
"<scope>BWEB Internet Resources</scope>"+
|
219
|
+
"<scope>nyu_aleph</scope>"+
|
220
|
+
"<scope>NYU</scope>"+
|
221
|
+
"<scope>NYUAD</scope>"+
|
222
|
+
"<scope>BOBST</scope>"+
|
223
|
+
"<scope>IFA</scope>"+
|
224
|
+
"<scope>IFAC</scope>"+
|
225
|
+
"<scope>ISAW</scope>"+
|
226
|
+
"<scope>COUR</scope>"+
|
227
|
+
"<scope>REI</scope>"+
|
228
|
+
"<alttitle>Combined New York morning newspapers</alttitle>"+
|
229
|
+
"<alttitle>Combined New York Sunday newspapers</alttitle>"+
|
230
|
+
"<lsr01>Newspaper</lsr01>"+
|
231
|
+
"<lsr02>H.J. Raymond & Co.],</lsr02>"+
|
232
|
+
"<title>The New York times.</title>"+
|
233
|
+
"<subject>History</subject>"+
|
234
|
+
"<subject>History Africa</subject>"+
|
235
|
+
"<subject>History East Asia</subject>"+
|
236
|
+
"<subject>History Europe</subject>"+
|
237
|
+
"<subject>History Latin America and Caribbean</subject>"+
|
238
|
+
"<subject>History Middle East</subject>"+
|
239
|
+
"<subject>History North America</subject>"+
|
240
|
+
"<subject>History Slavic</subject>"+
|
241
|
+
"<subject>Dance</subject>"+
|
242
|
+
"<subject>Performing arts</subject>"+
|
243
|
+
"<subject>Theater</subject>"+
|
244
|
+
"<subject>Government information New York State and City Recommended</subject>"+
|
245
|
+
"<subject>Electronic indexes</subject>"+
|
246
|
+
"<subject>Electronic newspapers</subject>"+
|
247
|
+
"<subject>Dancing</subject>"+
|
248
|
+
"<subject>Information, Government</subject>"+
|
249
|
+
"<subject>Show business</subject>"+
|
250
|
+
"<subject>Professional theater</subject>"+
|
251
|
+
"<subject>Theatre</subject>"+
|
252
|
+
"<subject>Dramatics</subject>"+
|
253
|
+
"<recordid>nyu_aleph002959842</recordid>"+
|
254
|
+
"<addtitle>New York semi-weekly times</addtitle>"+
|
255
|
+
"<addtitle>New York times on the web</addtitle>"+
|
256
|
+
"<searchscope>BOBST Microform</searchscope>"+
|
257
|
+
"<searchscope>CU</searchscope>"+
|
258
|
+
"<searchscope>CU Microform Periodicals</searchscope>"+
|
259
|
+
"<searchscope>CU Periodicals</searchscope>"+
|
260
|
+
"<searchscope>NREI</searchscope>"+
|
261
|
+
"<searchscope>NREI Reference</searchscope>"+
|
262
|
+
"<searchscope>TNSSC</searchscope>"+
|
263
|
+
"<searchscope>TNSSC Periodicals</searchscope>"+
|
264
|
+
"<searchscope>NS</searchscope>"+
|
265
|
+
"<searchscope>NSSC</searchscope>"+
|
266
|
+
"<searchscope>CPER</searchscope>"+
|
267
|
+
"<scope>BOBST Microform</scope>"+
|
268
|
+
"<scope>CU</scope>"+
|
269
|
+
"<scope>CU Microform Periodicals</scope>"+
|
270
|
+
"<scope>CU Periodicals</scope>"+
|
271
|
+
"<scope>NREI</scope>"+
|
272
|
+
"<scope>NREI Reference</scope>"+
|
273
|
+
"<scope>TNSSC</scope>"+
|
274
|
+
"<scope>TNSSC Periodicals</scope>"+
|
275
|
+
"<scope>NS</scope>"+
|
276
|
+
"<scope>NSSC</scope>"+
|
277
|
+
"<scope>CPER</scope>"+
|
278
|
+
"<alttitle>N.Y. times</alttitle>"+
|
279
|
+
"<lsr01>Film/Per</lsr01>"+
|
280
|
+
"</search>"+
|
281
|
+
"<sort>"+
|
282
|
+
"<title>New York times</title>"+
|
283
|
+
"<creationdate>1857</creationdate>"+
|
284
|
+
"<lso01>1857</lso01>"+
|
285
|
+
"</sort>"+
|
286
|
+
"<facets>"+
|
287
|
+
"<language>eng</language>"+
|
288
|
+
"<creationdate>1857</creationdate>"+
|
289
|
+
"<topic>New York (N.Y.)–Newspapers</topic>"+
|
290
|
+
"<topic>New York County (N.Y.)–Newspapers</topic>"+
|
291
|
+
"<toplevel>available</toplevel>"+
|
292
|
+
"<toplevel>online_resources</toplevel>"+
|
293
|
+
"<prefilter>journals</prefilter>"+
|
294
|
+
"<rsrctype>journals</rsrctype>"+
|
295
|
+
"<genre>Newspapers</genre>"+
|
296
|
+
"<genre>Electronic journals</genre>"+
|
297
|
+
"<library>BOBST</library>"+
|
298
|
+
"<library>IFA</library>"+
|
299
|
+
"<library>IFAC</library>"+
|
300
|
+
"<library>ISAW</library>"+
|
301
|
+
"<library>COUR</library>"+
|
302
|
+
"<library>REI</library>"+
|
303
|
+
"<lfc01>Internet Resources</lfc01>"+
|
304
|
+
"<lfc04>United States</lfc04>"+
|
305
|
+
"<lfc04>New York</lfc04>"+
|
306
|
+
"<lfc04>New York.</lfc04>"+
|
307
|
+
"<topic>History</topic>"+
|
308
|
+
"<topic>History–Africa</topic>"+
|
309
|
+
"<topic>History–East Asia</topic>"+
|
310
|
+
"<topic>History–Europe</topic>"+
|
311
|
+
"<topic>History–Latin America and Caribbean</topic>"+
|
312
|
+
"<topic>History–Middle East</topic>"+
|
313
|
+
"<topic>History–North America</topic>"+
|
314
|
+
"<topic>History–Slavic</topic>"+
|
315
|
+
"<topic>Dance</topic>"+
|
316
|
+
"<topic>Performing arts</topic>"+
|
317
|
+
"<topic>Theater</topic>"+
|
318
|
+
"<topic>Government information–New York State and City–Recommended</topic>"+
|
319
|
+
"<collection>BOBST</collection>"+
|
320
|
+
"<collection>CU</collection>"+
|
321
|
+
"<collection>NREI</collection>"+
|
322
|
+
"<collection>NSSC</collection>"+
|
323
|
+
"<genre>Electronic indexes</genre>"+
|
324
|
+
"<genre>Electronic newspapers</genre>"+
|
325
|
+
"<library>NSSC</library>"+
|
326
|
+
"<library>CPER</library>"+
|
327
|
+
"<lfc01>Microform</lfc01>"+
|
328
|
+
"<lfc01>Microform Periodicals</lfc01>"+
|
329
|
+
"<lfc01>Periodicals</lfc01>"+
|
330
|
+
"<lfc01>Reference</lfc01>"+
|
331
|
+
"<frbrgroupid>21490924</frbrgroupid>"+
|
332
|
+
"<frbrtype>5</frbrtype>"+
|
333
|
+
"</facets>"+
|
334
|
+
"<dedup>"+
|
335
|
+
"<t>2</t>"+
|
336
|
+
"<c2>0362-4331</c2>"+
|
337
|
+
"<c3>newyorktimes</c3>"+
|
338
|
+
"<c4>new</c4>"+
|
339
|
+
"<f4>0362-4331</f4>"+
|
340
|
+
"<f6>1857</f6>"+
|
341
|
+
"<f7>new york times</f7>"+
|
342
|
+
"<f8>new york times</f8>"+
|
343
|
+
"<f9>nyu</f9>"+
|
344
|
+
"<f10>new</f10>"+
|
345
|
+
"</dedup>"+
|
346
|
+
"<frbr>"+
|
347
|
+
"<t>1</t>"+
|
348
|
+
"<k3>$$Knew york times$$AT</k3>"+
|
349
|
+
"</frbr>"+
|
350
|
+
"<delivery>"+
|
351
|
+
"<institution>$$VNYU$$Onyu_aleph000932393</institution>"+
|
352
|
+
"<institution>$$VNYUAD$$Onyu_aleph000932393</institution>"+
|
353
|
+
"<delcategory>$$VOnline Resource$$Onyu_aleph000932393</delcategory>"+
|
354
|
+
"<institution>$$VNYU$$Onyu_aleph002959842</institution>"+
|
355
|
+
"<institution>$$VCU$$Onyu_aleph002959842</institution>"+
|
356
|
+
"<institution>$$VNS$$Onyu_aleph002959842</institution>"+
|
357
|
+
"<institution>$$VNYUAD$$Onyu_aleph002959842</institution>"+
|
358
|
+
"<delcategory>$$VOnline Resource$$Onyu_aleph002959842</delcategory>"+
|
359
|
+
"</delivery>"+
|
360
|
+
"<enrichment>"+
|
361
|
+
"<classificationlcc>Newspaper</classificationlcc>"+
|
362
|
+
"</enrichment>"+
|
363
|
+
"<ranking>"+
|
364
|
+
"<booster1>1</booster1>"+
|
365
|
+
"<booster2>1</booster2>"+
|
366
|
+
"</ranking>"+
|
367
|
+
"<addata>"+
|
368
|
+
"<jtitle>The New York times</jtitle>"+
|
369
|
+
"<addtitle>Combined New York morning newspapers</addtitle>"+
|
370
|
+
"<date>1857</date>"+
|
371
|
+
"<risdate>1857-</risdate>"+
|
372
|
+
"<coden>NYTIAO</coden>"+
|
373
|
+
"<format>journal</format>"+
|
374
|
+
"<genre>journal</genre>"+
|
375
|
+
"<ristype>JOUR</ristype>"+
|
376
|
+
"<cop>New-York [N.Y.</cop>"+
|
377
|
+
"<pub>H.J. Raymond & Co.]</pub>"+
|
378
|
+
"<lad01>BWEB</lad01>"+
|
379
|
+
"<lad01>Online Resource</lad01>"+
|
380
|
+
"<jtitle>The New York times.</jtitle>"+
|
381
|
+
"<stitle>N.Y. times</stitle>"+
|
382
|
+
"<issn>0362-4331</issn>"+
|
383
|
+
"<oclcid>1645522</oclcid>"+
|
384
|
+
"<lccn>sn 78004456</lccn>"+
|
385
|
+
"<lad01>BOBSTBOBSTBWEBNREICUCUTNSSC</lad01>"+
|
386
|
+
"</addata>"+
|
387
|
+
"</record>"
|
388
|
+
end
|
389
|
+
|
390
|
+
def record_xml
|
391
|
+
"<record>"+
|
392
|
+
"<control>"+
|
393
|
+
"<sourcerecordid>000062856</sourcerecordid>"+
|
394
|
+
"<sourceid>nyu_aleph</sourceid>"+
|
395
|
+
"<recordid>nyu_aleph000062856</recordid>"+
|
396
|
+
"<originalsourceid>NYU01</originalsourceid>"+
|
397
|
+
"<ilsapiid>NYU01000062856</ilsapiid>"+
|
398
|
+
"<sourceformat>MARC21</sourceformat>"+
|
399
|
+
"<sourcesystem>Aleph</sourcesystem>"+
|
400
|
+
"</control>"+
|
401
|
+
"<display>"+
|
402
|
+
"<type>book</type>"+
|
403
|
+
"<title>Travels with my aunt</title>"+
|
404
|
+
"<creator>Graham Greene 1904-1991.</creator>"+
|
405
|
+
"<edition>Deluxe ed.</edition>"+
|
406
|
+
"<publisher>New York : Penguin Books</publisher>"+
|
407
|
+
"<creationdate>2004</creationdate>"+
|
408
|
+
"<format>xvi, 254 p. ; 22 cm.</format>"+
|
409
|
+
"<identifier>$$Cisbn$$V0143039008; $$Cisbn$$V9780143039006</identifier>"+
|
410
|
+
"<subject>British -- Foreign countries -- Fiction; Women travelers -- Fiction; Older women -- Fiction; Travelers -- Fiction; Retirees -- Fiction; Aunts -- Fiction; Humorous stories</subject>"+
|
411
|
+
"<language>eng</language>"+
|
412
|
+
"<relation>$$Cseries $$VPenguin classics</relation>"+
|
413
|
+
"<source>nyu_aleph</source>"+
|
414
|
+
"<availlibrary>$$INYU$$LBOBST$$1Main Collection$$2(PR6013.R44 T7 2004 )$$Sunavailable$$31$$41$$5N$$61$$XNYU50$$YBOBST$$ZMAIN</availlibrary>"+
|
415
|
+
"<lds02>nyu_aleph000062856</lds02>"+
|
416
|
+
"<lds01>NYU</lds01>"+
|
417
|
+
"<availinstitution>$$INYU$$Sunavailable</availinstitution>"+
|
418
|
+
"<availpnx>unavailable</availpnx>"+
|
419
|
+
"</display>"+
|
420
|
+
"<links>"+
|
421
|
+
"<openurl>$$Topenurl_journal</openurl>"+
|
422
|
+
"<backlink>$$Taleph_backlink$$DMore bibliographic information</backlink>"+
|
423
|
+
"<thumbnail>$$Tamazon_thumb</thumbnail>"+
|
424
|
+
"<linktotoc>$$Tamazon_toc$$DCheck for Amazon Search Inside</linktotoc>"+
|
425
|
+
"<openurlfulltext>$$Topenurlfull_journal</openurlfulltext>"+
|
426
|
+
"<linktoholdings>$$Taleph_holdings</linktoholdings>"+
|
427
|
+
"<linktoreview>$$TpersistentUrl$$DCopy item link</linktoreview>"+
|
428
|
+
"<linktouc>$$Tamazon_uc$$DCheck Amazon</linktouc>"+
|
429
|
+
"<linktouc>$$Tworldcat_isbn$$DCheck other libraries (WorldCat®)</linktouc>"+
|
430
|
+
"<linktoexcerpt>$$Tsyndetics_excerpt$$DExcerpt from item</linktoexcerpt>"+
|
431
|
+
"</links>"+
|
432
|
+
"<search>"+
|
433
|
+
"<creatorcontrib>Graham, Greene 1904-1991.</creatorcontrib>"+
|
434
|
+
"<creatorcontrib>Greene, Graham, 1904-1991.</creatorcontrib>"+
|
435
|
+
"<creatorcontrib>Greene, G</creatorcontrib>"+
|
436
|
+
"<creatorcontrib>Graham Greene ; introduction by Gloria Emerson.</creatorcontrib>"+
|
437
|
+
"<creatorcontrib>Greene, Henry Graham, 1904-1991</creatorcontrib>"+
|
438
|
+
"<creatorcontrib>Gŭrin, Gŭreŏm, 1904-1991</creatorcontrib>"+
|
439
|
+
"<creatorcontrib>Grin, Greham, 1904-1991</creatorcontrib>"+
|
440
|
+
"<creatorcontrib>Grīna, Grāhama, 1904-1991</creatorcontrib>"+
|
441
|
+
"<creatorcontrib>Grin, Grėm, 1904-1991</creatorcontrib>"+
|
442
|
+
"<creatorcontrib>格拉姆・葛林, 1904-1991</creatorcontrib>"+
|
443
|
+
"<creatorcontrib>Grīns, Greiems, 1904-1991</creatorcontrib>"+
|
444
|
+
"<creatorcontrib>Grīns, G. (Greiems), 1904-1991</creatorcontrib>"+
|
445
|
+
"<title>Travels with my aunt /</title>"+
|
446
|
+
"<subject>British Foreign countries Fiction</subject>"+
|
447
|
+
"<subject>Women travelers Fiction</subject>"+
|
448
|
+
"<subject>Older women Fiction</subject>"+
|
449
|
+
"<subject>Travelers Fiction</subject>"+
|
450
|
+
"<subject>Retirees Fiction</subject>"+
|
451
|
+
"<subject>Aunts Fiction</subject>"+
|
452
|
+
"<subject>Humorous stories</subject>"+
|
453
|
+
"<subject>People, Retired</subject>"+
|
454
|
+
"<subject>Retired persons</subject>"+
|
455
|
+
"<subject>Retired people</subject>"+
|
456
|
+
"<subject>Travelers, Women</subject>"+
|
457
|
+
"<subject>Britishers</subject>"+
|
458
|
+
"<subject>British people</subject>"+
|
459
|
+
"<subject>Britons (British)</subject>"+
|
460
|
+
"<subject>Brits</subject>"+
|
461
|
+
"<subject>Aged women</subject>"+
|
462
|
+
"<general>Penguin Books,</general>"+
|
463
|
+
"<general>\"Graham Greene centennial, 1904-2004\"--Cover.</general>"+
|
464
|
+
"<sourceid>nyu_aleph</sourceid>"+
|
465
|
+
"<recordid>nyu_aleph000062856</recordid>"+
|
466
|
+
"<isbn>0143039008</isbn>"+
|
467
|
+
"<isbn>9780143039006</isbn>"+
|
468
|
+
"<isbn>9780143"0390069</isbn>"+
|
469
|
+
"<rsrctype>book</rsrctype>"+
|
470
|
+
"<creationdate>2004</creationdate>"+
|
471
|
+
"<creationdate>1969</creationdate>"+
|
472
|
+
"<addtitle>Penguin classics</addtitle>"+
|
473
|
+
"<searchscope>BOBST</searchscope>"+
|
474
|
+
"<searchscope>BOBST Main Collection</searchscope>"+
|
475
|
+
"<searchscope>nyu_aleph</searchscope>"+
|
476
|
+
"<searchscope>NYU</searchscope>"+
|
477
|
+
"<scope>BOBST</scope>"+
|
478
|
+
"<scope>BOBST Main Collection</scope>"+
|
479
|
+
"<scope>nyu_aleph</scope>"+
|
480
|
+
"<scope>NYU</scope>"+
|
481
|
+
"<lsr01>PR6013.R44 T7 2004</lsr01>"+
|
482
|
+
"<lsr01>PR6013 .R44 T7 2004</lsr01>"+
|
483
|
+
"<lsr02>Penguin Books,</lsr02>"+
|
484
|
+
"</search>"+
|
485
|
+
"<sort>"+
|
486
|
+
"<title>Travels with my aunt /</title>"+
|
487
|
+
"<creationdate>2004</creationdate>"+
|
488
|
+
"<author>Greene, Graham, 1904-1991.</author>"+
|
489
|
+
"<lso01>2004</lso01>"+
|
490
|
+
"</sort>"+
|
491
|
+
"<facets>"+
|
492
|
+
"<language>eng</language>"+
|
493
|
+
"<creationdate>2004</creationdate>"+
|
494
|
+
"<topic>British–Foreign countries–Fiction</topic>"+
|
495
|
+
"<topic>Women travelers–Fiction</topic>"+
|
496
|
+
"<topic>Older women–Fiction</topic>"+
|
497
|
+
"<topic>Travelers–Fiction</topic>"+
|
498
|
+
"<topic>Retirees–Fiction</topic>"+
|
499
|
+
"<topic>Aunts–Fiction</topic>"+
|
500
|
+
"<collection>BOBST</collection>"+
|
501
|
+
"<prefilter>books</prefilter>"+
|
502
|
+
"<rsrctype>books</rsrctype>"+
|
503
|
+
"<creatorcontrib>Greene, G</creatorcontrib>"+
|
504
|
+
"<genre>Fiction</genre>"+
|
505
|
+
"<genre>Humorous stories</genre>"+
|
506
|
+
"<library>BOBST</library>"+
|
507
|
+
"<lfc01>Main Collection</lfc01>"+
|
508
|
+
"<classificationlcc>P - Language and literature.–English literature</classificationlcc>"+
|
509
|
+
"<frbrgroupid>49340863</frbrgroupid>"+
|
510
|
+
"<frbrtype>5</frbrtype>"+
|
511
|
+
"</facets>"+
|
512
|
+
"<dedup>"+
|
513
|
+
"<t>1</t>"+
|
514
|
+
"<c1>2004559272</c1>"+
|
515
|
+
"<c2>0143039008;9780143039006</c2>"+
|
516
|
+
"<c3>travelswithmyaunt</c3>"+
|
517
|
+
"<c4>2004</c4>"+
|
518
|
+
"<f1>2004559272</f1>"+
|
519
|
+
"<f3>0143039008;9780143039006</f3>"+
|
520
|
+
"<f5>travelswithmyaunt</f5>"+
|
521
|
+
"<f6>2004</f6>"+
|
522
|
+
"<f7>travels with my aunt</f7>"+
|
523
|
+
"<f8>nyu</f8>"+
|
524
|
+
"<f9>xvi, 254 p. ;</f9>"+
|
525
|
+
"<f10>penguin books</f10>"+
|
526
|
+
"<f11>greene graham 1904 1991</f11>"+
|
527
|
+
"</dedup>"+
|
528
|
+
"<frbr>"+
|
529
|
+
"<t>1</t>"+
|
530
|
+
"<k1>$$Kgreene graham 1904 1991$$AA</k1>"+
|
531
|
+
"<k3>$$Kbooktravels with my aunt$$AT</k3>"+
|
532
|
+
"</frbr>"+
|
533
|
+
"<delivery>"+
|
534
|
+
"<institution>NYU</institution>"+
|
535
|
+
"<delcategory>Physical Item</delcategory>"+
|
536
|
+
"</delivery>"+
|
537
|
+
"<enrichment>"+
|
538
|
+
"<classificationlcc>PR6013.R44</classificationlcc>"+
|
539
|
+
"</enrichment>"+
|
540
|
+
"<ranking>"+
|
541
|
+
"<booster1>1</booster1>"+
|
542
|
+
"<booster2>1</booster2>"+
|
543
|
+
"</ranking>"+
|
544
|
+
"<addata>"+
|
545
|
+
"<aulast>Greene</aulast>"+
|
546
|
+
"<aufirst>Graham,</aufirst>"+
|
547
|
+
"<au>Greene, Graham, 1904-1991</au>"+
|
548
|
+
"<btitle>Travels with my aunt</btitle>"+
|
549
|
+
"<seriestitle>Penguin classics</seriestitle>"+
|
550
|
+
"<date>2004</date>"+
|
551
|
+
"<risdate>2004.</risdate>"+
|
552
|
+
"<isbn>0143039008</isbn>"+
|
553
|
+
"<isbn>9780143039006</isbn>"+
|
554
|
+
"<format>book</format>"+
|
555
|
+
"<genre>book</genre>"+
|
556
|
+
"<ristype>BOOK</ristype>"+
|
557
|
+
"<notes>Includes bibliographical references (p. xv-xvi).</notes>"+
|
558
|
+
"<cop>New York</cop>"+
|
559
|
+
"<pub>Penguin Books</pub>"+
|
560
|
+
"<oclcid>56781200</oclcid>"+
|
561
|
+
"<lccn>2004559272</lccn>"+
|
562
|
+
"<lad01>BOBST</lad01>"+
|
563
|
+
"<lad01>Physical Item</lad01>"+
|
564
|
+
"</addata>"+
|
565
|
+
"</record>"
|
566
|
+
end
|
567
|
+
end
|
568
|
+
|