sul-dlss-deprecated / assembly

DEPRECATED: This repo has been merged into common-accessioning
Other
0 stars 1 forks source link

When creating basic content metadata, set book direction if content type is book #113

Closed peetucket closed 5 years ago

peetucket commented 5 years ago

In the .create_basic_content_metadata method or in dor-services gem (would need a new ticket for dor-services if done there), we interrogate the tags in an object if the content type is book so that we can determine the reading direction. This reading direction is then passed as a parameter to the Assembly::ObjectFile gem so the correct node can be added to the XML.

Reading direction is determined based on the tag of Process : Content Type : Book (ltr) in identityMetadata when the object is registered.

Prerequisite: https://github.com/sul-dlss/assembly-objectfile/issues/16 Related: sul-dlss/argo#1019 See https://consul.stanford.edu/display/chimera/DOR+content+types,+resource+types+and+interpretive+metadata

jcoyne commented 5 years ago

Why do you think this belongs in create_basic_content_metadata? That method is already doing several things, but I don't see that it's looking at tags. We should to make each method should only do one thing.

peetucket commented 5 years ago

Good point, could perhaps instead create a method on dor-services that determines book direction (so its encapsulated there), which for now looks at tags. This method is then used by the assembly robot to detect the objects book direction, which can be passed as the parameter to assembly-objectfile gem to create content metadata (the gem itself has no knowledge of objects/tags/etc.).