Skip to content

File getter manipulator: CdmSingleFile

Mark Jordan edited this page Feb 2, 2016 · 2 revisions

Overview

This file getter manipulator gets the path to the master (OBJ) file for the current single-file object. Required for all CONTENTdm single-file object toolchains that get files corresponding to the OBJ datastream from a local filesystem and not from CONTENTdm.

Toolchains

This metadata manipulator applies to all toolchains that do not get the file corresponding to the OBJ datastream from CONTENTdm. For example, CONTENTdm does not store TIFFs. This manipulator defines where each object's TIFF is located, so it can be included in the resulting Islandora ingest package.

You must use this manipulator if you are combining files retrieved from CONTENTdm with "master" files stored on a local filesystem. If you are not using files on a local filesystem, you do not need to use this manipulator.

Configuration

To register this manipulator in your toolchain, add the following line to the "[MANIPULATORS]" section of your .ini file:

filegettermanipulators[] = "CdmSingleFile|identi|tif,tiff"

Note that the [FILE_GETTER] section of your .ini file must contain at least on 'input_directories[]' entry, e.g.,

input_directories[] = "/path/to/master_tiffs"

Parameters

This manipulator take two parameters:

  1. The fieldname in the CONTENTdm object metadata that contains the identifier or other value used to determine each object's master file. Note that this is the raw field name as it exists in the source's internal metadata format, not the human-readable field name.
  2. A comma-separated list of file extensions that the master files can have, without the leading period. Of course, each file will only have one; you can specify multiple extensions in case the files are named variously.

Functionality

The purpose of this file getter manipulator to determine file paths where files that will be used as the OBJ datastreams for single-file Islandora objects are found. The manipulator returns a list of possible paths (based on a combination of input directory, source field name, and file extension) to the file getter, which then checks to see if a file exists at each path. The file getter uses the first path that returns true to a PHP file_exists() statement as the path to the current object's master file.

Clone this wiki locally