<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="collectionsSubprocessor" class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor"> <property name="xmlNamespaceConfig" ref="xmlNamespaceConfig" /> <property name="matchDocuments"> <list> <value>https://purl.dataone.org/collections-1.0.0</value> </list> </property> <property name="fieldList"> <list> <ref bean="collections.name" /> <ref bean="collections.label" /> <ref bean="collections.description" /> <ref bean="collection.collectionQuery" /> </list> </property> </bean> <bean id="collections.label" class="org.dataone.cn.indexer.parser.SolrField"> <constructor-arg name="name" value="label" /> <constructor-arg name="xpath" value="//label/text()" /> <property name="multivalue" value="false" /> </bean> <bean id="collections.name" class="org.dataone.cn.indexer.parser.SolrField"> <constructor-arg name="name" value="title" /> <constructor-arg name="xpath" value="//name/text()" /> <property name="multivalue" value="false" /> </bean> <bean id="collections.description" class="org.dataone.cn.indexer.parser.SolrField"> <constructor-arg name="name" value="abstract" /> <constructor-arg name="xpath" value="//description/text()" /> <property name="multivalue" value="false" /> </bean> <bean id="collection.collectionQuery" class="org.dataone.cn.indexer.parser.FilterCommonRootSolrField" p:root-ref="collection.filterFields"> <constructor-arg name="name" value="collectionQuery" /> </bean> <!-- The filters from the collection document are assembled into a query based on the properties defined below. The placement of the filters in the query will be: - (<filters that match 'prefixMatch'>) OR (<any filter that doesn't match 'prefixMatch', 'codaMatch'>) AND (<'postfix' term>) OR (<filters that match 'codaMatch') For example: (((isPartOf:urn\:uuid\:4ef5567b-3066-425f-ae0d-685ba0d2cf82)) OR ((text:*lauren*) AND (text:*test*)) AND (-obsoletedBy:* AND formatType:METADATA)) OR (id:urn\:uuid\:53154666-03db-4252-ae01-993a02df6099) --> <bean id="collection.filterFields" class="org.dataone.cn.indexer.parser.utility.FilterRootElement" p:name="collectionQuery" p:xPath="//definition/booleanFilter | //definition/dateFilter | //definition/filter | //definition/numericFilter" p:prefixMatch="isPartOf,seriesId" p:fixedTerm="(-obsoletedBy:* AND formatType:METADATA)" p:postfixMatch="id"> <property name="filters"> <list> <ref bean="collection.booleanFilter"/> <ref bean="collection.dateFilter"/> <ref bean="collection.numericFilter"/> <ref bean="collection.textFilter"/> </list> </property> </bean> <bean id="collection.booleanFilter" class="org.dataone.cn.indexer.parser.utility.FilterProcessor" p:name="booleanFilter" p:matchElement="booleanFilter" p:template="field:value"> <property name="leafs"> <list> <ref bean="collection.filterFieldLeaf"/> <ref bean="collection.filterOperatorLeaf"/> <ref bean="collection.filterValueLeaf"/> <ref bean="collection.filterExclude"/> </list> </property> </bean> <bean id="collection.dateFilter" class="org.dataone.cn.indexer.parser.utility.FilterProcessor" p:name="dateFilter" p:matchElement="dateFilter" p:defaults="min:*,max:*" p:template="field:value,field:[min TO max]"> <property name="leafs"> <list> <ref bean="collection.filterFieldLeaf"/> <ref bean="collection.filterMinLeaf"/> <ref bean="collection.filterMaxLeaf"/> <ref bean="collection.filterOperatorLeaf"/> <ref bean="collection.filterValueLeaf"/> <ref bean="collection.filterExclude"/> </list> </property> </bean> <bean id="collection.numericFilter" class="org.dataone.cn.indexer.parser.utility.FilterProcessor" p:name="numericFilter" p:matchElement="numericFilter" p:defaults="min:*,max:*" p:template="field:value,field:[min TO max]"> <property name="leafs"> <list> <ref bean="collection.filterFieldLeaf"/> <ref bean="collection.filterMinLeaf"/> <ref bean="collection.filterMaxLeaf"/> <ref bean="collection.filterOperatorLeaf"/> <ref bean="collection.filterValueLeaf"/> <ref bean="collection.filterExclude"/> </list> </property> </bean> <bean id="collection.textFilter" class="org.dataone.cn.indexer.parser.utility.FilterProcessor" p:name="textfilter" p:matchElement="filter" p:escapeSpecialChars="true" p:quoteMultipleWords="true" p:template="field:value"> <property name="leafs"> <list> <ref bean="collection.filterFieldLeaf"/> <ref bean="collection.filterOperatorLeaf"/> <ref bean="collection.filterValueLeaf"/> <ref bean="collection.filterExclude"/> <ref bean="collection.filterMatchSubstring"/> </list> </property> </bean> <!-- Currently 'field' is the only element in the collection.xsd that is allowed repeat, so only need a delimeter for this, to dermine if multiple values have been specified. --> <bean id="collection.filterFieldLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="field" p:delimiter="--" p:xPath="field/text()" /> <bean id="collection.filterValueLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="value" p:delimiter="--" p:xPath="value/text()" /> <bean id="collection.filterExcludeLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="exclude" p:xPath="exclude/text()" /> <bean id="collection.filterMinLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="min" p:xPath="min/text()" /> <bean id="collection.filterMaxLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="max" p:xPath="max/text()" /> <bean id="collection.filterOperatorLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="operator" p:xPath="operator/text()" /> <bean id="collection.filterExclude" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="exclude" p:xPath="exclude/text()" /> <bean id="collection.filterMatchSubstring" class="org.dataone.cn.indexer.parser.utility.LeafElement" p:name="matchSubstring" p:xPath="matchSubstring/text()" /> </beans>