1
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
2
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3
|
xmlns:p="http://www.springframework.org/schema/p"
|
4
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
5
|
|
6
|
<bean id="mdqSubprocessor" class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
|
7
|
|
8
|
<!-- match MDQ documents -->
|
9
|
<property name="matchDocuments">
|
10
|
<list>
|
11
|
<value>https://nceas.ucsb.edu/mdqe/v1#run</value>
|
12
|
</list>
|
13
|
</property>
|
14
|
<property name="fieldList">
|
15
|
<list>
|
16
|
<ref bean="mdq.objectIdentifier" />
|
17
|
<ref bean="mdq.suiteId" />
|
18
|
<ref bean="mdq.timestamp" />
|
19
|
<ref bean="mdq.metadata.formatId" />
|
20
|
<ref bean="mdq.metadata.datasource" />
|
21
|
<ref bean="mdq.metadata.funder" />
|
22
|
<ref bean="mdq.metadata.funder.lookup" />
|
23
|
<ref bean="mdq.metadata.rightsHolder" />
|
24
|
<ref bean="mdq.metadata.group" />
|
25
|
<ref bean="mdq.score.green" />
|
26
|
<ref bean="mdq.score.orange" />
|
27
|
<ref bean="mdq.score.red" />
|
28
|
<ref bean="mdq.score.blue" />
|
29
|
<ref bean="mdq.score.total" />
|
30
|
<ref bean="mdq.score.identification" />
|
31
|
<ref bean="mdq.score.interpretation" />
|
32
|
<ref bean="mdq.score.discovery" />
|
33
|
<ref bean="mdq.score.other" />
|
34
|
<ref bean="mdq.score.composite" />
|
35
|
</list>
|
36
|
</property>
|
37
|
</bean>
|
38
|
|
39
|
<bean id="mdq.objectIdentifier" class="org.dataone.cn.indexer.parser.SolrField">
|
40
|
<constructor-arg name="name" value="mdq_objectIdentifier_s" />
|
41
|
<constructor-arg name="xpath"
|
42
|
value="//objectIdentifier" />
|
43
|
<property name="multivalue" value="false" />
|
44
|
</bean>
|
45
|
|
46
|
<bean id="mdq.suiteId" class="org.dataone.cn.indexer.parser.SolrField">
|
47
|
<constructor-arg name="name" value="mdq_suiteId_s" />
|
48
|
<constructor-arg name="xpath"
|
49
|
value="//suiteId" />
|
50
|
<property name="multivalue" value="false" />
|
51
|
</bean>
|
52
|
|
53
|
<bean id="mdq.timestamp" class="org.dataone.cn.indexer.parser.SolrField">
|
54
|
<constructor-arg name="name" value="mdq_timestamp_dt" />
|
55
|
<constructor-arg name="xpath"
|
56
|
value="//timestamp" />
|
57
|
<property name="multivalue" value="false" />
|
58
|
<property name="converter" ref="dateConverter" />
|
59
|
</bean>
|
60
|
|
61
|
<bean id="mdq.metadata.formatId" class="org.dataone.cn.indexer.parser.SolrField">
|
62
|
<constructor-arg name="name" value="mdq_metadata_formatId_s" />
|
63
|
<constructor-arg name="xpath"
|
64
|
value="//result[check/id[text() = 'check.echo.formatId.1']]/output/text()" />
|
65
|
<property name="multivalue" value="false" />
|
66
|
</bean>
|
67
|
|
68
|
<bean id="mdq.metadata.datasource" class="org.dataone.cn.indexer.parser.SolrField">
|
69
|
<constructor-arg name="name" value="mdq_metadata_datasource_s" />
|
70
|
<constructor-arg name="xpath"
|
71
|
value="//result[check/id[text() = 'check.echo.datasource.1']]/output/text()" />
|
72
|
<property name="multivalue" value="false" />
|
73
|
</bean>
|
74
|
|
75
|
<bean id="mdq.metadata.funder" class="org.dataone.cn.indexer.parser.SolrField">
|
76
|
<constructor-arg name="name" value="mdq_metadata_funder_sm" />
|
77
|
<constructor-arg name="xpath"
|
78
|
value="//result[check/id[text() = 'check.echo.funder.1']]/output/text()" />
|
79
|
<property name="multivalue" value="true" />
|
80
|
<property name="dedupe" value="true" />
|
81
|
</bean>
|
82
|
|
83
|
<bean id="mdq.metadata.funder.lookup" class="org.dataone.cn.indexer.parser.SolrField">
|
84
|
<constructor-arg name="name" value="mdq_metadata_funder_lookup_sm" />
|
85
|
<constructor-arg name="xpath"
|
86
|
value="//result[check/id[text() = 'check.lookup.funder.1']]/output/text()" />
|
87
|
<property name="multivalue" value="true" />
|
88
|
<property name="dedupe" value="true" />
|
89
|
</bean>
|
90
|
|
91
|
<bean id="mdq.metadata.rightsHolder" class="org.dataone.cn.indexer.parser.SolrField">
|
92
|
<constructor-arg name="name" value="mdq_metadata_rightsHolder_s" />
|
93
|
<constructor-arg name="xpath"
|
94
|
value="//result[check/id[text() = 'check.echo.rightsHolder.1']]/output/text()" />
|
95
|
<property name="multivalue" value="false" />
|
96
|
</bean>
|
97
|
|
98
|
<bean id="mdq.metadata.group" class="org.dataone.cn.indexer.parser.SolrField">
|
99
|
<constructor-arg name="name" value="mdq_metadata_group_sm" />
|
100
|
<constructor-arg name="xpath"
|
101
|
value="//result[check/id[text() = 'check.lookup.group.1']]/output/text()" />
|
102
|
<property name="multivalue" value="true" />
|
103
|
<property name="dedupe" value="true" />
|
104
|
</bean>
|
105
|
|
106
|
<!-- scoring by result status -->
|
107
|
<bean id="mdq.score.green" class="org.dataone.cn.indexer.parser.SolrField">
|
108
|
<constructor-arg name="name" value="mdq_green_i" />
|
109
|
<constructor-arg name="xpath"
|
110
|
value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS'])" />
|
111
|
<property name="multivalue" value="false" />
|
112
|
</bean>
|
113
|
<bean id="mdq.score.orange" class="org.dataone.cn.indexer.parser.SolrField">
|
114
|
<constructor-arg name="name" value="mdq_orange_i" />
|
115
|
<constructor-arg name="xpath"
|
116
|
value="count( //result[check/level[text() != 'INFO']]/status[text() = 'ERROR'] | //result[check/level[text() = 'OPTIONAL']]/status[text() = 'FAILURE'])" />
|
117
|
<property name="multivalue" value="false" />
|
118
|
</bean>
|
119
|
<bean id="mdq.score.red" class="org.dataone.cn.indexer.parser.SolrField">
|
120
|
<constructor-arg name="name" value="mdq_red_i" />
|
121
|
<constructor-arg name="xpath"
|
122
|
value="count(//result[check/level[text() = 'REQUIRED']]/status[text() = 'FAILURE'])" />
|
123
|
<property name="multivalue" value="false" />
|
124
|
</bean>
|
125
|
<bean id="mdq.score.blue" class="org.dataone.cn.indexer.parser.SolrField">
|
126
|
<constructor-arg name="name" value="mdq_blue_i" />
|
127
|
<constructor-arg name="xpath"
|
128
|
value="count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']])" />
|
129
|
<property name="multivalue" value="false" />
|
130
|
</bean>
|
131
|
|
132
|
<!-- the composite score -->
|
133
|
<bean id="mdq.score.composite" class="org.dataone.cn.indexer.parser.SolrField">
|
134
|
<constructor-arg name="name" value="mdq_composite_d" />
|
135
|
<constructor-arg name="xpath"
|
136
|
value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS']) div (count(//result) - count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']]))" />
|
137
|
<property name="multivalue" value="false" />
|
138
|
</bean>
|
139
|
|
140
|
<!-- scoring by check.type -->
|
141
|
<bean id="mdq.score.identification" class="org.dataone.cn.indexer.parser.SolrField">
|
142
|
<constructor-arg name="name" value="mdq_identification_d" />
|
143
|
<constructor-arg name="xpath"
|
144
|
value="count(//result[check/type[text() = 'identification']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'identification']])" />
|
145
|
<property name="multivalue" value="false" />
|
146
|
</bean>
|
147
|
<bean id="mdq.score.interpretation" class="org.dataone.cn.indexer.parser.SolrField">
|
148
|
<constructor-arg name="name" value="mdq_interpretation_d" />
|
149
|
<constructor-arg name="xpath"
|
150
|
value="count(//result[check/type[text() = 'interpretation']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'interpretation']])" />
|
151
|
<property name="multivalue" value="false" />
|
152
|
</bean>
|
153
|
<bean id="mdq.score.discovery" class="org.dataone.cn.indexer.parser.SolrField">
|
154
|
<constructor-arg name="name" value="mdq_discovery_d" />
|
155
|
<constructor-arg name="xpath"
|
156
|
value="count(//result[check/type[text() = 'discovery']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'discovery']])" />
|
157
|
<property name="multivalue" value="false" />
|
158
|
</bean>
|
159
|
<bean id="mdq.score.other" class="org.dataone.cn.indexer.parser.SolrField">
|
160
|
<constructor-arg name="name" value="mdq_other_d" />
|
161
|
<constructor-arg name="xpath"
|
162
|
value="count(//result[check/type[text() != 'identification' and text() != 'interpretation' and text() != 'discovery']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() != 'identification' and text() != 'interpretation' and text() != 'discovery']])" />
|
163
|
<property name="multivalue" value="false" />
|
164
|
</bean>
|
165
|
|
166
|
<bean id="mdq.score.total" class="org.dataone.cn.indexer.parser.SolrField">
|
167
|
<constructor-arg name="name" value="mdq_total_i" />
|
168
|
<constructor-arg name="xpath"
|
169
|
value="count(//result)" />
|
170
|
<property name="multivalue" value="false" />
|
171
|
</bean>
|
172
|
|
173
|
</beans>
|