return false; }   if (doc == null) {
  public static boolean importCommunityXML(File xmlFile, String assemblyID) {    if (log.isDebugEnabled()) {      log.debug("importcommXML with file " + xmlFile + " and ASB " + assemblyID);    }    XMLUtils xml = new XMLUtils();    Document doc;    try {      doc = xml.loadXMLFile(xmlFile);    } catch (Exception e) {      log.error("Error when parse xml file: " + xmlFile);      return false;    }    Hashtable calist = new Hashtable(); //table saves communities and their attributes    Hashtable celist = new Hashtable(); //table saves communities and their entities    NodeList communities = doc.getElementsByTagName("Community");    for (int i=0; i<communities.getLength(); i++)    {      Node community = communities.item(i);      String communityName = community.getAttributes().getNamedItem("Name").getNodeValue();      List attrs = new ArrayList();      Hashtable entities = new Hashtable();      NodeList children = community.getChildNodes();      for(int j=0; j<children.getLength(); j++)      {        Node child = children.item(j);        if(child.getLocalName() == null)          continue;        if(child.getLocalName().equals("Attribute")) //attribute of community        {          Attribute attr = new Attribute(child.getAttributes().getNamedItem("ID").getNodeValue(),					 child.getAttributes().getNamedItem("Value").getNodeValue());          attrs.add(attr);        }        if(child.getLocalName().equals("Entity"))        {          String entityName = child.getAttributes().getNamedItem("Name").getNodeValue();          List eattrs = new ArrayList();          NodeList entitychildren = child.getChildNodes();          for(int m=0; m<entitychildren.getLength(); m++)          {            Node entitychild = entitychildren.item(m);            if(entitychild.getLocalName() == null)              continue;            if(entitychild.getLocalName().equals("Attribute"))            {              Attribute attr = new Attribute(entitychild.getAttributes().getNamedItem("ID").getNodeValue(),					     entitychild.getAttributes().getNamedItem("Value").getNodeValue());              eattrs.add(attr);            }          }          entities.put(entityName, eattrs);        }      }      if(attrs.size() > 0)  calist.put(communityName, attrs);      if(entities.size() > 0) celist.put(communityName, entities);    }    if (log.isDebugEnabled()) {      log.debug("About to importCommAtt");    }    boolean flag1 = importCommunityAttribute(calist, assemblyID);    boolean flag2 = importCommunityEntity(celist, assemblyID);    return flag1&&flag2;  }