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
	<bean id="isotc.abstract" class="org.dataone.cn.indexer.parser.SolrField">
10
		<constructor-arg name="name" value="abstract" />
11
		<constructor-arg name="xpath" 
12
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString/text()" />
13
	</bean>
14
	
15
	<bean id="isotc.author" class="org.dataone.cn.indexer.parser.SolrField">
16
		<constructor-arg name="name" value="author" />
17
		<constructor-arg name="xpath" 
18
			value="(//gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text() | //gmd:CI_ResponsibleParty/gmd:individualName/gmx:Anchor/text())[1]" />
19
	</bean>
20

    
21
	<bean id="isotc.authorSurName" class="org.dataone.cn.indexer.parser.SolrField">
22
		<constructor-arg name="name" value="authorSurName" />
23
		<constructor-arg name="xpath"
24
			value="(//gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text() | //gmd:CI_ResponsibleParty/gmd:individualName/gmx:Anchor/text())[1]" />
25
		<property name="multivalue" value="false" />
26
	</bean>
27

    
28
	<bean id="isotc.authorSurNameSort" class="org.dataone.cn.indexer.parser.SolrField">
29
		<constructor-arg name="name" value="authorSurNameSort" />
30
		<constructor-arg name="xpath"
31
			value="(//gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text() | //gmd:CI_ResponsibleParty/gmd:individualName/gmx:Anchor/text())[1]" />
32
		<property name="multivalue" value="false" />
33
	</bean>
34
	
35
	<bean id="isotc.investigator" class="org.dataone.cn.indexer.parser.SolrField">
36
		<constructor-arg name="name" value="investigator" />
37
		<constructor-arg name="xpath" 
38
			value="//gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text() | //gmd:CI_ResponsibleParty/gmd:individualName/gmx:Anchor/text()" />
39
		<property name="multivalue" value="true" />
40
		<property name="dedupe" value="true" />
41
	</bean>
42
	
43
	<bean id="isotc.contactOrganization" class="org.dataone.cn.indexer.parser.SolrField">
44
		<constructor-arg name="name" value="contactOrganization" />
45
		<constructor-arg name="xpath" 
46
			value="(//gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text())[1]" />
47
	</bean>
48
	
49
	<!-- index only the individualName (not organisationName) if there is a valid role -->
50
	<!-- valid roles: "owner", "originator", "principalInvestigator", "author" -->
51
	<!-- or -->
52
	<!-- index the organisationName the role is valid but no individualName is specified -->
53
	<bean id="isotc.origin" class="org.dataone.cn.indexer.parser.SolrField">
54
		<constructor-arg name="name" value="origin" />
55
		<constructor-arg name="xpath" 
56
			value='//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode/text() = "owner" or gmd:role/gmd:CI_RoleCode/text() = "originator" or gmd:role/gmd:CI_RoleCode/text() = "principalInvestigator" or gmd:role/gmd:CI_RoleCode/text() = "author"]/gmd:individualName/gco:CharacterString/text() | //gmd:CI_ResponsibleParty[(gmd:role/gmd:CI_RoleCode/text() = "owner" or gmd:role/gmd:CI_RoleCode/text() = "originator" or gmd:role/gmd:CI_RoleCode/text() = "principalInvestigator" or gmd:role/gmd:CI_RoleCode/text() = "author") and (not(gmd:individualName) or gmd:individualName[@gco:nilReason = "missing"])]/gmd:organisationName/gco:CharacterString/text()' />
57
		<property name="multivalue" value="true" />
58
		<property name="dedupe" value="true" />
59
	</bean>
60
	
61
	<bean id="isotc.pubDate" class="org.dataone.cn.indexer.parser.SolrField">
62
		<constructor-arg name="name" value="pubDate" />
63
		<constructor-arg name="xpath" 
64
			value="(//gmd:dateStamp/gco:Date/text() | //gmd:dateStamp/gco:DateTime/text())[1]" />
65
		<property name="converter" ref="dateConverter" />
66
	</bean>
67
	
68
	<bean id="isotc.beginDate" class="org.dataone.cn.indexer.parser.SolrField">
69
		<constructor-arg name="name" value="beginDate" />
70
		<constructor-arg name="xpath" 
71
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/*[local-name() = 'TimePeriod']/*[local-name() = 'beginPosition']/text()" />
72
		<property name="converter" ref="dateConverter" />
73
	</bean>
74
	
75
	<bean id="isotc.endDate" class="org.dataone.cn.indexer.parser.SolrField">
76
		<constructor-arg name="name" value="endDate" />
77
		<constructor-arg name="xpath" 
78
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/*[local-name() = 'TimePeriod']/*[local-name() = 'endPosition']/text()" />
79
		<property name="converter" ref="dateConverter" />
80
	</bean>	
81

    
82
	<bean id="isotc.title" class="org.dataone.cn.indexer.parser.SolrField">
83
		<constructor-arg name="name" value="title" />
84
		<constructor-arg name="xpath" 
85
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString/text() | //gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gmx:Anchor/text()" />
86
	</bean>		
87
	
88
	<bean id="isotc.keywords" class="org.dataone.cn.indexer.parser.SolrField">
89
		<constructor-arg name="name" value="keywords" />
90
		<constructor-arg name="xpath"
91
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gmx:Anchor/text() | //gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString/text()" />
92
		<property name="multivalue" value="true" />
93
	</bean>
94
	
95
	<bean id="isotc.eastBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
96
		<constructor-arg name="name" value="eastBoundCoord" />
97
		<constructor-arg name="xpath" 
98
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal/text()" />
99
	</bean>	
100
	
101
	<bean id="isotc.westBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
102
		<constructor-arg name="name" value="westBoundCoord" />
103
		<constructor-arg name="xpath" 
104
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal/text()" />
105
	</bean>
106
	
107
	<bean id="isotc.southBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
108
		<constructor-arg name="name" value="southBoundCoord" />
109
		<constructor-arg name="xpath" 
110
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal/text()" />
111
	</bean>
112
	
113
	<bean id="isotc.northBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
114
		<constructor-arg name="name" value="northBoundCoord" />
115
		<constructor-arg name="xpath" 
116
			value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal/text()" />
117
	</bean>
118

    
119
	<!-- define the root and leafs for accessing multiple bounding coordinates for geohash -->
120
	<bean id="isotc.geohashRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
121
		p:name="geohashRoot"
122
		p:xPath="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox"
123
		p:template="[northBoundingCoordinate] [southBoundingCoordinate] [eastBoundingCoordinate] [westBoundingCoordinate]">
124
		<property name="leafs">
125
			<list>
126
				<ref bean="isotc.northBoundingCoordinateLeaf"/>
127
				<ref bean="isotc.southBoundingCoordinateLeaf"/>
128
				<ref bean="isotc.eastBoundingCoordinateLeaf"/>
129
				<ref bean="isotc.westBoundingCoordinateLeaf"/>
130
			</list>
131
		</property>
132
	</bean>
133
	
134
	<bean id="isotc.northBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
135
		p:name="northBoundingCoordinate"
136
		p:xPath="gmd:northBoundLatitude/gco:Decimal/text()" />
137
		
138
	<bean id="isotc.westBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
139
		p:name="westBoundingCoordinate"
140
		p:xPath="gmd:westBoundLongitude/gco:Decimal/text()" />
141
	
142
	<bean id="isotc.southBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
143
		p:name="southBoundingCoordinate"
144
		p:xPath="gmd:southBoundLatitude/gco:Decimal/text()" />		
145
		
146
	<bean id="isotc.eastBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
147
		p:name="eastBoundingCoordinate"
148
		p:xPath="gmd:eastBoundLongitude/gco:Decimal/text()" />
149
	
150
		
151
	<!-- use the root to calculate different geohash lengths -->
152
	<bean id="isotc.geohash1" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
153
		p:multivalue="true"
154
		p:root-ref="isotc.geohashRoot">
155
		<constructor-arg name="name" value="geohash_1" />
156
		<property name="converter" ref="geohashConverter_1"/>
157
	</bean>
158

    
159
	<bean id="isotc.geohash2" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
160
		p:multivalue="true"
161
		p:root-ref="isotc.geohashRoot">
162
		<constructor-arg name="name" value="geohash_2" />
163
		<property name="converter" ref="geohashConverter_2"/>
164
	</bean>
165
	
166
	<bean id="isotc.geohash3" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
167
		p:multivalue="true"
168
		p:root-ref="isotc.geohashRoot">
169
		<constructor-arg name="name" value="geohash_3" />
170
		<property name="converter" ref="geohashConverter_3"/>
171
	</bean>
172
	
173
	<bean id="isotc.geohash4" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
174
		p:multivalue="true"
175
		p:root-ref="isotc.geohashRoot">
176
		<constructor-arg name="name" value="geohash_4" />
177
		<property name="converter" ref="geohashConverter_4"/>
178
	</bean>
179

    
180
	<bean id="isotc.geohash5" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
181
		p:multivalue="true"
182
		p:root-ref="isotc.geohashRoot">
183
		<constructor-arg name="name" value="geohash_5" />
184
		<property name="converter" ref="geohashConverter_5"/>
185
	</bean>
186
	
187
	<bean id="isotc.geohash6" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
188
		p:multivalue="true"
189
		p:root-ref="isotc.geohashRoot">
190
		<constructor-arg name="name" value="geohash_6" />
191
		<property name="converter" ref="geohashConverter_6"/>
192
	</bean>
193
	
194
	<bean id="isotc.geohash7" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
195
		p:multivalue="true"
196
		p:root-ref="isotc.geohashRoot">
197
		<constructor-arg name="name" value="geohash_7" />
198
		<property name="converter" ref="geohashConverter_7"/>
199
	</bean>	
200

    
201
	<bean id="isotc.geohash8" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
202
		p:multivalue="true"
203
		p:root-ref="isotc.geohashRoot">
204
		<constructor-arg name="name" value="geohash_8" />
205
		<property name="converter" ref="geohashConverter_8"/>
206
	</bean>
207

    
208
	<bean id="isotc.geohash9" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
209
		p:multivalue="true"
210
		p:root-ref="isotc.geohashRoot">
211
		<constructor-arg name="name" value="geohash_9" />
212
		<property name="converter" ref="geohashConverter_9"/>
213
	</bean>
214
		
215
	<bean id="isotc.fileID" class="org.dataone.cn.indexer.parser.ResolveSolrField">
216
		<constructor-arg name="name" value="fileID" />
217
	</bean>
218

    
219
	<bean id="isotc.fullText" class="org.dataone.cn.indexer.parser.FullTextSolrField">
220
		<constructor-arg name="name" value="text" />
221
		<constructor-arg name="xpath" value="//*/text()" />
222
		<property name="combineNodes" value="true"/>
223
	</bean>
224
	
225
	<!-- service fields -->
226
	
227
	<!-- checks for existence of either srv service description or distribution "service" info -->
228
	<bean id="isotc.isService" class="org.dataone.cn.indexer.parser.SolrField">
229
		<constructor-arg name="name" value="isService" />
230
		<constructor-arg name="xpath" value="boolean(//srv:SV_ServiceIdentification or //gmd:distributionInfo/gmd:MD_Distribution)"/>
231
	</bean>
232
	
233
	<!-- combines the srv service title with the distribution "service" info's titles -->
234
	<bean id="isotc.serviceTitle" class="org.dataone.cn.indexer.parser.SolrField">
235
		<constructor-arg name="name" value="serviceTitle" />
236
		<constructor-arg name="xpath" 
237
			value="(//srv:SV_ServiceIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString | //gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:name/gco:CharacterString)/text()" />
238
		<property name="combineNodes" value="true"/>
239
		<property name="combineDelimiter" value=":" />
240
	</bean>
241
	
242
	<!-- combines the srv service description with the distribution "service" info's descriptions -->
243
	<bean id="isotc.serviceDescription" class="org.dataone.cn.indexer.parser.SolrField">
244
		<constructor-arg name="name" value="serviceDescription" />
245
		<constructor-arg name="xpath" 
246
			value="(//srv:SV_ServiceIdentification/gmd:abstract/gco:CharacterString | //gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:description/gco:CharacterString)/text()" />
247
		<property name="combineNodes" value="true"/>
248
		<property name="combineDelimiter" value=":" />
249
	</bean>	
250
	
251
	<bean id="isotc.serviceType" class="org.dataone.cn.indexer.parser.SolrField">
252
		<constructor-arg name="name" value="serviceType" />
253
		<constructor-arg name="xpath" 
254
			value="//srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName/text()"/>
255
		<property name="multivalue" value="true" />
256
		<property name="converter" ref="serviceTypesConverter" />
257
	</bean>
258
	
259
	<bean id="isotc.serviceEndpoint" class="org.dataone.cn.indexer.parser.SolrField">
260
		<constructor-arg name="name" value="serviceEndpoint" />
261
		<constructor-arg name="xpath" 
262
			value="//srv:SV_ServiceIdentification/srv:containsOperations/srv:SV_OperationMetadata/srv:connectPoint/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text()"/>
263
		<property name="multivalue" value="true" />
264
	</bean>	
265

    
266
	<bean id="isotc.serviceInput" class="org.dataone.cn.indexer.parser.SolrField">
267
		<constructor-arg name="name" value="serviceInput" />
268
		<constructor-arg name="xpath" 
269
			value="//srv:SV_ServiceIdentification/srv:operatesOn/@xlink:href"/>
270
		<property name="multivalue" value="true" />
271
	</bean>	
272

    
273
	<bean id="isotc.serviceOutput" class="org.dataone.cn.indexer.parser.SolrField">
274
		<constructor-arg name="name" value="serviceOutput" />
275
		<constructor-arg name="xpath" 
276
			value="//srv:SV_ServiceIdentification/gmd:resourceFormat/@xlink:href"/>
277
		<property name="multivalue" value="true" />
278
	</bean>	
279
	
280
	<!-- loose coupling if srv:SV_CouplingType is loose -->
281
	<!-- tight coupling if srv:SV_CouplingType is tight -->
282
	<!-- tight coupling if distribution service info exists and srv:SV_CouplingType doesn't / is unspecified -->
283
	<!-- empty if neither exists -->
284
	<bean id="isotc.serviceCoupling" class="org.dataone.cn.indexer.parser.SolrField">
285
		<constructor-arg name="name" value="serviceCoupling" />
286
		<constructor-arg name="xpath" 
287
			value="concat(	substring('loose',	1 div boolean(	//srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue = 'loose')),
288
							substring('tight',	1 div boolean(	//srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue = 'tight')),
289
							substring('tight',	1 div boolean(	//gmd:distributionInfo/gmd:MD_Distribution and not(//srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue))),
290
							substring('',		1 div boolean(	not(   //srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue) 
291
																and not(   //gmd:distributionInfo/gmd:MD_Distribution))))"/>
292
	</bean>
293
	
294
	<!-- below fields are multivalue, so will just be added to existing service fields extracted above -->
295
	
296
	<bean id="isotc.distribServiceType" class="org.dataone.cn.indexer.parser.SolrField">
297
		<constructor-arg name="name" value="serviceType" />
298
		<constructor-arg name="xpath" 
299
			value="//gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString/text()"/>
300
		<property name="multivalue" value="true" />
301
		<property name="converter" ref="serviceTypesConverter" />
302
	</bean>
303
	
304
	<bean id="isotc.distribServiceEndpoint" class="org.dataone.cn.indexer.parser.SolrField">
305
		<constructor-arg name="name" value="serviceEndpoint" />
306
		<constructor-arg name="xpath" 
307
			value="//gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text() | //gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text()"/>
308
		<property name="multivalue" value="true" />
309
	</bean>	
310

    
311
	<bean id="isotc.distribServiceInput" class="org.dataone.cn.indexer.parser.SolrField">
312
		<constructor-arg name="name" value="serviceInput" />
313
		<constructor-arg name="xpath" 
314
			value="//gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/@xlink:href"/>
315
		<property name="multivalue" value="true" />
316
	</bean>
317

    
318
	<bean id="isotc.distribServiceOutput" class="org.dataone.cn.indexer.parser.SolrField">
319
		<constructor-arg name="name" value="serviceOutput" />
320
		<constructor-arg name="xpath" 
321
			value="//gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorFormat/gmd:MD_Format/gmd:version/gco:CharacterString/text()"/>
322
		<property name="multivalue" value="true" />
323
	</bean>	
324
	
325
</beans>
(8-8/20)