<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	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="fgdc.abstract" class="org.dataone.cn.indexer.parser.MergeSolrField">
	  <constructor-arg name="name" value="abstract" />
	  <constructor-arg name="xpath"
	    value="/*[local-name() = 'metadata']/idinfo/descript/abstract/descendant::text()" />
	  <constructor-arg name="delimiter" value=" " />
	  <property name="multivalue" value="false" />
	  <property name="dedupe" value="false" />
	</bean>
	
	<bean id="fgdc.beginDate" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="beginDate" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/timeperd/timeinfo/rngdates/begdate/text()" />
		<property name="multivalue" value="false" />
		<property name="converter" ref="fgdcDateConverter" />
	</bean>
	
	<bean id="fgdc.contactOrganization" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="contactOrganization" />
		<constructor-arg name="xpath"
		  value="/*[local-name() = 'metadata']/distinfo/distrib/cntinfo/cntperp/cntorg/text() | /*[local-name() = 'metadata']/distinfo/distrib/cntinfo/cntorgp/cntorg/text()" />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="true"/>
	</bean>	

	<!-- define the root and leafs for accessing multiple bounding coordinates for geohash -->
	<bean id="fgdc.geohashRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
		p:name="geohashRoot"
		p:xPath="/*[local-name() = 'metadata']/idinfo/spdom/bounding"
		p:template="[northBoundingCoordinate] [southBoundingCoordinate] [eastBoundingCoordinate] [westBoundingCoordinate]">
		<property name="leafs">
			<list>
				<ref bean="fgdc.northBoundCoordLeaf"/>
				<ref bean="fgdc.southBoundCoordLeaf"/>
				<ref bean="fgdc.eastBoundCoordLeaf"/>
				<ref bean="fgdc.westBoundCoordLeaf"/>
			</list>
		</property>
	</bean>
		<bean id="fgdc.northBoundCoordLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="northBoundingCoordinate"
		p:xPath="northbc/text()" />
		
	<bean id="fgdc.westBoundCoordLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="westBoundingCoordinate"
		p:xPath="westbc/text()" />
	
	<bean id="fgdc.southBoundCoordLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="southBoundingCoordinate"
		p:xPath="southbc/text()" />		
		
	<bean id="fgdc.eastBoundCoordLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="eastBoundingCoordinate"
		p:xPath="eastbc/text()" />

	<bean id="fgdc.eastBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="eastBoundCoord" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/spdom/bounding/eastbc/text()" />
		<property name="multivalue" value="false" />
		<property name="converter" ref="solrLongitudeConverter" />
	</bean>
	
	<bean id="fgdc.northBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="northBoundCoord" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/spdom/bounding/northbc/text()" />
		<property name="multivalue" value="false" />
		<property name="converter" ref="solrLongitudeConverter" />
	</bean>	
	
	<bean id="fgdc.southBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="southBoundCoord" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/spdom/bounding/southbc/text()" />
		<property name="multivalue" value="false" />
		<property name="converter" ref="solrLongitudeConverter" />
	</bean>	
	
	<bean id="fgdc.westBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="westBoundCoord" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/spdom/bounding/westbc/text()" />
		<property name="multivalue" value="false" />
		<property name="converter" ref="solrLongitudeConverter" />
	</bean>		
	
		<!-- use the root to calculate different geohash lengths -->
	<bean id="fgdc.geohash1" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_1" />
		<property name="converter" ref="geohashConverter_1"/>
	</bean>
	
	<bean id="fgdc.geohash2" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_2" />
		<property name="converter" ref="geohashConverter_2"/>
	</bean>
	
		<bean id="fgdc.geohash3" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_3" />
		<property name="converter" ref="geohashConverter_3"/>
	</bean>
	
		<bean id="fgdc.geohash4" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_4" />
		<property name="converter" ref="geohashConverter_4"/>
	</bean>
	
		<bean id="fgdc.geohash5" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_5" />
		<property name="converter" ref="geohashConverter_5"/>
	</bean>
	
		<bean id="fgdc.geohash6" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_6" />
		<property name="converter" ref="geohashConverter_6"/>
	</bean>
	
		<bean id="fgdc.geohash7" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_7" />
		<property name="converter" ref="geohashConverter_7"/>
	</bean>
	
		<bean id="fgdc.geohash8" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_8" />
		<property name="converter" ref="geohashConverter_8"/>
	</bean>
	
		<bean id="fgdc.geohash9" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
		p:multivalue="false"
		p:root-ref="fgdc.geohashRoot">
		<constructor-arg name="name" value="geohash_9" />
		<property name="converter" ref="geohashConverter_9"/>
	</bean>

	<bean id="fgdc.edition" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="edition" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citeinfo/edition/text()" />
		<property name="multivalue" value="false" />
	</bean>	

	<bean id="fgdc.endDate" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="endDate" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/timeperd/timeinfo/rngdates/enddate/text()" />
		<property name="multivalue" value="false" />
		<property name="converter" ref="fgdcDateConverter" />
	</bean>

	<bean id="fgdc.gcmdKeyword" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="gcmdKeyword" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/keywords/theme[themekt='GCMD Science Keywords']/themekey/text()" />
		<property name="multivalue" value="true" />
	</bean>
 	
	<bean id="fgdc.keywords" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="keywords" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/keywords/theme/themekey/text() | /*[local-name() = 'metadata']/idinfo/keywords/place/placekey/text()" />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="true" />
		<property name="disallowedValues">
			<list>
				<value>none</value>
			</list>
		</property>
	</bean>

	<bean id="fgdc.genus" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="genus" />
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Genus"]/text()' />
		<property name="multivalue" value="true" />
	</bean>		
	
	<bean id="fgdc.geoform" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="geoform" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/geoform/text()" />
		<property name="multivalue" value="false" />
	</bean>	
	
	<bean id="fgdc.kingdom" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="kingdom" />
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Kingdom"]/text()' />
		<property name="multivalue" value="true" />
	</bean>	
	
	<bean id="fgdc.order" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="order" />
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Order"]/text()' />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.phylum" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="phylum" />
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Phylum"]/text() | //taxoncl/taxonrv[../taxonrn="Division"]/text()' />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.species" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="species" />
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Species"]/text()' />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.family" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="family" />
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Family"]/text()' />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.class" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="class" />
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Class"]/text()' />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.origin" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="origin" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/origin/text()" />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.scientificName" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
			p:multivalue="true"
			p:root-ref="fgdc.scientificNameRoot">
			<constructor-arg name="name" value="scientificName" />
	</bean>
	
	<bean id="fgdc.scientificNameRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
		p:name="scientificName"
		p:xPath='//taxoncl/taxonrv[../taxonrn="Genus"]'
		p:template="[genus] [species]">
		<property name="leafs">
			<list>
				<ref bean="fgdc.genusLeaf"/>
				<ref bean="fgdc.speciesLeaf"/>
			</list>
		</property>
	</bean>	
	
	<bean id="fgdc.genusLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="genus"
		p:xPath='../taxonrv/text()' />
		
	<bean id="fgdc.speciesLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="species"
		p:xPath='taxonrv/text()' />		
	
		
	<bean id="fgdc.placeKey" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="placeKey" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/keywords/place/placekey/text()" />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.pubDate" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="pubDate" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/pubdate/text()" />
		<property name="multivalue" value="false" />
		<property name="converter" ref="fgdcDateConverter" />
	</bean>
	
	<bean id="fgdc.purpose" class="org.dataone.cn.indexer.parser.MergeSolrField">
	  <constructor-arg name="name" value="purpose" />
	  <constructor-arg name="xpath"
	    value="/*[local-name() = 'metadata']/idinfo/descript/purpose/descendant::text()" />
	  <constructor-arg name="delimiter" value=" " />
	  <property name="multivalue" value="false" />
	  <property name="dedupe" value="false" />
	</bean>

	<bean id="fgdc.title" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="title" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/title/text()" />
		<property name="multivalue" value="false" />
	</bean>

	<bean id="fgdc.web_url" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="webUrl" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/onlink/text()" />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.fileID" class="org.dataone.cn.indexer.parser.ResolveSolrField">
		<constructor-arg name="name" value="fileID" />
	</bean>
	
	<bean id="fgdc.project" class="org.dataone.cn.indexer.parser.MergeSolrField">
	  <constructor-arg name="name" value="project" />
	  <constructor-arg name="xpath"
	    value="/*[local-name() = 'metadata']/idinfo/descript/purpose/descendant::text()" />
	  <constructor-arg name="delimiter" value=" " />
	  <property name="multivalue" value="false" />
	  <property name="dedupe" value="false" />
	</bean>
	
	<bean id="fgdc.presentationCat" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="presentationCat" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/geoform/text()" />
		<property name="multivalue" value="false" />
	</bean>
	
	<bean id="fgdc.author" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="author" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/origin/text()" />
		<property name="multivalue" value="false" />
	</bean>

	<bean id="fgdc.authorSurName" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="authorSurName" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/origin[1]/text()" />
		<property name="multivalue" value="false" />
	</bean>

	<bean id="fgdc.authorSurNameSort" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="authorSurNameSort" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/origin[1]/text()" />
		<property name="multivalue" value="false" />
	</bean>
	
	<bean id="fgdc.investigator" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="investigator" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/citation/citeinfo/origin/text()" />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.site" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="site" />
		<constructor-arg name="xpath" value="/*[local-name() = 'metadata']/idinfo/spdom/descgeog/text()" />
		<property name="multivalue" value="true" />
	</bean>
	
	<bean id="fgdc.attributeName" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeName" />
		<constructor-arg name="xpath"
			value='//attr/attrlabl/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="false" />
	</bean>
	
	<bean id="fgdc.attributeLabel" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeLabel" />
		<constructor-arg name="xpath"
			value='//attr/attalias/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="false" />
	</bean>
	
	<bean id="fgdc.attributeDescription" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeDescription" />
		<constructor-arg name="xpath"
			value='//attr/attrdef/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="false" />
	</bean>
	
	<bean id="fgdc.attributeUnit" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeUnit" />
		<constructor-arg name="xpath"
			value='//attr/attrdomv//attrunit/text() | //attr//attrdomv//edomv/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="false" />
	</bean>

	<bean id="fgdc.attributeName.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeName" />
		<constructor-arg name="xpath"
			value='//attr/attrlabl/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="true" />
	</bean>
	
	<bean id="fgdc.attributeLabel.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeLabel" />
		<constructor-arg name="xpath"
			value='//attr/attalias/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="true" />
	</bean>
	
	<bean id="fgdc.attributeDescription.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeDescription" />
		<constructor-arg name="xpath"
			value='//attr/attrdef/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="true" />
	</bean>
	
	<bean id="fgdc.attributeUnit.noDupe" class="org.dataone.cn.indexer.parser.SolrField">
		<constructor-arg name="name" value="attributeUnit" />
		<constructor-arg name="xpath"
			value='//attr/attrdomv//attrunit/text() | //attr//attrdomv//edomv/text()' />
		<property name="multivalue" value="true" />
		<property name="dedupe" value="true" />
	</bean>

	<bean id="fgdc.attributeText" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
			p:multivalue="true"
			p:root-ref="fgdc.attributeTextRoot">
			<constructor-arg name="name" value="attribute" />
	</bean>
	
	<bean id="fgdc.attributeTextRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
		p:name="attribute"
		p:xPath='//attr'
		p:template="[attributeName] [attributeLabel] [attributeDescription] [attributeUnit]">
		<property name="leafs">
			<list>
				<ref bean="fgdc.attributeNameLeaf" />
				<ref bean="fgdc.attributeLabelLeaf" />
				<ref bean="fgdc.attributeDescriptionLeaf" />
				<ref bean="fgdc.attributeUnitLeaf" />
			</list>
		</property>
	</bean>	
	
	<bean id="fgdc.attributeNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="attributeName"
		p:xPath='attrlabl/text()' />
		
	<bean id="fgdc.attributeLabelLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="attributeLabel"
		p:xPath='attalias/text()' />
	
	<bean id="fgdc.attributeDescriptionLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="attributeDescription"
		p:xPath='attrdef/text()' />
		
	<bean id="fgdc.attributeUnitLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
		p:name="attributeUnit"
		p:xPath='attrdomv//attrunit/text() | .//attrdomv//edomv/text()' />	

	
	<bean id="fgdc.text" class="org.dataone.cn.indexer.parser.FullTextSolrField">
		<constructor-arg name="name" value="text" />
		<constructor-arg name="xpath"
			value="/*[local-name() = 'metadata']//text()" />
		<property name="multivalue" value="false" />
		<property name="combineNodes" value="true"/>
	</bean>
	
	<bean id="fgdc.fullText" class="org.dataone.cn.indexer.parser.AggregateSolrField" >
		<property name="name" value="text" />
		<property name="solrFields">
	   		<list>
	       		<ref bean="fgdc.text" />
	      	</list>
	  	</property>
	</bean>
</beans>