On Wed, Apr 20, 2016 at 05:28:31PM +0200, Claudia Jürgen wrote: > Am 20.04.2016 um 16:57 schrieb Tim Donohue: > > On 4/20/2016 9:44 AM, Mark H. Wood wrote: > > > Is there any use case for a text_language value of an empty or blank > > > string? Should we not convert such values to null values in the business > > > logic layer on ingestion, and remove this puzzle? > > > > No, there is not. It's just a hard puzzle to solve. I'm not exactly sure > > *when* these empty / blank language values get into the system. > > > guess they come mostly from import and templates. (gonna check tomorrow just > leaving).
I say it doesn't matter where they get in. Submitters will make mistakes. The values should be normalized. I propose to have MetadataFieldServiceImpl.create() quietly strip leading/trailing spaces in setLanguage() and set the language to a null reference if the result is zero-length. We might even feed the non-null result into java.utli.Locale.Builder.setLanguageTag() to see whether it actually represents a standard language tag. (If not, the method will throw a distinct exception.) > And they are difficult to get rid of via the UI. One can only delete the > metadatum and create it again. > > Apart from making sure they are not created a curation task to clean up > would be good. Not only for empty values but invalid ones not referring to a > locale or some with trailing spaces etc. like "en ". As the text_lang > influences other things like sort in browse it would be useful. Also checking > for null values where there most likely should be some and for fields which > should not have any and got some. In older versions the default text lang was > applied to all metadata field even dates. Yes, I thought that a tool to clean up any existing mess would be useful. -- Mark H. Wood Lead Technology Analyst University Library Indiana University - Purdue University Indianapolis 755 W. Michigan Street Indianapolis, IN 46202 317-274-0749 www.ulib.iupui.edu -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature
