How to get and update the owner of the work item via Java API?

I can get and update some string attributes of a work item via Java API.
copiedWorkItem is the object of IWorkItem;
String currentSummary = copiedWorkItem.getHTMLSummary().getPlainText().trim();
if (!currentSummary.equalsIgnoreCase(workitem.getSummary().trim())){
IAttribute summaryAttribute= workItemClient.findAttribute(projectArea, IWorkItem.SUMMARY_PROPERTY, monitor);
copiedWorkItem.setValue(summaryAttribute, workitem.getSummary());
}
But I cannot get and set the value of "Owner". Who can help me?
Accepted answer

<tt>IWorkItem.getOwner()</tt> and <tt>IWorkItem.setOwner()</tt> deal with <tt>IContributorHandle</tt>, not strings. I'm not really sure how this interacts with the <tt>OWNER_PROPERTY</tt> attribute.
Working with getOwner() would look something more like this:
If you want to change the owner, use the IContributorManager to get the contributor:
Working with getOwner() would look something more like this:
IContributorHandle ownerHandle = workitem.getOwner(); //fetch the full object to see things like IContributor.getName(), IContributor.getUserId(), etc...
IContributor owner = teamRepository.itemManager().fetchCompleteItem(ownerHandle, IItemManager.DEFAULT, progressMonitor);
If you want to change the owner, use the IContributorManager to get the contributor:
IContributor newOwner = teamRepo.contributorManager().fetchContributorByUserId(newOwnerUserId, progressMonitor); copiedWorkItem.setOwner(newOwner);