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

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