Project

General

Profile

1 10063 leinfelder
<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 10070 leinfelder
				<value>https://nceas.ucsb.edu/mdqe/v1#run</value>
12 10063 leinfelder
			</list>
13
		</property>
14
		<property name="fieldList">
15
			<list>
16
				<ref bean="mdq.objectIdentifier" />
17
				<ref bean="mdq.suiteId" />
18 10064 leinfelder
				<ref bean="mdq.timestamp" />
19 10063 leinfelder
				<ref bean="mdq.metadata.formatId" />
20
				<ref bean="mdq.metadata.datasource" />
21
				<ref bean="mdq.metadata.funder" />
22 10171 leinfelder
				<ref bean="mdq.metadata.funder.lookup" />
23 10142 leinfelder
				<ref bean="mdq.metadata.rightsHolder" />
24
				<ref bean="mdq.metadata.group" />
25 10065 leinfelder
				<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 10093 leinfelder
				<ref bean="mdq.score.composite" />
35 10063 leinfelder
			</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 10092 leinfelder
			value="//objectIdentifier" />
43 10063 leinfelder
		<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 10092 leinfelder
			value="//suiteId" />
50 10063 leinfelder
		<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 10092 leinfelder
			value="//timestamp" />
57 10063 leinfelder
		<property name="multivalue" value="false" />
58 10064 leinfelder
		<property name="converter" ref="dateConverter" />
59 10063 leinfelder
	</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 10148 leinfelder
			value="//result[check/id[text() = 'check.echo.formatId.1']]/output/text()" />
65 10063 leinfelder
		<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 10148 leinfelder
			value="//result[check/id[text() = 'check.echo.datasource.1']]/output/text()" />
72 10063 leinfelder
		<property name="multivalue" value="false" />
73
	</bean>
74
75
	<bean id="mdq.metadata.funder" class="org.dataone.cn.indexer.parser.SolrField">
76 10126 leinfelder
		<constructor-arg name="name" value="mdq_metadata_funder_sm" />
77 10063 leinfelder
		<constructor-arg name="xpath"
78 10126 leinfelder
			value="//result[check/id[text() = 'check.echo.funder.1']]/output/text()" />
79
		<property name="multivalue" value="true" />
80
		<property name="dedupe" value="true" />
81 10063 leinfelder
	</bean>
82
83 10171 leinfelder
	<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 10063 leinfelder
	<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 10148 leinfelder
			value="//result[check/id[text() = 'check.echo.rightsHolder.1']]/output/text()" />
95 10063 leinfelder
		<property name="multivalue" value="false" />
96
	</bean>
97
98 10142 leinfelder
	<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 10065 leinfelder
	<!-- scoring by result status -->
107
	<bean id="mdq.score.green" class="org.dataone.cn.indexer.parser.SolrField">
108 10063 leinfelder
		<constructor-arg name="name" value="mdq_green_i" />
109
		<constructor-arg name="xpath"
110 10066 leinfelder
			value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS'])" />
111 10063 leinfelder
		<property name="multivalue" value="false" />
112
	</bean>
113 10065 leinfelder
	<bean id="mdq.score.orange" class="org.dataone.cn.indexer.parser.SolrField">
114 10063 leinfelder
		<constructor-arg name="name" value="mdq_orange_i" />
115
		<constructor-arg name="xpath"
116 10066 leinfelder
			value="count( //result[check/level[text() != 'INFO']]/status[text() = 'ERROR'] | //result[check/level[text() = 'OPTIONAL']]/status[text() = 'FAILURE'])" />
117 10063 leinfelder
		<property name="multivalue" value="false" />
118
	</bean>
119 10065 leinfelder
	<bean id="mdq.score.red" class="org.dataone.cn.indexer.parser.SolrField">
120 10063 leinfelder
		<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 10065 leinfelder
	<bean id="mdq.score.blue" class="org.dataone.cn.indexer.parser.SolrField">
126 10063 leinfelder
		<constructor-arg name="name" value="mdq_blue_i" />
127
		<constructor-arg name="xpath"
128 10066 leinfelder
			value="count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']])" />
129 10063 leinfelder
		<property name="multivalue" value="false" />
130
	</bean>
131
132 10093 leinfelder
	<!-- 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 10065 leinfelder
	<!-- 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 10066 leinfelder
			value="count(//result[check/type[text() = 'identification']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'identification']])" />
145 10065 leinfelder
		<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 10066 leinfelder
			value="count(//result[check/type[text() = 'interpretation']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'interpretation']])" />
151 10065 leinfelder
		<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 10066 leinfelder
			value="count(//result[check/type[text() = 'discovery']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'discovery']])" />
157 10065 leinfelder
		<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 10066 leinfelder
			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 10065 leinfelder
		<property name="multivalue" value="false" />
164
	</bean>
165
166
	<bean id="mdq.score.total" class="org.dataone.cn.indexer.parser.SolrField">
167 10063 leinfelder
		<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>