Introduction
If you take a look at the Mint and ReDBox screenshots below you'll notice that Mint and ReDBox detail screens provide access to Datastreams (ReDBox) and Attachments (Mint) - they're the same thing, just using different words because of historical reasons. If we take a look at a person's record in Mint (such as Paul James') we will find the following items:
These files are used by the ReDBox and Mint systems to provide OAI-PMH feeds of data. Each view can provide an OAI-PMH feed, allowing you to create specific subsets for harvesting. In the case of Mint's Parties-People record, this is available under http://<host>/mint/published/feed/oai. It's important to remember that, depending on your configuration, records in Mint and ReDBox may only be available via OAI-PMH if they've been published/curated. If you see no entries in your feed, try publishing a collection in ReDBox. The discussion that follows will describe how these metadata records are created and how you can customise them for your local needs. Transformers and templates
It's worth being acquainted with the way in which an entry in something such as a CSV file is ingested into Mint and moves through a process that eventually makes it available to OAI-PMH harvesters. Templates
First, open up mint/home/ system_config.json and seek out the oai-pmh parameters: "oai-pmh": { "sessionExpiry": "300000", "metadataFormats": { "oai_dc": { "enabledInAllViews": false, "enabledViews": ["published"], "schema": "http://www.openarchives.org/OAI/2.0/oai_dc.xsd", "metadataNamespace": "http://www.openarchives.org/OAI/2.0/oai_dc/" }, "eac_cpf": { "enabledInAllViews": false, "enabledViews": ["published"], "schema": "urn:isbn:1-931666-33-4 http://eac.staatsbibliothek-berlin.de/schema/cpf.xsd", "metadataNamespace": "urn:isbn:1-931666-33-4" }, "rif": { "enabledInAllViews": false, "enabledViews": ["published"], "schema": "http://ands.org.au/standards/rif-cs/registryObjectshttp://services.ands.org.au/home/orca/schemata/registryObjects.xsd", "metadataNamespace": "http://ands.org.au/standards/rif-cs/registryObjects" } } } You can see that there are three metadata formats in use in the config above:
The oai-pmh section indicates how metadata will be shared but we'll step to the start of the process and see how the metadata gets there in the first place.In another part of system_config.json you'll find the transformerDefaults section (below). This tells us that there is a transformer plug-in named jsonVelocity - this plugin allows for the creation of one or more renditions of the metadata via the use of Velocity templates. We can see that the sourcePayload being transformed is the metadata.json file (we mentioned that earlier). The templatesPath directive lets us know where the Velocity templates will be found. In the case of Mint we'll find it in mint/home/templates. It's worth looking through these files in your installation to see what's there. "transformerDefaults": { "ingest-relations": { "id": "ingest-relations" }, "jsonVelocity": { "id" : "jsonVelocity", "sourcePayload" : "metadata.json", "templatesPath" : "${fascinator.home}/templates", "portalId": "default" } }, Harvesting and transformers
When we harvest information about people (say, researchers) into Mint, data goes through a transformation step - you're likely to have undertaken this in the Loading data into Mint section. If we have a look at the transformer directives in the mint/home/harvest/Parties_People.json harvest configuration file (below) you can see that the Velocity templates in mint/home/templates/people will be used by the jsonVelocity transformer - go and have a look there and you should find two files: oai_dc.vm and rif.vm . "transformer": { "curation": [], "metadata": ["ingest-relations", "jsonVelocity"] }, "transformerOverrides": { ... "jsonVelocity": { "templatesPath" : "${fascinator.home}/templates/people", "portalId": "Parties_People" } }, Editing the templates
A quick look at the default mint/home/templates/people templates will show you that you need to undertake a little customisation. Open up the templates in a text editor and edit at will. If you change the template and flick back to your browser, refresh a record and open the metadata file you'll see (drum-roll) that nothing has changed!The jsonVelocity transformer runs at harvest time and the system does not watch for template changes. This means that any renditions you created before you edited the template will need to be updated. In order to do this you will need to:
Object histories
If you stay logged in as an administrator and give the reharvest a few moments to run, you can then see this reharvest in the object's history:
Further reading |