|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.fascinator.common.harvester.impl.GenericHarvester
com.googlecode.fascinator.harvester.oaipmh.OaiPmhHarvester
public class OaiPmhHarvester
This plugin harvests metadata records from an OAI-PMH compatible repository using OAI-PMH protocol. If the repository returns a 503, the HTTP headers are checked for Retry-After value, in an effort not to hammer the server.
Sample configuration file for OAI PMH harvester: usq.json
| Option | Description | Required | Default |
|---|---|---|---|
| url | The base URL of the OAI-PMH repository to harvest | Yes | None |
| maxRequests | Limit number of HTTP requests to make. Set this to -1 to configure the harvester to retrieve all records. | No | -1 |
| metadataPrefix | Set the type of metadata records to harvest, the first prefix in the list will be set as the source payload | No | oai_dc |
| setSpec | Set the OAI-PMH set to harvest | No | None |
| from | Harvest records from this date | No | None |
| until | Harvest records up to this date | No | None |
"harvester": {
"type": "oai-pmh",
"oai-pmh": {
"url": "http://eprints.usq.edu.au/cgi/oai2",
"maxRequests": 1
}
}
"harvester": {
"type": "oai-pmh",
"oai-pmh": {
"url": "http://eprints.usq.edu.au/cgi/oai2",
"recordID": "oai:eprints.usq.edu.au:5"
}
}
"harvester": {
"type": "oai-pmh",
"oai-pmh": {
"url": "http://eprints.usq.edu.au/cgi/oai2",
"from": "2009-01-01T00:00:00Z",
"until": "2009-01-31T00:00:00Z"
}
}
Sample rule file for the OAI PMH harvester: usq.py
None
| Field Summary | |
|---|---|
static String |
DATE_FORMAT
Date format |
static String |
DATETIME_FORMAT
Date and time format |
static String |
DEFAULT_METADATA_PREFIX
Default metadataPrefix (Dublin Core) |
| Constructor Summary | |
|---|---|
OaiPmhHarvester()
Basic constructor. |
|
| Method Summary | |
|---|---|
Set<String> |
getObjectIdList()
Gets a list of digital object IDs. |
boolean |
hasMoreObjects()
Tests whether there are more objects to retrieve. |
void |
init()
Basic init() function. |
| Methods inherited from class com.googlecode.fascinator.common.harvester.impl.GenericHarvester |
|---|
getDeletedObjectIdList, getId, getJsonConfig, getName, getObjectId, getPluginDetails, getStorage, hasMoreDeletedObjects, init, init, setStorage, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DATE_FORMAT
public static final String DATETIME_FORMAT
public static final String DEFAULT_METADATA_PREFIX
| Constructor Detail |
|---|
public OaiPmhHarvester()
| Method Detail |
|---|
public void init()
throws HarvesterException
init in class GenericHarvesterHarvesterException - : If there are problems during instantiation
public Set<String> getObjectIdList()
throws HarvesterException
HarvesterException - if there was an error retrieving the objectspublic boolean hasMoreObjects()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||