Tabnine Logo
Protein2xmlPSI2
Code IndexAdd Tabnine to your IDE (free)

How to use
Protein2xmlPSI2
in
uk.ac.ebi.intact.application.dataConversion.psiDownload.xmlGenerator.psi2

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

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

/**
 * Generates an proteinInteractorRef out of an IntAct Protein.
 *
 * @param session
 * @param parent  the Element to which we will add the proteinInteractorRef.
 * @param protein the IntAct Protein that we convert to PSI.
 *
 * @return the generated proteinInteractorRef Element.
 */
public Element createProteinInteracorReference( UserSessionDownload session, Element parent, Protein protein ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + PROTEIN_INTERACTOR_REF_TAG_NAME + "." );
  }
  if ( protein == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + PROTEIN_INTERACTOR_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( PROTEIN_INTERACTOR_REF_TAG_NAME );
  element.setAttribute( "ref", getProteinId( session, protein ) );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.util/data-conversion

element.setAttribute( "id", getProteinId( session, protein ) );
createNames( session, element, protein );
createProteinXrefs( session, element, protein );
createAttributeList( session, element, protein );
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.dataexchange.psimi.legacy/data-conversion

element.setAttribute( "id", getProteinId( session, protein ) );
createNames( session, element, protein );
createProteinXrefs( session, element, protein );
createAttributeList( session, element, protein );
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.app/data-conversion

element.setAttribute( "id", getProteinId( session, protein ) );
createNames( session, element, protein );
createProteinXrefs( session, element, protein );
createAttributeList( session, element, protein );
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Generates an proteinInteractorRef out of an IntAct Protein.
 *
 * @param session
 * @param parent  the Element to which we will add the proteinInteractorRef.
 * @param protein the IntAct Protein that we convert to PSI.
 *
 * @return the generated proteinInteractorRef Element.
 */
public Element createProteinInteracorReference( UserSessionDownload session, Element parent, Protein protein ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + PROTEIN_INTERACTOR_REF_TAG_NAME + "." );
  }
  if ( protein == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + PROTEIN_INTERACTOR_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( PROTEIN_INTERACTOR_REF_TAG_NAME );
  element.setAttribute( "ref", getProteinId( session, protein ) );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  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

/**
 * Generates an proteinParticipantRef out of an IntAct Protein.
 *
 * @param session
 * @param parent  the Element to which we will add the proteinParticipantRef.
 * @param protein the IntAct Protein that we convert to PSI.
 *
 * @return the generated proteinParticipantRef Element.
 */
public Element createParticipantReference( UserSessionDownload session, Element parent, Protein protein ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + PROTEIN_PARTICIPANT_REF_TAG_NAME + "." );
  }
  if ( protein == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + PROTEIN_PARTICIPANT_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( PROTEIN_PARTICIPANT_REF_TAG_NAME );
  element.setAttribute( "ref", getProteinId( session, protein ) );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Generates an proteinParticipantRef out of an IntAct Protein.
 *
 * @param session
 * @param parent  the Element to which we will add the proteinParticipantRef.
 * @param protein the IntAct Protein that we convert to PSI.
 *
 * @return the generated proteinParticipantRef Element.
 */
public Element createParticipantReference( UserSessionDownload session, Element parent, Protein protein ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + PROTEIN_PARTICIPANT_REF_TAG_NAME + "." );
  }
  if ( protein == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + PROTEIN_PARTICIPANT_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( PROTEIN_PARTICIPANT_REF_TAG_NAME );
  element.setAttribute( "ref", getProteinId( session, protein ) );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Generates an proteinParticipantRef out of an IntAct Protein.
 *
 * @param session
 * @param parent  the Element to which we will add the proteinParticipantRef.
 * @param protein the IntAct Protein that we convert to PSI.
 *
 * @return the generated proteinParticipantRef Element.
 */
public Element createParticipantReference( UserSessionDownload session, Element parent, Protein protein ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + PROTEIN_PARTICIPANT_REF_TAG_NAME + "." );
  }
  if ( protein == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + PROTEIN_PARTICIPANT_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( PROTEIN_PARTICIPANT_REF_TAG_NAME );
  element.setAttribute( "ref", getProteinId( session, protein ) );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Generates an proteinInteractorRef out of an IntAct Protein.
 *
 * @param session
 * @param parent  the Element to which we will add the proteinInteractorRef.
 * @param protein the IntAct Protein that we convert to PSI.
 *
 * @return the generated proteinInteractorRef Element.
 */
public Element createProteinInteracorReference( UserSessionDownload session, Element parent, Protein protein ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + PROTEIN_INTERACTOR_REF_TAG_NAME + "." );
  }
  if ( protein == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + PROTEIN_INTERACTOR_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( PROTEIN_INTERACTOR_REF_TAG_NAME );
  element.setAttribute( "ref", getProteinId( session, protein ) );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
uk.ac.ebi.intact.application.dataConversion.psiDownload.xmlGenerator.psi2Protein2xmlPSI2

Javadoc

Process the common behaviour of an IntAct Protein when exporting PSI version 2.

Most used methods

  • createAttributeList
  • createNames
  • createProteinXrefs
    Generate the xref tag of the given protein. That content is attached to the given parent Element.
  • getInstance
  • getProteinId
    get the value what will be used as ID of the protein.

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • CodeWhisperer alternatives
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