writer.print("# Asset Class may have been modified on parse!");
  private void writePrototypeINI(File configDir, AgentComponentData agent) throws IOException {    AgentAssetData assetData = agent.getAgentAssetData();    if (assetData == null) {      // No Asset info available      return;    }    PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, agent.getName() + "-prototype-ini.dat")));    try {      writer.print("[Prototype] ");      writer.println(assetData.getAssetClass());      writer.println();//       if(!assetData.isEntity()) {	if (assetData.getUniqueID() != null &&            !assetData.getUniqueID().equals("")) {	  writer.print("[UniqueId] ");	  writer.println(quote(assetData.getUniqueID()));	  writer.println();	}	if(assetData.getUnitName() != null &&           !assetData.getUnitName().equals("")) {	  writer.print("[UnitName] ");	  writer.println(assetData.getUnitName());	  writer.println();	}	        if(!assetData.isNewIniFormat()) {          writer.print("[UIC] ");          writer.println(quote(assetData.getUIC()));          writer.println();        }//       }            // Write Relationships.      Iterator iter = assetData.getRelationshipIterator();      writer.println("[Relationship]");      while(iter.hasNext()) {	RelationshipData rel = (RelationshipData)iter.next();        if(assetData.isNewIniFormat()) {          if(log.isInfoEnabled()) {            log.info("Writing out new INI file format");          }          if (assetData.isEntity()) {	              writer.print(rel.getType() + "  ");            writer.print(quote(rel.getItemId()) + "  ");            writer.print(quote(rel.getTypeId()) + "  ");            writer.print(quote(rel.getSupported()) + "  ");            long startTime = rel.getStartTime();            long endTime = rel.getEndTime();            if (startTime == 0L || endTime == 0L) {              writer.print(quote("") + "  ");              writer.println(quote(""));            } else {              writer.print(quote(myDateFormat.format(new Date(startTime))) + "  ");              writer.println(quote(myDateFormat.format(new Date(endTime))));            }          } else if(assetData.isOrg()) {            writer.print(rel.getType() + " ");            writer.print(quote(rel.getSupported()) + " ");            writer.println(quote(rel.getRole()));          } else if(assetData.isTPOrg()){            // To Do: Deals with Realtionship.ini file	    // FIXME!!!!!          } else {            throw new RuntimeException("Asset Data Type Must be set: Entity, Org or TPOrg");          }        } else {          if(log.isInfoEnabled()) {            log.info("Writing out old INI file format");          }                    if(rel.getRole().equalsIgnoreCase("Subordinate")) {            writer.print("Superior  ");            writer.print(quote(rel.getSupported()) + " ");            writer.println(quote(""));          } else {            writer.print(rel.getType() + " ");            writer.print(quote(rel.getSupported()) + " ");            writer.println(quote(rel.getRole()) + " ");          }        }      }      writer.println();      iter = assetData.getPropGroupsIterator();      while(iter.hasNext()) {	PropGroupData pgData = (PropGroupData)iter.next();	writer.println("[" + pgData.getName() + "]");	Iterator iter2 = pgData.getPropertiesIterator();		while(iter2.hasNext()) {	  PGPropData propData = (PGPropData)iter2.next();          if(propData.getName().equals("HomeLocation")) {            writer.println("# To correctly store in the database on read");            writer.println("# the parser removed data from this field that");            writer.println("# will prevent running from this INI file.");            writer.println("# Refer to an older ini file for the missing info.");          }	  writer.print(propData.getName() + " ");	  // This is ugly!	  if (propData.getName().equals("HomeLocation")) {	    writer.print("GeolocLocation");	  } else if (propData.getType().equals("COLLECTION")) {	    writer.print("Collection");	  } else if (propData.getType().equals("LIST")) {	    writer.print("List");	  } else {	  	    writer.print(propData.getType());	  }	  if(propData.isListType()) {	    writer.print("<" + propData.getSubType() + ">");	    writer.print(" " + quote(((PGPropMultiVal)propData.getValue()).toString()));	    writer.println();	  } else {	    writer.println(" " + quote((String)propData.getValue()));	  }	}	writer.println();      }    } finally {      writer.close();    }  }