Tabnine Logo
uk.ac.ebi.intact.application.dataConversion.psiDownload.xmlGenerator.psi1
Code IndexAdd Tabnine to your IDE (free)

How to use uk.ac.ebi.intact.application.dataConversion.psiDownload.xmlGenerator.psi1

Best Java code snippets using uk.ac.ebi.intact.application.dataConversion.psiDownload.xmlGenerator.psi1 (Showing top 20 results out of 315)

origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Convert an annotatedObject annotations in to confidence value in PSI.
 *
 * @param session
 * @param parent          the Element to which we will attach the generated confidence.
 * @param annotatedObject the object from which we get the annotations.
 *
 * @return the generated confidence or null if none could be generated.
 */
public Element create( UserSessionDownload session, Element parent, AnnotatedObject annotatedObject ) {
  Element element = null;
  if ( annotatedObject instanceof Interaction ) {
    element = create( session, parent, annotatedObject, CvTopic.AUTHOR_CONFIDENCE );
  } else if ( annotatedObject instanceof Experiment ) {
    element = create( session, parent, annotatedObject, CvTopic.CONFIDENCE_MAPPING );
  } else {
    // error, type not supported.
    throw new UnsupportedOperationException( "a confidence can only be generated for an interaction or an experiemnt." );
  }
  return element;
}
origin: uk.ac.ebi.intact.app/data-conversion

public Element createHostOrganism( UserSessionDownload session,
                  Element parent,
                  BioSource bioSource ) {
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null BioSource to build a " + HOST_ORGANISM_TAG_NAME + "." );
  } else {
    if ( !"experimentDescription".equals( parent.getNodeName() ) ) {
      throw new IllegalArgumentException( "You must give a experimentDescription to build a " + ORGANISM_TAG_NAME + "." );
    }
  }
  Element element = getHostOrganismFromCache( session, bioSource );
  if ( element == null ) {
    element = create( session, parent, bioSource, HOST_ORGANISM_TAG_NAME );
    updateHostOrganismCache( session, bioSource, element );
  } else {
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public Element createOrganism( UserSessionDownload session,
                Element parent,
                BioSource bioSource ) {
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null BioSource to build a " + ORGANISM_TAG_NAME + "." );
  } else {
    if ( !"proteinInteractor".equals( parent.getNodeName() ) ) {
      throw new IllegalArgumentException( "You must give a proteinInteractorparent to build a " + ORGANISM_TAG_NAME + "." );
    }
  }
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null session." );
  }
  Element element = getOrganismFromCache( session, bioSource );
  if ( element == null ) {
    element = create( session, parent, bioSource, ORGANISM_TAG_NAME );
    updateOrganismCache( session, bioSource, element );
  } else {
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.util/data-conversion

  ckeckParentName( parent );
createShortlabel( session, names, object );
createFullname( session, names, object );
origin: uk.ac.ebi.intact.app/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static Protein2xmlI getInstance( UserSessionDownload session ) {

    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return Protein2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return Protein2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() +
                       ". Please use Interactor2xmlPSI25 instead." );

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static CvObject2xmlI getInstance( UserSessionDownload session ) {


    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return CvObject2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return CvObject2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      // WE USE HERE THE PSI2 IMPLEMENTATION
      return CvObject2xmlPSI2.getInstance();

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static Experiment2xmlI getInstance( UserSessionDownload session ) {

    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return Experiment2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return Experiment2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      return Experiment2xmlPSI25.getInstance();

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static Confidence2xmlI getInstance( UserSessionDownload session ) {

    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return Confidence2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return Confidence2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      return Confidence2xmlPSI25.getInstance();

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

public Element createHostOrganism( UserSessionDownload session,
                  Element parent,
                  BioSource bioSource ) {
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null BioSource to build a " + HOST_ORGANISM_TAG_NAME + "." );
  } else {
    if ( !"experimentDescription".equals( parent.getNodeName() ) ) {
      throw new IllegalArgumentException( "You must give a experimentDescription to build a " + ORGANISM_TAG_NAME + "." );
    }
  }
  Element element = getHostOrganismFromCache( session, bioSource );
  if ( element == null ) {
    element = create( session, parent, bioSource, HOST_ORGANISM_TAG_NAME );
    updateHostOrganismCache( session, bioSource, element );
  } else {
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.app/data-conversion

public Element createOrganism( UserSessionDownload session,
                Element parent,
                BioSource bioSource ) {
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null BioSource to build a " + ORGANISM_TAG_NAME + "." );
  } else {
    if ( !"proteinInteractor".equals( parent.getNodeName() ) ) {
      throw new IllegalArgumentException( "You must give a proteinInteractorparent to build a " + ORGANISM_TAG_NAME + "." );
    }
  }
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null session." );
  }
  Element element = getOrganismFromCache( session, bioSource );
  if ( element == null ) {
    element = create( session, parent, bioSource, ORGANISM_TAG_NAME );
    updateOrganismCache( session, bioSource, element );
  } else {
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  ckeckParentName( parent );
createShortlabel( session, names, object );
createFullname( session, names, object );
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Convert an annotatedObject annotations in to confidence value in PSI.
 *
 * @param session
 * @param parent          the Element to which we will attach the generated confidence.
 * @param annotatedObject the object from which we get the annotations.
 *
 * @return the generated confidence or null if none could be generated.
 */
public Element create( UserSessionDownload session, Element parent, AnnotatedObject annotatedObject ) {
  Element element = null;
  if ( annotatedObject instanceof Interaction ) {
    element = create( session, parent, annotatedObject, CvTopic.AUTHOR_CONFIDENCE );
  } else if ( annotatedObject instanceof Experiment ) {
    element = create( session, parent, annotatedObject, CvTopic.CONFIDENCE_MAPPING );
  } else {
    // error, type not supported.
    throw new UnsupportedOperationException( "a confidence can only be generated for an interaction or an experiemnt." );
  }
  return element;
}
origin: uk.ac.ebi.intact.util/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static Protein2xmlI getInstance( UserSessionDownload session ) {

    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return Protein2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return Protein2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() +
                       ". Please use Interactor2xmlPSI25 instead." );

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static CvObject2xmlI getInstance( UserSessionDownload session ) {


    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return CvObject2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return CvObject2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      // WE USE HERE THE PSI2 IMPLEMENTATION
      return CvObject2xmlPSI2.getInstance();

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public Element createHostOrganism( UserSessionDownload session,
                  Element parent,
                  BioSource bioSource ) {
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null BioSource to build a " + HOST_ORGANISM_TAG_NAME + "." );
  } else {
    if ( !"experimentDescription".equals( parent.getNodeName() ) ) {
      throw new IllegalArgumentException( "You must give a experimentDescription to build a " + ORGANISM_TAG_NAME + "." );
    }
  }
  Element element = getHostOrganismFromCache( session, bioSource );
  if ( element == null ) {
    element = create( session, parent, bioSource, HOST_ORGANISM_TAG_NAME );
    updateHostOrganismCache( session, bioSource, element );
  } else {
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.util/data-conversion

public Element createOrganism( UserSessionDownload session,
                Element parent,
                BioSource bioSource ) {
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null BioSource to build a " + ORGANISM_TAG_NAME + "." );
  } else {
    if ( !"proteinInteractor".equals( parent.getNodeName() ) ) {
      throw new IllegalArgumentException( "You must give a proteinInteractorparent to build a " + ORGANISM_TAG_NAME + "." );
    }
  }
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null session." );
  }
  Element element = getOrganismFromCache( session, bioSource );
  if ( element == null ) {
    element = create( session, parent, bioSource, ORGANISM_TAG_NAME );
    updateOrganismCache( session, bioSource, element );
  } else {
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.app/data-conversion

  ckeckParentName( parent );
createShortlabel( session, names, object );
createFullname( session, names, object );
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Convert an annotatedObject annotations in to confidence value in PSI.
 *
 * @param session
 * @param parent          the Element to which we will attach the generated confidence.
 * @param annotatedObject the object from which we get the annotations.
 *
 * @return the generated confidence or null if none could be generated.
 */
public Element create( UserSessionDownload session, Element parent, AnnotatedObject annotatedObject ) {
  Element element = null;
  if ( annotatedObject instanceof Interaction ) {
    element = create( session, parent, annotatedObject, CvTopic.AUTHOR_CONFIDENCE );
  } else if ( annotatedObject instanceof Experiment ) {
    element = create( session, parent, annotatedObject, CvTopic.CONFIDENCE_MAPPING );
  } else {
    // error, type not supported.
    throw new UnsupportedOperationException( "a confidence can only be generated for an interaction or an experiemnt." );
  }
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static Protein2xmlI getInstance( UserSessionDownload session ) {

    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return Protein2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return Protein2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() +
                       ". Please use Interactor2xmlPSI25 instead." );

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

  /**
   * Gives the right version of the Psi XML generator according to the user's session
   *
   * @param session the user session that will indicate which version of the Psi generator is required
   *
   * @return
   */
  public static CvObject2xmlI getInstance( UserSessionDownload session ) {


    if ( session.getPsiVersion().equals( PsiVersion.VERSION_1 ) ) {

      return CvObject2xmlPSI1.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_2 ) ) {

      return CvObject2xmlPSI2.getInstance();

    } else if ( session.getPsiVersion().equals( PsiVersion.VERSION_25 ) ) {

      // WE USE HERE THE PSI2 IMPLEMENTATION
      return CvObject2xmlPSI2.getInstance();

    } else {

      throw new IllegalStateException( "We do not support PSI version " + session.getPsiVersion() );
    }
  }
}
uk.ac.ebi.intact.application.dataConversion.psiDownload.xmlGenerator.psi1

Most used classes

  • AnnotatedObject2xmlPSI1
    Process the common behaviour of AnnotatedObject when exporting PSI version 1.
  • BioSource2xmlPSI1
    Process the common behaviour of an IntAct BioSource when exporting PSI version 1.
  • Component2xmlPSI1
    Implements the tranformation of an IntAct Component into PSI XML.
  • Confidence2xmlPSI1$StringComparator
  • Confidence2xmlPSI1
    Implements the tranformation of an IntAct AnnotatedObject's annotation into a confidence in PSI XML
  • Experiment2xmlPSI1,
  • Feature2xmlPSI1,
  • Interaction2xmlPSI1,
  • Protein2xmlPSI1
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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