Server-side METS

Sources of this type will scan a directory recursively, searching for METS files.

Each METS file will be imported as an item. If it references other files (with fptr) they will be imported as media.

Only dc metadata is currently supported.

Imported resources are not re-imported on the next runs. In other words, this source type only creates resources. Resources are never updated.

Additional requirements

Configuration

Sources of this type have the following settings:

Path

The absolute path of the directory containing METS files

Visibility of created resources

Whether created resources should be made public or private

Process

The import process starts by finding all METS files. Files are considered METS files if:

  • their extension is .xml,

  • they are valid XML, and

  • their root element is mets

Then within each METS file we search for all /mets/structMap/div elements. For each div:

  1. Check if we already imported this item (the identifier used is /mets[@OBJID]). If not:

    1. Find the corresponding /mets/dmdSec element

    2. Find a dc element inside this dmdSec element.

    3. Transform dc’s children into Omeka literal values

    4. Set the item visibility depending on settings

    5. Attach the item to the default sites (sites with “Auto-assign new items” on)

    6. Save the item

  2. Then we search for fptr elements within the div. For each fptr found, check if we already imported this media (the identifiers used are /mets[@OBJID] and fptr[@FILEID]). If not:

    1. Find the corresponding /mets/fileSec//file and its FLocat element. The href attribute is read to determine the file location. If it starts with http:// or https:// the file is downloaded first. File paths are interpreted relative to the METS file path.

    2. If the module Alto is enabled and the file is an ALTO file, then the file is attached to the media corresponding to the previous fptr element.

    3. If Alto is not enabled or the file is not an ALTO file, a media is created. If a corresponding dmdSec element is found then the corresponding dc data is imported as literal values.