*/
private void readAvailabilityTable(Resource resource, AvailabilityPeriods periods)
{
if (periods != null)
{
AvailabilityTable table = resource.getAvailability();
List<AvailabilityPeriod> list = periods.getAvailabilityPeriod();
for (AvailabilityPeriod period : list)
{
Date start = DatatypeConverter.parseDate(period.getAvailableFrom());
Date end = DatatypeConverter.parseDate(period.getAvailableTo());
Number units = DatatypeConverter.parseUnits(period.getAvailableUnits());
Availability availability = new Availability(start, end, units);
table.add(availability);
}
Collections.sort(table);
}
}