public String getShortName() { return wrappedInteraction.getShortName(); }
/** * * @param interaction : the interaction to expand * @return the generated name for this interaction */ protected String generateComplexName(Interaction interaction) { String complexName = interaction.getShortName() != null ? interaction.getShortName() : interaction.toString(); if (complexName == null || complexName.length() == 0){ complexName = Integer.toString(interaction.hashCode()); } return complexName; } }
public void onShortNameUpdate(T interaction, String oldShortName) { if (oldShortName == null){ interactionChangeLogger.log(Level.INFO, "The short name has been initialised for the interaction " + interaction.toString()); } else if (interaction.getShortName() == null){ interactionChangeLogger.log(Level.INFO, "The short name has been reset for the interaction " + interaction.toString()); } else { interactionChangeLogger.log(Level.INFO, "The short name " + oldShortName + " has been updated with " + interaction.getShortName() + " in the interaction " + interaction.toString()); } }
hashcode = 31*hashcode + (interaction.getShortName() != null ? interaction.getShortName().hashCode() : 0);
/** * This method will copy basic properties from the Interaction source in the complex target. * It will erase existing annotations, xrefs, checksums and identifiers * This method does not copy the participants of the source * @param source * @param target */ public static void copyAndOverrideBasicComplexPropertiesWithInteractionProperties(Interaction source, Complex target){ if (source != null && target != null){ target.setInteractionType(source.getInteractionType()); target.setCreatedDate(source.getCreatedDate()); target.setUpdatedDate(source.getUpdatedDate()); if (source.getShortName() != null){ target.setShortName(source.getShortName()); } // copy collections target.getAnnotations().clear(); target.getAnnotations().addAll(source.getAnnotations()); target.getXrefs().clear(); target.getXrefs().addAll(source.getXrefs()); target.getIdentifiers().clear(); target.getIdentifiers().addAll(source.getIdentifiers()); target.getChecksums().clear(); target.getChecksums().addAll(source.getChecksums()); } }
String shortname1 = interaction1.getShortName(); String shortname2 = interaction2.getShortName(); if (shortname1 != null && shortname2 != null){ return shortname1.equals(shortname2);
String shortname1 = interaction1.getShortName(); String shortname2 = interaction2.getShortName(); if (shortname1 != null && shortname2 != null){ return shortname1.compareTo(shortname2);
sentence.addInteractionAc(interaction instanceof IntactPrimaryObject ? ((IntactPrimaryObject)interaction).getAc() : interaction.getShortName());
if (source != null && target != null){ target.setCreatedDate(source.getCreatedDate()); target.setShortName(source.getShortName()); target.setInteractionType(source.getInteractionType()); target.setUpdatedDate(source.getUpdatedDate());