* @see org.apache.commons.collections.Closure#execute(java.lang.Object)
*/
public void execute(Object arg0) {
if (!consumer.acceptValue(functor.getValue())) return; //hack LC
TimephasedDataType timephasedDataType;
//try {
timephasedDataType = factory.createTimephasedDataType();
// } catch (JAXBException e) {
// e.printStackTrace();
// return;
// }
timephasedDataType.setType(this.type);
timephasedDataType.setUID(this.id);
// System.out.println("Id is " + id);
timephasedDataType.setUnit(BigInteger.valueOf(3L));
HasStartAndEnd interval = (HasStartAndEnd)arg0;
Calendar startCal = DateTime.calendarInstance();
startCal.setTimeInMillis(DateTime.fromGmt(interval.getStart())); // for 2007, convert from gmt
Calendar endCal = DateTime.calendarInstance();
endCal.setTimeInMillis(DateTime.fromGmt(interval.getEnd())); // for 2007, convert from gmt
timephasedDataType.setStart(startCal);
timephasedDataType.setFinish(endCal);
double v = functor.getValue() / WorkCalendar.MILLIS_IN_HOUR;
net.sf.mpxj.Duration d = net.sf.mpxj.Duration.getInstance(v,TimeUnit.HOURS);
XsdDuration xsdDuration = new XsdDuration(d);
timephasedDataType.setValue(xsdDuration.toString());
consumer.consumeTimephased(timephasedDataType);
}