3.1. Definition of metadata types

A metadata type is defined within the <MetadataType> element. This element must be the only child of the <Name> element, which contains the internal name of the metadata type. The internal name is also used to reference the metadata type from the serialization configuration. It must not contain any spaces.

Furthermore the <MetadataType> element can contain any number of <language> elements as a child. These <language> elements translate the internal name of the metadata type into the respective language specified in the name attribute. Therefore, it makes sense to define at least one <language> element per metadata type so that its value can be displayed and used in the user interface. There can only be one <language> element per language and <MetadataType> element.

Example: Definition of the main title "TitleDocMain

<language name="de">HauptTitel</language>
<language name="en">Main title</language>

If the defined field is not a metadata but a person, an attribute type with the value person must be added to the <MetadataType> element.

Example: Definition of a person:

<MetadataType type="person">
<language name="en">Author</language>
<language name="de">Autor</language>

The order of the <language> elements does not matter, since they are called internally via the API using the values in the attribute name. If no language is defined, the API returns a NULL value and the application should use the internal name of the metadata type.

If the anchor is to be saved in a separate file, a metadata is required that allows a reference between the anchor file and the file of the underlying structural unit. Therefore, in this case, the metadata type to be used for this purpose must have an attribute type with the value identifier.

Example: Definition of an identifier for the above referencing:

<MetadataType type="identifier">
<language name="de">PPN (digital)</language>
<language name="en">PPN</language>

Metadata types that begin with an underscore _ are so-called internal metadata types. You can assign values to these metadata types when you create activities, for example, by means of an OPAC import defined in the rules set or by a definition in Goobi's projects.xml project configuration file. These internal metadata types are not returned with the structure type return lists - for example, DocStruct.getAllVisibleMetadata(). For example, they are not visible to users in the Goobi Metadata Editor and cannot be created as new metadata.

Example: Definition of a metadata with standard data

<MetadataType normdata="true">
<language name="en">Classification</language>
<language name="de">Klassifizierung </language>

Metadata with the attribute normdata="true" has additional fields to describe a standard record by a URL, an identifier and the name of the database.

Example: Definition of a person with additional fields:

<MetadataType type="person" namepart="true">
<language name="en">Author</language>
<language name="de">Autor</language>

For definitions of persons, the attribute namepart can be set in addition to the normdata attribute described above. This enables additional fields to be activated in which further information such as life data or form of attachment can be entered.