hydra-works 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rubocop.yml +0 -1
- data/README.md +9 -9
- data/Rakefile +12 -12
- data/hydra-works.gemspec +3 -3
- data/lib/hydra/works/models/characterization/fits_datastream.rb +1 -1
- data/lib/hydra/works/models/work.rb +4 -1
- data/lib/hydra/works/services/add_file_to_file_set.rb +5 -5
- data/lib/hydra/works/services/characterization_service.rb +2 -2
- data/lib/hydra/works/version.rb +1 -1
- data/lib/hydra/works.rb +1 -1
- data/solr/config/_rest_managed.json +3 -0
- data/solr/config/admin-extra.html +31 -0
- data/solr/config/elevate.xml +36 -0
- data/solr/config/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/config/protwords.txt +21 -0
- data/solr/config/schema.xml +372 -0
- data/solr/config/scripts.conf +24 -0
- data/solr/config/solrconfig.xml +419 -0
- data/solr/config/spellings.txt +2 -0
- data/solr/config/stopwords.txt +58 -0
- data/solr/config/stopwords_en.txt +58 -0
- data/solr/config/synonyms.txt +31 -0
- data/solr/config/xslt/example.xsl +132 -0
- data/solr/config/xslt/example_atom.xsl +67 -0
- data/solr/config/xslt/example_rss.xsl +66 -0
- data/solr/config/xslt/luke.xsl +337 -0
- data/spec/hydra/works/models/collection_spec.rb +17 -17
- data/spec/hydra/works/models/file_set_spec.rb +8 -8
- data/spec/hydra/works/models/{generic_work_spec.rb → work_spec.rb} +57 -57
- data/spec/hydra/works/services/add_file_to_file_set_spec.rb +23 -23
- data/spec/hydra/works/services/upload_file_spec.rb +22 -22
- data/spec/hydra/works_spec.rb +18 -18
- data/spec/spec_helper.rb +3 -2
- metadata +36 -24
- data/config/solrconfig.xml +0 -223
- data/lib/hydra/works/models/generic_work.rb +0 -9
- data/lib/tasks/hydra-works_tasks.rake +0 -89
- data/lib/tasks/jetty.rake +0 -15
data/spec/hydra/works_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Hydra::Works do
|
4
4
|
let(:works_coll) { Hydra::Works::Collection.new }
|
5
|
-
let(:works_gwork) { Hydra::Works::
|
5
|
+
let(:works_gwork) { Hydra::Works::Work.new }
|
6
6
|
let(:file_set) { Hydra::Works::FileSet.new }
|
7
7
|
|
8
8
|
let(:pcdm_coll) { Hydra::PCDM::Collection.new }
|
@@ -15,7 +15,7 @@ describe Hydra::Works do
|
|
15
15
|
expect(works_coll.collection?).to be true
|
16
16
|
end
|
17
17
|
|
18
|
-
it 'returns false for a works
|
18
|
+
it 'returns false for a works work' do
|
19
19
|
expect(works_gwork.collection?).to be false
|
20
20
|
end
|
21
21
|
|
@@ -29,7 +29,7 @@ describe Hydra::Works do
|
|
29
29
|
expect(works_coll.work?).to be false
|
30
30
|
end
|
31
31
|
|
32
|
-
it 'returns true for a
|
32
|
+
it 'returns true for a work' do
|
33
33
|
expect(works_gwork.work?).to be true
|
34
34
|
end
|
35
35
|
|
@@ -43,7 +43,7 @@ describe Hydra::Works do
|
|
43
43
|
expect(works_coll.file_set?).to be false
|
44
44
|
end
|
45
45
|
|
46
|
-
it 'returns false for a works
|
46
|
+
it 'returns false for a works work' do
|
47
47
|
expect(works_gwork.file_set?).to be false
|
48
48
|
end
|
49
49
|
|
@@ -56,53 +56,53 @@ describe Hydra::Works do
|
|
56
56
|
describe 'Hydra::PCDM' do
|
57
57
|
describe '#collection?' do
|
58
58
|
it 'returns true for a works collection' do
|
59
|
-
expect(Hydra::PCDM.collection?
|
59
|
+
expect(Hydra::PCDM.collection?(works_coll)).to be true
|
60
60
|
end
|
61
61
|
|
62
|
-
it 'returns false for a works
|
63
|
-
expect(Hydra::PCDM.collection?
|
62
|
+
it 'returns false for a works work' do
|
63
|
+
expect(Hydra::PCDM.collection?(works_gwork)).to be false
|
64
64
|
end
|
65
65
|
|
66
66
|
it 'returns false for a works file set' do
|
67
|
-
expect(Hydra::PCDM.collection?
|
67
|
+
expect(Hydra::PCDM.collection?(file_set)).to be false
|
68
68
|
end
|
69
69
|
|
70
70
|
it 'returns true for a pcdm collection' do
|
71
|
-
expect(Hydra::PCDM.collection?
|
71
|
+
expect(Hydra::PCDM.collection?(pcdm_coll)).to be true
|
72
72
|
end
|
73
73
|
|
74
74
|
it 'returns false for a pcdm object' do
|
75
|
-
expect(Hydra::PCDM.collection?
|
75
|
+
expect(Hydra::PCDM.collection?(pcdm_obj)).to be false
|
76
76
|
end
|
77
77
|
|
78
78
|
it 'returns false for a pcdm file' do
|
79
|
-
expect(Hydra::PCDM.collection?
|
79
|
+
expect(Hydra::PCDM.collection?(pcdm_file)).to be false
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
83
|
describe '#object?' do
|
84
84
|
it 'returns false for a works collection' do
|
85
|
-
expect(Hydra::PCDM.object?
|
85
|
+
expect(Hydra::PCDM.object?(works_coll)).to be false
|
86
86
|
end
|
87
87
|
|
88
|
-
it 'returns true for a works
|
89
|
-
expect(Hydra::PCDM.object?
|
88
|
+
it 'returns true for a works work' do
|
89
|
+
expect(Hydra::PCDM.object?(works_gwork)).to be true
|
90
90
|
end
|
91
91
|
|
92
92
|
it 'returns true for a works file set' do
|
93
|
-
expect(Hydra::PCDM.object?
|
93
|
+
expect(Hydra::PCDM.object?(file_set)).to be true
|
94
94
|
end
|
95
95
|
|
96
96
|
it 'returns false for a pcdm collection' do
|
97
|
-
expect(Hydra::PCDM.object?
|
97
|
+
expect(Hydra::PCDM.object?(pcdm_coll)).to be false
|
98
98
|
end
|
99
99
|
|
100
100
|
it 'returns true for a pcdm object' do
|
101
|
-
expect(Hydra::PCDM.object?
|
101
|
+
expect(Hydra::PCDM.object?(pcdm_obj)).to be true
|
102
102
|
end
|
103
103
|
|
104
104
|
it 'returns false for a pcdm file' do
|
105
|
-
expect(Hydra::PCDM.object?
|
105
|
+
expect(Hydra::PCDM.object?(pcdm_file)).to be false
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -2,10 +2,11 @@ ENV['environment'] ||= 'test'
|
|
2
2
|
require 'simplecov'
|
3
3
|
require 'coveralls'
|
4
4
|
|
5
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter
|
5
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
6
|
+
[
|
6
7
|
SimpleCov::Formatter::HTMLFormatter,
|
7
8
|
Coveralls::SimpleCov::Formatter
|
8
|
-
]
|
9
|
+
])
|
9
10
|
SimpleCov.start do
|
10
11
|
add_filter '/spec'
|
11
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-works
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hydra-pcdm
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hydra-derivatives
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,47 +101,47 @@ dependencies:
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '3.1'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
104
|
+
name: sqlite3
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
118
|
+
name: solr_wrapper
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - "
|
121
|
+
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
123
|
+
version: '0.4'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- - "
|
128
|
+
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '0'
|
130
|
+
version: '0.4'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
132
|
+
name: fcrepo_wrapper
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- - "
|
135
|
+
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: '0.1'
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- - "
|
142
|
+
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: '0.1'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: coveralls
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,7 +188,6 @@ files:
|
|
188
188
|
- LICENSE
|
189
189
|
- README.md
|
190
190
|
- Rakefile
|
191
|
-
- config/solrconfig.xml
|
192
191
|
- hydra-works.gemspec
|
193
192
|
- lib/hydra/works.rb
|
194
193
|
- lib/hydra/works/characterization.rb
|
@@ -214,7 +213,6 @@ files:
|
|
214
213
|
- lib/hydra/works/models/concerns/file_set_behavior.rb
|
215
214
|
- lib/hydra/works/models/concerns/work_behavior.rb
|
216
215
|
- lib/hydra/works/models/file_set.rb
|
217
|
-
- lib/hydra/works/models/generic_work.rb
|
218
216
|
- lib/hydra/works/models/work.rb
|
219
217
|
- lib/hydra/works/services/add_file_to_file_set.rb
|
220
218
|
- lib/hydra/works/services/characterization_service.rb
|
@@ -222,8 +220,22 @@ files:
|
|
222
220
|
- lib/hydra/works/services/upload_file_to_file_set.rb
|
223
221
|
- lib/hydra/works/version.rb
|
224
222
|
- lib/hydra/works/vocab/works_terms.rb
|
225
|
-
-
|
226
|
-
-
|
223
|
+
- solr/config/_rest_managed.json
|
224
|
+
- solr/config/admin-extra.html
|
225
|
+
- solr/config/elevate.xml
|
226
|
+
- solr/config/mapping-ISOLatin1Accent.txt
|
227
|
+
- solr/config/protwords.txt
|
228
|
+
- solr/config/schema.xml
|
229
|
+
- solr/config/scripts.conf
|
230
|
+
- solr/config/solrconfig.xml
|
231
|
+
- solr/config/spellings.txt
|
232
|
+
- solr/config/stopwords.txt
|
233
|
+
- solr/config/stopwords_en.txt
|
234
|
+
- solr/config/synonyms.txt
|
235
|
+
- solr/config/xslt/example.xsl
|
236
|
+
- solr/config/xslt/example_atom.xsl
|
237
|
+
- solr/config/xslt/example_rss.xsl
|
238
|
+
- solr/config/xslt/luke.xsl
|
227
239
|
- spec/fixtures/Example.ogg
|
228
240
|
- spec/fixtures/charter.docx
|
229
241
|
- spec/fixtures/countdown.avi
|
@@ -251,7 +263,7 @@ files:
|
|
251
263
|
- spec/hydra/works/models/concerns/file_set/virus_check_spec.rb
|
252
264
|
- spec/hydra/works/models/concerns/file_set_behavior_spec.rb
|
253
265
|
- spec/hydra/works/models/file_set_spec.rb
|
254
|
-
- spec/hydra/works/models/
|
266
|
+
- spec/hydra/works/models/work_spec.rb
|
255
267
|
- spec/hydra/works/services/add_file_to_file_set_spec.rb
|
256
268
|
- spec/hydra/works/services/characterization_service_spec.rb
|
257
269
|
- spec/hydra/works/services/persist_derivatives_spec.rb
|
@@ -288,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
300
|
version: '0'
|
289
301
|
requirements: []
|
290
302
|
rubyforge_project:
|
291
|
-
rubygems_version: 2.5.
|
303
|
+
rubygems_version: 2.5.1
|
292
304
|
signing_key:
|
293
305
|
specification_version: 4
|
294
306
|
summary: Fundamental repository data model for hydra
|
@@ -320,7 +332,7 @@ test_files:
|
|
320
332
|
- spec/hydra/works/models/concerns/file_set/virus_check_spec.rb
|
321
333
|
- spec/hydra/works/models/concerns/file_set_behavior_spec.rb
|
322
334
|
- spec/hydra/works/models/file_set_spec.rb
|
323
|
-
- spec/hydra/works/models/
|
335
|
+
- spec/hydra/works/models/work_spec.rb
|
324
336
|
- spec/hydra/works/services/add_file_to_file_set_spec.rb
|
325
337
|
- spec/hydra/works/services/characterization_service_spec.rb
|
326
338
|
- spec/hydra/works/services/persist_derivatives_spec.rb
|
data/config/solrconfig.xml
DELETED
@@ -1,223 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
-
<config>
|
3
|
-
<!-- NOTE: various comments and unused configuration possibilities have been purged
|
4
|
-
from this file. Please refer to http://wiki.apache.org/solr/SolrConfigXml,
|
5
|
-
as well as the default solrconfig file included with Solr -->
|
6
|
-
|
7
|
-
<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
|
8
|
-
|
9
|
-
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
|
10
|
-
|
11
|
-
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
|
12
|
-
|
13
|
-
<!-- solr lib dirs -->
|
14
|
-
<lib dir="../lib/contrib/analysis-extras/lib" />
|
15
|
-
<lib dir="../lib/contrib/analysis-extras/lucene-libs" />
|
16
|
-
<!-- for full-text indexing -->
|
17
|
-
<lib dir="../lib/contrib/extraction/lib" regex=".*\.jar" />
|
18
|
-
|
19
|
-
<dataDir>${solr.data.dir:}</dataDir>
|
20
|
-
|
21
|
-
<!-- The default high-performance update handler -->
|
22
|
-
<updateHandler class="solr.DirectUpdateHandler2">
|
23
|
-
|
24
|
-
<!-- Enables a transaction log, used for real-time get, durability, and
|
25
|
-
and solr cloud replica recovery. The log can grow as big as
|
26
|
-
uncommitted changes to the index, so use of a hard autoCommit
|
27
|
-
is recommended (see below).
|
28
|
-
"dir" - the target directory for transaction logs, defaults to the
|
29
|
-
solr data directory. -->
|
30
|
-
<updateLog>
|
31
|
-
<str name="dir">${solr.ulog.dir:}</str>
|
32
|
-
</updateLog>
|
33
|
-
|
34
|
-
<!-- AutoCommit
|
35
|
-
Perform a hard commit automatically under certain conditions.
|
36
|
-
Instead of enabling autoCommit, consider using "commitWithin"
|
37
|
-
when adding documents.
|
38
|
-
http://wiki.apache.org/solr/UpdateXmlMessages
|
39
|
-
maxDocs - Maximum number of documents to add since the last
|
40
|
-
commit before automatically triggering a new commit.
|
41
|
-
maxTime - Maximum amount of time in ms that is allowed to pass
|
42
|
-
since a document was added before automatically
|
43
|
-
triggering a new commit.
|
44
|
-
openSearcher - if false, the commit causes recent index changes
|
45
|
-
to be flushed to stable storage, but does not cause a new
|
46
|
-
searcher to be opened to make those changes visible.
|
47
|
-
If the updateLog is enabled, then it's highly recommended to
|
48
|
-
have some sort of hard autoCommit to limit the log size.
|
49
|
-
-->
|
50
|
-
<autoCommit>
|
51
|
-
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
|
52
|
-
<openSearcher>false</openSearcher>
|
53
|
-
</autoCommit>
|
54
|
-
|
55
|
-
<!-- softAutoCommit is like autoCommit except it causes a
|
56
|
-
'soft' commit which only ensures that changes are visible
|
57
|
-
but does not ensure that data is synced to disk. This is
|
58
|
-
faster and more near-realtime friendly than a hard commit.
|
59
|
-
-->
|
60
|
-
|
61
|
-
<autoSoftCommit>
|
62
|
-
<maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
|
63
|
-
</autoSoftCommit>
|
64
|
-
|
65
|
-
</updateHandler>
|
66
|
-
|
67
|
-
<requestHandler name="search" class="solr.SearchHandler" default="true">
|
68
|
-
<!-- default values for query parameters can be specified, these
|
69
|
-
will be overridden by parameters in the request
|
70
|
-
-->
|
71
|
-
<lst name="defaults">
|
72
|
-
<str name="defType">edismax</str>
|
73
|
-
<str name="echoParams">explicit</str>
|
74
|
-
<str name="q.alt">*:*</str>
|
75
|
-
<str name="mm">2<-1 5<-2 6<90%</str>
|
76
|
-
<int name="qs">1</int>
|
77
|
-
<int name="ps">2</int>
|
78
|
-
<float name="tie">0.01</float>
|
79
|
-
<!-- this qf and pf are used by default, if not otherwise specified by
|
80
|
-
client. The default blacklight_config will use these for the
|
81
|
-
"keywords" search. See the author_qf/author_pf, title_qf, etc
|
82
|
-
below, which the default blacklight_config will specify for
|
83
|
-
those searches. You may also be interested in:
|
84
|
-
http://wiki.apache.org/solr/LocalParams
|
85
|
-
-->
|
86
|
-
<str name="qf">
|
87
|
-
id
|
88
|
-
all_text_timv
|
89
|
-
active_fedora_model_ssi
|
90
|
-
object_type_si
|
91
|
-
</str>
|
92
|
-
<str name="pf">
|
93
|
-
all_text_timv^10
|
94
|
-
</str>
|
95
|
-
|
96
|
-
<str name="author_qf">
|
97
|
-
</str>
|
98
|
-
<str name="author_pf">
|
99
|
-
</str>
|
100
|
-
<str name="title_qf">
|
101
|
-
</str>
|
102
|
-
<str name="title_pf">
|
103
|
-
</str>
|
104
|
-
<str name="subject_qf">
|
105
|
-
</str>
|
106
|
-
<str name="subject_pf">
|
107
|
-
</str>
|
108
|
-
|
109
|
-
<str name="fl">
|
110
|
-
*,
|
111
|
-
score
|
112
|
-
</str>
|
113
|
-
|
114
|
-
<str name="facet">true</str>
|
115
|
-
<str name="facet.mincount">1</str>
|
116
|
-
<str name="facet.limit">10</str>
|
117
|
-
<str name="facet.field">active_fedora_model_ssi</str>
|
118
|
-
<str name="facet.field">object_type_si</str>
|
119
|
-
|
120
|
-
<str name="spellcheck">true</str>
|
121
|
-
<str name="spellcheck.dictionary">default</str>
|
122
|
-
<str name="spellcheck.onlyMorePopular">true</str>
|
123
|
-
<str name="spellcheck.extendedResults">true</str>
|
124
|
-
<str name="spellcheck.collate">false</str>
|
125
|
-
<str name="spellcheck.count">5</str>
|
126
|
-
|
127
|
-
</lst>
|
128
|
-
<arr name="last-components">
|
129
|
-
<str>spellcheck</str>
|
130
|
-
</arr>
|
131
|
-
</requestHandler>
|
132
|
-
|
133
|
-
<requestHandler name="permissions" class="solr.SearchHandler" >
|
134
|
-
<lst name="defaults">
|
135
|
-
<str name="facet">off</str>
|
136
|
-
<str name="echoParams">all</str>
|
137
|
-
<str name="rows">1</str>
|
138
|
-
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
139
|
-
<str name="fl">
|
140
|
-
id,
|
141
|
-
access_ssim,
|
142
|
-
discover_access_group_ssim,discover_access_person_ssim,
|
143
|
-
read_access_group_ssim,read_access_person_ssim,
|
144
|
-
edit_access_group_ssim,edit_access_person_ssim,
|
145
|
-
depositor_ti,
|
146
|
-
embargo_release_date_dtsi
|
147
|
-
inheritable_access_ssim,
|
148
|
-
inheritable_discover_access_group_ssim,inheritable_discover_access_person_ssim,
|
149
|
-
inheritable_read_access_group_ssim,inheritable_read_access_person_ssim,
|
150
|
-
inheritable_edit_access_group_ssim,inheritable_edit_access_person_ssim,
|
151
|
-
inheritable_embargo_release_date_dtsi
|
152
|
-
</str>
|
153
|
-
</lst>
|
154
|
-
</requestHandler>
|
155
|
-
|
156
|
-
<requestHandler name="/update/extract" startup="lazy" class="org.apache.solr.handler.extraction.ExtractingRequestHandler" >
|
157
|
-
<lst name="defaults">
|
158
|
-
<!-- All the main content goes into "text"... if you need to return the extracted text or do highlighting, use a stored field. -->
|
159
|
-
<str name="fmap.content">text</str>
|
160
|
-
<str name="lowernames">true</str>
|
161
|
-
<str name="uprefix">ignored_</str>
|
162
|
-
<!-- capture link hrefs but ignore div attributes -->
|
163
|
-
<str name="captureAttr">true</str>
|
164
|
-
<str name="fmap.a">links</str>
|
165
|
-
<str name="fmap.div">ignored_</str>
|
166
|
-
</lst>
|
167
|
-
</requestHandler>
|
168
|
-
|
169
|
-
<requestHandler name="standard" class="solr.SearchHandler">
|
170
|
-
<lst name="defaults">
|
171
|
-
<str name="echoParams">explicit</str>
|
172
|
-
<str name="defType">lucene</str>
|
173
|
-
</lst>
|
174
|
-
</requestHandler>
|
175
|
-
|
176
|
-
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
|
177
|
-
<requestHandler name="document" class="solr.SearchHandler" >
|
178
|
-
<lst name="defaults">
|
179
|
-
<str name="echoParams">all</str>
|
180
|
-
<str name="fl">*</str>
|
181
|
-
<str name="rows">1</str>
|
182
|
-
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
183
|
-
</lst>
|
184
|
-
</requestHandler>
|
185
|
-
|
186
|
-
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
187
|
-
<str name="queryAnalyzerFieldType">textSpell</str>
|
188
|
-
<!-- Multiple "Spell Checkers" can be declared and used by this component
|
189
|
-
(e.g. for title_spell field)
|
190
|
-
-->
|
191
|
-
<lst name="spellchecker">
|
192
|
-
<str name="name">default</str>
|
193
|
-
<str name="field">spell</str>
|
194
|
-
<str name="spellcheckIndexDir">./spell</str>
|
195
|
-
<str name="buildOnOptimize">true</str>
|
196
|
-
</lst>
|
197
|
-
</searchComponent>
|
198
|
-
|
199
|
-
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
200
|
-
|
201
|
-
<requestDispatcher handleSelect="true" >
|
202
|
-
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
|
203
|
-
</requestDispatcher>
|
204
|
-
|
205
|
-
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
|
206
|
-
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
207
|
-
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
208
|
-
|
209
|
-
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
210
|
-
<lst name="invariants">
|
211
|
-
<str name="q">solrpingquery</str>
|
212
|
-
</lst>
|
213
|
-
<lst name="defaults">
|
214
|
-
<str name="echoParams">all</str>
|
215
|
-
</lst>
|
216
|
-
</requestHandler>
|
217
|
-
|
218
|
-
<!-- config for the admin interface -->
|
219
|
-
<admin>
|
220
|
-
<defaultQuery>search</defaultQuery>
|
221
|
-
</admin>
|
222
|
-
|
223
|
-
</config>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
module Hydra::Works
|
2
|
-
# Typically used for very generic applications that don't differntiate
|
3
|
-
# between specific content types. If you want a specific type of work
|
4
|
-
# extend Active::Fedora base and include the following:
|
5
|
-
# include Hydra::Works::WorkBehavior
|
6
|
-
class GenericWork < ActiveFedora::Base
|
7
|
-
include Hydra::Works::WorkBehavior
|
8
|
-
end
|
9
|
-
end
|
@@ -1,89 +0,0 @@
|
|
1
|
-
require 'net/http'
|
2
|
-
|
3
|
-
namespace :hydra_works do
|
4
|
-
namespace :jetty do
|
5
|
-
|
6
|
-
FULLTEXT_JARS = %w(
|
7
|
-
org/apache/james/apache-mime4j-core/0.7.2/apache-mime4j-core-0.7.2.jar
|
8
|
-
org/apache/james/apache-mime4j-dom/0.7.2/apache-mime4j-dom-0.7.2.jar
|
9
|
-
org/apache/solr/solr-cell/4.0.0/solr-cell-4.0.0.jar
|
10
|
-
org/bouncycastle/bcmail-jdk15/1.45/bcmail-jdk15-1.45.jar
|
11
|
-
org/bouncycastle/bcprov-jdk15/1.45/bcprov-jdk15-1.45.jar
|
12
|
-
de/l3s/boilerpipe/boilerpipe/1.1.0/boilerpipe-1.1.0.jar
|
13
|
-
org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar
|
14
|
-
dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
|
15
|
-
org/apache/pdfbox/fontbox/1.7.0/fontbox-1.7.0.jar
|
16
|
-
com/ibm/icu/icu4j/49.1/icu4j-49.1.jar
|
17
|
-
com/googlecode/mp4parser/isoparser/1.0-RC-1/isoparser-1.0-RC-1.jar
|
18
|
-
jdom/jdom/1.0/jdom-1.0.jar
|
19
|
-
org/apache/pdfbox/jempbox/1.7.0/jempbox-1.7.0.jar
|
20
|
-
com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar
|
21
|
-
com/drewnoakes/metadata-extractor/2.4.0-beta-1/metadata-extractor-2.4.0-beta-1.jar
|
22
|
-
edu/ucar/netcdf/4.2-min/netcdf-4.2-min.jar
|
23
|
-
org/apache/pdfbox/pdfbox/1.7.0/pdfbox-1.7.0.jar
|
24
|
-
org/apache/poi/poi/3.8/poi-3.8.jar
|
25
|
-
org/apache/poi/poi-ooxml/3.8/poi-ooxml-3.8.jar
|
26
|
-
org/apache/poi/poi-ooxml-schemas/3.8/poi-ooxml-schemas-3.8.jar
|
27
|
-
org/apache/poi/poi-scratchpad/3.8/poi-scratchpad-3.8.jar
|
28
|
-
rome/rome/0.9/rome-0.9.jar
|
29
|
-
org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.jar
|
30
|
-
org/apache/tika/tika-core/1.2/tika-core-1.2.jar
|
31
|
-
org/apache/tika/tika-parsers/1.2/tika-parsers-1.2.jar
|
32
|
-
org/gagravarr/vorbis-java-core/0.1/vorbis-java-core-0.1.jar
|
33
|
-
org/gagravarr/vorbis-java-tika/0.1/vorbis-java-tika-0.1.jar
|
34
|
-
xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
|
35
|
-
org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar
|
36
|
-
org/tukaani/xz/1.0/xz-1.0.jar
|
37
|
-
org/aspectj/aspectjrt/1.8.5/aspectjrt-1.8.5.jar
|
38
|
-
)
|
39
|
-
|
40
|
-
desc 'Configure jetty with full-text indexing'
|
41
|
-
task config: [:generate_config, :download_jars] do
|
42
|
-
Rake::Task['jetty:config'].invoke
|
43
|
-
end
|
44
|
-
|
45
|
-
desc 'Generate a Solr config with full-text extraction'
|
46
|
-
task :generate_config do
|
47
|
-
puts "Generating a solrconfig.xml configured for full-text extraction"
|
48
|
-
source = File.join(File.dirname(__FILE__), '..', '..', 'config', 'solrconfig.xml')
|
49
|
-
dest = File.join('solr_conf','conf')
|
50
|
-
FileUtils.mkdir_p(dest) unless File.directory?(dest)
|
51
|
-
dest_file = File.join(dest, 'solrconfig.xml')
|
52
|
-
if File.exist?(dest_file)
|
53
|
-
puts "Skipping. #{dest_file} already exists."
|
54
|
-
else
|
55
|
-
cp source, dest
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
desc 'Download Solr full-text extraction jars'
|
60
|
-
task :download_jars do
|
61
|
-
puts "Downloading full-text jars from maven.org ..."
|
62
|
-
fulltext_dir = 'jetty/solr/lib/contrib/extraction/lib'
|
63
|
-
FileUtils.mkdir_p(fulltext_dir) unless File.directory?(fulltext_dir)
|
64
|
-
Dir.chdir(fulltext_dir) do
|
65
|
-
FULLTEXT_JARS.each do |jar|
|
66
|
-
destination = jar.split('/').last
|
67
|
-
download_from_maven(jar, destination) unless File.exists?(destination)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
def download_from_maven url, dst
|
75
|
-
full_url = '/remotecontent?filepath=' + url
|
76
|
-
file = File.open(dst, "wb")
|
77
|
-
endpoint = Net::HTTP.new('search.maven.org', 443)
|
78
|
-
endpoint.use_ssl = true
|
79
|
-
endpoint.start do |http|
|
80
|
-
puts "Fetching #{full_url}"
|
81
|
-
begin
|
82
|
-
http.request_get(full_url) do |resp|
|
83
|
-
resp.read_body { |segment| file.write(segment) }
|
84
|
-
end
|
85
|
-
ensure
|
86
|
-
file.close
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
data/lib/tasks/jetty.rake
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
namespace :jetty do
|
2
|
-
desc "Copies the default Solr & Fedora configs into the bundled Hydra Testing Server"
|
3
|
-
task :config do
|
4
|
-
Rake::Task['hydra_works:jetty:download_jars'].invoke
|
5
|
-
Rake::Task["jetty:config_solr"].invoke
|
6
|
-
end
|
7
|
-
|
8
|
-
desc "Copies the contents of solr_conf into the Solr development-core and test-core of Testing Server"
|
9
|
-
task :config_solr do
|
10
|
-
FileList['solr_conf/conf/*'].each do |f|
|
11
|
-
cp("#{f}", 'jetty/solr/development-core/conf/', verbose: true)
|
12
|
-
cp("#{f}", 'jetty/solr/test-core/conf/', verbose: true)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|