// get existing produced notification container
DataProductNotificationType activityType = dataProducedBatchActivity.addNewDataProduced();
// add new data product to the produced data
DataProductType dataProduct = activityType.addNewDataProduct();
// set data ID and size
dataProduct.setId(dataObj.getId().toString());
dataProduct.setSizeInBytes(dataObj.getSizeInBytes());
// set data URLs
List<URI> locations = dataObj.getLocations();
for (URI location : locations) {
dataProduct.addLocation(location.toString());
}
// set data timestamp
final Calendar cal = new GregorianCalendar();
cal.setTime(activityTimestamp != null ? activityTimestamp : new Date());
dataProduct.setTimestamp(cal);
// add description, and annotation to DATA PRODUCT if present
sendNotification(context, dataProducedBatchActivity, descriptionAndAnnotation, "[produced: ID=<"
+ dataObj.getId().toString() + ">; URL=<#" + locations.size() + "><"
+ (locations.size() > 0 ? locations.get(0) : "") + ">]");