public void onShortNameUpdate(T protein, String oldShortName) { interactorChangeLogger.log(Level.INFO, "The short name " + oldShortName + " has been updated with " + protein.getShortName() + " in the interactor " + protein.toString()); }
@Override public Collection<ValidatorMessage> check(Interactor interactor) throws ValidatorException { if (interactor.getShortName() == null || interactor.getShortName().length() == 0 || PsiXmlUtils.UNSPECIFIED.equals(interactor.getShortName()) || MitabUtils.UNKNOWN_NAME.equals(interactor.getShortName())){ // list of messages to return MiContext experimentContext = RuleUtils.buildContext(interactor, "interactor"); return Collections.singletonList(new ValidatorMessage( "Interactors must have a valid short name (or alias in MITAB).'", MessageLevel.ERROR, experimentContext, this ) ); } return Collections.EMPTY_LIST; }
String firstName = firstShortNameAlphabeticalOrder.getInteractor().getShortName().trim().toLowerCase(); String secondName = p.getInteractor().getShortName().trim().toLowerCase();
String firstName = firstShortNameAlphabeticalOrder.getInteractor().getShortName().trim().toLowerCase(); String secondName = p.getInteractor().getShortName().trim().toLowerCase();
escapeAndWriteString(interactor.getShortName()); writer.write("("); writer.write(MitabUtils.DISPLAY_SHORT);
protected void buildInteractionkey(I interaction) { this.stringBuilder.setLength(0); this.interactorAcs.clear(); // read ordered set of interactor acs for (Object obj : interaction.getParticipants()) { Participant component = (Participant)obj; interactorAcs.add(component.getInteractor() instanceof IntactInteractor ? ((IntactInteractor) component.getInteractor()).getAc() : component.getInteractor().getShortName()); } for (String prL : interactorAcs) { stringBuilder.append(" "); stringBuilder.append(prL); } // interaction type stringBuilder.append(interaction.getInteractionType().getMIIdentifier()); // experiment CvTerm method = extractInteractionDetectionMethodFrom(interaction); if (method != null) { stringBuilder.append(" "); stringBuilder.append(method.getMIIdentifier()); } }
String shortName1 = interactor1.getShortName(); String shortName2 = interactor2.getShortName(); if (shortName1.equals(shortName2)){ return true;
hashcode = 31*hashcode + interactor.getShortName().hashCode(); hashcode = 31*hashcode + (interactor.getFullName() != null ? interactor.getFullName().hashCode() : 0);
/*** * This method will copy properties of interactor source in interactor target and will override all the other properties of Target interactor. * @param source * @param target */ public static void copyAndOverrideBasicInteractorProperties(Interactor source, Interactor target){ if (source != null && target != null){ target.setShortName(source.getShortName()); target.setFullName(source.getFullName()); target.setInteractorType(source.getInteractorType()); target.setOrganism(source.getOrganism()); // copy collections target.getAnnotations().clear(); target.getAnnotations().addAll(source.getAnnotations()); target.getIdentifiers().clear(); target.getIdentifiers().addAll(source.getIdentifiers()); target.getAliases().clear(); target.getAliases().addAll(source.getAliases()); target.getXrefs().clear(); target.getXrefs().addAll(source.getXrefs()); target.getChecksums().clear(); target.getChecksums().addAll(source.getChecksums()); } }
String shortName1 = interactor1.getShortName(); String shortName2 = interactor2.getShortName(); int comp = shortName1.compareTo(shortName2);
this.ac = (interactor instanceof IntactInteractor) ? ((IntactInteractor)interactor).getAc() : interactor.getShortName(); this.shortName = interactor.getShortName();
MIJsonUtils.writeProperty("label", JSONValue.escape(object.getShortName()), writer); MIJsonUtils.writeEndObject(writer);
private void writeInteractorComponent(Interactor object) throws IOException { MIJsonUtils.writeStartObject(writer); MIJsonUtils.writeProperty("label", JSONValue.escape(object.getShortName()), writer);