Batch Importer (Bib/Acq) (UXPROD-47)

[ISBNUTIL-4] SPIKE: review the Java Apache Commons Validator implementation Created: 20/Dec/18  Updated: 20/Mar/19  Resolved: 14/Jan/19

Status: Closed
Project: isbn-util
Components: None
Affects versions: None
Fix versions: 1.0.0
Parent: Batch Importer (Bib/Acq)

Type: Story Priority: P3
Reporter: Julian Ladisch Assignee: Kateryna Senchenko
Resolution: Done Votes: 0
Labels: ISBN, data-import, epam-folijet
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to ISBNUTIL-2 Parse and validate ISBN numbers befor... Closed
relates to ISBNUTIL-3 SPIKE: review the PHP implementation ... Closed
relates to ISBNUTIL-5 Insert hyphens into ISBN Closed
relates to UXPROD-1038 ISBN normalization: Preparation, and ... Closed
Sprint: EPAM BatchLoader Sprint 7
Story Points: 3
Development Team: Folijet
Epic Link: Batch Importer (Bib/Acq)

 Description   

Apache Commons Validator project has ISBN validators, converters and check digit calculations implemented in Java:
https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/ISBNValidator.html
https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigit.html
https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigit.html
https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigit.html

Project website: https://commons.apache.org/proper/commons-validator/

Consider using that library.

Consider contributing back any additional code that the FOLIO project implements.

Acceptance criteria



 Comments   
Comment by Julian Ladisch [ 09/Jan/19 ]

Examples how to use validator functions with real ISBN numbers are in the unit tests:
http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/ISBNValidatorTest.java?view=markup
http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigitTest.java?view=markup
http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/checkdigit/ISBNCheckDigitTest.java?view=markup
http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/checkdigit/AbstractCheckDigitTest.java?revision=1739356&view=markup

Comment by Kateryna Senchenko [ 09/Jan/19 ]

Thank you Julian Ladisch, we'll take a look.

Comment by Julian Ladisch [ 10/Jan/19 ]

This is an example how Apache Commons Validator may be used: https://github.com/julianladisch/folio-isbn-util/tree/ISBNUTIL-4-apache-commons-validator

Comment by Kateryna Senchenko [ 11/Jan/19 ]

PR on folio-isbn-util is now created. Thank you Julian Ladisch for your help and the example implementation (I used your version of convertToISBN10 method and mentioned you as the author). Please take a look at the PR, I added you as a reviewer.

Generated at Thu Feb 08 22:25:19 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.