ret.setName(resource.getName());
ret.setDescription(resource.getDescription());
ret.setMetadata(resource.getMetadata());
if(resource.getData() != null)
ret.setData(resource.getData().getData());
ret.setCategory(new RESTCategory(resource.getCategory().getName()));
copyResourceAttribs(resource, ret);
return ret;
}