Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

To configure an external PID minter, create a Spring bean configuration file using the HttpPidMinter class, and use a system property to use it instead of the internal PID minter:

-Dfcrepo.minter.config=file:///path/to/minter.xml

Example minter.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

    <bean class="org.fcrepo.kernel.identifiers.HttpPidMinter"
        p:minterURL="http://localhost:8080/my/minter"
        p:minterMethod="POST" p:xPathExpression="/response/ids/value"
        p:username="minterUsername" p:password="minterPassword"/>

</beans>

The properties that can be set are:

  • minterURL (required): The URL of the external minter REST service.
  • minterMethod: The HTTP method to use to generate a new identifier: GET, POST, or PUT.  If not specified, POST is used.
  • trimExpression: If set, remove text matching the regular expression from the minter service response.  For example, if the minter response is "id: foo/abc123", the regular expression ".*/" would remove the "id: foo/" and result in the identifier "abc123".
  • xPathExpression: If set, parse the minter service response as XML and use XPath to get the identifier value to use.
  • username and password: The username and password to use for connecting to the minter REST service.  If not specified, no authentication is used.
  • No labels