Changeset 8575


Ignore:
Timestamp:
2004-11-16T16:49:03+13:00 (19 years ago)
Author:
kjdon
Message:

added a hack to select the first classifier node if its horizontal at the top

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/GS2BrowseAction.java

    r6695 r8575  
    9393    // the id of the classifier is the top id of the selected node
    9494    String top_id = OID.getTop(classifier_node);
    95 
    9695    HashSet doc_meta_names = new HashSet();
    9796    HashSet class_meta_names = new HashSet();
     
    127126        horizontal_at_top = true;
    128127    }
    129    
     128    if (top_id.equals(classifier_node) && horizontal_at_top) {
     129        // we have asked for a top node - if the first list is horizontal, we will select the first element of that list
     130        // this is a hack. also it craps out if the classifier really isn't horizontalAtTop.
     131        classifier_node = classifier_node+".1";
     132           
     133    }
     134
    130135    // get the browse structure for the selected node
    131136    Element classify_message = this.doc.createElement(GSXML.MESSAGE_ELEM);
     
    301306    }
    302307
    303 
     308   
    304309    protected void extractMetadataNames(Element new_format, HashSet doc_meta_names, HashSet class_meta_names) {
    305310
Note: See TracChangeset for help on using the changeset viewer.