congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Interactor
Code IndexAdd Tabnine to your IDE (free)

How to use
Interactor
in
psidev.psi.mi.jami.model

Best Java code snippets using psidev.psi.mi.jami.model.Interactor (Showing top 20 results out of 315)

origin: psidev.psi.mi.jami/jami-core

/***
 * 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());
  }
}
origin: psidev.psi.mi.jami/jami-mitab

public void writeUniqueIdentifier(P participant) throws IOException {
  if (participant == null){
    writer.write(MitabUtils.EMPTY_COLUMN);
  }
  else {
    Interactor interactor = participant.getInteractor();
    // write first identifier
    if (!interactor.getIdentifiers().isEmpty()){
      writeIdentifier(interactor.getPreferredIdentifier());
    }
    else{
      writer.write(MitabUtils.EMPTY_COLUMN);
    }
  }
}
origin: psidev.psi.mi.jami/jami-core

if (!interactor1.getIdentifiers().isEmpty() || !interactor2.getIdentifiers().isEmpty()){
  Collection<Xref> identifiers1 = interactor1.getIdentifiers();
  Collection<Xref> identifiers2 = interactor2.getIdentifiers();
  return identifierCollectionComparator.compare(identifiers1, identifiers2);
String shortName1 = interactor1.getShortName();
String shortName2 = interactor2.getShortName();
int comp = shortName1.compareTo(shortName2);
String fullName1 = interactor1.getFullName();
String fullName2 = interactor2.getFullName();
if (fullName1 == null && fullName2 == null){
  comp = 0;
Collection<Alias> aliases1 = interactor1.getAliases();
Collection<Alias> aliases2 = interactor2.getAliases();
origin: psidev.psi.mi/psimi-schema-validator

if (interactor.getOrganism() != null){
  checkOrganism(messages, interactor.getOrganism(), interactor, "interactor");
checkCv(messages, interactor.getInteractorType(), interactor, "interactor");
for (Alias alias : interactor.getAliases()){
  checkAlias(messages, alias, interactor, "interactor");
for (Xref ref : interactor.getIdentifiers()){
  checkXref(messages, ref, interactor, "interactor");
for (Xref ref : interactor.getXrefs()){
  checkXref(messages, ref, interactor, "interactor");
for (Annotation a : interactor.getAnnotations()){
  checkAnnotation(messages, a, interactor, "interactor");
for (Checksum a : interactor.getChecksums()){
  checkChecksum(messages, a, interactor, "interactor");
origin: psidev.psi.mi.jami/jami-interactionviewer-json

private void writeInteractorComponent(Interactor object) throws IOException {
  MIJsonUtils.writeStartObject(writer);
  MIJsonUtils.writeProperty("label", JSONValue.escape(object.getShortName()), writer);
  getCvWriter().write(object.getInteractorType());
  if (object.getOrganism() != null){
    MIJsonUtils.writeSeparator(writer);
    MIJsonUtils.writePropertyKey("organism", writer);
    getOrganismWriter().write(object.getOrganism());
  if (object.getPreferredIdentifier() != null){
    MIJsonUtils.writeSeparator(writer);
    MIJsonUtils.writePropertyKey("identifier", writer);
    getIdentifierWriter().write(object.getPreferredIdentifier());
origin: psidev.psi.mi.jami/jami-core

CvTerm type1 = interactor1.getInteractorType();
CvTerm type2 = interactor2.getInteractorType();
Organism organism1 = interactor1.getOrganism();
Organism organism2 = interactor2.getOrganism();
origin: uk.ac.ebi.intact.dataexchange/structured-abstract

this.ac = (interactor instanceof IntactInteractor) ? ((IntactInteractor)interactor).getAc() : interactor.getShortName();
this.shortName = interactor.getShortName();
for (Xref xref : interactor.getIdentifiers()) {
  if (XrefUtils.isXrefFromDatabase(xref, Xref.UNIPROTKB_MI, Xref.UNIPROTKB)
      && XrefUtils.doesXrefHaveQualifier(xref, Xref.IDENTITY_MI, Xref.IDENTITY)){
for (Alias alias : interactor.getAliases()) {
  if (AliasUtils.doesAliasHaveType(alias, Alias.GENE_NAME_MI, Alias.GENE_NAME)){
    this.shortName = alias.getName();
origin: psidev.psi.mi.jami/jami-core

public void onInteractorTypeUpdate(T protein, CvTerm old) {
  interactorChangeLogger.log(Level.INFO, "The interactor type" + old.toString() + " has been replaced with " + protein.getInteractorType().toString()+ " in the interactor " + protein.toString());
}
origin: psidev.psi.mi.jami/jami-mitab

escapeAndWriteString(interactor.getShortName());
writer.write("(");
writer.write(MitabUtils.DISPLAY_SHORT);
if (interactor.getFullName() != null){
  writer.write("|");
  writer.write(CvTerm.PSI_MI);
  writer.write(":");
  escapeAndWriteString(interactor.getFullName());
  writer.write("(");
  writer.write(MitabUtils.DISPLAY_LONG);
if (!interactor.getAliases().isEmpty()){
  Iterator<Alias> aliasIterator = interactor.getAliases().iterator();
origin: psidev.psi.mi.jami/jami-mitab

interactor.setFullName(fullName);
  interactor.getIdentifiers().addAll(uniqueId);
interactor.getChecksums().addAll(checksum);
  interactor.getXrefs().addAll(xref);
origin: psidev.psi.mi.jami/jami-core

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());
}
origin: psidev.psi.mi/psimi-schema-validator

if( interactor.getInteractorType() != null && (RuleUtils.isSmallMolecule( ontologyManager, interactor ) || RuleUtils.isPolysaccharide( ontologyManager, interactor ) )) {
  final Set<String> dbRefs = RuleUtils.collectNames( dbs );
  final Collection<Xref> identities = XrefUtils.searchAllXrefsHavingDatabaseAndQualifier(interactor.getIdentifiers(), dbMiRefs, dbRefs, Arrays.asList(Xref.IDENTITY_MI), Arrays.asList(Xref.IDENTITY));
else if( interactor.getInteractorType() != null && RuleUtils.isBiopolymer(ontologyManager, interactor)) {
  final Set<String> dbRefs = RuleUtils.collectNames( dbs );
  final Collection<Xref> identities = XrefUtils.searchAllXrefsHavingDatabaseAndQualifier(interactor.getIdentifiers(), dbMiRefs, dbRefs, Arrays.asList(Xref.IDENTITY_MI), Arrays.asList(Xref.IDENTITY));
  if(identities.isEmpty() ) {
origin: psidev.psi.mi/psimi-schema-validator

Collection<Xref> identifiers = container.getIdentifiers();
Collection<Xref> databaseReferences = container.getXrefs();
origin: psidev.psi.mi.jami/jami-mitab

protected void createAliasFromAltId(Interactor interactor, MitabXref ref) {
  // create alias from xref
  MitabAlias alias = new MitabAlias(ref.getDatabase().getShortName(), ref.getQualifier(), ref.getId(), ref.getSourceLocator());
  interactor.getAliases().add(alias);
  if (listener != null){
    listener.onSyntaxWarning(ref, "Found an Alias in the alternative identifiers column. Will load it as a checksum.");
  }
}
origin: psidev.psi.mi.jami/jami-core

public void onOrganismUpdate(T protein, Organism old) {
  if (old == null){
    interactorChangeLogger.log(Level.INFO, "The organism has been initialised for the interactor " + protein.toString());
  }
  else if (protein.getOrganism() == null){
    interactorChangeLogger.log(Level.INFO, "The organism has been reset for the interactor " + protein.toString());
  }
  else {
    interactorChangeLogger.log(Level.INFO, "The organism " + old.toString() + " has been replaced with " + protein.getOrganism() + " in the interactor " + protein.toString());
  }
}
origin: psidev.psi.mi.jami/jami-mitab

protected void processInteractorPool(Collection<MitabXref> xref, InteractorPool interactor) {
  InteractorPool pool = (InteractorPool)interactor;
  for (Xref ref : xref){
    // we have a component of the interactor pool
    if (XrefUtils.doesXrefHaveQualifier(ref, Xref.INTERACTOR_SET_QUALIFIER_MI, Xref.INTERACTOR_SET_QUALIFIER)){
      Interactor subInteractor = interactorFactory.createInteractorFromDatabase(ref.getDatabase(), ref.getId().toLowerCase());
      if (subInteractor != null){
        subInteractor.getIdentifiers().add(new MitabXref(ref.getDatabase(), ref.getId(), ref.getVersion(), CvTermUtils.createIdentityQualifier()));
        ((MitabInteractor)subInteractor).setSourceLocator(((MitabXref)ref).getSourceLocator());
      }
      // create a default interactor
      else{
        subInteractor = interactorFactory.createInteractor(ref.getId().toLowerCase(), CvTermUtils.createUnknownInteractorType());
        subInteractor.getIdentifiers().add(new MitabXref(ref.getDatabase(), ref.getId(), ref.getVersion(), CvTermUtils.createIdentityQualifier()));
        ((MitabInteractor)subInteractor).setSourceLocator(((MitabXref)ref).getSourceLocator());
      }
      // add the component to the interactor pool
      pool.add(subInteractor);
    }
    // we have a simple xref
    else{
      pool.getXrefs().add(ref);
    }
  }
}
origin: psidev.psi.mi.jami/jami-mitab

public void writeParticipantAnnotations(P participant) throws IOException {
  if (participant != null){
    if (!participant.getInteractor().getAnnotations().isEmpty()){
      Iterator<Annotation> interactorAnnotationIterator = participant.getInteractor().getAnnotations().iterator();
origin: psidev.psi.mi.jami/jami-mitab

if (!participant.getInteractor().getXrefs().isEmpty()){
  Iterator<Xref> interactorXrefIterator = participant.getInteractor().getXrefs().iterator();
    while (interactorIterator.hasNext()){
      Interactor subInteractor = interactorIterator.next();
      Xref preferredId = subInteractor.getPreferredIdentifier();
      if (preferredId != null){
        getWriter().write(MitabUtils.FIELD_SEPARATOR);
    while (interactorIterator.hasNext()){
      Interactor subInteractor = interactorIterator.next();
      Xref preferredId = subInteractor.getPreferredIdentifier();
      if (preferredId != null){
        getWriter().write(MitabUtils.FIELD_SEPARATOR);
    while (interactorIterator.hasNext()){
      Interactor subInteractor = interactorIterator.next();
      Xref preferredId = subInteractor.getPreferredIdentifier();
      if (preferredId != null){
        if (!first){
origin: psidev.psi.mi.jami/jami-mitab

public void writeParticipantChecksums(P participant) throws IOException {
  if (participant != null){
    if (!participant.getInteractor().getChecksums().isEmpty()){
      Iterator<Checksum> checksumIterator = participant.getInteractor().getChecksums().iterator();
      while(checksumIterator.hasNext()){
        writeChecksum(checksumIterator.next());
        if (checksumIterator.hasNext()){
          getWriter().write(MitabUtils.FIELD_SEPARATOR);
        }
      }
    }
    else{
      getWriter().write(MitabUtils.EMPTY_COLUMN);
    }
  }
  else {
    getWriter().write(MitabUtils.EMPTY_COLUMN);
  }
}
origin: psidev.psi.mi.jami/jami-interactionviewer-json

Interactor interactor = object.getInteractor();
keyValues = MIJsonUtils.extractInteractionId(interactor.getPreferredIdentifier(), (Complex)interactor);
keyValues = MIJsonUtils.extractInteractorId(interactor.getPreferredIdentifier(), interactor);
psidev.psi.mi.jami.modelInteractor

Javadoc

Molecule or complex of molecules that interacts with other molecules/complexes

Most used methods

  • getShortName
    The short name of the interactor. It cannot be null or empty. Ex: brca2
  • getAliases
    Collection of aliases for an interactor The Collection cannot be null and if the interactor does not
  • getAnnotations
    Collection of annotations for an interactor. The set cannot be null and if the interactor does not h
  • getIdentifiers
    Set of identifiers for this interactor. The identifiers can be from different databases, can be prim
  • getInteractorType
    The molecule type of this interactor. It is a controlled vocabulary term and cannot be null. Ex: pro
  • getOrganism
    The original source organism for this interactor. It can be null in case of chemical compounds/synth
  • getChecksums
    Set of checksums computed for this interactor. The Collection cannot be null so when an interactor d
  • getXrefs
    Collection of other xrefs that give more information about the interactor. Ex: GO references to give
  • getFullName
    The full name of the interactor. It can be null Ex: Breast cancer type 2 susceptibility protein
  • getPreferredIdentifier
    The identifier in the list of identifiers which is the preferred identifier. If no identifiers is pr
  • setFullName
    Sets the full name of the interactor
  • setOrganism
    Sets the source organism of this interactor
  • setFullName,
  • setOrganism,
  • setInteractorType,
  • setShortName

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now