Use metadata mappings for description

This commit is contained in:
Beatrycze Volk 2022-10-20 11:38:37 +02:00
parent 414596bfa7
commit df5236a319
2 changed files with 19 additions and 7 deletions

View File

@ -129,12 +129,5 @@ class Mods implements \Kitodo\Dlf\Common\MetadataInterface
}
}
}
// Get "description"
$descriptions = $xml->xpath('./mods:recordInfo/mods:recordInfoNote/text()');
if (!empty($descriptions)) {
foreach ($descriptions as $description) {
$metadata['description'][0] = (string) $description;
}
}
}
}

View File

@ -501,5 +501,24 @@ return [
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
],
'description' => [
'format' => [
[
'format_root' => 'mods',
'xpath' => './mods:recordInfo/mods:recordInfoNote',
'xpath_sorting' => '',
],
],
'default_value' => '',
'wrap' => '',
'index_tokenized' => 0,
'index_stored' => 0,
'index_indexed' => 0,
'index_boost' => 0.00,
'is_sortable' => 0,
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
]
];