libis-services 0.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +36 -0
  6. data/Rakefile +6 -0
  7. data/lib/libis/services/aleph/search.rb +157 -0
  8. data/lib/libis/services/alma/web_service.rb +36 -0
  9. data/lib/libis/services/collective_access/cataloguing.rb +48 -0
  10. data/lib/libis/services/collective_access/connector.rb +151 -0
  11. data/lib/libis/services/collective_access/item_info.rb +36 -0
  12. data/lib/libis/services/collective_access/search.rb +26 -0
  13. data/lib/libis/services/collective_access/service.rb +80 -0
  14. data/lib/libis/services/collective_access.rb +1 -0
  15. data/lib/libis/services/digitool/digital_entity_manager.rb +223 -0
  16. data/lib/libis/services/digitool/digitool_connector.rb +46 -0
  17. data/lib/libis/services/digitool/meta_data_manager.rb +193 -0
  18. data/lib/libis/services/extend/http_fetch.rb +63 -0
  19. data/lib/libis/services/generic_search.rb +38 -0
  20. data/lib/libis/services/http_error.rb +21 -0
  21. data/lib/libis/services/oracle_client.rb +47 -0
  22. data/lib/libis/services/primo/limo.rb +33 -0
  23. data/lib/libis/services/primo/search.rb +46 -0
  24. data/lib/libis/services/primo.rb +2 -0
  25. data/lib/libis/services/rest_client.rb +66 -0
  26. data/lib/libis/services/rosetta/client.rb +108 -0
  27. data/lib/libis/services/rosetta/collection_handler.rb +45 -0
  28. data/lib/libis/services/rosetta/collection_info.rb +44 -0
  29. data/lib/libis/services/rosetta/deposit_activity.rb +48 -0
  30. data/lib/libis/services/rosetta/deposit_handler.rb +187 -0
  31. data/lib/libis/services/rosetta/ie.rb +19 -0
  32. data/lib/libis/services/rosetta/ie_handler.rb +29 -0
  33. data/lib/libis/services/rosetta/oai_pmh.rb +48 -0
  34. data/lib/libis/services/rosetta/oai_set.rb +21 -0
  35. data/lib/libis/services/rosetta/pds_handler.rb +60 -0
  36. data/lib/libis/services/rosetta/producer.rb +71 -0
  37. data/lib/libis/services/rosetta/producer_handler.rb +125 -0
  38. data/lib/libis/services/rosetta/service.rb +403 -0
  39. data/lib/libis/services/rosetta/sip.rb +26 -0
  40. data/lib/libis/services/rosetta/sip_handler.rb +31 -0
  41. data/lib/libis/services/rosetta/user.rb +70 -0
  42. data/lib/libis/services/rosetta/user_manager.rb +28 -0
  43. data/lib/libis/services/rosetta.rb +2 -0
  44. data/lib/libis/services/scope/search.rb +46 -0
  45. data/lib/libis/services/search_factory.rb +40 -0
  46. data/lib/libis/services/service_error.rb +16 -0
  47. data/lib/libis/services/sharepoint/connector.rb +236 -0
  48. data/lib/libis/services/sharepoint/search.rb +19 -0
  49. data/lib/libis/services/soap_client.rb +57 -0
  50. data/lib/libis/services/soap_error.rb +22 -0
  51. data/lib/libis/services/version.rb +5 -0
  52. data/lib/libis/services.rb +22 -0
  53. data/lib/libis-services.rb +1 -0
  54. data/libis-services.gemspec +40 -0
  55. data/spec/alma_service_spec.rb +104 -0
  56. data/spec/ie_data.rb +726 -0
  57. data/spec/primo_limo_spec.rb +363 -0
  58. data/spec/primo_search_spec.rb +39 -0
  59. data/spec/rosetta_collection_spec.rb +206 -0
  60. data/spec/rosetta_deposit_spec.rb +82 -0
  61. data/spec/rosetta_ie_spec.rb +54 -0
  62. data/spec/rosetta_oai_spec.rb +52 -0
  63. data/spec/rosetta_pds_spec.rb +79 -0
  64. data/spec/rosetta_producer_spec.rb +270 -0
  65. data/spec/rosetta_sip_spec.rb +39 -0
  66. data/spec/spec_helper.rb +28 -0
  67. metadata +317 -0
@@ -0,0 +1,104 @@
1
+ require_relative 'spec_helper'
2
+ require 'awesome_print'
3
+
4
+ require 'libis/services/alma/web_service'
5
+
6
+ describe 'Alma web service' do
7
+ let(:subject) { Libis::Services::Alma::WebService.new }
8
+
9
+ context 'marc' do
10
+
11
+ let(:record) {
12
+ {
13
+ leader: '01206nas 2200337u 4500',
14
+ controlfield: ['9930800070101480', '20151015113543.0', '881205c19679999be r|p|| 0|||a|dut c'],
15
+ datafield: [
16
+ {
17
+ subfield: '(BeLVLBS)003080007LBS01-Aleph',
18
+ :@tag => '035', :@ind1 => ' ', :@ind2 => ' '
19
+ }, {
20
+ subfield: '(EXLNZ-32KUL_LIBIS_NETWORK)9930800070101471',
21
+ :@tag => '035', :@ind1 => ' ', :@ind2 => ' '
22
+ }, {
23
+ subfield: 'Kerk en leven. Bisdom Antwerpen (0991).',
24
+ :@tag => '245', :@ind1 => '0', :@ind2 => '0'
25
+ }, {
26
+ subfield: 'K & L',
27
+ :@tag => '246', :@ind1 => '3', :@ind2 => '3'
28
+ }, {
29
+ subfield: ['Antwerpen', 'Kerk en leven,', '1967-.'],
30
+ :@tag => '260', :@ind1 => ' ', :@ind2 => ' '
31
+ }, {
32
+ subfield: 'Weekly',
33
+ :@tag => '310', :@ind1 => ' ', :@ind2 => ' '
34
+ }, {
35
+ subfield: %w(text rdacontent),
36
+ :@tag => '336', :@ind1 => ' ', :@ind2 => ' '
37
+ }, {
38
+ subfield: %w(computer rdamedia),
39
+ :@tag => '337', :@ind1 => ' ', :@ind2 => ' '
40
+ }, {
41
+ subfield: ['online resource', 'rdacarrier'],
42
+ :@tag => '338', :@ind1 => ' ', :@ind2 => ' '
43
+ }, {
44
+ subfield: 'Online',
45
+ :@tag => '340', :@ind1 => ' ', :@ind2 => ' '
46
+ }, {
47
+ subfield: 'Digitale kopie van de gedrukte uitgave',
48
+ :@tag => '500', :@ind1 => ' ', :@ind2 => ' '
49
+ }, {
50
+ subfield: 'E-journals',
51
+ :@tag => '653', :@ind1 => ' ', :@ind2 => '6'
52
+ }, {
53
+ subfield: 'Collectie Kerk en Leven',
54
+ :@tag => '699', :@ind1 => ' ', :@ind2 => ' '
55
+ }, {
56
+ subfield: ['KADOC', 'C1', 'Kerken en religie', '(ODIS-HT)'],
57
+ :@tag => '650', :@ind1 => ' ', :@ind2 => '7'
58
+ }, {
59
+ subfield: ['KADOC', 'Antwerpen [deelgemeente in gemeente Antwerpen - BE]', '(ODIS-GEO)10560000006504'],
60
+ :@tag => '650', :@ind1 => ' ', :@ind2 => '7'
61
+ }, {
62
+ subfield: ['KADOC', 'Bisdom Antwerpen (1961-heden)', '(ODIS-ORG)9284'],
63
+ :@tag => '650', :@ind1 => ' ', :@ind2 => '7'
64
+ }, {
65
+ subfield: ['KADOC', 'Studiecentrum voor Zielzorg en Predicatie', '(ODIS-ORG)24894'],
66
+ :@tag => '650', :@ind1 => ' ', :@ind2 => '7'
67
+ }, {
68
+ subfield: 'KYE000486',
69
+ :@tag => '983', :@ind1 => ' ', :@ind2 => ' '
70
+ }, {
71
+ subfield: ['EKAD', '(2007)39-42, 44, 46-49, 51-52'],
72
+ :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
73
+ }, {
74
+ subfield: ['EKAD', '(2008)1-28, 32-53'],
75
+ :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
76
+ }, {
77
+ subfield: ['EKAD', '(2009)1-34, 36-38'],
78
+ :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
79
+ }, {
80
+ subfield: ['EKAD', '(2011)1-13, 15-36, 45-52'],
81
+ :@tag => '993', :@ind1 => ' ', :@ind2 => ' '
82
+ }, {
83
+ subfield: ['EKAD', 'KADOC elektronische tijdschriften'],
84
+ :@tag => '995', :@ind1 => ' ', :@ind2 => ' '
85
+ }, {
86
+ subfield: ['EKAD', 'KADOC lopende periodiek'],
87
+ :@tag => '995', :@ind1 => ' ', :@ind2 => ' '
88
+ }, {
89
+ subfield: ['KADOC', 'online', '201510', 'W', 'Collectie Kerk en Leven', 'local'],
90
+ :@tag => '996', :@ind1 => ' ', :@ind2 => ' '
91
+ }
92
+ ],
93
+ }
94
+ }
95
+
96
+ it 'get record' do
97
+ result = subject.get_marc('9930800070101480', 'l7xx8879c82a7d7b453a887a6e6dca8300fd').
98
+ to_hash(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
99
+ check_container(record, result[:bib][:record])
100
+ end
101
+
102
+ end
103
+
104
+ end