pp_vector.addElement(newPrepositionalPhrase(Constants.Preposition.MAINTAINING, inv));
Asset resource = inv.getInventoryPG().getResource(); StringBuffer inventoryID = new StringBuffer().append("Inventory:").append(resource.getTypeIdentificationPG().getTypeIdentification()); pp_vector.addElement(newPrepositionalPhrase(Constants.Preposition.MAINTAINING, inventoryID.toString()));
    public Task createRefillTask(Inventory inv, double refill_qty, long time) {	Asset item = getInventoryAsset(inv);	// create request task	Vector prefs = new Vector();	Preference p_start, p_end,p_qty;	long end_time = defaultRefillEndTime(time,inv);//  	long start_time = defaultRefillStartTime(time,inv);//  	p_start = createDateAfterPreference(AspectType.START_TIME, start_time);	p_end = createDateBeforePreference(AspectType.END_TIME,end_time);	// AMY - SF need early (OPlan Start date), best (defaultRefillEndDate) and Late (Plan End date)//  	    double early = (double)oplan.getStartTime();//  	    double best = (double)end_time;//  	    double late = (double)oplan.getEndTime();//  	    AspectValue earlyAV = new AspectValue(AspectType.END_TIME, early);//  	    AspectValue bestAV = new AspectValue(AspectType.END_TIME, best);//  	    AspectValue lateAV = new AspectValue(AspectType.END_TIME, late);//  	    ScoringFunction endTimeSF = ScoringFunction.createVScoringFunction(earlyAV, bestAV, lateAV);//  	    p_end = ldmFactory_.newPreference(AspectType.END_TIME, endTimeSF);        p_qty = createRefillQuantityPreference(refill_qty);//  	prefs.addElement(p_start);	prefs.addElement(p_end);	prefs.addElement(p_qty);	Vector pp_vector = new Vector();	pp_vector.addElement(newPrepositionalPhrase(Constants.Preposition.FOR, myOrgName_));	pp_vector.add(newPrepositionalPhrase(Constants.Preposition.OFTYPE, supplyType_));	Object io;	Enumeration geolocs = AssetUtils.getGeolocLocationAtTime(myOrganization_, end_time);	if (geolocs.hasMoreElements()) {	    io = (GeolocLocation)geolocs.nextElement();	} else {	    io = thisGeoloc_;	}	pp_vector.addElement(newPrepositionalPhrase(Constants.Preposition.TO, io));	pp_vector.addElement(newPrepositionalPhrase(Constants.Preposition.MAINTAINING, inv));	pp_vector.addElement(newPrepositionalPhrase(Constants.Preposition.REFILL));	NewTask task =  (NewTask)buildTask(null, Constants.Verb.SUPPLY, 					   item, pp_vector, prefs.elements());	return task;    }