code: private void writeResource(Resource mpxj)
     {
        ResourceType xml = m_factory.createResourceType();
        m_apibo.getResource().add(xml);
  
        xml.setAutoComputeActuals(Boolean.TRUE);
        xml.setCalculateCostFromUnits(Boolean.TRUE);
        xml.setCalendarObjectId(getCalendarUniqueID(mpxj.getResourceCalendar()));
        xml.setCurrencyObjectId(DEFAULT_CURRENCY_ID);
        xml.setDefaultUnitsPerTime(Double.valueOf(1.0));
        xml.setEmailAddress(mpxj.getEmailAddress());
        xml.setGUID(DatatypeConverter.printUUID(mpxj.getGUID()));
        xml.setId(RESOURCE_ID_PREFIX + mpxj.getUniqueID());
        xml.setIsActive(Boolean.TRUE);
        xml.setMaxUnitsPerTime(getPercentage(mpxj.getMaxUnits()));
        xml.setName(mpxj.getName());
        xml.setObjectId(mpxj.getUniqueID());
        xml.setParentObjectId(mpxj.getParentID());
        xml.setResourceNotes(mpxj.getNotes());
        xml.setResourceType(getResourceType(mpxj));
        xml.getUDF().addAll(writeUDFType(FieldTypeClass.RESOURCE, mpxj));
     }
docs: Write a single resource.
  
  @param mpxj Resource instance