<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2002-2010, DuraSpace.  All rights reserved
    Licensed under the DuraSpace License.

    A copy of the DuraSpace License has been included in this
    distribution and is available at: http://www.dspace.org/license

-->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       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.xsd">

    <context:annotation-config /> <!-- allows us to use spring annotations in beans -->

    <!-- Authority control -->
    <bean class="org.dspace.authority.AuthoritySolrServiceImpl" id="org.dspace.authority.AuthoritySearchService"/>
    <alias name="org.dspace.authority.AuthoritySearchService" alias="org.dspace.authority.indexer.AuthorityIndexingService"/>

    <bean id="dspace.DSpaceAuthorityIndexer" class="org.dspace.authority.indexer.DSpaceAuthorityIndexer"/>

    <bean name="AuthorityTypes" class="org.dspace.authority.AuthorityTypes">
        <property name="types">
            <list>
                <bean class="org.dspace.authority.orcid.OrcidAuthorityValue"/>
                <bean class="org.dspace.authority.PersonAuthorityValue"/>
            </list>
        </property>
        <property name="fieldDefaults">
            <map>
                <entry key="dc_contributor_author">
                    <bean class="org.dspace.authority.PersonAuthorityValue"/>
                </entry>
            </map>
        </property>
    </bean>

    <alias name="OrcidSource" alias="AuthoritySource"/>
    <bean name="OrcidSource" class="org.dspace.authority.orcid.Orcid">
        <constructor-arg value="http://pub.orcid.org"/>
    </bean>


</beans>