Metadata

Structure and configuration of mets.xml and levels.xml

The most important files for the configuration and storage of metadata are mets.xml and levels.xml. The file levels.xml can be found at docuteam-packer/docuteam packer.app/Contents/docuteam packer/config. It is used to determine the metadata fields. The file mets.xml is located in each SIP at the top level next to the root element and contains the metadata of a SIP.

mets.xml

If a SIP is created with docuteam packer, a file containing all metadata of the package is automatically created. The file is located on the top level in SIP, next to the root element. It is called mets.xml and is structured according to the Matterhorn METS standard.

location of mets.xml

The standard Matterhorn METS combines the standards METS, PREMIS and EAD. It specifies how these three standards can be used to describe a SIP. Further information about Matterhorn METS can be found here.

Technical and administrative metadata are automatically extracted and captured by docuteam packer. Descriptive metadata has to be manually entered by the user in the detail view of the opened SIP. Which metadata fields are available for which level and which values are allowed in them is defined in the configuration file levels.xml.

levels.xml

The file levels.xml is located at docuteam-packer/docuteam packer.app/Contents/docuteam packer/config. Here you can define, for example, which fields should be displayed at which level, whether a single field is mandatory, whether default values are used or how an entered value is validated.

In the first section of levels.xml (LEVELS:MetadataElements) all available metadata elements and, if applicable, allowed values are defined.

The second section (LEVELS:Levels) defines the levels and the assignment of metadata elements to these levels.

Metadata elements

A LEVELS:MetadataElement is defined by the following 6 attributes:

accessorNameId
Example accessNr
mandatory yes
Explanation The unique name of the metadata field. This must correspond to accessorNameRef shown below with which the data is accessed in packer. The i18n configuration can be used to assign an individual label to a metadata field for display in the GUI.



defaultExpression
Examplee new java.text.SimpleDateFormat("yyyy-MM-dd").format(new java.util.Date()), ((ch.docuteam.darc.METS.structmap.NodeAbstract)object1). getMimeType(), "false", 'false'
mandatory no
Explanation A Java expression to initialize this field with a value when created. The current node is referenced by: (ch.docuteam.darc.METS.structmap.NodeAbstract)object1



validatorClassName
Example ch.docuteam.darc.mdconfig.MetadataElementValidatorDate
mandatory no
Explanation A Java class that validates the content of this metadata element on setting. If the validation does not allow the entered value, an error message is displayed and the field is filled with the previous value.



postActionClassName
Example ch.docuteam.darc.mdconfig.
MetadataElementSetterPostActionSysOut
mandatory no
Explanation A Java class that executes arbitrary actions after the value of this field has been set. This action is not executed if the validation of the entered value fails.



allowedValues
Example *;German;English;French;Italian, file:///config/skos/retentions.rdf
mandatory no
Explanation A list of values that is displayed in packer as a drop-down list. If the first element of this list is an asterisk "*", any other terms can be entered in addition to the list elements. \ The list of values may also be predefined in a file which respects the SKOS schema ("Simple Knowledge Organization System"). The relative path to this RDF file must be provided in this case.



allowedValuesType
Example stringList
mandatory no
Explanation Specifies the type of the selection list of allowed values. Supported values are stringList, skosFile and csvFile.



Example:

<LEVELS:MetadataElement
    accessorNameID="retentionPolicy"
    defaultExpression='"Confidential"'
    allowedValues="OpenAccess;EmbargoPeriod30Years;EmbargoPeriod50Years;Confidential"
    allowedValuesType="stringList"/>

With the element LEVELS:AllowedValuesSeparator the separator of the allowed values list can be set. This may also consist of several characters, as the following example shows:

<LEVELS:MetadataElements>
	<LEVELS:AllowedValuesSeparator>::</LEVELS:AllowedValuesSeparator>
	<LEVELS:MetadataElement
        accessorNameID="language"
        allowedValues="*::German::English::French::Italian"/>
...
</LEVELS:MetadataElements>



Levels of description

A LEVELS:Level (level of description) is defined by the following 4 attributes:

nameID
Example Fonds
mandatory yes
Explanation The unique name of this level.



iconFileName
Example resources/images/LevelSerie.png
mandatory yes
Explanation The path to the icon file of this level. If this file does not exist, a yellow warning icon is displayed.



allowedSublevelNameRefs
Example Series File Undefined
mandatory no
Explanation List of sub-levels allowed for this level. The elements of this list must be specified in this file (as nameID) and separated by a space. The first element of this list is set as the default level for new child elements.



isTrash
Example true
mandatory no
Explanation Marks the corresponding level as nodes to be deleted.



Example:

<LEVELS:Level
    nameID="Fonds"
    iconFileName="resources/images/LevelBestand.png"
    allowedSublevelNameRefs="Series File Undefined">
...
</LEVELS:Level>



Assignment of metadata elements to levels

The assignment of metadata elements to levels is defined by a list of LEVELS:LevelMetadataElement. This element has the following 7 attributes:

accessorNameRef
Example language
mandatory yes
Explanation The accessorNameID of the metadata element; references an accessorNameID from the list of <LEVELS:MetadataElements> (see above).



isMandatory
Example true
mandatory yes
Explanation If true, this metadata element is mandatory. Mandatory elements are always displayed in the metadata list. If a mandatory element is empty, the element is marked with an exclamation mark.



isRepeatable
Example false
mandatory yes
Explanation If true, this metadata element is repeatable and can be added multiple times as needed.



isAlwaysDisplayed
Example true
mandatory no
Explanation If true, this metadata element is always displayed in the metadata list and does not need to be added manually first.



isReadOnly
Example false
mandatory no
Explanation If true, this metadata element can not be changed manually. If a 'defaultExpression' is specified, the metadata element is initialized with this value when it is created.



keepInTemplate
Example false
mandatory no
Explanation If true, this metadata element is not deleted when a template is created.



displayRows
Example 5
mandatory no
Explanation Specifies the number of rows when displaying this metadata element in the metadata list.



Example:

<LEVELS:LevelMetadataElement
    accessorNameRef="PID"
    isMandatory="false"
    isRepeatable="false"
    isAlwaysDisplayed="true"
    isReadOnly="true"/>

Depending on how the attributes are defined in levels.xml, the metadata fields are displayed accordingly in the detail view of a SIP.

For example, if dynamic metadata elements are defined, they can be selected from the drop-down list in the lower left-hand corner of the Description tab and added to the list by clicking on the plus sign.

add metadata fields dynamically

The first column in the list contains information in coded form about the individual elements defined in levels.xml:

  • A * means that this element is a mandatory field and has already been filled in. Mandatory fields are always visible.
  • A !' means that the element is a mandatory field that has not yet been filled in.
  • An O means that the element is always visible, but does not have to be filled in.
  • A + means that the element can occur several times.
  • A X means that the element cannot be edited.