<?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"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

    <!-- Identifier Service Application Interface.  Will be autowired with
         any Identifier Providers present in Spring context.
    -->
    <bean id="org.dspace.identifier.service.IdentifierService"
          class="org.dspace.identifier.IdentifierServiceImpl"
          autowire="byType"
          scope="singleton"/>

      <!-- If you enabled versioning, you should use one of the versioned
           handle identifier provider instead of the default one. 
           The VersionedHandleIdentifierProvider creates a new versioned
           handle for every new version.
           -->
    <!--
    <bean id="org.dspace.identifier.HandleIdentifierProvider" class="org.dspace.identifier.VersionedHandleIdentifierProvider" scope="singleton">
        <property name="configurationService" ref="org.dspace.services.ConfigurationService"/>
    </bean>
    -->
    <!--
           The VersionedHandleIdentifierProviderWithCanonicalHandles
           preserves the first handle for every new version. Whenever
           a new version is created the previous version gets a new
           handle. This leads to a handle that points always to the
           newest version, but there is no permanent handle, that
           will always keep pointing to the acutal newest one.
           -->
    <!--
    <bean id="org.dspace.identifier.HandleIdentifierProvider" class="org.dspace.identifier.VersionedHandleIdentifierProviderWithCanonicalHandles" scope="singleton">
        <property name="configurationService" ref="org.dspace.services.ConfigurationService"/>
    </bean>
    -->

    <!-- provider to mint and register DOIs with DSpace.
         To mint DOIs you need a registration agency. The DOIIdentifierProvider
         maintains the doi database table and handling of DSpaceObject. It uses
         a DOIConnector that handles all API calls to your DOI registration
         agency. Please configure a DOIConnector as well! -->

    <!-- In order to mint DOIs with DSpace, get an agreement with a DOI 
         registration agency,  take a look into dspace.cfg, and activate either
         the DOIIdentifierProvider or the VersionedDOIIdentifierProvider,
         depending on whether you have Item Level Versioning activated or not.
    -->
    <!--
    <bean id="org.dspace.identifier.DOIIdentifierProvider"
        class="org.dspace.identifier.DOIIdentifierProvider"
        scope="singleton">
        <property name="configurationService"
            ref="org.dspace.services.ConfigurationService" />
        <property name="DOIConnector"
            ref="org.dspace.identifier.doi.DOIConnector" />
    </bean>
    -->
    <!--
    <bean id="org.dspace.identifier.DOIIdentifierProvider"
        class="org.dspace.identifier.VersionedDOIIdentifierProvider"
        scope="singleton">
        <property name="configurationService"
            ref="org.dspace.services.ConfigurationService" />
        <property name="DOIConnector"
            ref="org.dspace.identifier.doi.DOIConnector" />
    </bean>
    -->
    
    <!-- The DOIConnector will handle the API calls to your DOI registration
         agency for the DOIIdentifierProvider. If your registration agency
         tells you to use the DataCite API directly, you can use the
         DataCiteConnector. If your registration agency is not part of DataCite
         or provides their own API, you have to implement a DOIConnector.
         e.g. EZID is part of DataCite but provides their own APIs. The following
         DataCiteConnector won't work if EZID is your registration agency.
    -->
    <!-- Uncomment this to use the DataCite API directly as DOIConnector.
    <bean id="org.dspace.identifier.doi.DOIConnector"
        class="org.dspace.identifier.doi.DataCiteConnector"
        scope="singleton">
        <property name='DATACITE_SCHEME' value='https'/>
        <property name='DATACITE_HOST' value='mds.test.datacite.org'/>
        <property name='DATACITE_DOI_PATH' value='/doi/' />
        <property name='DATACITE_METADATA_PATH' value='/metadata/' />
        <property name='disseminationCrosswalkName' value="DataCite" />
    </bean>
    -->

    <!-- Provider to mint and register DOIs using EZID as the registrar.
    -->
    <!-- 
         Set generateDataciteXML to true to send metadata in DataCite xml schema for EZID DOI mint requests.
         When generateDataciteXML is enabled, EZIDIdentifierProvider uses 
         dspace.cfg:crosswalk.dissemination.DataCite.stylesheet XSL configuration for metadata mapping
    -->
    <!-- Uncomment to enable DOI using EZID
    <bean id="org.dspace.identifier.EZIDIdentifierProvider"
          class="org.dspace.identifier.EZIDIdentifierProvider"
          scope='singleton'>
        <description>Uses the EZID service to provide DOI identifiers from DataCite</description>
        <property name="configurationService"
                      ref="org.dspace.services.ConfigurationService"/>
        <property name='requestFactory'>
            <bean class='org.dspace.identifier.ezid.EZIDRequestFactory'>
                <property name='EZID_SCHEME' value='https'/>
                <property name='EZID_HOST' value='ezid.cdlib.org'/>
                <property name='EZID_PATH' value=''/>
            </bean>
        </property>
        <property name='crosswalk'>
            <map>
                <entry key='datacite.creator' value='dc.contributor.author'/>
                <entry key='datacite.title' value='dc.title'/>
                <entry key='datacite.publisher' value='dc.publisher'/>
                <entry key='datacite.publicationyear' value='dc.date.issued'/>
            </map>
        </property>
        <property name='crosswalkTransform'>
            <description>How to compute the crosswalked value from the original.  Default is plain copy.</description>
            <map>
                <entry key='datacite.publicationyear'>
                    <bean class='org.dspace.identifier.ezid.DateToYear'/>
                </entry>
            </map>
        </property>
        <property name='generateDataciteXML' value='false'/>
        <property name='disseminationCrosswalkName' value='DataCite'/>

    </bean>
    -->

</beans>
