metadataArray = items[i].getDC(element, Item.ANY, Item.ANY);
metadataArray = items[i].getMetadata(schema, element, Item.ANY, Item.ANY);
    public int doStartTag() throws JspException    {        JspWriter out = pageContext.getOut();        HttpServletRequest hrq = (HttpServletRequest) pageContext.getRequest();                boolean emphasiseDate = false;        boolean emphasiseTitle = false;        if (emphColumn != null)        {            emphasiseDate = emphColumn.equalsIgnoreCase("date");            emphasiseTitle = emphColumn.equalsIgnoreCase("title");        }                // get the elements to display        String configLine = ConfigurationManager.getProperty("webui.itemlist.columns");        if (configLine != null)        {            listFields = configLine;        }                // get the date and title fields        String dateLine = ConfigurationManager.getProperty("webui.browse.index.date");        if (dateLine != null)        {            dateField = dateLine;        }                String titleLine = ConfigurationManager.getProperty("webui.browse.index.title");        if (titleLine != null)        {            titleField = titleLine;        }                StringTokenizer st = new StringTokenizer(listFields, ",");        //      make an array to hold all the frags that we will use        int columns = st.countTokens();        String[] frags = new String[columns * items.length];                try         {            out.println("<table align=\"center\" class=\"miscTable\" summary=\"This table browse all dspace content\">");            out.println("<tr>");                        //      Write the column headings            int colCount = 1;            boolean isDate = false;            boolean emph = false;                        while (st.hasMoreTokens())            {                String field = st.nextToken().toLowerCase().trim();                String cOddOrEven = ((colCount % 2) == 0 ? "Odd" : "Even");                                // find out if the field is a date                if (field.indexOf("(date)") > 0)                {                    field = field.replaceAll("\\(date\\)", "");                    isDate = true;                }                                // get the schema and the element qualifier pair                // (Note, the schema is not used for anything yet)                // (second note, I hate this bit of code.  There must be                // a much more elegant way of doing this.  Tomcat has                // some weird problems with variations on this code that                 // I tried, which is why it has ended up the way it is)                StringTokenizer eq = new StringTokenizer(field, ".");                                String[] tokens = { "", "", "" };                int k = 0;                while(eq.hasMoreTokens())                {                    tokens[k] = eq.nextToken().toLowerCase().trim();                    k++;                }                String schema = tokens[0];                String element = tokens[1];                String qualifier = tokens[2];                                // find out if we are emphasising this field                if ((field.equals(dateField) && emphasiseDate) ||                         (field.equals(titleField) && emphasiseTitle))                {                    emph = true;                }                                // prepare the strings for the header                String id = "t" + Integer.toString(colCount);                String css = "oddRow" + cOddOrEven + "Col";                String message = "itemlist." + field;                                // output the header                out.print("<th id=\"" + id +  "\" class=\"" + css + "\">"                        + (emph ? "<strong>" : "")                        + LocaleSupport.getLocalizedMessage(pageContext, message)                        + (emph ? "</strong>" : "") + "</th>");                                // now prepare the frags for each of the table elements                for (int i = 0; i < items.length; i++)                {                    // first get hold of the relevant metadata for this column                    DCValue[] metadataArray;                    if (qualifier.equals("*"))                    {                        metadataArray = items[i].getDC(element, Item.ANY, Item.ANY);                    }                    else if (qualifier.equals(""))                    {                        metadataArray = items[i].getDC(element, null, Item.ANY);                    }                    else                    {                        metadataArray = items[i].getDC(element, qualifier, Item.ANY);                    }                                        // now prepare the content of the table division                    String metadata = "-";                    if (metadataArray.length > 0)                    {                        // format the date field correctly                        if (isDate)                        {                            // this is to be consistent with the existing setup.                            // seems like an odd place to put it though (FIXME)                            String thumbs = "";                            if (showThumbs)                            {                                thumbs = getThumbMarkup(hrq, items[i]);                            }                            DCDate dd = new DCDate(metadataArray[0].value);                            metadata = UIUtil.displayDate(dd, false, false) + thumbs;                        }                        // format the title field correctly                        else if (field.equals(titleField))                        {                            metadata = "<a href=\"" + hrq.getContextPath() + "/handle/"                             + items[i].getHandle() + "\">"                             + Utils.addEntities(metadataArray[0].value)                            + "</a>";                        }                        // format all other fields                        else                        {                            StringBuffer sb = new StringBuffer();                            for (int j = 0; j < metadataArray.length; j++)                            {                                sb.append(Utils.addEntities(metadataArray[j].value));                                if (j < (metadataArray.length - 1))                                {                                    sb.append("; ");                                }                            }                            metadata = "<em>" + sb.toString() + "</em>";                        }                    }                                        // now prepare the XHTML frag for this division                    String rOddOrEven;                    if (i == highlightRow)                    {                        rOddOrEven = "highlight";                    }                    else                    {                        rOddOrEven = ((i % 2) == 1 ? "odd" : "even");                    }                                        // prepare extra special layout requirements for dates                    String extras = "";                    if (isDate)                    {                        extras = "nowrap=\"nowrap\" align=\"right\"";                    }                                        int idx = ((i + 1) * columns) - columns + colCount - 1;                    frags[idx] = "<td headers=\"" + id + "\" class=\""                     	+ rOddOrEven + "Row" + cOddOrEven + "Col\" " + extras + ">"                    	+ (emph ? "<strong>" : "") + metadata + (emph ? "</strong>" : "")                    	+ "</td>";                                    }                                colCount++;                isDate = false;                emph = false;            }                        out.println("</tr>");                        // now output all the frags in the right order for the page            for (int i = 0; i < frags.length; i++)            {                if ((i + 1) % columns == 1)                {                    out.println("<tr>");                }                out.println(frags[i]);                if ((i + 1) % columns == 0)                {                    out.println("</tr>");                }            }                        // close the table            out.println("</table>");        }        catch (IOException ie)        {            throw new JspException(ie);        }        return SKIP_BODY;    }