Project

General

Profile

1
<beans xmlns="http://www.springframework.org/schema/beans"
2
	xmlns:p="http://www.springframework.org/schema/p"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
5
						http://www.springframework.org/schema/beans/spring-beans.xsd
6
						http://www.springframework.org/schema/context  
7
    					http://www.springframework.org/schema/context/spring-context-3.0.xsd">
8

    
9

    
10
	<bean id="eml.abstract" class="org.dataone.cn.indexer.parser.MergeSolrField">
11
	  <constructor-arg name="name" value="abstract" />
12
	  <constructor-arg name="xpath"
13
	    value="//dataset/abstract/descendant::text()" />
14
	  <constructor-arg name="delimiter" value=" " />
15
	  <property name="multivalue" value="false" />
16
	  <property name="dedupe" value="false" />
17
	</bean>
18

    
19
	<bean id="eml.keywords" class="org.dataone.cn.indexer.parser.SolrField">
20
		<constructor-arg name="name" value="keywords" />
21
		<constructor-arg name="xpath"
22
			value="//dataset/keywordSet/keyword/text()" />
23
		<property name="multivalue" value="true" />
24
		<property name="dedupe" value="true" />
25
	</bean>
26

    
27
	<bean id="eml.southBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
28
		<constructor-arg name="name" value="southBoundCoord" />
29
		<constructor-arg name="xpath"
30
			value="//dataset/coverage/geographicCoverage/boundingCoordinates/southBoundingCoordinate/text()" />
31
		<property name="multivalue" value="false" />
32
		<property name="converter" ref="solrLatitudeConverter" />
33
	</bean>
34

    
35
	<bean id="eml.northBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
36
		<constructor-arg name="name" value="northBoundCoord" />
37
		<constructor-arg name="xpath"
38
			value="//dataset/coverage/geographicCoverage/boundingCoordinates/northBoundingCoordinate/text()" />
39
		<property name="multivalue" value="false" />
40
		<property name="converter" ref="solrLatitudeConverter" />
41
	</bean>
42

    
43
	<bean id="eml.westBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
44
		<constructor-arg name="name" value="westBoundCoord" />
45
		<constructor-arg name="xpath"
46
			value="//dataset/coverage/geographicCoverage/boundingCoordinates/westBoundingCoordinate/text()" />
47
		<property name="multivalue" value="false" />
48
		<property name="converter" ref="solrLongitudeConverter" />
49
	</bean>
50

    
51
	<bean id="eml.eastBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
52
		<constructor-arg name="name" value="eastBoundCoord" />
53
		<constructor-arg name="xpath"
54
			value="//dataset/coverage/geographicCoverage/boundingCoordinates/eastBoundingCoordinate/text()" />
55
		<property name="multivalue" value="false" />
56
		<property name="converter" ref="solrLongitudeConverter" />
57
	</bean>
58
		
59
	<!-- define the root and leafs for accessing multiple bounding coordinates for geohash -->
60
	<bean id="eml.geohashRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
61
		p:name="geohashRoot"
62
		p:xPath="//dataset/coverage/geographicCoverage/boundingCoordinates"
63
		p:template="[northBoundingCoordinate] [westBoundingCoordinate] [southBoundingCoordinate] [eastBoundingCoordinate]">
64
		<property name="leafs">
65
			<list>
66
				<ref bean="eml.northBoundingCoordinateLeaf"/>
67
				<ref bean="eml.westBoundingCoordinateLeaf"/>
68
				<ref bean="eml.southBoundingCoordinateLeaf"/>
69
				<ref bean="eml.eastBoundingCoordinateLeaf"/>
70
			</list>
71
		</property>
72
	</bean>
73
	
74
		
75
	<!-- use the root to calculate different geohash lengths -->
76
	<bean id="eml.geohash1" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
77
		p:multivalue="true"
78
		p:root-ref="eml.geohashRoot">
79
		<constructor-arg name="name" value="geohash_1" />
80
		<property name="converter" ref="geohashConverter_1"/>
81
	</bean>
82
	
83
	<bean id="eml.geohash2" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
84
		p:multivalue="true"
85
		p:root-ref="eml.geohashRoot">
86
		<constructor-arg name="name" value="geohash_2" />
87
		<property name="converter" ref="geohashConverter_2"/>
88
	</bean>
89
	
90
		<bean id="eml.geohash3" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
91
		p:multivalue="true"
92
		p:root-ref="eml.geohashRoot">
93
		<constructor-arg name="name" value="geohash_3" />
94
		<property name="converter" ref="geohashConverter_2"/>
95
	</bean>
96
	
97
		<bean id="eml.geohash4" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
98
		p:multivalue="true"
99
		p:root-ref="eml.geohashRoot">
100
		<constructor-arg name="name" value="geohash_4" />
101
		<property name="converter" ref="geohashConverter_4"/>
102
	</bean>
103
	
104
		<bean id="eml.geohash5" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
105
		p:multivalue="true"
106
		p:root-ref="eml.geohashRoot">
107
		<constructor-arg name="name" value="geohash_5" />
108
		<property name="converter" ref="geohashConverter_5"/>
109
	</bean>
110
	
111
		<bean id="eml.geohash6" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
112
		p:multivalue="true"
113
		p:root-ref="eml.geohashRoot">
114
		<constructor-arg name="name" value="geohash_6" />
115
		<property name="converter" ref="geohashConverter_6"/>
116
	</bean>
117
	
118
		<bean id="eml.geohash7" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
119
		p:multivalue="true"
120
		p:root-ref="eml.geohashRoot">
121
		<constructor-arg name="name" value="geohash_7" />
122
		<property name="converter" ref="geohashConverter_7"/>
123
	</bean>
124
	
125
		<bean id="eml.geohash8" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
126
		p:multivalue="true"
127
		p:root-ref="eml.geohashRoot">
128
		<constructor-arg name="name" value="geohash_8" />
129
		<property name="converter" ref="geohashConverter_8"/>
130
	</bean>
131
	
132
		<bean id="eml.geohash9" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
133
		p:multivalue="true"
134
		p:root-ref="eml.geohashRoot">
135
		<constructor-arg name="name" value="geohash_9" />
136
		<property name="converter" ref="geohashConverter_9"/>
137
	</bean>
138

    
139
	<bean id="eml.site" class="org.dataone.cn.indexer.parser.SolrField">
140
		<constructor-arg name="name" value="site" />
141
		<constructor-arg name="xpath" value='//dataset/coverage/geographicCoverage/geographicDescription/text()' />
142
		<property name="multivalue" value="true" />
143
	</bean>
144
	
145
	<bean id="eml.beginDate" class="org.dataone.cn.indexer.parser.SolrField">
146
		<constructor-arg name="name" value="beginDate" />
147
		<constructor-arg name="xpath"
148
			value="//dataset/coverage/temporalCoverage/rangeOfDates/beginDate/calendarDate/text() | //dataset/coverage/temporalCoverage/singleDateTime/calendarDate/text()" />
149
		<property name="multivalue" value="false" />
150
		<property name="converter" ref="dateConverter" />
151
	</bean>
152

    
153
	<bean id="eml.endDate" class="org.dataone.cn.indexer.parser.SolrField">
154
		<constructor-arg name="name" value="endDate" />
155
		<constructor-arg name="xpath"
156
			value="//dataset/coverage/temporalCoverage/rangeOfDates/endDate/calendarDate/text() | //dataset/coverage/temporalCoverage/singleDateTime/calendarDate/text()" />
157
		<property name="multivalue" value="false" />
158
		<property name="converter" ref="dateConverter" />
159
	</bean>
160
	
161
	<bean id="eml.pubDate" class="org.dataone.cn.indexer.parser.SolrField">
162
		<constructor-arg name="name" value="pubDate" />
163
		<constructor-arg name="xpath" value="//dataset/pubDate/text()" />
164
		<property name="multivalue" value="false" />
165
		<property name="converter" ref="dateConverter" />
166
	</bean>
167

    
168
	<bean id="eml.title" class="org.dataone.cn.indexer.parser.SolrField">
169
		<constructor-arg name="name" value="title" />
170
		<constructor-arg name="xpath" value="//dataset/title/text()" />
171
		<property name="multivalue" value="false" />
172
	</bean>
173
	
174
	<bean id="eml.project" class="org.dataone.cn.indexer.parser.SolrField">
175
		<constructor-arg name="name" value="project" />
176
		<constructor-arg name="xpath" value="//dataset/project/title/text()" />
177
		<property name="multivalue" value="false" />
178
	</bean>	
179

    
180
	<bean id="eml.authorSurName" class="org.dataone.cn.indexer.parser.SolrField">
181
		<constructor-arg name="name" value="authorSurName" />
182
		<constructor-arg name="xpath"
183
			value="//dataset/creator[1]/individualName[1]/surName/text()" />
184
	</bean>
185
	
186
	<bean id="eml.authorGivenName" class="org.dataone.cn.indexer.parser.SolrField">
187
		<constructor-arg name="name" value="authorGivenName" />
188
		<constructor-arg name="xpath"
189
			value="//dataset/creator[1]/individualName[1]/givenName/text()" />
190
	</bean>
191

    
192
	<bean id="eml.authorSurNameSort" class="org.dataone.cn.indexer.parser.SolrField">
193
		<constructor-arg name="name" value="authorSurNameSort" />
194
		<constructor-arg name="xpath"
195
			value="//dataset/creator[1]/individualName[1]/surName/text()" />
196
	</bean>
197
	
198
	<bean id="eml.authorGivenNameSort" class="org.dataone.cn.indexer.parser.SolrField">
199
		<constructor-arg name="name" value="authorGivenNameSort" />
200
		<constructor-arg name="xpath"
201
			value="//dataset/creator[1]/individualName[1]/givenName/text()" />
202
	</bean>
203

    
204
	<bean id="eml.author" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
205
			p:multivalue="false"
206
			p:root-ref="eml.authorNameRoot">
207
			<constructor-arg name="name" value="author" />
208
	</bean>
209
	
210
	<bean id="eml.authorNameRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
211
		p:name="author"
212
		p:xPath="//dataset/creator/individualName"
213
		p:template="[givenName] [surName]">
214
		<property name="leafs">
215
			<list>
216
				<ref bean="eml.givenNameLeaf"/>
217
				<ref bean="eml.surNameLeaf"/>
218
			</list>
219
		</property>
220
	</bean>
221
	
222
	<bean id="eml.givenNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
223
		p:name="givenName"
224
		p:xPath="givenName/text()" />
225
		
226
	<bean id="eml.surNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
227
		p:name="surName"
228
		p:xPath="surName/text()"/>
229
			
230
	<bean id="eml.author_lname" class="org.dataone.cn.indexer.parser.SolrField">
231
		<constructor-arg name="name" value="authorLastName" />
232
		<constructor-arg name="xpath"
233
			value="//dataset/creator/individualName/surName/text()" />
234
		<property name="multivalue" value="true" />
235
	</bean>
236
	
237
	<bean id="eml.investigator" class="org.dataone.cn.indexer.parser.SolrField">
238
		<constructor-arg name="name" value="investigator" />
239
		<constructor-arg name="xpath"
240
			value="//dataset/creator/individualName/surName/text()" />
241
		<property name="multivalue" value="true" />
242
	</bean>
243
	
244
	<bean id="eml.origin" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
245
		p:multivalue="true"
246
		p:root-ref="eml.originRoot">
247
		<constructor-arg name="name" value="origin" />
248
	</bean>
249
	
250
	<bean id="eml.originRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
251
		p:name="origin"
252
		p:xPath="//dataset/creator" 
253
		p:template="[individualName]||[organizationName]">
254
		<property name="leafs"><list><ref bean="eml.organizationNameLeaf"/></list></property>
255
		<property name="subRoots"><list><ref bean="eml.individualNameRoot" /></list></property>
256
	</bean>
257
		
258
	<bean id="eml.organizationNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
259
		p:name="organizationName"
260
		p:xPath="organizationName/text()" />
261
		
262
	<bean id="eml.individualNameRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
263
		p:name="individualName"
264
		p:xPath="individualName"
265
		p:template="[givenName] [surName]">
266
		<property name="leafs">
267
			<list>
268
				<ref bean="eml.givenNameLeaf"/>
269
				<ref bean="eml.surNameLeaf"/>
270
			</list>
271
		</property>
272
	</bean>
273
	
274
	<bean id="eml.contactOrganization" class="org.dataone.cn.indexer.parser.SolrField">
275
		<constructor-arg name="name" value="contactOrganization" />
276
		<constructor-arg name="xpath"
277
		  value="//dataset/creator/organizationName/text()" />
278
		<property name="multivalue" value="true" />
279
		<property name="dedupe" value="true"/>
280
	</bean>
281
	
282
	<bean id="eml.fileID" class="org.dataone.cn.indexer.parser.ResolveSolrField">
283
		<constructor-arg name="name" value="fileID" />
284
	</bean>
285
	
286
	<bean id="eml.text" class="org.dataone.cn.indexer.parser.FullTextSolrField">
287
		<constructor-arg name="name" value="text" />
288
		<constructor-arg name="xpath"
289
			value="//dataset/*[not(self::dataTable)]//text()" />
290
		<property name="multivalue" value="false" />
291
		<property name="combineNodes" value="true"/>
292
	</bean>
293
	
294
	<bean id="eml.genus" class="org.dataone.cn.indexer.parser.SolrField">
295
		<constructor-arg name="name" value="genus" />
296
		<constructor-arg name="xpath" 
297
			value='//taxonomicClassification/taxonRankValue[../taxonRankName="Genus"]/text()' />
298
		<property name="multivalue" value="true" />
299
		<property name="dedupe" value="true" />
300
	</bean>
301

    
302
	<bean id="eml.species" class="org.dataone.cn.indexer.parser.SolrField">
303
		<constructor-arg name="name" value="species" />
304
		<constructor-arg name="xpath" 
305
			value='//taxonomicClassification/taxonRankValue[../taxonRankName="Species"]/text()' />
306
		<property name="multivalue" value="true" />
307
		<property name="dedupe" value="true" />
308
	</bean>
309

    
310
	<bean id="eml.kingdom" class="org.dataone.cn.indexer.parser.SolrField">
311
		<constructor-arg name="name" value="kingdom" />
312
		<constructor-arg name="xpath" 
313
			value='//taxonomicClassification/taxonRankValue[../taxonRankName="Kingdom"]/text()' />
314
		<property name="multivalue" value="true" />
315
		<property name="dedupe" value="true" />
316
	</bean>
317

    
318
	<bean id="eml.order" class="org.dataone.cn.indexer.parser.SolrField">
319
		<constructor-arg name="name" value="order" />
320
		<constructor-arg name="xpath" 
321
			value='//taxonomicClassification/taxonRankValue[../taxonRankName="Order"]/text()' />
322
		<property name="multivalue" value="true" />
323
		<property name="dedupe" value="true" />
324
	</bean>
325

    
326
	<bean id="eml.phylum" class="org.dataone.cn.indexer.parser.SolrField">
327
		<constructor-arg name="name" value="phylum" />
328
		<constructor-arg name="xpath" 
329
			value='//taxonomicClassification/taxonRankValue[../taxonRankName="Phylum"]/text() | //taxonomicClassification/taxonRankValue[../taxonRankName="Division"]/text()' />
330
		<property name="multivalue" value="true" />
331
		<property name="dedupe" value="true" />
332
	</bean>
333
		
334
	<bean id="eml.family" class="org.dataone.cn.indexer.parser.SolrField">
335
		<constructor-arg name="name" value="family" />
336
		<constructor-arg name="xpath" 
337
			value='//taxonomicClassification/taxonRankValue[../taxonRankName="Family"]/text()' />
338
		<property name="multivalue" value="true" />
339
		<property name="dedupe" value="true" />
340
	</bean>
341

    
342
	<bean id="eml.class" class="org.dataone.cn.indexer.parser.SolrField">
343
		<constructor-arg name="name" value="class" />
344
		<constructor-arg name="xpath" 
345
			value='//taxonomicClassification/taxonRankValue[../taxonRankName="Class"]/text()' />
346
		<property name="multivalue" value="true" />
347
		<property name="dedupe" value="true" />
348
	</bean>
349
	
350
	
351
	<bean id="eml.scientificName" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
352
			p:multivalue="true"
353
			p:root-ref="eml.scientificNameRoot">
354
			<constructor-arg name="name" value="scientificName" />
355
	</bean>
356
	
357
	<bean id="eml.scientificNameRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
358
		p:name="scientificName"
359
		p:xPath='//taxonomicClassification[../taxonRankName="Genus"]'
360
		p:template="[genus] [species]">
361
		<property name="leafs">
362
			<list>
363
				<ref bean="eml.genusLeaf"/>
364
				<ref bean="eml.speciesLeaf"/>
365
			</list>
366
		</property>
367
	</bean>	
368
	
369
	<bean id="eml.genusLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
370
		p:name="genus"
371
		p:xPath='../taxonRankValue/text()' />
372
		
373
	<bean id="eml.speciesLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
374
		p:name="species"
375
		p:xPath='taxonRankValue/text()' />	
376
	
377

    
378
	<bean id="eml.attributeName" class="org.dataone.cn.indexer.parser.SolrField">
379
		<constructor-arg name="name" value="attributeName" />
380
		<constructor-arg name="xpath"
381
			value='//dataTable/attributeList/attribute/attributeName/text()' />
382
		<property name="multivalue" value="true" />
383
		<property name="dedupe" value="false" />
384
	</bean>
385
	
386
	<bean id="eml.attributeLabel" class="org.dataone.cn.indexer.parser.SolrField">
387
		<constructor-arg name="name" value="attributeLabel" />
388
		<constructor-arg name="xpath"
389
			value='//dataTable/attributeList/attribute/attributeLabel/text()' />
390
		<property name="multivalue" value="true" />
391
		<property name="dedupe" value="false" />
392
	</bean>
393
	
394
	<bean id="eml.attributeDescription" class="org.dataone.cn.indexer.parser.SolrField">
395
		<constructor-arg name="name" value="attributeDescription" />
396
		<constructor-arg name="xpath"
397
			value='//dataTable/attributeList/attribute/attributeDefinition/text()' />
398
		<property name="multivalue" value="true" />
399
		<property name="dedupe" value="false" />
400
	</bean>
401
	
402
	<bean id="eml.attributeUnit" class="org.dataone.cn.indexer.parser.SolrField">
403
		<constructor-arg name="name" value="attributeUnit" />
404
		<constructor-arg name="xpath"
405
			value='//dataTable//standardUnit/text() | //dataTable//customUnit/text()' />
406
		<property name="multivalue" value="true" />
407
		<property name="dedupe" value="false" />
408
	</bean>
409

    
410
	<bean id="eml.attributeText" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
411
			p:multivalue="true"
412
			p:root-ref="eml.attributeTextRoot">
413
			<constructor-arg name="name" value="attribute" />
414
	</bean>
415
	
416
	<bean id="eml.attributeTextRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
417
		p:name="attribute"
418
		p:xPath='//dataTable/attributeList/attribute'
419
		p:template="[attributeName] [attributeLabel] [attributeDescription] [attributeUnit]">
420
		<property name="leafs">
421
			<list>
422
				<ref bean="eml.attributeNameLeaf" />
423
				<ref bean="eml.attributeLabelLeaf" />
424
				<ref bean="eml.attributeDescriptionLeaf" />
425
				<ref bean="eml.attributeUnitLeaf" />
426
			</list>
427
		</property>
428
	</bean>	
429
	
430
	<bean id="eml.attributeNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
431
		p:name="attributeName"
432
		p:xPath='attributeName/text()' />
433
		
434
	<bean id="eml.attributeLabelLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
435
		p:name="attributeLabel"
436
		p:xPath='attributeLabel/text()' />
437
	
438
	<bean id="eml.attributeDescriptionLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
439
		p:name="attributeDescription"
440
		p:xPath='attributeDefinition/text()' />
441
		
442
	<bean id="eml.attributeUnitLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
443
		p:name="attributeUnit"
444
		p:xPath='.//standardUnit/text() | .//customUnit/text()' />	
445
	
446
	<bean id="eml.attributeName.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
447
		<constructor-arg name="name" value="attributeName_noDupe" />
448
		<constructor-arg name="xpath"
449
			value='//dataTable/attributeList/attribute/attributeName/text()' />
450
		<property name="multivalue" value="true" />
451
		<property name="dedupe" value="true" />
452
	</bean>
453
	
454
	<bean id="eml.attributeLabel.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
455
		<constructor-arg name="name" value="attributeLabel_noDupe" />
456
		<constructor-arg name="xpath"
457
			value='//dataTable/attributeList/attribute/attributeLabel/text()' />
458
		<property name="multivalue" value="true" />
459
		<property name="dedupe" value="true" />
460
	</bean>
461
	
462
	<bean id="eml.attributeDescription.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
463
		<constructor-arg name="name" value="attributeDescription_noDupe" />
464
		<constructor-arg name="xpath"
465
			value='//dataTable/attributeList/attribute/attributeDefinition/text()' />
466
		<property name="multivalue" value="true" />
467
		<property name="dedupe" value="true" />
468
	</bean>
469
	
470
	<bean id="eml.attributeUnit.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
471
		<constructor-arg name="name" value="attributeUnit_noDupe" />
472
		<constructor-arg name="xpath"
473
			value='//dataTable//standardUnit/text() | //dataTable//customUnit/text()' />
474
		<property name="multivalue" value="true" />
475
		<property name="dedupe" value="true" />
476
	</bean>
477
	
478
	<bean id="eml.fullText" class="org.dataone.cn.indexer.parser.AggregateSolrField" >
479
		<property name="name" value="text" />
480
		<property name="solrFields">
481
	   		<list>
482
	       		<ref bean="eml.text" />
483
	       		<ref bean="eml.attributeName.noDupe" />
484
	       		<ref bean="eml.attributeLabel.noDupe" />
485
	       		<ref bean="eml.attributeDescription.noDupe" />
486
	       		<ref bean="eml.attributeUnit.noDupe" />
487
	      	</list>
488
	  	</property>
489
	</bean>
490
</beans>
(2-2/11)