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 ; }
Formats a resource type .