code: public void setResource(Resource resource)
     {
        m_resource = resource;
        String name = m_resource.getName();
        if (name == null || name.length() == 0)
        {
           name = "Unnamed Resource";
        }
        setName(name);
     }
docs: Sets the resource to which this calendar is linked. Note that this
  method updates the calendar's name to be the same as the resource name.
  If the resource does not yet have a name, then the calendar is given
  a default name.
  
  @param resource resource instance