talia_core 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ module TaliaCore
|
|
14
14
|
# present. If attributes for one source are imported in more than one place, all
|
15
15
|
# subsequent calls will merge the newly imported attributes with the existing ones.
|
16
16
|
class GenericReader
|
17
|
-
|
17
|
+
|
18
18
|
extend TaliaUtil::IoHelper
|
19
19
|
include TaliaUtil::Progressable
|
20
20
|
|
@@ -87,7 +87,7 @@ module TaliaCore
|
|
87
87
|
if(use_root && self.respond_to?("#{@doc.root.name}_handler".to_sym))
|
88
88
|
run_with_progress('XmlRead', 1) { read_source(@doc.root) }
|
89
89
|
else
|
90
|
-
|
90
|
+
read_children_with_progress(@doc.root)
|
91
91
|
end
|
92
92
|
@sources.values
|
93
93
|
end
|
@@ -126,14 +126,18 @@ module TaliaCore
|
|
126
126
|
attribs = call_handler(element, &block)
|
127
127
|
add_source_with_check(attribs) if(attribs)
|
128
128
|
end
|
129
|
-
|
130
|
-
def
|
129
|
+
|
130
|
+
def read_children_with_progress(element, &block)
|
131
131
|
run_with_progress('Xml Read', element.children.size) do |prog|
|
132
|
-
element
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
132
|
+
read_children_of(element, prog, &block)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def read_children_of(element, progress = nil, &block)
|
137
|
+
element.children.each do |element|
|
138
|
+
progress.inc if(progress)
|
139
|
+
next unless(element.is_a?(Hpricot::Elem))
|
140
|
+
read_source(element, &block)
|
137
141
|
end
|
138
142
|
end
|
139
143
|
|
@@ -142,7 +146,7 @@ module TaliaCore
|
|
142
146
|
end
|
143
147
|
|
144
148
|
private
|
145
|
-
|
149
|
+
|
146
150
|
|
147
151
|
# Removes all characters that are illegal in IRIs, so that the
|
148
152
|
# URIs can be imported
|
@@ -28,6 +28,10 @@ module TaliaCore
|
|
28
28
|
:xml => { :type => XmlData },
|
29
29
|
:html =>{ :type => XmlData },
|
30
30
|
:tei => { :type => XmlData },
|
31
|
+
:tei_p5 => { :type => XmlData },
|
32
|
+
:tei_p4 => { :type => XmlData },
|
33
|
+
:gml => { :type => XmlData },
|
34
|
+
:wittei => { :type => XmlData },
|
31
35
|
:hnml => { :type => XmlData },
|
32
36
|
:jpeg => { :type => ImageData, :loader => :create_iip },
|
33
37
|
:tiff => { :type => ImageData, :loader => :create_iip },
|
data/lib/talia_dependencies.rb
CHANGED
@@ -6,7 +6,7 @@ RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
|
|
6
6
|
|
7
7
|
# Stuff we may need to load from sources/uninstalled versions
|
8
8
|
TLoad::require_module("assit", "assit", "/../../assit") unless(defined?(assit))
|
9
|
-
TLoad::require_module("
|
9
|
+
TLoad::require_module("activerdf_net7", "active_rdf", "/../../ActiveRDF")
|
10
10
|
TLoad::require_module("semantic_naming", "semantic_naming", "/../../semantic_naming")
|
11
11
|
|
12
12
|
require 'version'
|
metadata
CHANGED
@@ -5,7 +5,7 @@ homepage: http://trac.talia.discovery-project.eu/
|
|
5
5
|
executables:
|
6
6
|
- talia
|
7
7
|
version: !ruby/object:Gem::Version
|
8
|
-
version: 0.4.
|
8
|
+
version: 0.4.1
|
9
9
|
post_install_message:
|
10
10
|
date: 2009-10-13 22:00:00 +00:00
|
11
11
|
files:
|
@@ -166,7 +166,7 @@ dependencies:
|
|
166
166
|
requirements:
|
167
167
|
- - '>='
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version:
|
169
|
+
version: 2.0.5
|
170
170
|
- !ruby/object:Gem::Dependency
|
171
171
|
type: :runtime
|
172
172
|
name: activesupport
|
@@ -176,17 +176,17 @@ dependencies:
|
|
176
176
|
requirements:
|
177
177
|
- - '>='
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
179
|
+
version: 2.0.5
|
180
180
|
- !ruby/object:Gem::Dependency
|
181
181
|
type: :runtime
|
182
|
-
name:
|
182
|
+
name: activerdf_net7
|
183
183
|
version_requirement:
|
184
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
185
|
version:
|
186
186
|
requirements:
|
187
187
|
- - '>='
|
188
188
|
- !ruby/object:Gem::Version
|
189
|
-
version: 1.
|
189
|
+
version: 1.6.11
|
190
190
|
- !ruby/object:Gem::Dependency
|
191
191
|
type: :runtime
|
192
192
|
name: assit
|
@@ -196,7 +196,7 @@ dependencies:
|
|
196
196
|
requirements:
|
197
197
|
- - '>='
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: 0.
|
199
|
+
version: 0.1.2
|
200
200
|
- !ruby/object:Gem::Dependency
|
201
201
|
type: :runtime
|
202
202
|
name: semantic_naming
|
@@ -206,7 +206,47 @@ dependencies:
|
|
206
206
|
requirements:
|
207
207
|
- - '>='
|
208
208
|
- !ruby/object:Gem::Version
|
209
|
-
version: 0.0
|
209
|
+
version: 2.0.0
|
210
|
+
- !ruby/object:Gem::Dependency
|
211
|
+
type: :runtime
|
212
|
+
name: averell23-bj
|
213
|
+
version_requirement:
|
214
|
+
version_requirements: !ruby/object:Gem::Requirement
|
215
|
+
version:
|
216
|
+
requirements:
|
217
|
+
- - '>='
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: 1.0.2
|
220
|
+
- !ruby/object:Gem::Dependency
|
221
|
+
type: :runtime
|
222
|
+
name: hpricot
|
223
|
+
version_requirement:
|
224
|
+
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
version:
|
226
|
+
requirements:
|
227
|
+
- - '>='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 0.8.1
|
230
|
+
- !ruby/object:Gem::Dependency
|
231
|
+
type: :runtime
|
232
|
+
name: oai
|
233
|
+
version_requirement:
|
234
|
+
version_requirements: !ruby/object:Gem::Requirement
|
235
|
+
version:
|
236
|
+
requirements:
|
237
|
+
- - '>='
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
version: 0.0.12
|
240
|
+
- !ruby/object:Gem::Dependency
|
241
|
+
type: :runtime
|
242
|
+
name: ruby-openid
|
243
|
+
version_requirement:
|
244
|
+
version_requirements: !ruby/object:Gem::Requirement
|
245
|
+
version:
|
246
|
+
requirements:
|
247
|
+
- - '>='
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: 2.1.7
|
210
250
|
- !ruby/object:Gem::Dependency
|
211
251
|
type: :runtime
|
212
252
|
name: builder
|