String qualifier = dcv.qualifier;  if( qualifier == null ) { qualifier = "none"; }
    private static void writeMetadata( Context c, Item i, File destDir )        throws Exception    {        File outFile = new File( destDir, "dublin_core.xml" );             System.out.println("Attempting to create file " + outFile);                   if( outFile.createNewFile() )        {            PrintWriter out = new PrintWriter( new FileWriter( outFile ) );                        DCValue dcorevalues[] = i.getDC(Item.ANY, Item.ANY, Item.ANY);                   out.println("<dublin_core>");                         for(int j = 0; j < dcorevalues.length; j++)            {                DCValue dcv = dcorevalues[j];                            String output = "  <dcvalue element=\"" + dcv.element + "\" " +                                "qualifier=\"" + dcv.qualifier + "\">" +                                dcv.value +                                "</dcvalue>";                            out.println( output );            }            out.println("</dublin_core>");            out.close();        }        else        {            throw new Exception( "Cannot create dublin_core.xml in " + destDir );        }    }