Wrapper library for managing DOIs through OSTI Elink
For more information, see: https://www.osti.gov/elink/
- Service Class Name Configuration:
- By default, it uses the v2json service. However, you may explicitly set the environment variable
METACAT_OSTI_SERVICE_CLASS_NAMEto the valueedu.ucsb.nceas.osti_elink.v2.json.OSTIv2JsonService
- By default, it uses the v2json service. However, you may explicitly set the environment variable
- Base URL Configuration:
- You can configure the base URL by setting the property
guid.doi.baseurlin themetacat.propertiesfile or by setting an environment variable namedMETACAT_OSTI_BASE_URL. The environment variable will override the property file setting. - Its value should be in the format:
https://www.osti.gov(production) orhttps://review.osti.gov(test)
- You can configure the base URL by setting the property
- Token Configuration:
- Set the environment variable
METACAT_OSTI_TOKENwith the appropriate token value
- Set the environment variable
- Context name configuration (Optional):
- Default Context Name: OSTI ensures that
elink2api(for the v2 JSON API) remain the same across both test and production services. The value is set as defaults in the configuration. - Customizing Context Names: If you need to change the context name, you can configure them
through the following environment variables:
METACAT_OSTI_V2JSON_CONTEXTfor the v2 JSON API
- Default Context Name: OSTI ensures that
- Max query-attempts configuration (Optional):
- There is a delay between minting a DOI and its search availability in the OSTI service. This delay typically ranges from one to five seconds. To account for this, the system repeatedly queries the service, waiting 200 milliseconds after each failed attempt. By default, the maximum number of query attempts is set to 40, resulting in a maximum waiting time of eight seconds.
- You can customize the maximum number of query attempts by setting the environment variable
METACAT_OSTI_DOI_QUERY_MAX_ATTEMPTS.
- Clone the code from https://github.com/NCEAS/osti-elink
- Install JDK 1.8 and maven
- Edit the
src/test/resources/test.propertiesfile to point your credential files:The token file should contain only the OSTI token.ostiService.v2.tokenFilePath=./token