if(!assetData.isEntity()) { if (assetData.getUniqueID() != null) {
if (assetData.getUniqueID() != null && !assetData.getUniqueID().equals("")) {
  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) {	  writer.print("[UniqueId] ");	  writer.println(quote(assetData.getUniqueID()));	  writer.println();	}	if(assetData.getUnitName() != null) {	  writer.print("[UnitName] ");	  writer.println(assetData.getUnitName());	  writer.println();	}		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.isEntity()) {	  	  writer.print(rel.getRole() + "  ");	  writer.print(quote(rel.getItem()) + "  ");	  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	} else {	  throw new RuntimeException("Asset Data Type Must be set: Entity, Org or TPOrg");	}      }		                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();	  writer.print(propData.getName() + " ");	  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();    }  }