Skip to main content
Version: 7.2

Metadata

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/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/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 docuteam-packer/config there are several pre-configured levels.xml configuration files available. packer always uses the file named levels.xml, so by renaming another file into levels.xml it is possible to switch the configuration:

  • levels.xml: Default version with just one level (undefined) with all the metadata fields available in packer.
  • levels_BAR.xml: Version for transforming Matterhorn METS packages into eCH-0160.
  • levels_cmi_de.xml Version adapted for usage with CMI AIS.
  • levels_isad-g_de.xml Version with levels, fields and field labels according to ISAD(G) in German.
  • levels_isad-g_en.xml Version with levels, fields and field labels according to ISAD(G) in Englisch.
  • levels_isad-g_fr.xml Version with levels, fields and field labels according to ISAD(G) in French.

In the first section of levels.xml (LEVELS:MetadataElements) all available metadata elements and, if applicable, allowed values are defined. See List of metadata fields for a list of all metadata fields available in packer.

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
ExampleaccessNr
mandatoryyes
ExplanationThe 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
Examplenew java.text.SimpleDateFormat("yyyy-MM-dd").format(new java.util.Date()), ((ch.docuteam.darc.mets.structmap.NodeAbstract)object1).getMimeType(), "false"
mandatoryno
ExplanationA Java expression to initialize this field with a value when the node is created. The current node is referenced by: (ch.docuteam.darc.mets.structmap.NodeAbstract)object1. See List of defaultExpressions for examples.
validatorClassName
Examplech.docuteam.darc.mdconfig.MetadataElementValidatorDate
mandatoryno
ExplanationA 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. See List of validatorClassNames for all available validators.
postActionClassName
Examplech.docuteam.darc.mdconfig.
MetadataElementSetterPostActionSysOut
mandatoryno
ExplanationA 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. See List of postActionClassNames for all available postAction classes.
allowedValues
Example*;German;English;French;Italian, file:///config/skos/retentions.rdf
mandatoryno
ExplanationA 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
ExamplestringList
mandatoryno
ExplanationSpecifies 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
ExampleFonds
mandatoryyes
ExplanationThe unique name of this level.
iconFileName
Exampleresources/images/LevelSerie.png
mandatoryyes
ExplanationThe path to the icon file of this level. If this file does not exist, a yellow warning icon is displayed.
allowedSublevelNameRefs
ExampleSeries File Undefined
mandatoryno
ExplanationList 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
Exampletrue
mandatoryno
ExplanationMarks 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
Examplelanguage
mandatoryyes
ExplanationThe accessorNameID of the metadata element; references an accessorNameID from the list of <LEVELS:MetadataElements> (see above).
isMandatory
Exampletrue
mandatoryyes
ExplanationIf 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
Examplefalse
mandatoryyes
ExplanationIf true, this metadata element is repeatable and can be added multiple times as needed.
isAlwaysDisplayed
Exampletrue
mandatoryno
ExplanationIf true, this metadata element is always displayed in the metadata list and does not need to be added manually first.
isReadOnly
Examplefalse
mandatoryno
ExplanationIf 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
Examplefalse
mandatoryno
ExplanationIf true, this metadata element is not deleted when a template is created.
displayRows
Example5
mandatoryno
ExplanationSpecifies 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.

List of metadata fields

For a list of metadata fields available in docuteam packer consult the Matterhorn METS documentation.

List of defaultExpressions

  • '"Abc"': Enters "Abc" as default value.
  • 'new java.text.SimpleDateFormat("yyyy-MM-dd").format(new java.util.Date())': Enters the current date in the formate yyyy-MM-dd as the default value.
  • '((ch.docuteam.darc.mets.structmap.NodeAbstract)object1).getMimeType()': Enters the MIME type of a file as the default value.
  • 'ch.docuteam.tools.string.DateFormatter.getDateTimeString(object1.getFile().lastModified(), DateFormatter.Short)': Enters the date of the last modification of a file.
  • 'ch.docuteam.tools.file.FileUtil.getHumanReadableFileSize(object1.getFile())': Enters the file size in human readable form.
  • 'object1.isFile() ? ch.docuteam.tools.file.FileUtil.asFileNameExtension(((ch.docuteam.darc.mets.structmap.NodeAbstract)object1).getFile()) : null': Enters the file extensions.

List of validatorClassNames

  • 'MetadataElementValidatorInteger.java': Only accepts integers between -2147483648 and 2147483647.
  • 'MetadataElementValidatorShort.java': Only accepts positive integers between 0 and 32767.
  • 'MetadataElementValidatorYear.java': Only accepts dates in the format yyyy.
  • 'MetadataElementValidatorDate.java': Only accepts dates in the format yyyy-MM-dd.
  • 'MetadataElementValidatorDateCH.java': Only accepts dates in the format dd.MM.yyyy.
  • 'MetadataElementValidatorDateYYYYMMDD.java': Only accepts dates in the format yyyyMMdd.
  • 'MetadataElementValidatorDateYYYYMMDDPartial.java': Only accepts dates in the format yyyyMMdd, yyyyMM or yyyy.
  • 'MetadataElementValidatorDateRangeCH.java': Only accepts dates or date ranges in the format dd.MM.yyyy or dd.MM.yyyy - dd.MM.yyyy
  • 'MetadataElementValidatorDateHierarchyRangeCH.java': Only accepts dates or date ranges in the format dd.MM.yyyy or dd.MM.yyyy - dd.MM.yyyy and additionally checks whether a given date rage is within the ancestors range and comprises the descendants date ranges.
  • 'MetadataElementValidatorDateHierarchyYear.java': Only accepts dates or dates ranges in the formats yyyy or yyyy - yyyy and additionally checks whether a given date range is within the ancestors ranges and comprises the descandants date ranges.
  • 'MetadataElementValidatorUniqueValueAmongSiblings.java': Checks whether a metadata element is unique amongs its siblings.

List of postActionClassNames

  • 'MetadataElementSetterPostActionAddValueInParents.java': Adds a copy of a newly entered metadata field to all ancestor nodes.
  • 'MetadataElementSetterPostActionAddStartDateInParents.java': Adds a copy of a newly entered start date field to all ancestor nodes, if the ancestor node is empty or the ancestor date is later than the newly entered date. Supports multiple date formats.
  • 'MetadataElementSetterPostActionAddEndDateInParents.java': Adds a copy of a newly entered end date field to all ancestor nodes, if the ancestor node is empty, the ancestor date is earlier than the newly entered date. Supports multiple date formats.
  • 'MetadataElementSetterPostActionAddValueInChildrenOfDossiers.java': Applies changes (add/update/remove) to a value to decendants (if node's level is "Dossier" or "Document" and element is not repeatable).