Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: ISBNValidator

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Location
    Brno, Czech republic
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question ISBNValidator

    Hi,

    I would like to use class ISBNValidator. I think this class should be in library commons-validator-1.3.1.jar, but there isn't any in org.apache.commons.validator.routines (one other ISBNValidator is in org.apache.commons.validator).

    Could anyone tell me where is the problem?

    //on deprecated list of package is also writen:
    "org.apache.commons.validator.ISBNValidator - Use the new ISBNValidator in the routines package"
    Last edited by shebik; December 6th, 2011 at 11:53 AM.

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: ISBNValidator

    org.apache.commons.validator.routines.ISBNValidato r was introduced in v1.4, so you will not find it in any release prior to that. The org.apache.commons.validator.ISBNValidator should not be listed as deprecated in any API prior to version 1.4

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Location
    Brno, Czech republic
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: ISBNValidator

    ok, but on Apache websites is only version 1.3.3 and I can't find latest version. I found only missing source classes on www.koders.com (example). Is there some place where I can download the library of version 1.4 or how can I put the missing files to the library? to which directory?
    Last edited by shebik; December 6th, 2011 at 01:53 PM.

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: ISBNValidator

    Is there something wrong with using the ISBNValidator from 1.3? Like I said it wasn't deprecated until 1.4 If you want the latest, you will probably have to get the latest source from svn: Validator - Source Repository

  5. #5
    Junior Member
    Join Date
    Dec 2011
    Location
    Brno, Czech republic
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: ISBNValidator

    ISBNValidator from 1.3 doesn't work with ISBN13. That's the problem.

    I downloaded files that I need and then I inserted them into org.apache.commons.validator.routines (resp. org.apache.commons.validator.routines.checkdigit) location. But it doesn't work. When I look on these files in Netbeans IDE they have different icons from other classes in library. What should I do to make them work properly in the library?
    Last edited by shebik; December 7th, 2011 at 08:43 AM.

  6. #6
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: ISBNValidator

    Quote Originally Posted by shebik View Post
    ISBNValidator from 1.3 doesn't work with ISBN13. That's the problem.

    I downloaded files that I need and then I inserted them into org.apache.commons.validator.routines (resp. org.apache.commons.validator.routines.checkdigit) location. But it doesn't work. When I look on these files in Netbeans IDE they have different icons from other classes in library. What should I do to make them work properly in the library?
    I have no clue why it doesn't work - you need to provide more information. Did you download .java files? .class files? Define 'doesn't work'

  7. #7
    Junior Member
    Join Date
    Dec 2011
    Location
    Brno, Czech republic
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: ISBNValidator

    Only .java files. When I put them to my default package (and change the package location to actual) it works how it should. But I want to put them into the validator .jar library I just don't know how. I have tried to insert .java files to /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines (resp. .../checkdigit).

  8. #8
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: ISBNValidator

    Compile the java files to class files, then add them to the library. I'm surprised the newest version isn't available as a jar. That being said, I'd recommend ditching the 1.3 library and get the fill Validator as opposed to adding 1.4 files to 1.3. This means you may have to retrieve the source from SVN, compile, and jar yourself. You will prevent any versioning conflicts this way

  9. The Following User Says Thank You to copeg For This Useful Post:

    shebik (December 9th, 2011)

  10. #9
    Junior Member
    Join Date
    Dec 2011
    Location
    Brno, Czech republic
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: ISBNValidator

    I have just tried to put the compiled classes to the library and it works well. Thank you.

Tags for this Thread