milkfarm-onix 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. data/CHANGELOG +21 -0
  2. data/README.markdown +1 -0
  3. data/lib/onix.rb +4 -17
  4. data/lib/onix/code_list_extractor.rb +69 -0
  5. data/lib/onix/lists.rb +134 -0
  6. data/lib/onix/product.rb +14 -0
  7. data/lib/onix/sl_product.rb +24 -1
  8. data/lib/onix/version.rb +3 -0
  9. data/lib/onix/work_identifier.rb +28 -0
  10. data/spec/apa_product_spec.rb +9 -9
  11. data/spec/audience_range_spec.rb +4 -4
  12. data/spec/contributor_spec.rb +4 -4
  13. data/spec/header_spec.rb +7 -7
  14. data/spec/imprint_spec.rb +4 -4
  15. data/spec/language_spec.rb +4 -4
  16. data/spec/lists_spec.rb +33 -0
  17. data/spec/market_representation_spec.rb +4 -6
  18. data/spec/measure_spec.rb +4 -4
  19. data/spec/media_file_spec.rb +4 -4
  20. data/spec/normaliser_spec.rb +28 -4
  21. data/spec/other_text_spec.rb +4 -4
  22. data/spec/price_spec.rb +4 -4
  23. data/spec/product_identifier_spec.rb +4 -4
  24. data/spec/product_spec.rb +8 -8
  25. data/spec/publisher_spec.rb +4 -4
  26. data/spec/reader_spec.rb +11 -11
  27. data/spec/sales_restriction_spec.rb +4 -5
  28. data/spec/sender_identifier.rb +4 -4
  29. data/spec/series_identifier_spec.rb +4 -4
  30. data/spec/series_spec.rb +4 -4
  31. data/spec/spec_helper.rb +4 -1
  32. data/spec/stock_spec.rb +4 -4
  33. data/spec/subject_spec.rb +4 -5
  34. data/spec/supply_detail_spec.rb +4 -4
  35. data/spec/title_spec.rb +4 -4
  36. data/spec/website_spec.rb +4 -4
  37. data/spec/work_identifier_spec.rb +39 -0
  38. data/spec/writer_spec.rb +7 -7
  39. data/support/codes/001.tsv +10 -0
  40. data/support/codes/002.tsv +5 -0
  41. data/support/codes/003.tsv +7 -0
  42. data/support/codes/005.tsv +13 -0
  43. data/support/codes/006.tsv +76 -0
  44. data/support/codes/007.tsv +123 -0
  45. data/support/codes/008.tsv +7 -0
  46. data/support/codes/009.tsv +7 -0
  47. data/support/codes/010.tsv +34 -0
  48. data/support/codes/011.tsv +11 -0
  49. data/support/codes/012.tsv +11 -0
  50. data/support/codes/013.tsv +7 -0
  51. data/support/codes/014.tsv +4 -0
  52. data/support/codes/015.tsv +13 -0
  53. data/support/codes/016.tsv +6 -0
  54. data/support/codes/017.tsv +90 -0
  55. data/support/codes/018.tsv +3 -0
  56. data/support/codes/019.tsv +7 -0
  57. data/support/codes/020.tsv +0 -0
  58. data/support/codes/021.tsv +31 -0
  59. data/support/codes/022.tsv +9 -0
  60. data/support/codes/023.tsv +9 -0
  61. data/support/codes/024.tsv +11 -0
  62. data/support/codes/025.tsv +29 -0
  63. data/support/codes/026.tsv +75 -0
  64. data/support/codes/027.tsv +75 -0
  65. data/support/codes/028.tsv +8 -0
  66. data/support/codes/029.tsv +16 -0
  67. data/support/codes/030.tsv +15 -0
  68. data/support/codes/031.tsv +3 -0
  69. data/support/codes/032.tsv +2 -0
  70. data/support/codes/033.tsv +36 -0
  71. data/support/codes/034.tsv +14 -0
  72. data/support/codes/035.tsv +6 -0
  73. data/support/codes/036.tsv +3 -0
  74. data/support/codes/037.tsv +6 -0
  75. data/support/codes/038.tsv +36 -0
  76. data/support/codes/039.tsv +8 -0
  77. data/support/codes/040.tsv +6 -0
  78. data/support/codes/041.tsv +6 -0
  79. data/support/codes/042.tsv +16 -0
  80. data/support/codes/043.tsv +4 -0
  81. data/support/codes/044.tsv +13 -0
  82. data/support/codes/045.tsv +12 -0
  83. data/support/codes/046.tsv +3 -0
  84. data/support/codes/047.tsv +4 -0
  85. data/support/codes/048.tsv +11 -0
  86. data/support/codes/049.tsv +84 -0
  87. data/support/codes/050.tsv +8 -0
  88. data/support/codes/051.tsv +27 -0
  89. data/support/codes/052.tsv +1 -0
  90. data/support/codes/053.tsv +3 -0
  91. data/support/codes/054.tsv +23 -0
  92. data/support/codes/055.tsv +13 -0
  93. data/support/codes/056.tsv +2 -0
  94. data/support/codes/057.tsv +5 -0
  95. data/support/codes/058.tsv +21 -0
  96. data/support/codes/059.tsv +4 -0
  97. data/support/codes/060.tsv +2 -0
  98. data/support/codes/061.tsv +3 -0
  99. data/support/codes/062.tsv +5 -0
  100. data/support/codes/063.tsv +0 -0
  101. data/support/codes/064.tsv +13 -0
  102. data/support/codes/065.tsv +25 -0
  103. data/support/codes/066.tsv +4 -0
  104. data/support/codes/067.tsv +2 -0
  105. data/support/codes/068.tsv +15 -0
  106. data/support/codes/069.tsv +4 -0
  107. data/support/codes/070.tsv +2 -0
  108. data/support/codes/071.tsv +9 -0
  109. data/support/codes/072.tsv +7 -0
  110. data/support/codes/073.tsv +36 -0
  111. data/support/codes/074.tsv +489 -0
  112. data/support/codes/075.tsv +2 -0
  113. data/support/codes/076.tsv +12 -0
  114. data/support/codes/077.tsv +19 -0
  115. data/support/codes/078.tsv +148 -0
  116. data/support/codes/079.tsv +17 -0
  117. data/support/codes/080.tsv +19 -0
  118. data/support/codes/081.tsv +11 -0
  119. data/support/codes/082.tsv +17 -0
  120. data/support/codes/083.tsv +68 -0
  121. data/support/codes/084.tsv +10 -0
  122. data/support/codes/085.tsv +23 -0
  123. data/support/codes/086.tsv +5 -0
  124. data/support/codes/087.tsv +6 -0
  125. data/support/codes/088.tsv +0 -0
  126. data/support/codes/089.tsv +1 -0
  127. data/support/codes/090.tsv +11 -0
  128. data/support/codes/091.tsv +248 -0
  129. data/support/codes/092.tsv +7 -0
  130. data/support/codes/093.tsv +13 -0
  131. data/support/codes/094.tsv +3 -0
  132. data/support/codes/095.tsv +3 -0
  133. data/support/codes/096.tsv +185 -0
  134. data/support/codes/097.tsv +1 -0
  135. data/support/codes/098.tsv +21 -0
  136. data/support/codes/099.tsv +24 -0
  137. data/support/codes/100.tsv +4 -0
  138. data/support/codes/101.tsv +2 -0
  139. data/support/codes/102.tsv +3 -0
  140. data/support/codes/121.tsv +127 -0
  141. data/support/codes/138.tsv +6 -0
  142. data/support/codes/139.tsv +70 -0
  143. data/support/codes/140.tsv +7 -0
  144. data/support/codes/141.tsv +10 -0
  145. data/support/codes/142.tsv +12 -0
  146. data/support/codes/143.tsv +7 -0
  147. data/support/codes/144.tsv +4 -0
  148. data/support/codes/145.tsv +5 -0
  149. data/support/codes/146.tsv +3 -0
  150. data/support/codes/147.tsv +7 -0
  151. data/support/codes/148.tsv +3 -0
  152. data/support/codes/149.tsv +4 -0
  153. data/support/codes/150.tsv +124 -0
  154. data/support/codes/151.tsv +7 -0
  155. data/support/codes/152.tsv +2 -0
  156. data/support/codes/153.tsv +14 -0
  157. data/support/codes/154.tsv +9 -0
  158. data/support/codes/155.tsv +5 -0
  159. data/support/codes/156.tsv +4 -0
  160. data/support/codes/157.tsv +4 -0
  161. data/support/codes/158.tsv +24 -0
  162. data/support/codes/159.tsv +6 -0
  163. data/support/codes/160.tsv +0 -0
  164. data/support/codes/161.tsv +3 -0
  165. data/support/codes/162.tsv +3 -0
  166. data/support/codes/163.tsv +7 -0
  167. data/support/codes/164.tsv +2 -0
  168. data/support/codes/165.tsv +2 -0
  169. data/support/codes/166.tsv +2 -0
  170. data/support/codes/167.tsv +3 -0
  171. data/support/codes/168.tsv +2 -0
  172. data/support/codes/169.tsv +3 -0
  173. data/support/codes/170.tsv +0 -0
  174. data/support/codes/171.tsv +2 -0
  175. data/support/codes/172.tsv +1 -0
  176. data/support/codes/173.tsv +2 -0
  177. data/support/codes/174.tsv +2 -0
  178. data/support/codes/175.tsv +175 -0
  179. data/support/codes/176.tsv +12 -0
  180. data/support/codes/177.tsv +2 -0
  181. data/support/codes/178.tsv +17 -0
  182. data/support/switch-onix-2.1-short-to-reference.xsl +3 -2
  183. metadata +226 -38
  184. data/lib/onix/lists/audience_code.rb +0 -17
  185. data/lib/onix/lists/contributor_role.rb +0 -99
  186. data/lib/onix/lists/country_code.rb +0 -257
  187. data/lib/onix/lists/language_code.rb +0 -498
  188. data/lib/onix/lists/language_role.rb +0 -18
  189. data/lib/onix/lists/notification_type.rb +0 -19
  190. data/lib/onix/lists/product_availability.rb +0 -32
  191. data/lib/onix/lists/product_form.rb +0 -99
  192. data/lib/onix/lists/product_form_detail.rb +0 -157
@@ -1,18 +0,0 @@
1
- # coding: utf-8
2
-
3
- module ONIX
4
- module Lists
5
- # Code list 22
6
- LANGUAGE_ROLE = {
7
- "01" => "Language of text",
8
- "02" => "Original language of a translated text",
9
- "03" => "Language of abstracts",
10
- "04" => "Rights language",
11
- "05" => "Rights-excluded language",
12
- "06" => "Original language in a multilingual edition",
13
- "07" => "Translated language in a multilingual edition",
14
- "08" => "Language of audio track",
15
- "09" => "Language of subtitles",
16
- }
17
- end
18
- end
@@ -1,19 +0,0 @@
1
- # coding: utf-8
2
-
3
- module ONIX
4
- module Lists
5
- # Code list 1
6
- NOTIFICATION_TYPE = {
7
- 1 => "Early notification",
8
- 2 => "Advance notification (confirmed)",
9
- 3 => "Notification confirmed from book-in-hand",
10
- 4 => "Update (partial)",
11
- 5 => "Delete",
12
- 8 => "Notice of sale",
13
- 9 => "Notice of acquisition",
14
- 12 => "Update - SupplyDetail only",
15
- 13 => "Update - MarketRepresentation only",
16
- 14 => "Update - SupplyDetail and MarketRepresentation",
17
- }
18
- end
19
- end
@@ -1,32 +0,0 @@
1
- # coding: utf-8
2
-
3
- module ONIX
4
- module Lists
5
- # Code list 65
6
- PRODUCT_AVAILABILITY = {
7
- 1 => "Cancelled",
8
- 10 => "Not Yet Available",
9
- 11 => "Awaiting Stock",
10
- 12 => "Not Yet Available, will be POD",
11
- 20 => "Available",
12
- 21 => "In Stock",
13
- 22 => "To Order",
14
- 23 => "Manufactured on Demand",
15
- 30 => "Temporarily Unavailable",
16
- 31 => "Out Of Stock",
17
- 32 => "Reprinting",
18
- 33 => "Awaiting Reissue",
19
- 40 => "Not Available",
20
- 41 => "Replaced By New Product",
21
- 42 => "Other Format Available",
22
- 43 => "No Longer Supplier By Us",
23
- 44 => "Apply Direct",
24
- 45 => "Not Sold Seperately",
25
- 46 => "Withdrawn From Sale",
26
- 47 => "Remaindered",
27
- 48 => "Out Of Print, Replaced By POD with Diff ISBN",
28
- 99 => "Uncertain"
29
- }
30
- end
31
- end
32
-
@@ -1,99 +0,0 @@
1
- # coding: utf-8
2
-
3
- module ONIX
4
- module Lists
5
- # code list 7
6
- PRODUCT_FORM = {
7
- "00" => "Undefined",
8
- "AA" => "Audio",
9
- "AB" => "Audio - Cassette",
10
- "AC" => "Audio - CD",
11
- "AD" => "Audio - DAT",
12
- "AE" => "Audio - Disk",
13
- "AF" => "Audio - Tape",
14
- "AZ" => "Audio - Other",
15
- "BA" => "Book",
16
- "BB" => "Book - Hardback",
17
- "BC" => "Book - Paperback",
18
- "BD" => "Book - Loose-leaf",
19
- "BE" => "Book - Spiral Bound",
20
- "BF" => "Book - Pamphlet",
21
- "BG" => "Book - Leather / Fine Binding",
22
- "BH" => "Book - Board",
23
- "BI" => "Book - Rag",
24
- "BJ" => "Book - Bath",
25
- "BZ" => "Book - Other",
26
- "CA" => "Cartographic - Sheet Map",
27
- "CB" => "Cartographic - Sheet Map Folded",
28
- "CC" => "Cartographic - Sheet Map Flat",
29
- "CD" => "Cartographic - Sheet Map Rolled",
30
- "CE" => "Cartographic - Globe",
31
- "CZ" => "Cartographic - Other",
32
- "DA" => "Digital",
33
- "DB" => "Digital - CDROM",
34
- "DC" => "Digital - CD-Interactive",
35
- "DD" => "Digital - DVD",
36
- "DE" => "Digital - Game Cartridge",
37
- "DF" => "Digital - Diskette",
38
- "DG" => "Digital - Electronic Book Text",
39
- "DH" => "Digital - Online File",
40
- "DZ" => "Digital - Other",
41
- "FA" => "Film or Transparency",
42
- "FB" => "Film",
43
- "FC" => "Film - Slides",
44
- "FD" => "Film - OHP Transparencies",
45
- "FZ" => "Film - Other ",
46
- "MA" => "Microform",
47
- "MB" => "Microform - Microfiche",
48
- "MC" => "Microform - Microfilm",
49
- "MZ" => "Microform - Other",
50
- "PA" => "Print - Misc",
51
- "PB" => "Print - Address Book",
52
- "PC" => "Print - Calendar",
53
- "PD" => "Print - Cards",
54
- "PE" => "Print - Copymasters",
55
- "PF" => "Print - Diary",
56
- "PG" => "Print - Frieze",
57
- "PH" => "Print - Kit",
58
- "PI" => "Print - Sheet Music",
59
- "PJ" => "Print - Postcard Book or Pack",
60
- "PK" => "Print - Poster",
61
- "PL" => "Print - Record Book",
62
- "PM" => "Print - Wallet",
63
- "PN" => "Print - Pictures or Photographs",
64
- "PO" => "Print - Wallchart",
65
- "PZ" => "Print - Other",
66
- "VA" => "Video",
67
- "VB" => "Video - VHS PAL",
68
- "VC" => "Video - VHS NTSC",
69
- "VD" => "Video - Betamax PAL",
70
- "VE" => "Video - Betamax NTSC",
71
- "VF" => "Video - disk",
72
- "VG" => "Video - VHS SECAM",
73
- "VH" => "Video - Betamax SECAM",
74
- "VZ" => "Video - Other Format",
75
- "WW" => "Multiple - Mixed Media Product",
76
- "WX" => "Misc - Quantity Pack",
77
- "XA" => "Misc - Trade-only Material",
78
- "XB" => "Misc - Dumpbim - Empty",
79
- "XC" => "Misc - Dumpbin - Filled",
80
- "XD" => "Misc - Counterpack - Empty",
81
- "XE" => "Misc - Counterpack - Filled",
82
- "XF" => "Misc - Poster",
83
- "XG" => "Misc - Shelf Strip",
84
- "XH" => "Misc - Window Piece",
85
- "XI" => "Misc - Streamer",
86
- "XJ" => "Misc - Spinner",
87
- "XK" => "Misc - Large Book Display",
88
- "XL" => "Misc - Shrink Wrapped Pack",
89
- "XZ" => "Misc - Other Point of Sale",
90
- "ZA" => "General Merchandise",
91
- "ZB" => "Misc - Doll",
92
- "ZC" => "Misc - Soft Toy",
93
- "ZD" => "Misc - Toy",
94
- "ZE" => "Misc - Game",
95
- "ZF" => "Misc - T-shirt",
96
- "ZZ" => "Misc - Other Merchandise"
97
- }
98
- end
99
- end
@@ -1,157 +0,0 @@
1
- # coding: utf-8
2
-
3
- module ONIX
4
- module Lists
5
- # Code list 78
6
- PRODUCT_FORM_DETAIL = {
7
- "A101" => "CD standard audio format",
8
- "A102" => "SACD super audio format",
9
- "A103" => "MP3 format",
10
- "A104" => "WAV format",
11
- "A105" => "Real Audio format",
12
- "A106" => "WMA",
13
- "A107" => "AAC",
14
- "A108" => "Ogg/Vorbis",
15
- "A109" => "Audible",
16
- "A110" => "FLAC",
17
- "A111" => "AIFF",
18
- "A112" => "ALAC",
19
- "A201" => "DAISY 2: full audio with title only (no navigation)",
20
- "A202" => "DAISY 2: full audio with navigation",
21
- "A203" => "DAISY 2: full audio with navigation and partial text",
22
- "A204" => "DAISY 2: full audio and full text",
23
- "A205" => "DAISY 2: full text and some audio",
24
- "A206" => "DAISY 2: full text and no audio",
25
- "A207" => "DAISY 3: full audio with title only (no navigation)",
26
- "A208" => "DAISY 3: full audio with navigation",
27
- "A209" => "DAISY 3: full audio with navigation and partial text",
28
- "A210" => "DAISY 3: full audio and full text",
29
- "A211" => "DAISY 3: full text and some audio",
30
- "A212" => "DAISY 3: full text and no audio",
31
- "B101" => "Mass market (rack) paperback",
32
- "B102" => "Trade paperback (US)",
33
- "B103" => "Digest format paperback",
34
- "B104" => "A-format paperback",
35
- "B105" => "B-format paperback",
36
- "B106" => "Trade paperback (UK)",
37
- "B107" => "Tall rack paperback (US)",
38
- "B108" => "A5: Tankobon",
39
- "B109" => "B5: Tankobon",
40
- "B110" => "B6: Tankobon",
41
- "B111" => "A6: Bunko",
42
- "B112" => "B40-dori: Shinsho",
43
- "B113" => "Pocket (Sweden)",
44
- "B114" => "Storpocket (Sweden)",
45
- "B115" => "Kartonnage (Sweden)",
46
- "B116" => "Flexband (Sweden)",
47
- "B201" => "Coloring / join-the-dot book",
48
- "B202" => "Lift-the-flap book",
49
- "B203" => "Fuzzy book",
50
- "B204" => "Miniature book",
51
- "B205" => "Moving picture / flicker book",
52
- "B206" => "Pop-up book",
53
- "B207" => "Scented / 'smelly' book",
54
- "B208" => "Sound story / 'noisy' book",
55
- "B209" => "Sticker book",
56
- "B210" => "Touch-and-feel book",
57
- "B211" => "Toy / die-cut book",
58
- "B212" => "Die-cut book",
59
- "B213" => "Book-as-toy",
60
- "B214" => "Soft-to-touch book",
61
- "B215" => "Fuzzy-felt book",
62
- "B221" => "Picture book",
63
- "B301" => "Loose leaf - sheets & binder",
64
- "B302" => "Loose leaf - binder only",
65
- "B303" => "Loose leaf - sheets only",
66
- "B304" => "Sewn",
67
- "B305" => "Unsewn / adhesive bound",
68
- "B306" => "Library binding",
69
- "B307" => "Reinforced binding",
70
- "B308" => "Half bound",
71
- "B309" => "Quarter bound",
72
- "B310" => "Saddle-sewn",
73
- "B311" => "Comb bound",
74
- "B312" => "Wire-O",
75
- "B313" => "Concealed wire",
76
- "B401" => "Cloth over boards",
77
- "B402" => "Paper over boards",
78
- "B403" => "Leather, real",
79
- "B404" => "Leather, imitation",
80
- "B405" => "Leather, bonded",
81
- "B406" => "Vellum",
82
- "B407" => "Plastic",
83
- "B408" => "Vinyl",
84
- "B409" => "Cloth",
85
- "B410" => "Imitation cloth",
86
- "B411" => "Velvet",
87
- "B412" => "Flexible plastic/vinyl cover",
88
- "B413" => "Plastic-covered",
89
- "B414" => "Vinyl-covered",
90
- "B415" => "Laminated cover",
91
- "B501" => "With dust jacket",
92
- "B502" => "With printed dust jacket",
93
- "B503" => "With translucent dust cover",
94
- "B504" => "With flaps",
95
- "B505" => "With thumb index",
96
- "B506" => "With ribbon marker(s)",
97
- "B507" => "With zip fastener",
98
- "B508" => "With button snap fastener",
99
- "B509" => "With leather edge lining",
100
- "B601" => "Turn-around book",
101
- "B602" => "Unflipped manga format",
102
- "B701" => "UK Braille Grade 1",
103
- "B702" => "UK Braille Grade 2",
104
- "B703" => "US Braille",
105
- "D101" => "Real Video format",
106
- "D102" => "Quicktime format",
107
- "D103" => "AVI format",
108
- "D104" => "Windows Media Video format",
109
- "D105" => "MPEG-4",
110
- "D201" => "MS-DOS",
111
- "D202" => "Windows",
112
- "D203" => "Macintosh",
113
- "D204" => "UNIX / LINUX",
114
- "D205" => "Other operating system(s)",
115
- "D206" => "Palm OS",
116
- "D207" => "Windows Mobile",
117
- "D301" => "Microsoft XBox",
118
- "D302" => "Nintendo Gameboy Color",
119
- "D303" => "Nintendo Gameboy Advanced",
120
- "D304" => "Nintendo Gameboy",
121
- "D305" => "Nintendo Gamecube",
122
- "D306" => "Nintendo 64",
123
- "D307" => "Sega Dreamcast",
124
- "D308" => "Sega Genesis/Megadrive",
125
- "D309" => "Sega Saturn",
126
- "D310" => "Sony PlayStation 1",
127
- "D311" => "Sony PlayStation 2",
128
- "D312" => "Nintendo Dual Screen",
129
- "D313" => "Sony PlayStation 3",
130
- "D314" => "Xbox 360",
131
- "D315" => "Nintendo Wii",
132
- "D316" => "Sony PlayStation Portable (PSP)",
133
- "L101" => "Laminated",
134
- "P101" => "Desk calendar",
135
- "P102" => "Mini calendar",
136
- "P103" => "Engagement calendar",
137
- "P104" => "Day by day calendar",
138
- "P105" => "Poster calendar",
139
- "P106" => "Wall calendar",
140
- "P107" => "Perpetual calendar",
141
- "P108" => "Advent calendar",
142
- "P109" => "Bookmark calendar",
143
- "P110" => "Student calendar",
144
- "P111" => "Project calendar",
145
- "P112" => "Almanac calendar",
146
- "P113" => "Other calendar",
147
- "P114" => "Other calendar or organiser product",
148
- "P201" => "Hardback (stationery)",
149
- "P202" => "Paperback / softback (stationery)",
150
- "P203" => "Spiral bound (stationery)",
151
- "P204" => "Leather / fine binding (stationery)",
152
- "V201" => "PAL",
153
- "V202" => "NTSC",
154
- "V203" => "SECAM",
155
- }
156
- end
157
- end