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 10142 leinfelder
				<ref bean="mdq.metadata.rightsHolder" />
23
				<ref bean="mdq.metadata.group" />
24 10065 leinfelder
				<ref bean="mdq.score.green" />
25
				<ref bean="mdq.score.orange" />
26
				<ref bean="mdq.score.red" />
27
				<ref bean="mdq.score.blue" />
28
				<ref bean="mdq.score.total" />
29
				<ref bean="mdq.score.identification" />
30
				<ref bean="mdq.score.interpretation" />
31
				<ref bean="mdq.score.discovery" />
32
				<ref bean="mdq.score.other" />
33 10093 leinfelder
				<ref bean="mdq.score.composite" />
34 10063 leinfelder
			</list>
35
		</property>
36
	</bean>
37
38
	<bean id="mdq.objectIdentifier" class="org.dataone.cn.indexer.parser.SolrField">
39
		<constructor-arg name="name" value="mdq_objectIdentifier_s" />
40
		<constructor-arg name="xpath"
41 10092 leinfelder
			value="//objectIdentifier" />
42 10063 leinfelder
		<property name="multivalue" value="false" />
43
	</bean>
44
45
	<bean id="mdq.suiteId" class="org.dataone.cn.indexer.parser.SolrField">
46
		<constructor-arg name="name" value="mdq_suiteId_s" />
47
		<constructor-arg name="xpath"
48 10092 leinfelder
			value="//suiteId" />
49 10063 leinfelder
		<property name="multivalue" value="false" />
50
	</bean>
51
52
	<bean id="mdq.timestamp" class="org.dataone.cn.indexer.parser.SolrField">
53
		<constructor-arg name="name" value="mdq_timestamp_dt" />
54
		<constructor-arg name="xpath"
55 10092 leinfelder
			value="//timestamp" />
56 10063 leinfelder
		<property name="multivalue" value="false" />
57 10064 leinfelder
		<property name="converter" ref="dateConverter" />
58 10063 leinfelder
	</bean>
59
60
	<bean id="mdq.metadata.formatId" class="org.dataone.cn.indexer.parser.SolrField">
61
		<constructor-arg name="name" value="mdq_metadata_formatId_s" />
62
		<constructor-arg name="xpath"
63 10148 leinfelder
			value="//result[check/id[text() = 'check.echo.formatId.1']]/output/text()" />
64 10063 leinfelder
		<property name="multivalue" value="false" />
65
	</bean>
66
67
	<bean id="mdq.metadata.datasource" class="org.dataone.cn.indexer.parser.SolrField">
68
		<constructor-arg name="name" value="mdq_metadata_datasource_s" />
69
		<constructor-arg name="xpath"
70 10148 leinfelder
			value="//result[check/id[text() = 'check.echo.datasource.1']]/output/text()" />
71 10063 leinfelder
		<property name="multivalue" value="false" />
72
	</bean>
73
74
	<bean id="mdq.metadata.funder" class="org.dataone.cn.indexer.parser.SolrField">
75 10126 leinfelder
		<constructor-arg name="name" value="mdq_metadata_funder_sm" />
76 10063 leinfelder
		<constructor-arg name="xpath"
77 10126 leinfelder
			value="//result[check/id[text() = 'check.echo.funder.1']]/output/text()" />
78
		<property name="multivalue" value="true" />
79
		<property name="dedupe" value="true" />
80 10063 leinfelder
	</bean>
81
82
	<bean id="mdq.metadata.rightsHolder" class="org.dataone.cn.indexer.parser.SolrField">
83
		<constructor-arg name="name" value="mdq_metadata_rightsHolder_s" />
84
		<constructor-arg name="xpath"
85 10148 leinfelder
			value="//result[check/id[text() = 'check.echo.rightsHolder.1']]/output/text()" />
86 10063 leinfelder
		<property name="multivalue" value="false" />
87
	</bean>
88
89 10142 leinfelder
	<bean id="mdq.metadata.group" class="org.dataone.cn.indexer.parser.SolrField">
90
		<constructor-arg name="name" value="mdq_metadata_group_sm" />
91
		<constructor-arg name="xpath"
92
			value="//result[check/id[text() = 'check.lookup.group.1']]/output/text()" />
93
		<property name="multivalue" value="true" />
94
		<property name="dedupe" value="true" />
95
	</bean>
96
97 10065 leinfelder
	<!-- scoring by result status -->
98
	<bean id="mdq.score.green" class="org.dataone.cn.indexer.parser.SolrField">
99 10063 leinfelder
		<constructor-arg name="name" value="mdq_green_i" />
100
		<constructor-arg name="xpath"
101 10066 leinfelder
			value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS'])" />
102 10063 leinfelder
		<property name="multivalue" value="false" />
103
	</bean>
104 10065 leinfelder
	<bean id="mdq.score.orange" class="org.dataone.cn.indexer.parser.SolrField">
105 10063 leinfelder
		<constructor-arg name="name" value="mdq_orange_i" />
106
		<constructor-arg name="xpath"
107 10066 leinfelder
			value="count( //result[check/level[text() != 'INFO']]/status[text() = 'ERROR'] | //result[check/level[text() = 'OPTIONAL']]/status[text() = 'FAILURE'])" />
108 10063 leinfelder
		<property name="multivalue" value="false" />
109
	</bean>
110 10065 leinfelder
	<bean id="mdq.score.red" class="org.dataone.cn.indexer.parser.SolrField">
111 10063 leinfelder
		<constructor-arg name="name" value="mdq_red_i" />
112
		<constructor-arg name="xpath"
113
			value="count(//result[check/level[text() = 'REQUIRED']]/status[text() = 'FAILURE'])" />
114
		<property name="multivalue" value="false" />
115
	</bean>
116 10065 leinfelder
	<bean id="mdq.score.blue" class="org.dataone.cn.indexer.parser.SolrField">
117 10063 leinfelder
		<constructor-arg name="name" value="mdq_blue_i" />
118
		<constructor-arg name="xpath"
119 10066 leinfelder
			value="count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']])" />
120 10063 leinfelder
		<property name="multivalue" value="false" />
121
	</bean>
122
123 10093 leinfelder
	<!-- the composite score -->
124
	<bean id="mdq.score.composite" class="org.dataone.cn.indexer.parser.SolrField">
125
		<constructor-arg name="name" value="mdq_composite_d" />
126
		<constructor-arg name="xpath"
127
			value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS']) div (count(//result) - count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']]))" />
128
		<property name="multivalue" value="false" />
129
	</bean>
130
131 10065 leinfelder
	<!-- scoring by check.type -->
132
	<bean id="mdq.score.identification" class="org.dataone.cn.indexer.parser.SolrField">
133
		<constructor-arg name="name" value="mdq_identification_d" />
134
		<constructor-arg name="xpath"
135 10066 leinfelder
			value="count(//result[check/type[text() = 'identification']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'identification']])" />
136 10065 leinfelder
		<property name="multivalue" value="false" />
137
	</bean>
138
	<bean id="mdq.score.interpretation" class="org.dataone.cn.indexer.parser.SolrField">
139
		<constructor-arg name="name" value="mdq_interpretation_d" />
140
		<constructor-arg name="xpath"
141 10066 leinfelder
			value="count(//result[check/type[text() = 'interpretation']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'interpretation']])" />
142 10065 leinfelder
		<property name="multivalue" value="false" />
143
	</bean>
144
	<bean id="mdq.score.discovery" class="org.dataone.cn.indexer.parser.SolrField">
145
		<constructor-arg name="name" value="mdq_discovery_d" />
146
		<constructor-arg name="xpath"
147 10066 leinfelder
			value="count(//result[check/type[text() = 'discovery']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'discovery']])" />
148 10065 leinfelder
		<property name="multivalue" value="false" />
149
	</bean>
150
	<bean id="mdq.score.other" class="org.dataone.cn.indexer.parser.SolrField">
151
		<constructor-arg name="name" value="mdq_other_d" />
152
		<constructor-arg name="xpath"
153 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']])" />
154 10065 leinfelder
		<property name="multivalue" value="false" />
155
	</bean>
156
157
	<bean id="mdq.score.total" class="org.dataone.cn.indexer.parser.SolrField">
158 10063 leinfelder
		<constructor-arg name="name" value="mdq_total_i" />
159
		<constructor-arg name="xpath"
160
			value="count(//result)" />
161
		<property name="multivalue" value="false" />
162
	</bean>
163
164
</beans>