log.error("Exception", fnf);
log.error("createGraphFromDotFile couldnt find file " + f.getAbsolutePath() + ". Error: " + fnf);
  public static CSMARTGraph createGraphFromDotFile(File f) {    InputStream input = null;    Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic.CSMARTGraph");    try {      input = new FileInputStream(f);    } catch(FileNotFoundException fnf) {      if(log.isErrorEnabled()) {        log.error("Exception", fnf);      }      return null;    }    CSMARTGraph graph = new CSMARTGraph();    graph.file = f;    Parser program = new Parser(input, System.err, graph);    try {      program.parse();    } catch(Exception ex) {      if(log.isErrorEnabled()) {        log.error("CSMARTGraph: parser exception: ", ex);      }      return null;    }    stripAttributeQuotes(graph);    Attribute colorTableAttr = graph.getAttribute(COLOR_TABLE);    // if no color table, just get values for COLOR_DETERMINER colorName    // from properties, and put these in the Grappa color table    // and in COLOR_ATTR and STYLE_ATTR    // note: this does not preserve colors for files that have no color table    if (colorTableAttr ==  null) {      GraphEnumeration ge = graph.elements(GrappaConstants.NODE);      while (ge.hasMoreElements()) {	Node node = (Node)ge.nextGraphElement();	Attribute a = node.getAttribute(COLOR_DETERMINER);	if (a == null)	  continue;	String colorName = a.getStringValue();	Color color = properties.getClusterColor(colorName);	GrappaColor.addColor(colorName, color);	node.setAttribute(COLOR_ATTR, colorName);	node.setAttribute(GrappaConstants.STYLE_ATTR,			  new GrappaStyle(GrappaConstants.NODE, 			    "filled(true), line_color(" + colorName + ")"));      }    } else {      // set uiproperties and GrappaColor from color table      String colorTable = colorTableAttr.getStringValue();      // parse color table, return hashtable of colorname to color      Hashtable colors = readColorTable(colorTable);      Enumeration keys = colors.keys();      // enter colorname to color mappings in uiproperties and GrappaColor      while (keys.hasMoreElements()) {	String colorName = (String)keys.nextElement();	Color color = (Color)colors.get(colorName);	properties.setClusterColor(colorName, color);	GrappaColor.addColor(colorName, color);      }      // define COLOR_ATTR and STYLE_ATTR to use COLOR_DETERMINER value      GraphEnumeration ge = graph.elements(GrappaConstants.NODE);      while (ge.hasMoreElements()) {	Node node = (Node)ge.nextGraphElement();	Attribute a = node.getAttribute(COLOR_DETERMINER);	if (a == null)	  continue;	String colorName = a.getStringValue();	node.setAttribute(COLOR_ATTR, colorName);	node.setAttribute(GrappaConstants.STYLE_ATTR,			  new GrappaStyle(GrappaConstants.NODE,                             "filled(true), line_color(" + colorName + ")"));      }    }    graph.buildShapes();    return graph;  }