The Fedora OAI Provider Service is part of the Fedora Service Framework and offers a vast improvement over the previous, simple OAI provider that Fedora used in previous versions. The new provider is based on Proai, an open source caching, polling OAI provider. It has the following features:
To install the service:
By editing the WEB-INF/classes/proai.properties
file, you can configure the OAI provider in many different ways.
See the example configuration values and change them to match the
configuration you want.
The example configuration follows.
# # Proai Configuration # ================================ ####################### # Required Properties # ####################### proai.sessionBaseDir = /tmp/proai/sessions proai.secondsBetweenRequests = 300 proai.incompleteRecordListSize = 2 proai.incompleteSetListSize = 2 proai.incompleteIdentifierListSize = 2 # [proai.readLockWait] # The number of milliseconds to wait for a read lock on the cache # before giving up. A higher value means that OAI harvesters won't # have to deal with "Service Unavailable" requests as often, whereas # a lower value will result in quicker response. proai.readLockWait = 5000 # [proai.writeLockWait] # The number of milliseconds to wait for a write lock on the cache # before giving up. If this amount of time passes while waiting # to commit a change to the cache, the update will be canceled and # attempted again after proai.cache.RecordCache.pollSeconds proai.writeLockWait = 60000 # [proai.cacheBaseDir] # The directory where cache files should be stored. This will be created # if it doesn't exist. proai.cacheBaseDir = /tmp/proai/cache # [proai.driverClassName] # The class name of proai.driver.OAIDriver implementation. This should be # in the classpath. proai.driverClassName = fedora.services.oaiprovider.FedoraOAIDriver # [proai.driverPollSeconds] # How often to poll the driver for updates. proai.driverPollSeconds = 60 # [proai.db.url] # The JDBC connection URL for the database that will be used by the cache. # [proai.db.driverClassName] # The class name of the JDBC driver appropriate for use with the # connection url. This class should be in the classpath. # [proai.db.username] # The database user. This user should already exist in the database # and must have permission to create, modify, and query tables. # [proai.db.password] # The password for the database user. # MySQL proai.db.url = jdbc:mysql://localhost/proai?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true proai.db.driverClassName = com.mysql.jdbc.Driver # McKoi #proai.db.url = jdbc:mckoi:local://build/test/mckoi/mckoi.conf?create_or_boot=true #proai.db.driverClassName = com.mckoi.JDBCDriver proai.db.username = proai proai.db.password = proai # [JDBC Driver-specific DDL Converters] # A ddlConverter class is used to generate the commands necessary for # creating the tables required Proai's record cache. The name of the # property should be the driverClassName of the JDBC driver you're using # plus ".ddlConverter". com.mckoi.JDBCDriver.ddlConverter = proai.util.McKoiDDLConverter com.mysql.jdbc.Driver.ddlConverter = proai.util.MySQLDDLConverter oracle.jdbc.driver.OracleDriver.ddlConverter = proai.util.OracleDDLConverter ################################# # OAIDriver-Specific Properties # ################################# driver.fedora.baseURL = http://localhost:8080/fedora/ driver.fedora.user = fedoraAdmin driver.fedora.pass = fedoraAdmin # [driver.fedora.queryConnectionTimeout] # When querying the resource index, the maximum number of seconds to # wait for the http connection to be established before giving up. driver.fedora.queryConnectionTimeout = 30 # [driver.fedora.querySocketTimeout] # When querying the resource index, the maximum number of seconds of # socket inactivity to allow before giving up. driver.fedora.querySocketTimeout = 600 # [driver.fedora.disseminationConnectionTimeout] # When getting xml data from Fedora, the maximum number of seconds to # wait for the http connection to be established before giving up. driver.fedora.disseminationConnectionTimeout = 30 # [driver.fedora.disseminationSocketTimeout] # When getting xml data from Fedora, the maximum number of seconds of # socket inactivity to allow before giving up. driver.fedora.disseminationSocketTimeout = 120 driver.fedora.queryFactory = fedora.services.oaiprovider.ITQLQueryFactory driver.fedora.identify = http://localhost:8080/fedora/get/demo:MyRepository/Identify.xml # space-separated list of metadata formats driver.fedora.md.formats = oai_dc test_format formatX formatY driver.fedora.md.format.oai_dc.loc = http://www.openarchives.org/OAI/2.0/oai_dc.xsd driver.fedora.md.format.oai_dc.uri = http://www.openarchives.org/OAI/2.0/oai_dc/ driver.fedora.md.format.oai_dc.dissType = info:fedora/*/oai_dc # optional driver.fedora.md.format.oai_dc.about.dissType = info:fedora/*/about_oai_dc driver.fedora.md.format.formatX.about.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadataAbout?format=x driver.fedora.md.format.formatY.about.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadataAbout?format=y driver.fedora.md.format.test_format.loc = http://example.org/testFormat.xsd driver.fedora.md.format.test_format.uri = http://example.org/testFormat/ driver.fedora.md.format.test_format.dissType = info:fedora/*/test_format driver.fedora.md.format.formatX.loc = http://example.org/formatX.xsd driver.fedora.md.format.formatX.uri = http://example.org/formatX/ driver.fedora.md.format.formatX.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadata?format=x driver.fedora.md.format.formatY.loc = http://example.org/formatY.xsd driver.fedora.md.format.formatY.uri = http://example.org/formatY/ driver.fedora.md.format.formatY.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadata?format=y driver.fedora.itemID = http://www.openarchives.org/OAI/2.0/itemID driver.fedora.setSpec = http://www.openarchives.org/OAI/2.0/setSpec driver.fedora.setSpec.name = http://www.openarchives.org/OAI/2.0/setName driver.fedora.setSpec.desc.dissType = info:fedora/*/SetInfo.xml driver.fedora.itemSetSpecPath = $item <fedora-rels-ext:isMemberOf> $set $set <http://www.openarchives.org/OAI/2.0/setSpec> $setSpec # optional oai-deleted property #driver.fedora.deleted = info:fedora/fedora-system:def/model#state # optional volatile property #driver.fedora.volatile = true