{
Resource resource = event.getResource();
ResourceProperty identityProperty = getIdentityProperty(resource);
if (identityProperty != null)
{
XmlAnyURI id = (XmlAnyURI) identityProperty.get(0);
String resourceID = null;
if (id == null)
{
resourceID = "ResourceID Unknown. May be singleton.";
}
else
{
resourceID = id.toString();
}
DestructionNotificationDocument destructionNotifDoc = DestructionNotificationDocument.Factory.newInstance();
DestructionNotificationDocument.DestructionNotification destructionNotif = destructionNotifDoc.addNewDestructionNotification();
destructionNotif.setResourceId((String) resourceID);