Project

General

Profile

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.rightsHolder" />				
23
				<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
				<ref bean="mdq.score.composite" />
33
			</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
			value="//objectIdentifier" />
41
		<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
			value="//suiteId" />
48
		<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
			value="//timestamp" />
55
		<property name="multivalue" value="false" />
56
		<property name="converter" ref="dateConverter" />
57
	</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
			value="//metadata/formatId" />
63
		<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
			value="//metadata/datasource" />
70
		<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
			value="//metadata/funder" />
77
		<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
			value="//metadata/rightsHolder" />
84
		<property name="multivalue" value="false" />
85
	</bean>
86
	
87
	<!-- scoring by result status -->
88
	<bean id="mdq.score.green" class="org.dataone.cn.indexer.parser.SolrField">
89
		<constructor-arg name="name" value="mdq_green_i" />
90
		<constructor-arg name="xpath"
91
			value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS'])" />
92
		<property name="multivalue" value="false" />
93
	</bean>
94
	<bean id="mdq.score.orange" class="org.dataone.cn.indexer.parser.SolrField">
95
		<constructor-arg name="name" value="mdq_orange_i" />
96
		<constructor-arg name="xpath"
97
			value="count( //result[check/level[text() != 'INFO']]/status[text() = 'ERROR'] | //result[check/level[text() = 'OPTIONAL']]/status[text() = 'FAILURE'])" />
98
		<property name="multivalue" value="false" />
99
	</bean>
100
	<bean id="mdq.score.red" class="org.dataone.cn.indexer.parser.SolrField">
101
		<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
	<bean id="mdq.score.blue" class="org.dataone.cn.indexer.parser.SolrField">
107
		<constructor-arg name="name" value="mdq_blue_i" />
108
		<constructor-arg name="xpath"
109
			value="count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']])" />
110
		<property name="multivalue" value="false" />
111
	</bean>
112
	
113
	<!-- 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
	<!-- 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
			value="count(//result[check/type[text() = 'identification']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'identification']])" />
126
		<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
			value="count(//result[check/type[text() = 'interpretation']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'interpretation']])" />
132
		<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
			value="count(//result[check/type[text() = 'discovery']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'discovery']])" />
138
		<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
			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
		<property name="multivalue" value="false" />
145
	</bean>
146
	
147
	<bean id="mdq.score.total" class="org.dataone.cn.indexer.parser.SolrField">
148
		<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>
(11-11/20)