4.6.6. Metadata Type Mapping

However, the main part of the configuration for this serialization class is the mapping of the metadata types to specific tables and table columns. To understand the explanations described below, it is therefore useful to be familiar with the AGORA database schema.

For each metadata type there is a <Metadata> element. Within this element the table, column or even a value is selected. Each <Metadata> element must have a <InternalName> and <TableName> subelement. <InternalName> contains the internal name of the metadata type and <TableName> contains the name of the table in which the value of the metadata is to be stored. Depending on the database management system, it may be necessary to pay attention to upper and lower case. According to the relation between structural unit and metadata, there are several ways to store the metadata:

Relation

Description

1:1

Metadata of the corresponding type may be used a maximum of once per structural unit the metadata is therefore stored in the same table like the structural unit. In the AGORA database schema, this is the DOC table for structural units of the logical structure and the ISET table for force units in the physical structure. All you have to do is the corresponding table column is specified in the element <TableColumn>1m, 1o or +.

Example:

<Metadata>

<InternalName>CatalogIDDigital</InternalName>

<TableName>Doc</TableName>

<TableColumn>CatalogIDDigital</TableColumn>

</Metadata>

1:n

The metadata can occur several times for a structural unit. In this case, there are two tables. The DocAttribute table contains the type of the metadata, the DocAttribValue table links the metadata value plus the metadata value to the table for the structural unit (DOC table). In this case, the value DocAttribute>/code> must be specified in <TableName>. The element <FieldValue> must then have the value of the internal attribute name as stored in the DocAttribute table. The element <TableColumn> does not exist.

Beispiel:

<Metadata>

<InternalName>PublisherName</InternalName> <TableName>DocAttribute</TableName>

<FieldValue>Publisher</FieldValue>

</Metadata>

m:n

A metadata can occur several times for a structural unit. In contrast to the 1:n relationship, however, the metadata value is used several times for different force units. This model is used for the DigitalCollection and the PlacePublication table. If data is to be stored in one of these two tables, the <Metadata> element must contain only one <TableName> element. This must contain the value PlacePublication or DigitalCollection.

Beispiel:

<Metadata>

<InternalName>PlaceOfPublication</InternalName> <TableName>PlacePublication</TableName>

</Metadata>

Personen

People are stored in a separate table. This is necessary because the additional characteristics of a person object have no place in the conventional metadata tables. The <FieldValue> element specifies in this case the role name that this person type has in the database. This is stored in the database in the CreatorType table. The element <TableName> must have the value Creator. Example:

<Metadata>

<InternalName>Author</InternalName>

<TableName>Creator</TableName>

<FieldValue>AUTHOR</FieldValue>

</Metadata>

Beispiel: Nutzung einer Werteliste für die Wertkonvertierung

<Metadata>
<InternalName>DocLanguage</InternalName>
<TableName>Doc</TableName>
<TableColumn>IDLanguage</TableColumn>
<ValueList>languagelist</ValueList>
</Metadata>