code: private String getResourceType(Resource resource)
     {
        String result;
        net.sf.mpxj.ResourceType type = resource.getType();
        if (type == null)
        {
           type = net.sf.mpxj.ResourceType.WORK;
        }
  
        switch (type)
        {
           case MATERIAL:
           {
              result = "Material";
              break;
           }
  
           case COST:
           {
              result = "Nonlabor";
              break;
           }
  
           default:
           {
              result = "Labor";
              break;
           }
        }
  
        return result;
     }
docs: Formats a resource type.
  
  @param resource MPXJ resource
  @return Primavera resource type