MODS import needs improvement
The current MODS translator logic is implemented incorrectly such that a lot of information gets lost when dealing, in particular, with analyticals (those items like articles and chapters that have relatedItem hosts).
From what I could tell on a quick look (and from observed behavior), right now the translator only looks at the child mods:mods/mods:genre value. If it finds none, or cannot map that value, it defaults to 'book'.
The logic should be (using some xpath notation, where the context is the m:mods element):
From what I could tell on a quick look (and from observed behavior), right now the translator only looks at the child mods:mods/mods:genre value. If it finds none, or cannot map that value, it defaults to 'book'.
The logic should be (using some xpath notation, where the context is the m:mods element):
if m:relatedItem[@type='host'] then
if [insert genre value mapping]
else if m:relatedItem/m:originInfo/m:publisher then
type = 'bookSection' # or whatever it is internally
else
type = 'article' # a generic article
else
[insert genre value mapping; default to 'document']