String element = allDC[i].element;   if (allDC[i].element.equals("contributor") && allDC[i].qualifier != null && allDC[i].qualifier.equals("author")) { element = "creator"; }
    public String createMetadata(Object nativeItem)        throws CannotDisseminateFormatException    {        Item item = ((HarvestedItemInfo) nativeItem).item;                // Get all the DC        DCValue[] allDC = item.getDC(Item.ANY, Item.ANY, Item.ANY);                StringBuffer metadata = new StringBuffer();                metadata.append("<oai_dc:dc xmlns:oai_dc=\"http://www.openarchives.org/OAI/2.0/oai_dc/\" ")            .append("xmlns:dc=\"http://purl.org/dc/elements/1.1/\" ")            .append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ")            .append("xsi:schemaLocation=\"http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd\">");                for (int i = 0; i < allDC.length; i++)        {            // Do not include description.provenance            boolean description = allDC[i].element.equals("description");            boolean provenance = allDC[i].qualifier != null &&                                 allDC[i].qualifier.equals("provenance");            if (!(description && provenance))            {                // Escape XML chars <, > and &                String value = allDC[i].value;                // First do &'s - need to be careful not to replace the                // & in "&amp;" again!                int c = -1;                while ((c = value.indexOf("&", c + 1)) > -1)                {                    value = value.substring(0, c) +                        "&amp;" +                        value.substring(c + 1);                }                while ((c = value.indexOf("<")) > -1)                {                    value = value.substring(0, c) +                        "&lt;" +                        value.substring(c + 1);                }                                while ((c = value.indexOf(">")) > -1)                {                    value = value.substring(0, c) +                        "&gt;" +                        value.substring(c + 1);                }                metadata.append("<dc:")                    .append(allDC[i].element)                    .append(">")                    .append(value)                    .append("</dc:")                    .append(allDC[i].element)                    .append(">");            }        }                metadata.append("</oai_dc:dc>");        return metadata.toString();    }