enju_oai 0.1.0.pre4 → 0.1.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/app/views/manifestations/list_identifiers.oai.builder +1 -1
  2. data/app/views/manifestations/list_records.oai.builder +1 -1
  3. data/lib/enju_oai/version.rb +1 -1
  4. data/spec/dummy/app/models/setting.rb +4 -0
  5. data/spec/dummy/config/application.yml +38 -0
  6. data/spec/dummy/db/migrate/20120728204337_create_series_statement_relationships.rb +11 -0
  7. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  8. data/spec/dummy/db/schema.rb +11 -1
  9. data/spec/dummy/db/test.sqlite3 +0 -0
  10. data/spec/dummy/solr/conf/admin-extra.html +31 -0
  11. data/spec/dummy/solr/conf/elevate.xml +36 -0
  12. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  13. data/spec/dummy/solr/conf/protwords.txt +21 -0
  14. data/spec/dummy/solr/conf/schema.xml +250 -0
  15. data/spec/dummy/solr/conf/scripts.conf +24 -0
  16. data/spec/dummy/solr/conf/solrconfig.xml +934 -0
  17. data/spec/dummy/solr/conf/spellings.txt +2 -0
  18. data/spec/dummy/solr/conf/stopwords.txt +58 -0
  19. data/spec/dummy/solr/conf/synonyms.txt +31 -0
  20. data/spec/dummy/solr/data/test/index/_c.fdt +0 -0
  21. data/spec/dummy/solr/data/test/index/_c.fdx +0 -0
  22. data/spec/dummy/solr/data/test/index/_c.fnm +7 -0
  23. data/spec/dummy/solr/data/test/index/_c.frq +0 -0
  24. data/spec/dummy/solr/data/test/index/_c.nrm +1 -0
  25. data/spec/dummy/solr/data/test/index/_c.prx +0 -0
  26. data/spec/dummy/solr/data/test/index/_c.tii +0 -0
  27. data/spec/dummy/solr/data/test/index/_c.tis +0 -0
  28. data/spec/dummy/solr/data/test/index/_d.fdt +0 -0
  29. data/spec/dummy/solr/data/test/index/_d.fdx +0 -0
  30. data/spec/dummy/solr/data/test/index/_d.fnm +7 -0
  31. data/spec/dummy/solr/data/test/index/_d.frq +0 -0
  32. data/spec/dummy/solr/data/test/index/_d.nrm +1 -0
  33. data/spec/dummy/solr/data/test/index/_d.prx +0 -0
  34. data/spec/dummy/solr/data/test/index/_d.tii +0 -0
  35. data/spec/dummy/solr/data/test/index/_d.tis +0 -0
  36. data/spec/dummy/solr/data/test/index/_e.fdt +0 -0
  37. data/spec/dummy/solr/data/test/index/_e.fdx +0 -0
  38. data/spec/dummy/solr/data/test/index/_e.fnm +7 -0
  39. data/spec/dummy/solr/data/test/index/_e.frq +0 -0
  40. data/spec/dummy/solr/data/test/index/_e.nrm +1 -0
  41. data/spec/dummy/solr/data/test/index/_e.prx +0 -0
  42. data/spec/dummy/solr/data/test/index/_e.tii +0 -0
  43. data/spec/dummy/solr/data/test/index/_e.tis +0 -0
  44. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  45. data/spec/dummy/solr/data/test/index/segments_l +0 -0
  46. data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
  47. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  48. metadata +99 -28
  49. data/spec/dummy/config/configatron/cucumber.rb +0 -4
  50. data/spec/dummy/config/configatron/defaults.rb +0 -28
  51. data/spec/dummy/config/configatron/development.rb +0 -4
  52. data/spec/dummy/config/configatron/production.rb.sample +0 -12
  53. data/spec/dummy/config/configatron/test.rb +0 -7
  54. data/spec/dummy/config/initializers/configatron.rb +0 -2
  55. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  56. data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
@@ -9,7 +9,7 @@ xml.tag! "OAI-PMH", :xmlns => "http://www.openarchives.org/OAI/2.0/",
9
9
  end
10
10
  xml.ListIdentifiers do
11
11
  @manifestations.each do |manifestation|
12
- cache([:manifestation => manifestation.id, :fragment => 'list_identifiers_oai', :role => current_user_role_name, :locale => @locale]) do %>
12
+ cache([manifestation, :fragment => 'list_identifiers_oai', :role => current_user_role_name, :locale => @locale]) do %>
13
13
  xml.header do
14
14
  xml.identifier manifestation.oai_identifier
15
15
  xml.datestamp manifestation.updated_at.utc.iso8601
@@ -18,7 +18,7 @@ xml.tag! "OAI-PMH", :xmlns => "http://www.openarchives.org/OAI/2.0/",
18
18
  end
19
19
  xml.ListRecords do
20
20
  @manifestations.each do |manifestation|
21
- cache([:manifestation => manifestation.id, :fragment => 'list_records_oai', :role => current_user_role_name, :locale => @locale]) do %>
21
+ cache([manifestation, :fragment => 'list_records_oai', :role => current_user_role_name, :locale => @locale]) do %>
22
22
  xml.record do
23
23
  xml.header do
24
24
  xml.identifier manifestation.oai_identifier
@@ -1,3 +1,3 @@
1
1
  module EnjuOai
2
- VERSION = "0.1.0.pre4"
2
+ VERSION = "0.1.0.pre5"
3
3
  end
@@ -0,0 +1,4 @@
1
+ class Setting < Settingslogic
2
+ source "#{Rails.root}/config/application.yml"
3
+ namespace Rails.env
4
+ end
@@ -0,0 +1,38 @@
1
+ defaults: &defaults
2
+ enju:
3
+ web_hostname: localhost
4
+ web_port_number: 3000
5
+
6
+ family_name_first: true
7
+ max_number_of_results: 500
8
+ write_search_log_to_file: true
9
+ csv_charset_conversion: true
10
+
11
+ # Choose a locale from 'ca', 'de', 'fr', 'jp', 'uk', 'us'
12
+ #AMAZON_AWS_HOSTNAME = 'ecs.amazonaws.com'
13
+ amazon:
14
+ aws_hostname: ecs.amazonaws.jp
15
+ hostname: www.amazon.co.jp
16
+ access_key: REPLACE_WITH_YOUR_AMAZON_ACCESS_KEY
17
+ secret_access_key: REPLACE_WITH_YOUR_AMAZON_SECRET_ACCESS_KEY
18
+
19
+ # :google, :amazon
20
+ book_jacket:
21
+ source: :google
22
+ unknown_resource:
23
+
24
+ # :mozshot, :simpleapi, :heartrails, :thumbalizr
25
+ screenshot:
26
+ generator: :mozshot
27
+
28
+ uploaded_file:
29
+ storage: :local
30
+
31
+ development:
32
+ <<: *defaults
33
+
34
+ test:
35
+ <<: *defaults
36
+
37
+ production:
38
+ <<: *defaults
@@ -0,0 +1,11 @@
1
+ class CreateSeriesStatementRelationships < ActiveRecord::Migration
2
+ def change
3
+ create_table :series_statement_relationships do |t|
4
+ t.integer :parent_id
5
+ t.integer :child_id
6
+ t.integer :position
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ class AddDoiToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :doi, :string
4
+ add_index :manifestations, :doi
5
+ end
6
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120602141129) do
14
+ ActiveRecord::Schema.define(:version => 20121116033446) do
15
15
 
16
16
  create_table "bookstores", :force => true do |t|
17
17
  t.text "name", :null => false
@@ -340,12 +340,14 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
340
340
  t.string "attachment_fingerprint"
341
341
  t.text "attachment_meta"
342
342
  t.integer "month_of_publication"
343
+ t.string "doi"
343
344
  end
344
345
 
345
346
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
346
347
  add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
347
348
  add_index "manifestations", ["created_at"], :name => "index_manifestations_on_created_at"
348
349
  add_index "manifestations", ["deleted_at"], :name => "index_manifestations_on_deleted_at"
350
+ add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
349
351
  add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
350
352
  add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
351
353
  add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
@@ -661,6 +663,14 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
661
663
  add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
662
664
  add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
663
665
 
666
+ create_table "series_statement_relationships", :force => true do |t|
667
+ t.integer "parent_id"
668
+ t.integer "child_id"
669
+ t.integer "position"
670
+ t.datetime "created_at", :null => false
671
+ t.datetime "updated_at", :null => false
672
+ end
673
+
664
674
  create_table "series_statements", :force => true do |t|
665
675
  t.text "original_title"
666
676
  t.text "numbering"
Binary file
@@ -0,0 +1,31 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <!-- The content of this page will be statically included into the top
19
+ of the admin page. Uncomment this as an example to see there the content
20
+ will show up.
21
+
22
+ <hr>
23
+ <i>This line will appear before the first table</i>
24
+ <tr>
25
+ <td colspan="2">
26
+ This row will be appended to the end of the first table
27
+ </td>
28
+ </tr>
29
+ <hr>
30
+
31
+ -->
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one or more
4
+ contributor license agreements. See the NOTICE file distributed with
5
+ this work for additional information regarding copyright ownership.
6
+ The ASF licenses this file to You under the Apache License, Version 2.0
7
+ (the "License"); you may not use this file except in compliance with
8
+ the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ -->
18
+
19
+ <!-- If this file is found in the config directory, it will only be
20
+ loaded once at startup. If it is found in Solr's data
21
+ directory, it will be re-loaded every commit.
22
+ -->
23
+
24
+ <elevate>
25
+ <query text="foo bar">
26
+ <doc id="1" />
27
+ <doc id="2" />
28
+ <doc id="3" />
29
+ </query>
30
+
31
+ <query text="ipod">
32
+ <doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
33
+ <doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
34
+ </query>
35
+
36
+ </elevate>
@@ -0,0 +1,246 @@
1
+ # The ASF licenses this file to You under the Apache License, Version 2.0
2
+ # (the "License"); you may not use this file except in compliance with
3
+ # the License. You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ # Syntax:
14
+ # "source" => "target"
15
+ # "source".length() > 0 (source cannot be empty.)
16
+ # "target".length() >= 0 (target can be empty.)
17
+
18
+ # example:
19
+ # "À" => "A"
20
+ # "\u00C0" => "A"
21
+ # "\u00C0" => "\u0041"
22
+ # "ß" => "ss"
23
+ # "\t" => " "
24
+ # "\n" => ""
25
+
26
+ # À => A
27
+ "\u00C0" => "A"
28
+
29
+ # Á => A
30
+ "\u00C1" => "A"
31
+
32
+ # Â => A
33
+ "\u00C2" => "A"
34
+
35
+ # Ã => A
36
+ "\u00C3" => "A"
37
+
38
+ # Ä => A
39
+ "\u00C4" => "A"
40
+
41
+ # Å => A
42
+ "\u00C5" => "A"
43
+
44
+ # Æ => AE
45
+ "\u00C6" => "AE"
46
+
47
+ # Ç => C
48
+ "\u00C7" => "C"
49
+
50
+ # È => E
51
+ "\u00C8" => "E"
52
+
53
+ # É => E
54
+ "\u00C9" => "E"
55
+
56
+ # Ê => E
57
+ "\u00CA" => "E"
58
+
59
+ # Ë => E
60
+ "\u00CB" => "E"
61
+
62
+ # Ì => I
63
+ "\u00CC" => "I"
64
+
65
+ # Í => I
66
+ "\u00CD" => "I"
67
+
68
+ # Î => I
69
+ "\u00CE" => "I"
70
+
71
+ # Ï => I
72
+ "\u00CF" => "I"
73
+
74
+ # IJ => IJ
75
+ "\u0132" => "IJ"
76
+
77
+ # Ð => D
78
+ "\u00D0" => "D"
79
+
80
+ # Ñ => N
81
+ "\u00D1" => "N"
82
+
83
+ # Ò => O
84
+ "\u00D2" => "O"
85
+
86
+ # Ó => O
87
+ "\u00D3" => "O"
88
+
89
+ # Ô => O
90
+ "\u00D4" => "O"
91
+
92
+ # Õ => O
93
+ "\u00D5" => "O"
94
+
95
+ # Ö => O
96
+ "\u00D6" => "O"
97
+
98
+ # Ø => O
99
+ "\u00D8" => "O"
100
+
101
+ # Œ => OE
102
+ "\u0152" => "OE"
103
+
104
+ # Þ
105
+ "\u00DE" => "TH"
106
+
107
+ # Ù => U
108
+ "\u00D9" => "U"
109
+
110
+ # Ú => U
111
+ "\u00DA" => "U"
112
+
113
+ # Û => U
114
+ "\u00DB" => "U"
115
+
116
+ # Ü => U
117
+ "\u00DC" => "U"
118
+
119
+ # Ý => Y
120
+ "\u00DD" => "Y"
121
+
122
+ # Ÿ => Y
123
+ "\u0178" => "Y"
124
+
125
+ # à => a
126
+ "\u00E0" => "a"
127
+
128
+ # á => a
129
+ "\u00E1" => "a"
130
+
131
+ # â => a
132
+ "\u00E2" => "a"
133
+
134
+ # ã => a
135
+ "\u00E3" => "a"
136
+
137
+ # ä => a
138
+ "\u00E4" => "a"
139
+
140
+ # å => a
141
+ "\u00E5" => "a"
142
+
143
+ # æ => ae
144
+ "\u00E6" => "ae"
145
+
146
+ # ç => c
147
+ "\u00E7" => "c"
148
+
149
+ # è => e
150
+ "\u00E8" => "e"
151
+
152
+ # é => e
153
+ "\u00E9" => "e"
154
+
155
+ # ê => e
156
+ "\u00EA" => "e"
157
+
158
+ # ë => e
159
+ "\u00EB" => "e"
160
+
161
+ # ì => i
162
+ "\u00EC" => "i"
163
+
164
+ # í => i
165
+ "\u00ED" => "i"
166
+
167
+ # î => i
168
+ "\u00EE" => "i"
169
+
170
+ # ï => i
171
+ "\u00EF" => "i"
172
+
173
+ # ij => ij
174
+ "\u0133" => "ij"
175
+
176
+ # ð => d
177
+ "\u00F0" => "d"
178
+
179
+ # ñ => n
180
+ "\u00F1" => "n"
181
+
182
+ # ò => o
183
+ "\u00F2" => "o"
184
+
185
+ # ó => o
186
+ "\u00F3" => "o"
187
+
188
+ # ô => o
189
+ "\u00F4" => "o"
190
+
191
+ # õ => o
192
+ "\u00F5" => "o"
193
+
194
+ # ö => o
195
+ "\u00F6" => "o"
196
+
197
+ # ø => o
198
+ "\u00F8" => "o"
199
+
200
+ # œ => oe
201
+ "\u0153" => "oe"
202
+
203
+ # ß => ss
204
+ "\u00DF" => "ss"
205
+
206
+ # þ => th
207
+ "\u00FE" => "th"
208
+
209
+ # ù => u
210
+ "\u00F9" => "u"
211
+
212
+ # ú => u
213
+ "\u00FA" => "u"
214
+
215
+ # û => u
216
+ "\u00FB" => "u"
217
+
218
+ # ü => u
219
+ "\u00FC" => "u"
220
+
221
+ # ý => y
222
+ "\u00FD" => "y"
223
+
224
+ # ÿ => y
225
+ "\u00FF" => "y"
226
+
227
+ # ff => ff
228
+ "\uFB00" => "ff"
229
+
230
+ # fi => fi
231
+ "\uFB01" => "fi"
232
+
233
+ # fl => fl
234
+ "\uFB02" => "fl"
235
+
236
+ # ffi => ffi
237
+ "\uFB03" => "ffi"
238
+
239
+ # ffl => ffl
240
+ "\uFB04" => "ffl"
241
+
242
+ # ſt => ft
243
+ "\uFB05" => "ft"
244
+
245
+ # st => st
246
+ "\uFB06" => "st"
@@ -0,0 +1,21 @@
1
+ # The ASF licenses this file to You under the Apache License, Version 2.0
2
+ # (the "License"); you may not use this file except in compliance with
3
+ # the License. You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ #-----------------------------------------------------------------------
14
+ # Use a protected word file to protect against the stemmer reducing two
15
+ # unrelated words to the same base word.
16
+
17
+ # Some non-words that normally won't be encountered,
18
+ # just to test that they won't be stemmed.
19
+ dontstems
20
+ zwhacky
21
+