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
|
<bean id="isotc.origin" class="org.dataone.cn.indexer.parser.SolrField">
|
50
|
<constructor-arg name="name" value="origin" />
|
51
|
<constructor-arg name="xpath"
|
52
|
value='//gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text() | //gmd:CI_ResponsibleParty/gmd:individualName/gmx:Anchor/text() | //gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()' />
|
53
|
<property name="multivalue" value="true" />
|
54
|
<property name="dedupe" value="true" />
|
55
|
</bean>
|
56
|
|
57
|
<bean id="isotc.pubDate" class="org.dataone.cn.indexer.parser.SolrField">
|
58
|
<constructor-arg name="name" value="pubDate" />
|
59
|
<constructor-arg name="xpath"
|
60
|
value="(//gmd:dateStamp/gco:Date/text() | //gmd:dateStamp/gco:DateTime/text())[1]" />
|
61
|
<property name="converter" ref="dateConverter" />
|
62
|
</bean>
|
63
|
|
64
|
<bean id="isotc.beginDate" class="org.dataone.cn.indexer.parser.SolrField">
|
65
|
<constructor-arg name="name" value="beginDate" />
|
66
|
<constructor-arg name="xpath"
|
67
|
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()" />
|
68
|
<property name="converter" ref="dateConverter" />
|
69
|
</bean>
|
70
|
|
71
|
<bean id="isotc.endDate" class="org.dataone.cn.indexer.parser.SolrField">
|
72
|
<constructor-arg name="name" value="endDate" />
|
73
|
<constructor-arg name="xpath"
|
74
|
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()" />
|
75
|
<property name="converter" ref="dateConverter" />
|
76
|
</bean>
|
77
|
|
78
|
<bean id="isotc.title" class="org.dataone.cn.indexer.parser.SolrField">
|
79
|
<constructor-arg name="name" value="title" />
|
80
|
<constructor-arg name="xpath"
|
81
|
value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString/text()" />
|
82
|
</bean>
|
83
|
|
84
|
<bean id="isotc.keywords" class="org.dataone.cn.indexer.parser.SolrField">
|
85
|
<constructor-arg name="name" value="keywords" />
|
86
|
<constructor-arg name="xpath"
|
87
|
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()" />
|
88
|
<property name="multivalue" value="true" />
|
89
|
</bean>
|
90
|
|
91
|
<bean id="isotc.eastBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
|
92
|
<constructor-arg name="name" value="eastBoundCoord" />
|
93
|
<constructor-arg name="xpath"
|
94
|
value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal/text()" />
|
95
|
</bean>
|
96
|
|
97
|
<bean id="isotc.westBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
|
98
|
<constructor-arg name="name" value="westBoundCoord" />
|
99
|
<constructor-arg name="xpath"
|
100
|
value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal/text()" />
|
101
|
</bean>
|
102
|
|
103
|
<bean id="isotc.southBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
|
104
|
<constructor-arg name="name" value="southBoundCoord" />
|
105
|
<constructor-arg name="xpath"
|
106
|
value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal/text()" />
|
107
|
</bean>
|
108
|
|
109
|
<bean id="isotc.northBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
|
110
|
<constructor-arg name="name" value="northBoundCoord" />
|
111
|
<constructor-arg name="xpath"
|
112
|
value="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal/text()" />
|
113
|
</bean>
|
114
|
|
115
|
<!-- define the root and leafs for accessing multiple bounding coordinates for geohash -->
|
116
|
<bean id="isotc.geohashRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
|
117
|
p:name="geohashRoot"
|
118
|
p:xPath="//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox"
|
119
|
p:template="[northBoundingCoordinate] [southBoundingCoordinate] [eastBoundingCoordinate] [westBoundingCoordinate]">
|
120
|
<property name="leafs">
|
121
|
<list>
|
122
|
<ref bean="isotc.northBoundingCoordinateLeaf"/>
|
123
|
<ref bean="isotc.southBoundingCoordinateLeaf"/>
|
124
|
<ref bean="isotc.eastBoundingCoordinateLeaf"/>
|
125
|
<ref bean="isotc.westBoundingCoordinateLeaf"/>
|
126
|
</list>
|
127
|
</property>
|
128
|
</bean>
|
129
|
|
130
|
<bean id="isotc.northBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
|
131
|
p:name="northBoundingCoordinate"
|
132
|
p:xPath="gmd:northBoundLatitude/gco:Decimal/text()" />
|
133
|
|
134
|
<bean id="isotc.westBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
|
135
|
p:name="westBoundingCoordinate"
|
136
|
p:xPath="gmd:westBoundLongitude/gco:Decimal/text()" />
|
137
|
|
138
|
<bean id="isotc.southBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
|
139
|
p:name="southBoundingCoordinate"
|
140
|
p:xPath="gmd:southBoundLatitude/gco:Decimal/text()" />
|
141
|
|
142
|
<bean id="isotc.eastBoundingCoordinateLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
|
143
|
p:name="eastBoundingCoordinate"
|
144
|
p:xPath="gmd:eastBoundLongitude/gco:Decimal/text()" />
|
145
|
|
146
|
|
147
|
<!-- use the root to calculate different geohash lengths -->
|
148
|
<bean id="isotc.geohash1" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
149
|
p:multivalue="true"
|
150
|
p:root-ref="isotc.geohashRoot">
|
151
|
<constructor-arg name="name" value="geohash_1" />
|
152
|
<property name="converter" ref="geohashConverter_1"/>
|
153
|
</bean>
|
154
|
|
155
|
<bean id="isotc.geohash2" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
156
|
p:multivalue="true"
|
157
|
p:root-ref="isotc.geohashRoot">
|
158
|
<constructor-arg name="name" value="geohash_2" />
|
159
|
<property name="converter" ref="geohashConverter_2"/>
|
160
|
</bean>
|
161
|
|
162
|
<bean id="isotc.geohash3" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
163
|
p:multivalue="true"
|
164
|
p:root-ref="isotc.geohashRoot">
|
165
|
<constructor-arg name="name" value="geohash_3" />
|
166
|
<property name="converter" ref="geohashConverter_3"/>
|
167
|
</bean>
|
168
|
|
169
|
<bean id="isotc.geohash4" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
170
|
p:multivalue="true"
|
171
|
p:root-ref="isotc.geohashRoot">
|
172
|
<constructor-arg name="name" value="geohash_4" />
|
173
|
<property name="converter" ref="geohashConverter_4"/>
|
174
|
</bean>
|
175
|
|
176
|
<bean id="isotc.geohash5" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
177
|
p:multivalue="true"
|
178
|
p:root-ref="isotc.geohashRoot">
|
179
|
<constructor-arg name="name" value="geohash_5" />
|
180
|
<property name="converter" ref="geohashConverter_5"/>
|
181
|
</bean>
|
182
|
|
183
|
<bean id="isotc.geohash6" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
184
|
p:multivalue="true"
|
185
|
p:root-ref="isotc.geohashRoot">
|
186
|
<constructor-arg name="name" value="geohash_6" />
|
187
|
<property name="converter" ref="geohashConverter_6"/>
|
188
|
</bean>
|
189
|
|
190
|
<bean id="isotc.geohash7" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
191
|
p:multivalue="true"
|
192
|
p:root-ref="isotc.geohashRoot">
|
193
|
<constructor-arg name="name" value="geohash_7" />
|
194
|
<property name="converter" ref="geohashConverter_7"/>
|
195
|
</bean>
|
196
|
|
197
|
<bean id="isotc.geohash8" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
198
|
p:multivalue="true"
|
199
|
p:root-ref="isotc.geohashRoot">
|
200
|
<constructor-arg name="name" value="geohash_8" />
|
201
|
<property name="converter" ref="geohashConverter_8"/>
|
202
|
</bean>
|
203
|
|
204
|
<bean id="isotc.geohash9" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
|
205
|
p:multivalue="true"
|
206
|
p:root-ref="isotc.geohashRoot">
|
207
|
<constructor-arg name="name" value="geohash_9" />
|
208
|
<property name="converter" ref="geohashConverter_9"/>
|
209
|
</bean>
|
210
|
|
211
|
<bean id="isotc.fileID" class="org.dataone.cn.indexer.parser.ResolveSolrField">
|
212
|
<constructor-arg name="name" value="fileID" />
|
213
|
</bean>
|
214
|
|
215
|
<bean id="isotc.fullText" class="org.dataone.cn.indexer.parser.FullTextSolrField">
|
216
|
<constructor-arg name="name" value="text" />
|
217
|
<constructor-arg name="xpath" value="//*/text()" />
|
218
|
<property name="combineNodes" value="true"/>
|
219
|
</bean>
|
220
|
|
221
|
<!-- service fields -->
|
222
|
|
223
|
<!-- checks for existence of either srv service description or distribution "service" info -->
|
224
|
<bean id="isotc.isService" class="org.dataone.cn.indexer.parser.SolrField">
|
225
|
<constructor-arg name="name" value="isService" />
|
226
|
<constructor-arg name="xpath" value="boolean(//srv:SV_ServiceIdentification or //gmd:distributionInfo/gmd:MD_Distribution)"/>
|
227
|
</bean>
|
228
|
|
229
|
<!-- combines the srv service title with the distribution "service" info's titles -->
|
230
|
<bean id="isotc.serviceTitle" class="org.dataone.cn.indexer.parser.SolrField">
|
231
|
<constructor-arg name="name" value="serviceTitle" />
|
232
|
<constructor-arg name="xpath"
|
233
|
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()" />
|
234
|
<property name="combineNodes" value="true"/>
|
235
|
<property name="combineDelimiter" value=":" />
|
236
|
</bean>
|
237
|
|
238
|
<!-- combines the srv service description with the distribution "service" info's descriptions -->
|
239
|
<bean id="isotc.serviceDescription" class="org.dataone.cn.indexer.parser.SolrField">
|
240
|
<constructor-arg name="name" value="serviceDescription" />
|
241
|
<constructor-arg name="xpath"
|
242
|
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()" />
|
243
|
<property name="combineNodes" value="true"/>
|
244
|
<property name="combineDelimiter" value=":" />
|
245
|
</bean>
|
246
|
|
247
|
<bean id="isotc.serviceType" class="org.dataone.cn.indexer.parser.SolrField">
|
248
|
<constructor-arg name="name" value="serviceType" />
|
249
|
<constructor-arg name="xpath"
|
250
|
value="//srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName/text()"/>
|
251
|
<property name="multivalue" value="true" />
|
252
|
<property name="converter" ref="serviceTypesConverter" />
|
253
|
</bean>
|
254
|
|
255
|
<bean id="isotc.serviceEndpoint" class="org.dataone.cn.indexer.parser.SolrField">
|
256
|
<constructor-arg name="name" value="serviceEndpoint" />
|
257
|
<constructor-arg name="xpath"
|
258
|
value="//srv:SV_ServiceIdentification/srv:containsOperations/srv:SV_OperationMetadata/srv:connectPoint/gmd:CI_OnlineResource/gmd:linkage/gmd:URL/text()"/>
|
259
|
<property name="multivalue" value="true" />
|
260
|
</bean>
|
261
|
|
262
|
<bean id="isotc.serviceInput" class="org.dataone.cn.indexer.parser.SolrField">
|
263
|
<constructor-arg name="name" value="serviceInput" />
|
264
|
<constructor-arg name="xpath"
|
265
|
value="//srv:SV_ServiceIdentification/srv:operatesOn/@xlink:href"/>
|
266
|
<property name="multivalue" value="true" />
|
267
|
</bean>
|
268
|
|
269
|
<bean id="isotc.serviceOutput" class="org.dataone.cn.indexer.parser.SolrField">
|
270
|
<constructor-arg name="name" value="serviceOutput" />
|
271
|
<constructor-arg name="xpath"
|
272
|
value="//srv:SV_ServiceIdentification/gmd:resourceFormat/@xlink:href"/>
|
273
|
<property name="multivalue" value="true" />
|
274
|
</bean>
|
275
|
|
276
|
<!-- loose coupling if srv:SV_CouplingType is loose -->
|
277
|
<!-- tight coupling if srv:SV_CouplingType is tight -->
|
278
|
<!-- tight coupling if distribution service info exists and srv:SV_CouplingType doesn't / is unspecified -->
|
279
|
<!-- empty if neither exists -->
|
280
|
<bean id="isotc.serviceCoupling" class="org.dataone.cn.indexer.parser.SolrField">
|
281
|
<constructor-arg name="name" value="serviceCoupling" />
|
282
|
<constructor-arg name="xpath"
|
283
|
value="concat( substring('loose', 1 div boolean( //srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue = 'loose')),
|
284
|
substring('tight', 1 div boolean( //srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue = 'tight')),
|
285
|
substring('tight', 1 div boolean( //gmd:distributionInfo/gmd:MD_Distribution and not(//srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue))),
|
286
|
substring('', 1 div boolean( not( //srv:SV_ServiceIdentification/srv:couplingType/srv:SV_CouplingType/@codeListValue)
|
287
|
and not( //gmd:distributionInfo/gmd:MD_Distribution))))"/>
|
288
|
</bean>
|
289
|
|
290
|
<!-- below fields are multivalue, so will just be added to existing service fields extracted above -->
|
291
|
|
292
|
<bean id="isotc.distribServiceType" class="org.dataone.cn.indexer.parser.SolrField">
|
293
|
<constructor-arg name="name" value="serviceType" />
|
294
|
<constructor-arg name="xpath"
|
295
|
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()"/>
|
296
|
<property name="multivalue" value="true" />
|
297
|
<property name="converter" ref="serviceTypesConverter" />
|
298
|
</bean>
|
299
|
|
300
|
<bean id="isotc.distribServiceEndpoint" class="org.dataone.cn.indexer.parser.SolrField">
|
301
|
<constructor-arg name="name" value="serviceEndpoint" />
|
302
|
<constructor-arg name="xpath"
|
303
|
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()"/>
|
304
|
<property name="multivalue" value="true" />
|
305
|
</bean>
|
306
|
|
307
|
<bean id="isotc.distribServiceInput" class="org.dataone.cn.indexer.parser.SolrField">
|
308
|
<constructor-arg name="name" value="serviceInput" />
|
309
|
<constructor-arg name="xpath"
|
310
|
value="//gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorTransferOptions/@xlink:href"/>
|
311
|
<property name="multivalue" value="true" />
|
312
|
</bean>
|
313
|
|
314
|
<bean id="isotc.distribServiceOutput" class="org.dataone.cn.indexer.parser.SolrField">
|
315
|
<constructor-arg name="name" value="serviceOutput" />
|
316
|
<constructor-arg name="xpath"
|
317
|
value="//gmd:distributionInfo/gmd:MD_Distribution/gmd:distributor/gmd:MD_Distributor/gmd:distributorFormat/gmd:MD_Format/gmd:version/gco:CharacterString/text()"/>
|
318
|
<property name="multivalue" value="true" />
|
319
|
</bean>
|
320
|
|
321
|
</beans>
|