...
Code Block |
---|
-Dfcrepo.minter.config=file:///path/to/minter.xml -Dfcrepo.minter.username=minterUser -Dfcrepo.minter.password=minterPass |
Example minter.xml:
Code Block | ||
---|---|---|
| ||
<?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:pc="http://www.springframework.org/schema/pc" 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" pc:minterURLurl="http://localhost:8080/my/minter" c:method="POST" p c:minterMethodusername="POST" p:xPathExpression="/response/ids/value${fcrepo.minter.username:minterUsername}" c:password="${fcrepo.minter.password:minterPassword}" pc:usernameregex="minterUsername" pc:passwordxpath="minterPassword/response/ids/value"/> </beans> |
The properties that can be set are:
- minterURL url (required): The URL of the external minter REST service.
- minterMethodmethod: The HTTP method to use to generate a new identifier: GET, POST, or PUT. If not specified, POST is used.
- username/password: The username and password to use for connecting to the minter REST service. You may want to pass the username/password using System properties instead of hard-coding them in the config file (the example above shows how to use a System property with a fallback value if the property is not set). If not specified, no authentication is used.
- regextrimExpression: 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".
- xPathExpressionxpath: 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.