<beans xmlns:p="http://www.springframework.org/schema/p"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xmlns="http://www.springframework.org/schema/beans"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans
						http://www.springframework.org/schema/beans/spring-beans.xsd
						http://www.springframework.org/schema/context
    					http://www.springframework.org/schema/context/spring-context-3.0.xsd">

	<bean id="portalsSubprocessor"
	  	class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
	  	<property name="xmlNamespaceConfig" ref="xmlNamespaceConfig" />
		<property name="matchDocuments">
	   		<list>
				<value>https://purl.dataone.org/portals-1.0.0</value>
				<value>https://purl.dataone.org/portals-1.1.0</value>
			</list>
	   	</property>
	  	<property name="fieldList">
		   	<list>
		   	    <ref bean="collections.name" />
		    	<ref bean="collections.label" />
		    	<ref bean="collections.description" />
				<ref bean="collection.collectionQuery" />
		    	<ref bean="portals.logo" />
		    	<ref bean="portals.associatedParty" />
		    	<ref bean="portals.funderName" />
		    	<ref bean="portals.funderIdentifier" />
		    	<ref bean="portals.awardNumber" />
		    	<ref bean="portals.awardTitle" />
		   	</list>
	  	</property>
	</bean>

	<bean id="portals.logo" class="org.dataone.cn.indexer.parser.SolrField">
	  <constructor-arg name="name" value="logo" />
	  <constructor-arg name="xpath" value="//logo/identifier/text()" />
	  <property name="multivalue" value="false" />
	</bean>

	<bean id="portals.associatedParty" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="true"
		p:root-ref="portals.associatedPartyRoot">
		<constructor-arg name="name" value="investigator" />
	</bean>

	<bean id="portals.associatedPartyRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
		p:name="investigator"
		p:xPath="//associatedParty"
		p:template="[individualName]||[organizationName]">
		<property name="leafs"><list><ref bean="eml.organizationNameLeaf"/></list></property>
		<property name="subRoots"><list><ref bean="eml.individualNameRoot" /></list></property>
	</bean>

	<bean id="portals.funderName" class="org.dataone.cn.indexer.parser.SolrField">
	  <constructor-arg name="name" value="funderName" />
	  <constructor-arg name="xpath"
	    value="//award/funderName/text()" />
	  <property name="multivalue" value="true" />
	  <property name="dedupe" value="true" />
	</bean>

	<bean id="portals.funderIdentifier" class="org.dataone.cn.indexer.parser.SolrField">
	  <constructor-arg name="name" value="funderIdentifier" />
	  <constructor-arg name="xpath"
	    value="//award/funderIdentifier/text()" />
	  <property name="multivalue" value="true" />
	  <property name="dedupe" value="true" />
	</bean>

	<bean id="portals.awardNumber" class="org.dataone.cn.indexer.parser.SolrField">
	  <constructor-arg name="name" value="awardNumber" />
	  <constructor-arg name="xpath"
	    value="//award/awardNumber/text()" />
	  <property name="multivalue" value="true" />
	  <property name="dedupe" value="true" />
	</bean>

	<bean id="portals.awardTitle" class="org.dataone.cn.indexer.parser.SolrField">
	  <constructor-arg name="name" value="awardTitle" />
	  <constructor-arg name="xpath"
	    value="//award/awardTitle/text()" />
	  <property name="multivalue" value="true" />
	  <property name="dedupe" value="true" />
	</bean>
</beans>