Ignore:
Timestamp:
2011-07-14T21:39:43+12:00 (13 years ago)
Author:
ak19
Message:

Commits for ticket 770 concerning the display of multiple values for a metadata (like dc.Title) when classified by that metadata. So when the user browses by dc.Title, they no longer merely see a doc listed once for each dc.Title assigned but under the same (first retrieved) dc.Title, but they should now see the doc listed once for each dc.Title assigned to it with a different dc.Title value each time.

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DBInfo.java

    r16869 r24254  
    5353    }
    5454
     55    /** get the value for the key at offset. If offset out of bounds,
     56     * just return the first one. */
     57    public String getInfoOffset(String key, int offset) {
     58    Vector items = (Vector)info_map_.get(key);
     59    if (items==null) {
     60        return "";
     61    }
     62    if(offset >= 0 && offset < items.size()) {
     63        return (String)items.get(offset);
     64    } // else
     65    return (String)items.firstElement();
     66    }
     67
     68
    5569    // methods for keys that can have multiple values
    5670   
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r24221 r24254  
    157157  public static final String NODE_TYPE_INTERNAL = "internal";
    158158  public static final String NODE_TYPE_LEAF = "leaf";
     159  public static final String NODE_MDOFFSET_ATT = "mdoffset";
    159160 
    160161  public static final String DOC_TYPE_SIMPLE = "simple";
     
    10391040      StringWriter sw = new StringWriter();
    10401041      trans.transform(new DOMSource(e), new StreamResult(sw));
    1041       System.err.println( sw.toString() );
     1042      System.err.println( sw.toString() ); // logger.info( sw.toString() );
    10421043    } catch( Exception ex ) {
    10431044      System.err.println( "couldn't write " + e + " to log" );
Note: See TracChangeset for help on using the changeset viewer.