Codota Logo
Interactor.getInteractorType
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain Interactor
private void myMethod () {
Interactor i =
  • Codota IconParticipant participant;participant.getInteractor()
  • Smart code suggestions by Codota
}
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/psimi-schema-validator

public static boolean isDNA( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), RuleUtils.DNA_MI_REF, true );
}
origin: psidev.psi.mi.jami/jami-core

/**
 * To know if an interactor have a specific interactor type.
 * @param interactor
 * @param typeId
 * @param typeName
 * @return true if the interactor has the type with given name/identifier
 */
public static boolean doesInteractorHaveType(Interactor interactor, String typeId, String typeName){
  if (interactor == null){
    return false;
  }
  return CvTermUtils.isCvTerm(interactor.getInteractorType(), typeId, typeName);
}
origin: psidev.psi.mi/psimi-schema-validator

public static boolean isRNA( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), RuleUtils.RNA_MI_REF, true );
}
origin: psidev.psi.mi/psimi-schema-validator

public static boolean isSmallMolecule( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), BioactiveEntity.BIOACTIVE_ENTITY_MI, true );
}
origin: psidev.psi.mi/psimi-schema-validator

public static boolean isBiopolymer( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), RuleUtils.BIOPOLYMER_MI_REF, true );
}
origin: psidev.psi.mi/psimi-schema-validator

public static boolean isPeptide( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), Protein.PEPTIDE_MI, false );
}
origin: psidev.psi.mi/psimi-schema-validator

public static boolean isPolysaccharide( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), RuleUtils.POLYSACCHARIDE_MI_REF, true );
}
origin: psidev.psi.mi/psimi-schema-validator

public static boolean isProtein( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), Protein.PROTEIN_MI, false );
}
origin: psidev.psi.mi/psimi-schema-validator

public static boolean isNucleicAcid( OntologyManager ontologyManager, Interactor interactor ) {
  return isOfType( ontologyManager, interactor.getInteractorType(), RuleUtils.NUCLEIC_ACID_MI_REF, true );
}
origin: psidev.psi.mi.jami/jami-mitab

public void writeInteractorType(P participant) throws IOException {
  if (participant != null){
    writeCvTerm(participant.getInteractor().getInteractorType());
  }
  else {
    getWriter().write(MitabUtils.EMPTY_COLUMN);
  }
}
origin: psidev.psi.mi.jami/jami-core

CvTerm type1 = interactor1.getInteractorType();
CvTerm type2 = interactor2.getInteractorType();
origin: psidev.psi.mi.jami/jami-core

CvTerm type1 = interactor1.getInteractorType();
CvTerm type2 = interactor2.getInteractorType();
origin: psidev.psi.mi/psimi-schema-validator

/**
 * check that each interactor has at least name or a short label.
 *
 * @param interactor to check on.
 * @return a collection of validator messages.
 * @exception psidev.psi.tools.validator.ValidatorException if we fail to retrieve the MI Ontology.
 */
public Collection<ValidatorMessage> check( Interactor interactor ) throws ValidatorException {
  // list of messages to return
  List<ValidatorMessage> messages = Collections.EMPTY_LIST;
  if (interactor.getInteractorType() == null){
    MiContext context = RuleUtils.buildContext( interactor, "interactor" );
    messages=Collections.singletonList( new ValidatorMessage( "The interactor does not have an interactor type and it is required by IMEx.",
        MessageLevel.ERROR,
        context,
        this ) );
  }
  else {
    if( RuleUtils.isNucleicAcid(ontologyManager, interactor) || RuleUtils.isSmallMolecule(ontologyManager, interactor)) {
      MiContext context = RuleUtils.buildContext( interactor, "interactor" );
      messages=Collections.singletonList( new ValidatorMessage( "'nucleic acids' and 'small molecules' are currently outside of the remit of IMEx and " +
          "should be removed from the record.",
          MessageLevel.WARN,
          context,
          this ) );
    }
  }
  return messages;
}
origin: psidev.psi.mi/psimi-schema-validator

@Override
public Collection<ValidatorMessage> check(Interactor interactor) throws ValidatorException {
  Collection<ValidatorMessage> messages = Collections.EMPTY_LIST;
  if (interactor.getInteractorType() != null && RuleUtils.isProtein(ontologyManager, interactor) && interactor.getOrganism() == null){
    MiContext context = RuleUtils.buildContext(interactor, "interactor");
    messages=Collections.singleton(new ValidatorMessage("The protein does not have an organism and it is required for MIMIx.",
        MessageLevel.ERROR,
        context,
        this));
  }
  else if ( InteractorUtils.doesInteractorHaveType(interactor, Gene.GENE_MI, Gene.GENE) && interactor.getOrganism() == null){
    MiContext context = RuleUtils.buildContext(interactor, "interactor");
    messages=Collections.singleton( new ValidatorMessage( "The gene does not have an organism and it is required for MIMIx.",
        MessageLevel.ERROR,
        context,
        this ) );
  }
  return messages;
}
origin: psidev.psi.mi.jami/jami-core

  /**
   *
   * @param interactor
   * @return the hashcode consistent with the equals method for this comparator
   */
  public static int hashCode(Interactor interactor){
    if (unambiguousExactInteractorComparator == null){
      unambiguousExactInteractorComparator = new UnambiguousExactInteractorBaseComparator();
    }

    if (interactor == null){
      return 0;
    }

    int hashcode = 31;
    hashcode = 31*hashcode + UnambiguousCvTermComparator.hashCode(interactor.getInteractorType());
    hashcode = 31*hashcode + OrganismTaxIdComparator.hashCode(interactor.getOrganism());
    hashcode = 31*hashcode + UnambiguousInteractorBaseComparator.hashCode(interactor);

    return hashcode;
  }
}
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/psimi-schema-validator

if( interactor.getInteractorType() != null && (RuleUtils.isSmallMolecule( ontologyManager, interactor ) || RuleUtils.isPolysaccharide( ontologyManager, interactor ) )) {
else if( interactor.getInteractorType() != null && RuleUtils.isBiopolymer(ontologyManager, interactor)) {
origin: psidev.psi.mi/psimi-schema-validator

checkCv(messages, interactor.getInteractorType(), interactor, "interactor");
origin: psidev.psi.mi.jami/jami-interactionviewer-json

getCvWriter().write(object.getInteractorType());
psidev.psi.mi.jami.modelInteractorgetInteractorType

Javadoc

The molecule type of this interactor. It is a controlled vocabulary term and cannot be null. Ex: protein, gene, small molecule, ...

Popular methods of Interactor

  • 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
  • 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
  • setInteractorType
    Sets the molecule type for this interactor If the given type is null, this method automatically sets
  • setOrganism,
  • setInteractorType,
  • setShortName

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • String (java.lang)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
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