elibri_onix 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/.document +5 -0
  2. data/Gemfile +14 -0
  3. data/Gemfile.lock +48 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.rdoc +19 -0
  6. data/Rakefile +55 -0
  7. data/VERSION +1 -0
  8. data/elibri_onix.gemspec +104 -0
  9. data/lib/elibri_onix.rb +16 -0
  10. data/lib/elibri_onix/onix_3_0/audience_range.rb +20 -0
  11. data/lib/elibri_onix/onix_3_0/collection.rb +23 -0
  12. data/lib/elibri_onix/onix_3_0/contributor.rb +27 -0
  13. data/lib/elibri_onix/onix_3_0/extent.rb +18 -0
  14. data/lib/elibri_onix/onix_3_0/header.rb +18 -0
  15. data/lib/elibri_onix/onix_3_0/imprint.rb +18 -0
  16. data/lib/elibri_onix/onix_3_0/language.rb +19 -0
  17. data/lib/elibri_onix/onix_3_0/measure.rb +18 -0
  18. data/lib/elibri_onix/onix_3_0/onix_message.rb +18 -0
  19. data/lib/elibri_onix/onix_3_0/price.rb +40 -0
  20. data/lib/elibri_onix/onix_3_0/product.rb +144 -0
  21. data/lib/elibri_onix/onix_3_0/product_identifier.rb +17 -0
  22. data/lib/elibri_onix/onix_3_0/publisher.rb +20 -0
  23. data/lib/elibri_onix/onix_3_0/publishing_date.rb +21 -0
  24. data/lib/elibri_onix/onix_3_0/related_product.rb +35 -0
  25. data/lib/elibri_onix/onix_3_0/sales_restriction.rb +21 -0
  26. data/lib/elibri_onix/onix_3_0/sender.rb +17 -0
  27. data/lib/elibri_onix/onix_3_0/stock_quantity_coded.rb +21 -0
  28. data/lib/elibri_onix/onix_3_0/subject.rb +28 -0
  29. data/lib/elibri_onix/onix_3_0/supplier.rb +29 -0
  30. data/lib/elibri_onix/onix_3_0/supplier_identifier.rb +22 -0
  31. data/lib/elibri_onix/onix_3_0/supply_detail.rb +34 -0
  32. data/lib/elibri_onix/onix_3_0/supporting_resource.rb +25 -0
  33. data/lib/elibri_onix/onix_3_0/text_content.rb +21 -0
  34. data/lib/elibri_onix/onix_3_0/title_detail.rb +42 -0
  35. data/lib/elibri_onix/onix_3_0/title_element.rb +28 -0
  36. data/lib/elibri_onix/releases.rb +10 -0
  37. data/lib/elibri_onix/version.rb +13 -0
  38. data/test/elibri_onix_release_3_0_onix_message_test.rb +178 -0
  39. data/test/elibri_onix_test.rb +10 -0
  40. data/test/fixtures/all_possible_tags.xml +442 -0
  41. data/test/helper.rb +20 -0
  42. metadata +241 -0
@@ -0,0 +1,22 @@
1
+
2
+
3
+
4
+
5
+ module Elibri
6
+ module ONIX
7
+ module Release_3_0
8
+
9
+ class SupplierIdentifier
10
+ include ROXML
11
+
12
+ xml_name 'SupplierIdentifier'
13
+
14
+ xml_accessor :type, :from => 'SupplierIDType', :as => Fixnum
15
+ xml_accessor :type_name, :from => 'IDTypeName'
16
+ xml_accessor :value, :from => 'IDValue'
17
+
18
+
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,34 @@
1
+
2
+
3
+
4
+ module Elibri
5
+ module ONIX
6
+ module Release_3_0
7
+
8
+ class SupplyDetail
9
+ include ROXML
10
+
11
+ xml_name 'SupplyDetail'
12
+
13
+ xml_accessor :relation_code, :from => 'ProductRelationCode', :as => Fixnum
14
+ xml_accessor :supplier, :as => Supplier
15
+ xml_accessor :product_availability, :from => 'ProductAvailability', :as => Fixnum
16
+ xml_accessor :pack_quantity, :from => 'PackQuantity', :as => Fixnum
17
+ xml_accessor :price, :as => Price
18
+
19
+
20
+ with_options :in => 'Stock' do |stock|
21
+ stock.xml_accessor :on_hand, :from => 'OnHand', :as => Fixnum
22
+ stock.xml_accessor :quantity_coded, :as => StockQuantityCoded
23
+ end
24
+
25
+
26
+ def quantity_code
27
+ quantity_coded.try(:code)
28
+ end
29
+
30
+ end
31
+
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,25 @@
1
+
2
+
3
+ module Elibri
4
+ module ONIX
5
+ module Release_3_0
6
+
7
+ class SupportingResource
8
+ include ROXML
9
+
10
+ xml_name 'SupportingResource'
11
+
12
+ xml_accessor :content_type, :from => 'ResourceContentType', :as => Fixnum
13
+ xml_accessor :audience, :from => 'ContentAudience', :as => Fixnum
14
+ xml_accessor :mode, :from => 'ResourceMode', :as => Fixnum
15
+
16
+ with_options :in => 'ResourceVersion' do |version|
17
+ version.xml_accessor :form, :from => 'ResourceForm', :as => Fixnum
18
+ version.xml_accessor :link, :from => 'ResourceLink'
19
+ end
20
+
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,21 @@
1
+
2
+ module Elibri
3
+ module ONIX
4
+ module Release_3_0
5
+
6
+ class TextContent
7
+ include ROXML
8
+
9
+ xml_name 'TextContent'
10
+
11
+ xml_accessor :type, :from => 'TextType', :as => Fixnum
12
+ xml_accessor :audience, :from => 'ContentAudience', :as => Fixnum
13
+ xml_accessor :author, :from => 'TextAuthor'
14
+
15
+ xml_accessor :text, :from => 'Text', :cdata => true
16
+
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,42 @@
1
+
2
+
3
+ module Elibri
4
+ module ONIX
5
+ module Release_3_0
6
+
7
+ class TitleDetail
8
+ include ROXML
9
+
10
+ xml_name 'TitleDetail'
11
+
12
+ xml_accessor :type, :from => 'TitleType', :as => Fixnum
13
+ xml_accessor :elements, :as => [TitleElement]
14
+
15
+
16
+ def full_title
17
+ String.new.tap do |_full_title|
18
+ _full_title << collection_level_title if collection_level_title.present?
19
+ if product_level_title.present?
20
+ _full_title << ". " if _full_title.present?
21
+ _full_title << product_level_title
22
+ end
23
+ end
24
+ end
25
+
26
+
27
+ private
28
+
29
+ def product_level_title
30
+ elements.find {|element| element.level == 1}.try(:full_title)
31
+ end
32
+
33
+
34
+ def collection_level_title
35
+ elements.find {|element| element.level == 2}.try(:full_title)
36
+ end
37
+
38
+ end
39
+
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,28 @@
1
+
2
+ module Elibri
3
+ module ONIX
4
+ module Release_3_0
5
+
6
+ class TitleElement
7
+ include ROXML
8
+
9
+ xml_name 'TitleElement'
10
+
11
+ xml_accessor :level, :from => 'TitleElementLevel', :as => Fixnum
12
+ xml_accessor :part_number, :from => 'PartNumber'
13
+ xml_accessor :title, :from => 'TitleText'
14
+ xml_accessor :subtitle, :from => 'Subtitle'
15
+
16
+
17
+ def full_title
18
+ String.new(self.title).tap do |_full_title|
19
+ _full_title << ". " + self.subtitle if self.subtitle.present?
20
+ _full_title << " (#{self.part_number})" if self.part_number.present?
21
+ end
22
+ end
23
+
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,10 @@
1
+
2
+
3
+ %w{
4
+ sender header product_identifier measure title_element title_detail collection contributor subject
5
+ language extent audience_range text_content supporting_resource imprint publisher publishing_date
6
+ sales_restriction related_product supplier_identifier stock_quantity_coded price supplier supply_detail
7
+ product onix_message
8
+ }.each do |file_name|
9
+ require File.join(File.dirname(__FILE__), "onix_3_0", file_name)
10
+ end
@@ -0,0 +1,13 @@
1
+
2
+ module Elibri
3
+ module ONIX
4
+ module Version
5
+ MAJOR = 0
6
+ MINOR = 1
7
+ PATCH = 0
8
+
9
+ STRING = [MAJOR, MINOR, PATCH].compact.join('.')
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,178 @@
1
+ require 'helper'
2
+
3
+
4
+ describe Elibri::ONIX::Release_3_0::ONIXMessage do
5
+
6
+
7
+ it "should be able to parse all attributes supported in Elibri" do
8
+ xml_string = File.read File.join(File.dirname(__FILE__), "..", "test", "fixtures", "all_possible_tags.xml")
9
+
10
+ onix = Elibri::ONIX::Release_3_0::ONIXMessage.from_xml(xml_string)
11
+ assert_equal 'Elibri.com.pl', onix.header.sender.sender_name
12
+ assert_equal 'Tomasz Meka', onix.header.sender.contact_name
13
+ assert_equal 'kontakt@elibri.com.pl', onix.header.sender.email_address
14
+ assert_equal Date.new(2011, 10, 5), onix.header.sent_date_time
15
+
16
+ assert_equal 1, onix.products.size
17
+
18
+ product = onix.products.first
19
+
20
+ assert_equal 'miękka', product.cover_type
21
+ assert_equal 12.99, product.cover_price
22
+ assert_equal 5, product.vat
23
+ assert_equal '58.11.1', product.pkwiu
24
+
25
+ assert_equal 'fdb8fa072be774d97a97', product.record_reference
26
+ assert_equal 3, product.notification_type
27
+ assert_equal "Record had many errors", product.deletion_text
28
+
29
+ assert_equal '9788324799992', product.isbn13
30
+ assert_equal '9788324788882', product.ean13
31
+
32
+ assert_equal({"Gildia.pl" => "GILD-123", "PWN" => "pl.pwn.ksiegarnia.produkt.id.76734"}, product.proprietary_identifiers)
33
+
34
+ assert_equal 0, product.product_composition
35
+ assert_equal 'BA', product.product_form
36
+
37
+ assert_equal 4, product.measures.size
38
+
39
+ assert_equal 195, product.height
40
+ assert_equal 'mm', product.height_unit
41
+
42
+ assert_equal 125, product.width
43
+ assert_equal 'mm', product.width_unit
44
+
45
+ assert_equal 20, product.thickness
46
+ assert_equal 'mm', product.thickness_unit
47
+
48
+ assert_equal 90.5, product.weight
49
+ assert_equal 'gr', product.weight_unit
50
+
51
+ assert_equal 1, product.collections.size
52
+ assert_equal "Publisher series title (Vol. 1)", product.collections.first.full_title
53
+
54
+ assert_equal 'Original title', product.original_title
55
+ assert_equal 'Trade title', product.trade_title
56
+ assert_equal 'Collection title (Vol. 1). Title. Subtitle (part 5)', product.full_title
57
+
58
+ assert_equal 1, product.contributors.size
59
+ product.contributors.first.tap do |sienkiewicz|
60
+ assert_equal 'B06', sienkiewicz.role
61
+ assert_equal 'pol', sienkiewicz.from_language
62
+ assert_equal "prof. Henryk von Sienkiewicz Ibrahim", sienkiewicz.person_name
63
+ assert_equal "prof.", sienkiewicz.titles_before_names
64
+ assert_equal "Henryk", sienkiewicz.names_before_key
65
+ assert_equal "von", sienkiewicz.prefix_to_key
66
+ assert_equal "Sienkiewicz", sienkiewicz.key_names
67
+ assert_equal "Ibrahim", sienkiewicz.names_after_key
68
+ assert_equal "Sienkiewicz's biography", sienkiewicz.biographical_note
69
+ end
70
+
71
+ assert_equal 'second edition', product.edition_statement
72
+
73
+ assert_equal 1, product.languages.size
74
+ assert_equal 1, product.languages.first.role
75
+ assert_equal 'pol', product.languages.first.code
76
+
77
+ assert_equal 250, product.number_of_pages
78
+ assert_equal 32, product.number_of_illustrations
79
+
80
+ assert_equal 2, product.subjects.size
81
+ assert !product.subjects[1].main_subject?
82
+
83
+ product.subjects[0].tap do |first_subject|
84
+ assert first_subject.main_subject?
85
+ assert_equal 24, first_subject.scheme_identifier
86
+ assert_equal 'elibri.com.pl', first_subject.scheme_name
87
+ assert_equal '1.0', first_subject.scheme_version
88
+ assert_equal '1110', first_subject.code
89
+ assert_equal 'Beletrystyka / Literatura popularna / Powieść historyczna', first_subject.heading_text
90
+ end
91
+
92
+ assert_equal 7, product.reading_age_from
93
+ assert_equal 25, product.reading_age_to
94
+
95
+ assert_equal 1, product.text_contents.size
96
+ product.text_contents.first.tap do |book_review|
97
+ assert_equal 7, book_review.type
98
+ assert_equal 0, book_review.audience
99
+ assert_equal 'Jan Kowalski', book_review.author
100
+ assert_equal 'This book is purely <strong>awesome!</strong>', book_review.text.strip
101
+ end
102
+
103
+ assert_equal 1, product.supporting_resources.size
104
+ product.supporting_resources.first.tap do |cover|
105
+ assert_equal 1, cover.content_type
106
+ assert_equal 0, cover.audience
107
+ assert_equal 3, cover.mode
108
+ assert_equal 2, cover.form
109
+ assert_equal 'http://elibri.com.pl/path/to/file.png', cover.link
110
+ end
111
+
112
+ assert_equal 'National Geographic', product.imprint_name
113
+
114
+ assert_equal 'GREG', product.publisher.name
115
+ assert_equal 1, product.publisher.role
116
+
117
+ assert_equal 4, product.publishing_status
118
+
119
+ assert_equal 1, product.publishing_date.role
120
+ assert_equal 5, product.publishing_date.format
121
+ assert_equal '2011', product.publishing_date.date
122
+
123
+ assert_equal 1, product.sales_restrictions.size
124
+ gildia_restriction = product.sales_restrictions.first
125
+ assert_equal 4, gildia_restriction.type
126
+ assert_equal 'sklep.gildia.pl', gildia_restriction.outlet_name
127
+ assert_equal Date.new(2012, 7, 22), gildia_restriction.end_date
128
+
129
+ assert_equal 2, product.related_products.size
130
+
131
+ product.related_products.first.tap do |first_related|
132
+ assert_equal 24, first_related.relation_code
133
+ assert_equal '9788324705818', first_related.isbn13
134
+ assert_equal({"Gildia.pl" => "Title of facsimile"}, first_related.proprietary_identifiers)
135
+ end
136
+
137
+ product.related_products[1].tap do |second_related|
138
+ assert_equal 23, second_related.relation_code
139
+ assert_equal '9788324799992', second_related.isbn13
140
+ assert_equal({"PWN" => "Title of similar book"}, second_related.proprietary_identifiers)
141
+ end
142
+
143
+ assert_equal 2, product.supply_details.size
144
+
145
+ product.supply_details.first.tap do |supply_detail|
146
+ supply_detail.supplier.tap do |supplier|
147
+ assert_equal 3, supplier.role
148
+ assert_equal '5213359408', supplier.nip
149
+ assert_equal 'Gildia.pl', supplier.name
150
+ assert_equal "22 631 40 83", supplier.telephone_number
151
+ assert_equal "bok@gildia.pl", supplier.email_address
152
+ assert_equal "http://gildia.pl", supplier.website
153
+ end
154
+
155
+ assert_equal 21, supply_detail.product_availability
156
+ assert_equal 1000, supply_detail.on_hand
157
+ assert_equal 7, supply_detail.pack_quantity
158
+
159
+ supply_detail.price.tap do |price|
160
+ assert_equal 2, price.type
161
+ assert_equal 20, price.minimum_order_quantity
162
+ assert_equal 12.99, price.amount
163
+ assert_equal 7, price.vat
164
+ assert_equal 'PLN', price.currency_code
165
+ assert_equal 2, price.printed_on_product
166
+ assert price.printed_on_product?
167
+ assert_equal 0, price.position_on_product
168
+ end
169
+ end
170
+
171
+ product.supply_details[1].tap do |supply_detail|
172
+ assert_equal 'very few', supply_detail.quantity_code
173
+ end
174
+
175
+ end
176
+
177
+
178
+ end
@@ -0,0 +1,10 @@
1
+ require 'helper'
2
+
3
+
4
+ describe Elibri::ONIX do
5
+
6
+ it "should be able to establish its version" do
7
+ assert_match /\d+\.\d+\.\d+/, Elibri::ONIX::Version::STRING
8
+ end
9
+
10
+ end
@@ -0,0 +1,442 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ONIXMessage release="3.0" xmlns:elibri="http://elibri.com.pl/ns/extensions" xmlns="http://www.editeur.org/onix/3.0/reference">
3
+ <Header>
4
+ <Sender>
5
+ <SenderName>Elibri.com.pl</SenderName>
6
+ <ContactName>Tomasz Meka</ContactName>
7
+ <EmailAddress>kontakt@elibri.com.pl</EmailAddress>
8
+ </Sender>
9
+ <SentDateTime>20111005</SentDateTime>
10
+ </Header>
11
+ <Product>
12
+ <!-- Unikalne ID rekordu produktu -->
13
+ <RecordReference>fdb8fa072be774d97a97</RecordReference>
14
+ <!-- Typ powiadomienia
15
+ 01 - wczesne powiadomienie
16
+ 03 - powiadomienie o publikacji
17
+ 05 - usunięcie rekordu -->
18
+ <NotificationType>03</NotificationType>
19
+ <!-- Występuje tylko gdy NotificationType == 05 -->
20
+ <DeletionText>Record had many errors</DeletionText>
21
+ <!-- ISBN -->
22
+ <ProductIdentifier>
23
+ <ProductIDType>15</ProductIDType>
24
+ <IDValue>9788324799992</IDValue>
25
+ </ProductIdentifier>
26
+ <!-- EAN-13 - gdy inny niż ISBN -->
27
+ <ProductIdentifier>
28
+ <ProductIDType>03</ProductIDType>
29
+ <IDValue>9788324788882</IDValue>
30
+ </ProductIdentifier>
31
+ <!-- Identyfikator własnościowy dostawcy Gildia.pl -->
32
+ <ProductIdentifier>
33
+ <ProductIDType>01</ProductIDType>
34
+ <IDTypeName>Gildia.pl</IDTypeName>
35
+ <IDValue>GILD-123</IDValue>
36
+ </ProductIdentifier>
37
+ <!-- Identyfikator własnościowy dostawcy PWN -->
38
+ <ProductIdentifier>
39
+ <ProductIDType>01</ProductIDType>
40
+ <IDTypeName>PWN</IDTypeName>
41
+ <IDValue>pl.pwn.ksiegarnia.produkt.id.76734</IDValue>
42
+ </ProductIdentifier>
43
+ <DescriptiveDetail>
44
+ <!-- Zawsze 00 - pojedynczy element -->
45
+ <ProductComposition>00</ProductComposition>
46
+ <!-- Format produktu
47
+ AC - audio CD
48
+ AI - audio DVD
49
+ EA - e-book
50
+ CZ - inny format kartograficzny
51
+ AB - kaseta magnetofonowa
52
+ BA - książka
53
+ CA - mapa
54
+ CC - mapa płaska
55
+ CB - mapa składana
56
+ CD - mapa w rolce
57
+ AA - nagranie audio -->
58
+ <ProductForm>BA</ProductForm>
59
+ <Measure>
60
+ <!-- Wysokość: 195mm -->
61
+ <MeasureType>01</MeasureType>
62
+ <Measurement>195</Measurement>
63
+ <MeasureUnitCode>mm</MeasureUnitCode>
64
+ </Measure>
65
+ <Measure>
66
+ <!-- Szerokość: 125mm -->
67
+ <MeasureType>02</MeasureType>
68
+ <Measurement>125</Measurement>
69
+ <MeasureUnitCode>mm</MeasureUnitCode>
70
+ </Measure>
71
+ <Measure>
72
+ <!-- Grubość: 20mm -->
73
+ <MeasureType>03</MeasureType>
74
+ <Measurement>20</Measurement>
75
+ <MeasureUnitCode>mm</MeasureUnitCode>
76
+ </Measure>
77
+ <Measure>
78
+ <!-- Masa: 90gr -->
79
+ <MeasureType>08</MeasureType>
80
+ <Measurement>90.5</Measurement>
81
+ <MeasureUnitCode>gr</MeasureUnitCode>
82
+ </Measure>
83
+ <Collection>
84
+ <!-- Zawsze 10 - seria wydawnictwa -->
85
+ <CollectionType>10</CollectionType>
86
+ <TitleDetail>
87
+ <!-- Zawsze 01 -->
88
+ <TitleType>01</TitleType>
89
+ <TitleElement>
90
+ <!-- Zawsze 02 -->
91
+ <TitleElementLevel>02</TitleElementLevel>
92
+ <PartNumber>Vol. 1</PartNumber>
93
+ <TitleText>Publisher series title</TitleText>
94
+ </TitleElement>
95
+ </TitleDetail>
96
+ </Collection>
97
+ <!-- Rozróżniane typy tytułów
98
+ 01 - tytuł
99
+ 03 - tytuł w języku oryginału
100
+ 10 - tytuł wydawcy -->
101
+ <TitleDetail>
102
+ <TitleType>01</TitleType>
103
+ <TitleElement>
104
+ <TitleElementLevel>01</TitleElementLevel>
105
+ <PartNumber>part 5</PartNumber>
106
+ <TitleText>Title</TitleText>
107
+ <Subtitle>Subtitle</Subtitle>
108
+ </TitleElement>
109
+ <TitleElement>
110
+ <TitleElementLevel>02</TitleElementLevel>
111
+ <PartNumber>Vol. 1</PartNumber>
112
+ <TitleText>Collection title</TitleText>
113
+ </TitleElement>
114
+ </TitleDetail>
115
+ <TitleDetail>
116
+ <TitleType>03</TitleType>
117
+ <TitleElement>
118
+ <TitleElementLevel>01</TitleElementLevel>
119
+ <TitleText>Original title</TitleText>
120
+ </TitleElement>
121
+ </TitleDetail>
122
+ <TitleDetail>
123
+ <TitleType>10</TitleType>
124
+ <TitleElement>
125
+ <TitleElementLevel>01</TitleElementLevel>
126
+ <TitleText>Trade title</TitleText>
127
+ </TitleElement>
128
+ </TitleDetail>
129
+ <!-- Gdy wyszczególniono autorów -->
130
+ <Contributor>
131
+ <SequenceNumber>1</SequenceNumber>
132
+ <!-- Rola autora
133
+ A01 - autor
134
+ A02 - współautor
135
+ A03 - scenarzysta
136
+ A10 - pomysłodawca
137
+ A12 - ilustrator
138
+ A13 - fotograf
139
+ A15 - autor wstępu
140
+ A35 - rysownik
141
+ A36 - projektant okładki
142
+ B01 - redaktor
143
+ B02 - korektor
144
+ B06 - tłumacz
145
+ E07 - lektor -->
146
+ <ContributorRole>B06</ContributorRole>
147
+ <!-- Tylko w przypadku tłumaczy: -->
148
+ <FromLanguage>pol</FromLanguage>
149
+ <PersonName>prof. Henryk von Sienkiewicz Ibrahim</PersonName>
150
+ <TitlesBeforeNames>prof.</TitlesBeforeNames>
151
+ <NamesBeforeKey>Henryk</NamesBeforeKey>
152
+ <PrefixToKey>von</PrefixToKey>
153
+ <KeyNames>Sienkiewicz</KeyNames>
154
+ <NamesAfterKey>Ibrahim</NamesAfterKey>
155
+ <BiographicalNote>Sienkiewicz's biography</BiographicalNote>
156
+ </Contributor>
157
+ <!-- Opis wydania -->
158
+ <EditionStatement>second edition</EditionStatement>
159
+ <!-- Rola języka
160
+ 01 - język tekstu
161
+ 02 - język oryginału
162
+ 03 - język streszczenia
163
+ 08 - język ścieżki audio (CD/DVD)
164
+ 08 - język napisów (CD/DVD) -->
165
+ <Language>
166
+ <LanguageRole>01</LanguageRole>
167
+ <LanguageCode>pol</LanguageCode>
168
+ </Language>
169
+ <Extent>
170
+ <!-- Liczba stron - tylko dla produktów typu książka -->
171
+ <ExtentType>00</ExtentType>
172
+ <ExtentValue>250</ExtentValue>
173
+ <ExtentUnit>03</ExtentUnit>
174
+ </Extent>
175
+ <!-- Liczba ilustracji - tylko dla produktów typu książka -->
176
+ <NumberOfIllustrations>32</NumberOfIllustrations>
177
+ <!-- Stosujemy wewnętrzną kategoryzację. Lista kategorii Elibri w formacie JSON: http://www.elibri.com.pl/assets/product_categories.js -->
178
+ <Subject>
179
+ <MainSubject/>
180
+ <SubjectSchemeIdentifier>24</SubjectSchemeIdentifier>
181
+ <SubjectSchemeName>elibri.com.pl</SubjectSchemeName>
182
+ <SubjectSchemeVersion>1.0</SubjectSchemeVersion>
183
+ <SubjectCode>1110</SubjectCode>
184
+ <SubjectHeadingText>Beletrystyka / Literatura popularna / Powieść historyczna</SubjectHeadingText>
185
+ </Subject>
186
+ <Subject>
187
+ <SubjectSchemeIdentifier>24</SubjectSchemeIdentifier>
188
+ <SubjectSchemeName>elibri.com.pl</SubjectSchemeName>
189
+ <SubjectSchemeVersion>1.0</SubjectSchemeVersion>
190
+ <SubjectCode>21D0</SubjectCode>
191
+ <SubjectHeadingText>Dziecięca i młodzieżowa / Beletrystyka / Przygodowe</SubjectHeadingText>
192
+ </Subject>
193
+ <AudienceRange>
194
+ <!-- Ograniczenie dotyczy wieku czytelnika - zawsze 18 -->
195
+ <AudienceRangeQualifier>18</AudienceRangeQualifier>
196
+ <!-- Wiek od 7 lat -->
197
+ <AudienceRangePrecision>03</AudienceRangePrecision>
198
+ <AudienceRangeValue>7</AudienceRangeValue>
199
+ </AudienceRange>
200
+ <AudienceRange>
201
+ <!-- Ograniczenie dotyczy wieku czytelnika - zawsze 18 -->
202
+ <AudienceRangeQualifier>18</AudienceRangeQualifier>
203
+ <!-- Wiek do 25 lat -->
204
+ <AudienceRangePrecision>04</AudienceRangePrecision>
205
+ <AudienceRangeValue>25</AudienceRangeValue>
206
+ </AudienceRange>
207
+ </DescriptiveDetail>
208
+ <CollateralDetail>
209
+ <!-- Typy tekstów
210
+ 03 - opis produktu
211
+ 04 - spis treści
212
+ 07 - recenzja
213
+ 14 - fragment książki -->
214
+ <TextContent>
215
+ <TextType>07</TextType>
216
+ <!-- Zawsze 00 - Unrestricted -->
217
+ <ContentAudience>00</ContentAudience>
218
+ <Text>
219
+ <![CDATA[This book is purely <strong>awesome!</strong>]]>
220
+ </Text>
221
+ <!-- Autor tylko gdy jest to recenzja -->
222
+ <TextAuthor>Jan Kowalski</TextAuthor>
223
+ </TextContent>
224
+ <SupportingResource>
225
+ <!-- Typ załącznika
226
+ 01 - okładka (przód)
227
+ 02 - okładka (tył)
228
+ 11 - wywiad z autorem
229
+ 13 - fragment książki czytany przez autora
230
+ 15 - fragment książki lub audiobook-a
231
+ 17 - recenzja
232
+ 24 - mediapack -->
233
+ <ResourceContentType>01</ResourceContentType>
234
+ <!-- Zawsze 00 - Unrestricted -->
235
+ <ContentAudience>00</ContentAudience>
236
+ <!-- Rodzaj załącznika
237
+ 02 - audio
238
+ 03 - obrazek
239
+ 04 - tekst -->
240
+ <ResourceMode>03</ResourceMode>
241
+ <ResourceVersion>
242
+ <!-- Zawsze 02 - Downloadable file -->
243
+ <ResourceForm>02</ResourceForm>
244
+ <ResourceLink>http://elibri.com.pl/path/to/file.png</ResourceLink>
245
+ </ResourceVersion>
246
+ </SupportingResource>
247
+ </CollateralDetail>
248
+ <PublishingDetail>
249
+ <Imprint>
250
+ <ImprintName>National Geographic</ImprintName>
251
+ </Imprint>
252
+ <Publisher>
253
+ <!-- Wydawca - zawsze 01 -->
254
+ <PublishingRole>01</PublishingRole>
255
+ <PublisherName>GREG</PublisherName>
256
+ </Publisher>
257
+ <!-- Status publikacji
258
+ 01 - anulowany
259
+ 02 - nadchodzący
260
+ 04 - w sprzedaży
261
+ 07 - nakład wyczerpany
262
+ 08 - niedostępny -->
263
+ <PublishingStatus>04</PublishingStatus>
264
+ <PublishingDate>
265
+ <!-- Zawsze 01 - data publikacji -->
266
+ <PublishingDateRole>01</PublishingDateRole>
267
+ <!-- Format daty
268
+ 00 - RRRRMMDD
269
+ 01 - RRRRMM
270
+ 05 - RRRR -->
271
+ <DateFormat>05</DateFormat>
272
+ <Date>2011</Date>
273
+ </PublishingDate>
274
+ <SalesRestriction>
275
+ <!-- Typ restrykcji - zawsze 04 -->
276
+ <SalesRestrictionType>04</SalesRestrictionType>
277
+ <SalesOutlet>
278
+ <SalesOutletName>sklep.gildia.pl</SalesOutletName>
279
+ </SalesOutlet>
280
+ <!-- Ograniczenie wygasa 2012-07-22 -->
281
+ <EndDate>20120722</EndDate>
282
+ </SalesRestriction>
283
+ </PublishingDetail>
284
+ <RelatedMaterial>
285
+ <!-- Typy relacji
286
+ 23 - produkty są podobne (mogą zainteresować klienta)
287
+ 24 - produkty to faksymile (kopia lub dodruk) -->
288
+ <RelatedProduct>
289
+ <ProductRelationCode>24</ProductRelationCode>
290
+ <ProductIdentifier>
291
+ <!-- Zawsze 01 - symbol wydawcy -->
292
+ <ProductIDType>01</ProductIDType>
293
+ <IDTypeName>Gildia.pl</IDTypeName>
294
+ <IDValue>Title of facsimile</IDValue>
295
+ </ProductIdentifier>
296
+ <ProductIdentifier>
297
+ <!-- Zawsze ISBN-13 -->
298
+ <ProductIDType>15</ProductIDType>
299
+ <IDValue>9788324705818</IDValue>
300
+ </ProductIdentifier>
301
+ </RelatedProduct>
302
+ <RelatedProduct>
303
+ <ProductRelationCode>23</ProductRelationCode>
304
+ <ProductIdentifier>
305
+ <!-- Zawsze 01 - symbol wydawcy -->
306
+ <ProductIDType>01</ProductIDType>
307
+ <IDTypeName>PWN</IDTypeName>
308
+ <IDValue>Title of similar book</IDValue>
309
+ </ProductIdentifier>
310
+ <ProductIdentifier>
311
+ <ProductIDType>15</ProductIDType>
312
+ <IDValue>9788324799992</IDValue>
313
+ </ProductIdentifier>
314
+ </RelatedProduct>
315
+ </RelatedMaterial>
316
+ <ProductSupply>
317
+ <SupplyDetail>
318
+ <Supplier>
319
+ <!-- Rola dostawcy
320
+ 01 - sprzedaż wydawnictwa do detalu
321
+ 02 - wyłączny dystrybutor wydawnictwa
322
+ 03 - dystrybutor wydawnictwa bez prawa wyłączności
323
+ 04 - hurtownia książek -->
324
+ <SupplierRole>03</SupplierRole>
325
+ <SupplierIdentifier>
326
+ <!-- Zawsze 02 - Proprietary. Identyfikujemy dostawcę po NIP -->
327
+ <SupplierIDType>02</SupplierIDType>
328
+ <IDTypeName>NIP</IDTypeName>
329
+ <IDValue>5213359408</IDValue>
330
+ </SupplierIdentifier>
331
+ <SupplierName>Gildia.pl</SupplierName>
332
+ <TelephoneNumber>22 631 40 83</TelephoneNumber>
333
+ <EmailAddress>bok@gildia.pl</EmailAddress>
334
+ <Website>
335
+ <WebsiteLink>http://gildia.pl</WebsiteLink>
336
+ </Website>
337
+ </Supplier>
338
+ <!-- Typ dostępności
339
+ 21 - na stanie
340
+ 40 - niedostępne -->
341
+ <ProductAvailability>21</ProductAvailability>
342
+ <Stock>
343
+ <OnHand>1000</OnHand>
344
+ </Stock>
345
+ <!-- Ile produktów dostawca umieszcza w paczce -->
346
+ <PackQuantity>7</PackQuantity>
347
+ <Price>
348
+ <!-- Typ ceny
349
+ 02 - sugerowana cena detaliczna brutto
350
+ 01 - sugerowana cena detaliczna netto -->
351
+ <PriceType>02</PriceType>
352
+ <MinimumOrderQuantity>20</MinimumOrderQuantity>
353
+ <PriceAmount>12.99</PriceAmount>
354
+ <Tax>
355
+ <!-- VAT -->
356
+ <TaxType>01</TaxType>
357
+ <TaxRatePercent>7</TaxRatePercent>
358
+ </Tax>
359
+ <CurrencyCode>PLN</CurrencyCode>
360
+ <!-- Cena na okładce?
361
+ 01 - nie
362
+ 02 - tak -->
363
+ <PrintedOnProduct>02</PrintedOnProduct>
364
+ <!-- Zawsze 00 - Unknown / unspecified -->
365
+ <PositionOnProduct>00</PositionOnProduct>
366
+ </Price>
367
+ </SupplyDetail>
368
+ <SupplyDetail>
369
+ <Supplier>
370
+ <!-- Rola dostawcy
371
+ 01 - sprzedaż wydawnictwa do detalu
372
+ 02 - wyłączny dystrybutor wydawnictwa
373
+ 03 - dystrybutor wydawnictwa bez prawa wyłączności
374
+ 04 - hurtownia książek -->
375
+ <SupplierRole>04</SupplierRole>
376
+ <SupplierIdentifier>
377
+ <!-- Zawsze 02 - Proprietary. Identyfikujemy dostawcę po NIP -->
378
+ <SupplierIDType>02</SupplierIDType>
379
+ <IDTypeName>NIP</IDTypeName>
380
+ <IDValue>5213359408</IDValue>
381
+ </SupplierIdentifier>
382
+ <SupplierName>PWN</SupplierName>
383
+ <TelephoneNumber>22 631 40 83</TelephoneNumber>
384
+ <EmailAddress>bok@pwn.pl</EmailAddress>
385
+ <Website>
386
+ <WebsiteLink>http://pwn.pl</WebsiteLink>
387
+ </Website>
388
+ </Supplier>
389
+ <!-- Typ dostępności
390
+ 21 - na stanie
391
+ 40 - niedostępne -->
392
+ <ProductAvailability>21</ProductAvailability>
393
+ <Stock>
394
+ <!-- Nie znamy konkretnej ilości produktów na stanie -->
395
+ <StockQuantityCoded>
396
+ <!-- Zawsze 01 - Proprietary -->
397
+ <StockQuantityCodeType>01</StockQuantityCodeType>
398
+ <StockQuantityCode>very few</StockQuantityCode>
399
+ </StockQuantityCoded>
400
+ </Stock>
401
+ <!-- Ile produktów dostawca umieszcza w paczce -->
402
+ <PackQuantity>7</PackQuantity>
403
+ <Price>
404
+ <!-- Typ ceny
405
+ 02 - sugerowana cena detaliczna brutto
406
+ 01 - sugerowana cena detaliczna netto -->
407
+ <PriceType>02</PriceType>
408
+ <MinimumOrderQuantity>10</MinimumOrderQuantity>
409
+ <PriceAmount>14.99</PriceAmount>
410
+ <Tax>
411
+ <!-- VAT -->
412
+ <TaxType>01</TaxType>
413
+ <TaxRatePercent>7</TaxRatePercent>
414
+ </Tax>
415
+ <CurrencyCode>PLN</CurrencyCode>
416
+ <!-- Cena na okładce?
417
+ 01 - nie
418
+ 02 - tak -->
419
+ <PrintedOnProduct>02</PrintedOnProduct>
420
+ <!-- Zawsze 00 - Unknown / unspecified -->
421
+ <PositionOnProduct>00</PositionOnProduct>
422
+ </Price>
423
+ </SupplyDetail>
424
+ </ProductSupply>
425
+ <!-- Format okładki
426
+ gąbka
427
+ kartonowa
428
+ kartonowa foliowana
429
+ miękka
430
+ miękka ze skrzydełkami
431
+ plastikowa
432
+ skórzana
433
+ twarda
434
+ twarda z obwolutą -->
435
+ <elibri:CoverType>miękka</elibri:CoverType>
436
+ <!-- Cena na okładce -->
437
+ <elibri:CoverPrice>12.99</elibri:CoverPrice>
438
+ <!-- Vat w procentach -->
439
+ <elibri:Vat>5</elibri:Vat>
440
+ <elibri:PKWiU>58.11.1</elibri:PKWiU>
441
+ </Product>
442
+ </ONIXMessage>