Codota Logo
Participant.getInteractor
Code IndexAdd Codota to your IDE (free)

How to use
getInteractor
method
in
psidev.psi.mi.xml.model.Participant

Best Java code snippets using psidev.psi.mi.xml.model.Participant.getInteractor (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: psidev.psi.mi/psimitab

  public int compare(Participant p1, Participant p2) {
    Interactor i1 = p1.getInteractor();
    if( i1 == null ) {
      throw new IllegalArgumentException( "Both participant should hold a valid interactor." );
    }
    Interactor i2 = p2.getInteractor();
    if( i2 == null ) {
      throw new IllegalArgumentException( "Both participant should hold a valid interactor." );
    }
    String name1 = getName( i1 );
    String name2 = getName( i2 );
    int result;
    if ( name1 == null ) {
      result = -1;
    } else if ( name2 == null ) {
      result = 1;
    } else {
      result = name1.compareTo( name2 );
    }
    return result;
  }
} );
origin: psidev.psi.mi/psi25-xml

  jParticipant.setInteractorRef( mParticipant.getInteractorRef().getRef() );
else
  jParticipant.setInteractorRef( mParticipant.getInteractor().getId() );
jParticipant.setInteractor( interactorConverter.toJaxb( mParticipant.getInteractor() ) );
origin: psidev.psi.mi/psi25-xml

public static Entry createEntry(Source source, Collection<Interaction> interactions) {
  Entry entry = new Entry();
  entry.setSource(source);
  for (Interaction interaction : interactions) {
    entry.getInteractions().add(interaction);
    for (ExperimentDescription expDesc : interaction.getExperiments()) {
      entry.getExperiments().add(expDesc);
    }
    for (Participant part : interaction.getParticipants()) {
      entry.getInteractors().add(part.getInteractor());
    }
  }
  return entry;
}
origin: psidev.psi.mi/psi25-xml

private void removeInteractorRedundancy( EntrySet mEntrySet ) {
  if( ConverterContext.getInstance().getConverterConfig().getXmlForm() == PsimiXmlForm.FORM_COMPACT ) {
    for ( Entry entry : mEntrySet.getEntries() ) {
      Map<Interactor, Interactor> uniqueInteractors = new HashMap<Interactor, Interactor>();
      for ( Interaction interaction : entry.getInteractions() ) {
        for ( Participant participant : interaction.getParticipants() ) {
          if( participant.getInteractor() != null ) {
            final Interactor myInteractor = participant.getInteractor();
            if( uniqueInteractors.containsKey( myInteractor ) ) {
              final Interactor uniq = uniqueInteractors.get( myInteractor );
              participant.setInteractor( uniq );
            } else {
              uniqueInteractors.put( myInteractor, myInteractor );
            }
          }
        } // participants
      } // interactions
      // if we had a compact format, we cannot remove interactor redundancy without changing the interactions
      // and update the interactor xref
      if (!uniqueInteractors.isEmpty()){
        entry.getInteractors().clear();
        entry.getInteractors().addAll( uniqueInteractors.keySet() );
      }
    } // entries
  } // model is compact
}
origin: psidev.psi.mi/psimitab

/**
 * @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;
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

public static Collection<Object> nonRedundantInteractorsFromPsiEntry(Entry psiEntry) {
  Map<Integer, Object> nonRedundantInteractors = new HashMap<Integer, Object>();
  if( ConverterContext.getInstance().isGenerateExpandedXml() ) {
    // iterate to get the unique experiments/interactors
    for (psidev.psi.mi.xml.model.Interaction interaction : psiEntry.getInteractions()) {
      for (Participant participant : interaction.getParticipants()) {
        if (participant.getInteractor() != null){
          nonRedundantInteractors.put(participant.getInteractor().getId(), participant.getInteractor());
        }
        else if (participant.getInteraction() != null){
          nonRedundantInteractors.put(participant.getInteraction().getId(), participant.getInteraction());
        }
      }
    }
  } else {
    for ( psidev.psi.mi.xml.model.Interactor interactor : psiEntry.getInteractors() ) {
      nonRedundantInteractors.put( interactor.getId(), interactor );
    }
  }
  return nonRedundantInteractors.values();
}
origin: uk.ac.ebi.intact.dataexchange.imex/intact-imex-repository

private void normalizeEntry(Entry entry) {
  if (entry.getExperiments().isEmpty()) {
    for (Interaction interaction : entry.getInteractions()) {
      interaction.getExperimentRefs().clear();
      for (ExperimentDescription exp : interaction.getExperiments()) {
        entry.getExperiments().add(exp);
        interaction.getExperimentRefs().add(new ExperimentRef(exp.getId()));
      }  
    }
  }
  if (entry.getInteractors().isEmpty()) {
    for (Interaction interaction : entry.getInteractions()) {
      for(Participant participant : interaction.getParticipants()) {
        entry.getInteractors().add(participant.getInteractor());
      }
    }
  }
}
origin: psidev.psi.mi/psimitab

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;
}
origin: psidev.psi.mi/psimitab

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;
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

if (participant.getInteractor() == null && participant.getInteraction() == null) {
  throw new PsiConversionException("Participant without interactor found: "+participant+" in interaction: "+interaction);
origin: psidev.psi.mi/psi25-xml

Interactor interactor = participant.getInteractor();
String name = interactor.getNames().getShortLabel();
String type = interactor.getInteractorType().getNames().getShortLabel();
origin: org.biopax.paxtools/psimi-converter

for(Participant p : interaction.getParticipants()) {
  if(p.hasInteractor()) {
    String type = getName(p.getInteractor().getInteractorType().getNames());
    if(type==null) type = "protein"; //default type (if unspecified)
    participantTypes.add(type.toLowerCase());
      + "; so we'll replace 'gene' with 'dna' (a quick fix)");
  for(Participant p : interaction.getParticipants()) {
    if(p.hasInteractor() && p.getInteractor().getInteractorType().hasNames()) {
      String type = getName(p.getInteractor().getInteractorType().getNames());
      if("gene".equalsIgnoreCase(type)) {
        p.getInteractor().getInteractorType().getNames().setShortLabel("dna");
origin: psidev.psi.mi/psi25-xml

mEntry.getInteractors().add(mParticipant.getInteractor());
participantIds.add(mParticipant.getInteractor().getId());
origin: org.cytoscape/psi-mi-impl

private void processEdge(final Participant source, final Participant target, final Interaction interaction,
    final Collection<Participant> nodes, CyTable nodeTable, CyTable edgeTable) {
  Interactor sourceInteractor = source.getInteractor();
  Interactor targetInteractor = target.getInteractor();
  
  if (sourceInteractor == null || targetInteractor == null) {
    return;
  }
  
  final CyNode sourceCyNode = id2NodeMap.get(sourceInteractor.getId());
  final CyNode targetCyNode = id2NodeMap.get(targetInteractor.getId());
  
  // PPI does not have directinarity
  final CyEdge edge = network.addEdge(sourceCyNode, targetCyNode, false);
  // TODO: what's the best value for interaction?
  edgeTable.getRow(edge.getSUID()).set(CyEdge.INTERACTION, "pp");
  final String sourceName = nodeTable.getRow(sourceCyNode.getSUID()).get(CyNetwork.NAME, String.class);
  final String targetName = nodeTable.getRow(targetCyNode.getSUID()).get(CyNetwork.NAME, String.class);
  edgeTable.getRow(edge.getSUID()).set(CyNetwork.NAME, sourceName + " (pp) " + targetName);
  mapNames(edgeTable, edge.getSUID(), interaction.getNames(), null);
  mapAttributes(interaction.getAttributes(), edgeTable, edge.getSUID());
  final Collection<InteractionType> types = interaction.getInteractionTypes();
  mapInteractionType(types, edgeTable, edge.getSUID());
}

origin: psidev.psi.mi/psi25-xml

for (psidev.psi.mi.xml.model.Interaction mInteraction : mEntry.getInteractions()) {
  for (psidev.psi.mi.xml.model.Participant mParticipant : mInteraction.getParticipants()) {
    mEntry.getInteractors().add(mParticipant.getInteractor());
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

if (participant.getInteractor() != null){
  interactor = this.interactorConverter.psiToIntact(participant.getInteractor());
origin: psidev.psi.mi/psi25-xml

for (psidev.psi.mi.xml.model.Participant mParticipant : mInteraction.getParticipants()) {
  if (!participantIds.contains(mParticipant.getId())) {
    jEntry.getInteractorList().getInteractors().add(interactorConverter.toJaxb(mParticipant.getInteractor()));
    participantIds.add(mParticipant.getId());
origin: psidev.psi.mi/psi25-xml

for (psidev.psi.mi.xml.model.Participant mParticipant : mInteraction.getParticipants()) {
  if (!participantIds.contains(mParticipant.getId())) {
    jEntry.getInteractorList().getInteractors().add( interactorConverter.toJaxb(mParticipant.getInteractor()));
    participantIds.add(mParticipant.getId());
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

public static Component newComponent(Institution institution, Participant participant, uk.ac.ebi.intact.model.Interaction interaction) {
  Interactor interactor = new InteractorConverter(institution).psiToIntact(participant.getInteractor());
origin: org.biopax.paxtools/psimi-converter

  entity = createParticipant(participant, participant.getInteractor(), avail, pro, false);
} else if(participant.hasInteraction()) {
psidev.psi.mi.xml.modelParticipantgetInteractor

Javadoc

Gets the value of the interactor property.

Popular methods of Participant

  • getExperimentalRoles
    Gets the value of the experimentalRoleList property.
  • getFeatures
    Gets the value of the featureList property.
  • getAttributes
    Gets the value of the attributeList property.
  • getBiologicalRole
    Gets the value of the biologicalRole property.
  • getExperimentalInteractors
    Gets the value of the experimentalInteractorList property.
  • getId
    Gets the value of the id property.
  • getInteraction
  • getParticipantIdentificationMethods
    Gets the value of the participantIdentificationMethodList property.
  • hasExperimentalRoles
    Check if the optional experimentalRoles is defined.
  • setBiologicalRole
    Sets the value of the biologicalRole property.
  • setInteractor
    Sets the value of the interactor property.
  • <init>
  • setInteractor,
  • <init>,
  • getConfidenceList,
  • getExperimentalPreparations,
  • getHostOrganisms,
  • getNames,
  • getParameters,
  • getXref,
  • hasAttributes

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now