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_sm" />
75
		<constructor-arg name="xpath"
76
			value="//result[check/id[text() = 'check.echo.funder.1']]/output/text()" />
77
		<property name="multivalue" value="true" />
78
		<property name="dedupe" value="true" />
79
	</bean>
80
	
81
	<bean id="mdq.metadata.rightsHolder" class="org.dataone.cn.indexer.parser.SolrField">
82
		<constructor-arg name="name" value="mdq_metadata_rightsHolder_s" />
83
		<constructor-arg name="xpath"
84
			value="//metadata/rightsHolder" />
85
		<property name="multivalue" value="false" />
86
	</bean>
87
	
88
	<!-- scoring by result status -->
89
	<bean id="mdq.score.green" class="org.dataone.cn.indexer.parser.SolrField">
90
		<constructor-arg name="name" value="mdq_green_i" />
91
		<constructor-arg name="xpath"
92
			value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS'])" />
93
		<property name="multivalue" value="false" />
94
	</bean>
95
	<bean id="mdq.score.orange" class="org.dataone.cn.indexer.parser.SolrField">
96
		<constructor-arg name="name" value="mdq_orange_i" />
97
		<constructor-arg name="xpath"
98
			value="count( //result[check/level[text() != 'INFO']]/status[text() = 'ERROR'] | //result[check/level[text() = 'OPTIONAL']]/status[text() = 'FAILURE'])" />
99
		<property name="multivalue" value="false" />
100
	</bean>
101
	<bean id="mdq.score.red" class="org.dataone.cn.indexer.parser.SolrField">
102
		<constructor-arg name="name" value="mdq_red_i" />
103
		<constructor-arg name="xpath"
104
			value="count(//result[check/level[text() = 'REQUIRED']]/status[text() = 'FAILURE'])" />
105
		<property name="multivalue" value="false" />
106
	</bean>
107
	<bean id="mdq.score.blue" class="org.dataone.cn.indexer.parser.SolrField">
108
		<constructor-arg name="name" value="mdq_blue_i" />
109
		<constructor-arg name="xpath"
110
			value="count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']])" />
111
		<property name="multivalue" value="false" />
112
	</bean>
113
	
114
	<!-- the composite score -->
115
	<bean id="mdq.score.composite" class="org.dataone.cn.indexer.parser.SolrField">
116
		<constructor-arg name="name" value="mdq_composite_d" />
117
		<constructor-arg name="xpath"
118
			value="count(//result[check/level[text() != 'INFO']]/status[text() = 'SUCCESS']) div (count(//result) - count(//result/status[text() = 'SKIP'] | //result[check/level[text() = 'INFO']]))" />
119
		<property name="multivalue" value="false" />
120
	</bean>
121
	
122
	<!-- scoring by check.type -->
123
	<bean id="mdq.score.identification" class="org.dataone.cn.indexer.parser.SolrField">
124
		<constructor-arg name="name" value="mdq_identification_d" />
125
		<constructor-arg name="xpath"
126
			value="count(//result[check/type[text() = 'identification']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'identification']])" />
127
		<property name="multivalue" value="false" />
128
	</bean>
129
	<bean id="mdq.score.interpretation" class="org.dataone.cn.indexer.parser.SolrField">
130
		<constructor-arg name="name" value="mdq_interpretation_d" />
131
		<constructor-arg name="xpath"
132
			value="count(//result[check/type[text() = 'interpretation']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'interpretation']])" />
133
		<property name="multivalue" value="false" />
134
	</bean>
135
	<bean id="mdq.score.discovery" class="org.dataone.cn.indexer.parser.SolrField">
136
		<constructor-arg name="name" value="mdq_discovery_d" />
137
		<constructor-arg name="xpath"
138
			value="count(//result[check/type[text() = 'discovery']]/status[text() = 'SUCCESS']) div count(//result[check/type[text() = 'discovery']])" />
139
		<property name="multivalue" value="false" />
140
	</bean>
141
	<bean id="mdq.score.other" class="org.dataone.cn.indexer.parser.SolrField">
142
		<constructor-arg name="name" value="mdq_other_d" />
143
		<constructor-arg name="xpath"
144
			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']])" />
145
		<property name="multivalue" value="false" />
146
	</bean>
147
	
148
	<bean id="mdq.score.total" class="org.dataone.cn.indexer.parser.SolrField">
149
		<constructor-arg name="name" value="mdq_total_i" />
150
		<constructor-arg name="xpath"
151
			value="count(//result)" />
152
		<property name="multivalue" value="false" />
153
	</bean>
154

    
155
</beans>
(11-11/20)