/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
element.setAttribute( "id", getProteinId( session, protein ) );
element.setAttribute( "id", getProteinId( session, protein ) );
element.setAttribute( "id", getProteinId( session, protein ) );