code: 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 = period.getAvailableFrom();
              Date end = period.getAvailableTo();
              Number units = DatatypeConverter.parseUnits(period.getAvailableUnits());
              Availability availability = new Availability(start, end, units);
              table.add(availability);
           }
           Collections.sort(table);
        }
     }
docs: Reads the availability table from the file.
  
  @param resource MPXJ resource instance
  @param periods MSPDI availability periods