Ignore:
Timestamp:
2010-04-08T19:53:54+12:00 (14 years ago)
Author:
ak19
Message:

Sometimes (even the) top-level classifier ID contains a decimal point. Need to deal with this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java

    r21859 r21863  
    17371737        // classifier CL1 = browse titles by letter;
    17381738        // classifier CL2 = browse by collection;
    1739         //remove the CL prefix and obtain the number from the id:
    1740         int classifierNum = Integer.parseInt(classifierIDs[i].replace("CL", ""));
     1739        // remove the CL prefix and decimal point to obtain the number from the id:
     1740        String classifier = classifierIDs[i].replace("CL", "");
     1741        int decimal = classifier.indexOf('.'); // look for decimal point
     1742        if(decimal != -1) {
     1743            classifier.substring(0, decimal);
     1744        }
     1745        int classifierNum = Integer.parseInt(classifier);
    17411746        switch(classifierNum) {
    17421747            case 1:
Note: See TracChangeset for help on using the changeset viewer.