Project

General

Profile

« Previous | Next » 

Revision 9411

add fileName, mediaType and mediaTypeProperties to solr schema and v2 system metadata processor

View differences:

metacat-index/src/main/resources/application-context-systemmeta200.xml
1 1
<beans xmlns="http://www.springframework.org/schema/beans"
2
	xmlns:p="http://www.springframework.org/schema/p"
2 3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
5
						http://www.springframework.org/schema/beans/spring-beans.xsd
6
						http://www.springframework.org/schema/context  
7
    					http://www.springframework.org/schema/context/spring-context-3.0.xsd">
8
    					
4 9
	<bean id="xpath_system_metadata_200" class="java.util.ArrayList">
5 10
		<constructor-arg>
6 11
			<list>
......
15 20
						value="/d200:systemMetadata/seriesId/text()" />
16 21
				</bean>
17 22
				<bean class="org.dataone.cn.indexer.parser.SolrField">
23
					<constructor-arg name="name" value="fileName" />
24
					<constructor-arg name="xpath"
25
						value="/d200:systemMetadata/fileName/text()" />
26
				</bean>
27
				<bean class="org.dataone.cn.indexer.parser.SolrField">
28
					<constructor-arg name="name" value="mediaType" />
29
					<constructor-arg name="xpath"
30
						value="/d200:systemMetadata/mediaType/@name" />
31
				</bean>
32
				<bean class="org.dataone.cn.indexer.parser.CommonRootSolrField"
33
						p:multivalue="true"
34
						p:root-ref="mediaTypePropertyListRoot">
35
						<constructor-arg name="name" value="mediaTypeProperty" />
36
				</bean>
37
				<bean class="org.dataone.cn.indexer.parser.SolrField">
18 38
					<constructor-arg name="name" value="formatId" />
19 39
					<constructor-arg name="xpath"
20 40
						value="/d200:systemMetadata/formatId/text()" />
......
157 177
			</list>
158 178
		</constructor-arg>	
159 179
	</bean>
180
	
181
		
182
	<bean id="mediaTypePropertyListRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
183
		p:name="mediaTypeProperty"
184
		p:xPath='/d200:systemMetadata/mediaType/property'
185
		p:template="[mediaTypePropertyName] [mediaTypePropertyValue]">
186
		<property name="leafs">
187
			<list>
188
				<ref bean="mediaTypePropertyNameLeaf" />
189
				<ref bean="mediaTypePropertyValueLeaf" />
190
			</list>
191
		</property>
192
	</bean>	
193
	
194
	<bean id="mediaTypePropertyNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
195
		p:name="mediaTypePropertyName"
196
		p:xPath='@name' />
197
		
198
	<bean id="mediaTypePropertyValueLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
199
		p:name="mediaTypePropertyValue"
200
		p:xPath='text()' />
201
	
202
	
203
	
204
	
160 205
</beans>

Also available in: Unified diff