public void onPublicationUpdate(Source cv, Publication oldPublication) { if (oldPublication == null){ sourceChangeLogger.log(Level.INFO, "The publication " + cv.getPublication() + " has been added to the source " + cv.toString()); } else if (cv.getPublication() == null){ sourceChangeLogger.log(Level.INFO, "The publication " + oldPublication + " has been removed from the source " + cv.toString()); } else { sourceChangeLogger.log(Level.INFO, "The publication " + oldPublication + " has been updated with " + cv.getPublication() + " in the source " + cv.toString()); } } }
/** * This method will copy basic properties and source specific properties from a source to a target * @param source : the source to copy from * @param target : the source target to copy to */ public static void copyAndOverrideSourceProperties(Source source, Source target){ if (source != null && target != null){ copyAndOverrideCvTermProperties(source, target); target.setPublication(source.getPublication()); } } }