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