/** * Get the interactor's shortlabel. * @param interactor * @return the name of null of no shortlabel available. */ private String getName(Interactor interactor) { if( interactor.getNames() != null ) { if ( interactor.getNames().hasShortLabel() ) { return interactor.getNames().getShortLabel(); } } return null; } }
/** * @param interaction * @return names of these interaction. */ private Names getInteractionName(Interaction interaction) { Names interactionName = null; Collection<Participant> participants = interaction.getParticipants(); for (Participant participant : participants) { if (interactionName != null) { String shortLabel = interactionName.getShortLabel().concat("-"); shortLabel = shortLabel.concat(participant.getInteractor().getNames().getShortLabel().split("_")[0]); interactionName.setShortLabel(shortLabel); } if (interactionName == null) { interactionName = new Names(); interactionName.setShortLabel(participant.getInteractor().getNames().getShortLabel().split("_")[0]); } } if (interactionName == null) { log.warn("Interaction don't have a name"); } return interactionName; }
@Override protected Interactor newIntactObjectInstance( psidev.psi.mi.xml.model.Interactor psiObject ) { String shortLabel = psiObject.getNames().getShortLabel(); return newInteractorAccordingToType( psiObject.getOrganism(), shortLabel, psiObject.getInteractorType() ); }
protected String displayParticipant(Participant p) { // fetch role String role = ""; for (ExperimentalRole aRole : p.getExperimentalRoles()) { if (role.length() > 0) { role += "&"; } if (aRole.hasNames()) { role += aRole.getNames().getShortLabel(); } else { role += "?"; } } // fetch interactor String interactor = p.getInteractor().getNames().getShortLabel(); return interactor + ":" + role; }
private String displayParticipant( Participant p ) { // fetch role String role = ""; for ( ExperimentalRole aRole : p.getExperimentalRoles() ) { if ( role.length() > 0 ) { role += "&"; } if ( aRole.hasNames() ) { role += aRole.getNames().getShortLabel(); } else { role += "?"; } } // fetch interactor String interactor = p.getInteractor().getNames().getShortLabel(); return interactor + ":" + role; }
String name = interactor.getNames().getShortLabel(); String type = interactor.getInteractorType().getNames().getShortLabel();
if (xmlInteractor.getNames() != null) { Collection<Alias> aliases = xmlInteractor.getNames().getAliases(); String shortLabel = xmlInteractor.getNames().getShortLabel(); if (shortLabel != null) { psidev.psi.mi.tab.model.Alias a = new psidev.psi.mi.tab.model.AliasImpl(UNKNOWN, shortLabel); String fullName = xmlInteractor.getNames().getFullName(); if (fullName != null) { psidev.psi.mi.tab.model.Alias a = new psidev.psi.mi.tab.model.AliasImpl(UNKNOWN, fullName);
String shortName = null; Set<String> synonyms = new HashSet<String>(); Names psiNames = interactor.getNames(); if (psiNames != null) { name = (psiNames.hasFullName()) ? psiNames.getFullName() : null;
IntactConverterUtils.populateNames(psiObject.getNames(), interactor, aliasConverter); IntactConverterUtils.populateXref( psiObject.getXref(), interactor, xrefConverter ); IntactConverterUtils.populateAnnotations( psiObject, interactor, getInstitution(), annotationConverter );