Skip to content
This repository

Blank MODS elements from the crosswalk #117

Closed
JenniferMartin opened this Issue · 0 comments

3 participants

JenniferMartin Mike Daines Gregory Jansen
JenniferMartin
Collaborator

Currently, the crosswalk creates a blank MODS element if the element it is mapped to is blank. The idea is to add logic which will cause the crosswalk to not write blank elements.

  • If/then logic: if field mapped to is blank, then don't write element set.
  • Must discount attributes with preset values, so that they don't trigger a "not blank" response.
  • Have way for users to indicate whether a subelement is important or not (e.g. only want mapped if 's field has a value, regardless of what's going on with /).
  • Have way for users to mark elements as required or not, and throw up a warning if a required element is not mapped because it's blank, indicating what line the error is from.
  • Probably use some form of recursive logic, where the system checks the parent element and all subelements/attributes and then loops back to the parent element to determine whether to write the whole block or not. (This prevents partly written metadata elements.)
Mike Daines mdaines referenced this issue from a commit
daines daines In MappedAttributeImpl#updateRecord, if the string value is blank, se…
…t the default instead (or null if there is no default). MappedElementImpl#isEmpty will then determine that a record is empty when it would otherwise just have a blank attribute. The result is that elements with blank values are not present in the MODS. References #117.
904438b
Mike Daines mdaines referenced this issue from a commit
daines daines Add "Omitted When Blank" attribute to the MappedAttribute class (defa…
…ult is true). Check this when setting blank values to blank in updateRecord. (References #117)
0aa5093
Gregory Jansen gregjan closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.