printError("getTaskKey() Maintaining prep phrase not a String:"+key+" TASK:"+taskDesc(task));
printError("getTaskKey() Maintaining prep phrase not a MaintainedItem:"+key+" TASK:"+taskDesc(task));
   public static String getTaskKey(Task task)    {	String key = "VERB:"+task.getVerb().toString();		Asset direct_obj = task.getDirectObject();	if (direct_obj != null) {	    key += " "+getKey(direct_obj);	}	// This whole prepositional phrase section should be replaced by the following	// if I knew an easy way to sort objects... 	Enumeration pps = task.getPrepositionalPhrases();	Enumeration sorted_phrases = sortByPrepostion(pps);	while (sorted_phrases.hasMoreElements()) {	    PrepositionalPhrase pp = (PrepositionalPhrase)sorted_phrases.nextElement();	    String preposition = pp.getPreposition();	    Object indirect_obj = pp.getIndirectObject();	    String description = ""+indirect_obj;	    if (pp.equals(Constants.Preposition.TO) || pp.equals(Constants.Preposition.FROM)) {		if (indirect_obj instanceof GeolocLocation) {		    description = ((GeolocLocation)indirect_obj).getGeolocCode();		} else {		    GLMDebug.DEBUG("PublicationKey", null, preposition+" on "+taskDesc(task)+" geoloc:"+indirect_obj, 1);		}	    } else if (pp.equals(Constants.Preposition.FOR)) {		if (indirect_obj instanceof Organization) {		    description = ((Organization)indirect_obj).getItemIdentificationPG().getItemIdentification();		} else if (indirect_obj instanceof String) {		    description = (String)indirect_obj;		} else {		    printError("getTaskKey() FOR prep phrase not an org or string id. key:"+key+" TASK:"+taskDesc(task));		}	    } else if (pp.equals(Constants.Preposition.MAINTAINING)) {		if (indirect_obj instanceof String) {		    description = (String)indirect_obj;		} else {		    printError("getTaskKey() Maintaining prep phrase not a String:"+key+" TASK:"+taskDesc(task));		}	    }	    key += " "+preposition+" "+description;	}			try {            long time = TaskUtils.getStartTime(task);	    key += " START:" + TimeUtils.dateString(new Date(time));        } catch (RuntimeException re) {            try {                long time = TaskUtils.getEndTime(task);		key += " END:" + TimeUtils.dateString(new Date(time));	    } catch (RuntimeException re2) {            }	}	return key;    }