@Override protected void createDefinitionFor(String def, Source term) { term.getAnnotations().add(AnnotationUtils.createAnnotation("definition", def)); } }
public void onPostalAddressUpdate(Source cv, String oldPostalAddress) { if (oldPostalAddress == null){ sourceChangeLogger.log(Level.INFO, "The postal address " + cv.getPostalAddress() + " has been added to the source " + cv.toString()); } else if (cv.getPostalAddress() == null){ sourceChangeLogger.log(Level.INFO, "The postal address " + oldPostalAddress + " has been removed from the source " + cv.toString()); } else { sourceChangeLogger.log(Level.INFO, "The postal address " + oldPostalAddress + " has been updated with " + cv.getPostalAddress() + " 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()); } } }
pub.getAdminGroupList().getGroup().add(publication.getSource().getShortName().toUpperCase());
public void onUrlUpdate(Source cv, String oldUrl) { if (oldUrl == null){ sourceChangeLogger.log(Level.INFO, "The URL " + cv.getUrl() + " has been added to the source " + cv.toString()); } else if (cv.getUrl() == null){ sourceChangeLogger.log(Level.INFO, "The URL " + oldUrl + " has been removed from the source " + cv.toString()); } else { sourceChangeLogger.log(Level.INFO, "The URL " + oldUrl + " has been updated with " + cv.getUrl() + " in the source " + cv.toString()); } }
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()); } } }
try { imexPublication = (ImexPublication)getImexCentralClient().updatePublicationAdminGroup( pubId, source, Operation.ADD, institution.getShortName().toUpperCase() ); log.info("Added other publication admin group : " + institution); if (!INTACT_ADMIN.equals(institution.getShortName().toUpperCase()) && !containsAdminGroup(sources, new DefaultSource(INTACT_ADMIN_CURATOR))){ if (!INTACT_ADMIN.equals(institution.getShortName().toUpperCase()) && !containsAdminGroup(sources, new DefaultSource(INTACT_ADMIN))){ try { else if (!INTACT_ADMIN.equals(institution.getShortName().toUpperCase()) && !containsAdminGroup(sources, new DefaultSource(INTACT_ADMIN_CURATOR))){
/** * The source of the Alias is uniprotkb if the alias type is gene name, gene name synonym, isoform synonym, * locus name or orf name. If the participant has an modelled interaction with a source, * it will return the source shortname. It is unknown otherwise. * @param participant * @param alias * @return */ public static String findDbSourceForAlias(ModelledParticipant participant, Alias alias){ if (participant != null){ // these aliases should come from uniprotkb if (AliasUtils.doesAliasHaveType(alias, Alias.GENE_NAME_MI, Alias.GENE_NAME) || AliasUtils.doesAliasHaveType(alias, Alias.GENE_NAME_SYNONYM_MI, Alias.GENE_NAME_SYNONYM) || AliasUtils.doesAliasHaveType(alias, Alias.ISOFORM_SYNONYM_MI, Alias.ISOFORM_SYNONYM) || AliasUtils.doesAliasHaveType(alias, Alias.LOCUS_NAME_MI, Alias.LOCUS_NAME) || AliasUtils.doesAliasHaveType(alias, Alias.ORF_NAME_MI, Alias.ORF_NAME)){ return Xref.UNIPROTKB; } // check source else if (participant.getInteraction() != null){ ModelledInteraction interaction = participant.getInteraction(); if (interaction.getSource() != null){ return interaction.getSource().getShortName(); } } } return UNKNOWN_DATABASE; }
Publication pub = exp.getPublication(); if (pub.getSource() != null){ return pub.getSource().getShortName();