public void chooseItemDmd(Context context, Element dmds[])
public void chooseItemDmd(Context context, Item item, MetsManifest manifest, AbstractMetsSubmission.MdrefManager callback, Element dmds[])
    public void chooseItemDmd(Context context, Element dmds[])        throws CrosswalkException,               AuthorizeException, SQLException, IOException    {        int found = -1;        // MODS is preferred        for (int i = 0; i < dmds.length; ++i)            if ("MODS".equals(manifest.getMdType(dmds[i])))                found = i;        // DC acceptable if no MODS        if (found == -1)        {            for (int i = 0; i < dmds.length; ++i)                if ("DC".equals(manifest.getMdType(dmds[i])))                    found = i;        }        String groupID = null;        if (found >= 0)        {            manifest.crosswalkItem(context, item, dmds[found], this);            groupID = dmds[found].getAttributeValue("GROUPID");            if (groupID != null)            {                for (int i = 0; i < dmds.length; ++i)                {                    String g = dmds[i].getAttributeValue("GROUPID");                    if (g != null && !g.equals(groupID))                        manifest.crosswalkItem(context, item, dmds[i], this);                }            }        }        // otherwise take the first.  Don't xwalk more than one because        // each xwalk _adds_ metadata, and could add duplicate fields.        else        {            if (dmds.length > 0)                manifest.crosswalkItem(context, item, dmds[0], this);        }    }