Changeset 23050

Show
Ignore:
Timestamp:
06.10.2010 15:01:25 (9 years ago)
Author:
kjdon
Message:

code was assuming CLx and removing CL then parsing the integer to get the position. But now just use the position in the list to be the position and assume that the coll config and build config lists are the same. then we can get classifier info for eg oai classifier

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java

    r22306 r23050  
    3838/** Partially implements a generic classifier service 
    3939 * 
    40  * @author <a href="mailto:kjdon@cs.waikato.ac.nz">Katherine Don</a> 
    4140 */ 
    4241public abstract class AbstractBrowse 
     
    268267        //                         name); 
    269268            //now use the position to get the node - CL1  
    270             int position = Integer.parseInt(name.substring(2)); 
     269        // assumes the same number of classifiers in collectionCOnfig as in buildConfig 
     270        //            int position = Integer.parseInt(name.substring(2)); 
     271         
    271272        Element node_extra = null; 
    272273            NodeList cls = config_browse.getElementsByTagName(GSXML.CLASSIFIER_ELEM); 
    273             if (position >0 && position <= cls.getLength()) { 
    274             node_extra  = (Element) cls.item((position -1));  
     274            //if (position >0 && position <= cls.getLength()) { 
     275        //    node_extra  = (Element) cls.item((position -1));  
     276        //} 
     277        if (i<cls.getLength()) { 
     278          node_extra = (Element) cls.item(i); 
    275279        } 
    276280