/** * Generates an participantRef out of an IntAct interactor. * * @param session * @param parent the Element to which we will add the participantRef. * @param interactor the IntAct interactor that we convert to PSI. * * @return the generated participantRef Element. */ public Element createParticipantReference( UserSessionDownload session, Element parent, Interactor interactor ) { // 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 " + INTERACTOR_REF_TAG_NAME + "." ); } if ( interactor == null ) { throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." ); } // 2. Initialising the element... Element element = session.createElement( INTERACTOR_REF_TAG_NAME ); element.setAttribute( "ref", getInteractorId( session, interactor ) ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
/** * Generates an participantRef out of an IntAct interactor. * * @param session * @param parent the Element to which we will add the participantRef. * @param interactor the IntAct interactor that we convert to PSI. * * @return the generated participantRef Element. */ public Element createParticipantReference( UserSessionDownload session, Element parent, Interactor interactor ) { // 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 " + INTERACTOR_REF_TAG_NAME + "." ); } if ( interactor == null ) { throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." ); } // 2. Initialising the element... Element element = session.createElement( INTERACTOR_REF_TAG_NAME ); element.setAttribute( "ref", getInteractorId( session, interactor ) ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
/** * Generates an participantRef out of an IntAct interactor. * * @param session * @param parent the Element to which we will add the participantRef. * @param interactor the IntAct interactor that we convert to PSI. * * @return the generated participantRef Element. */ public Element createParticipantReference( UserSessionDownload session, Element parent, Interactor interactor ) { // 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 " + INTERACTOR_REF_TAG_NAME + "." ); } if ( interactor == null ) { throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." ); } // 2. Initialising the element... Element element = session.createElement( INTERACTOR_REF_TAG_NAME ); element.setAttribute( "ref", getInteractorId( session, interactor ) ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
/** * Generates an interactorRef out of an IntAct interactor. * * @param session * @param parent the Element to which we will add the interactorRef. * @param interactor the IntAct interactor that we convert to PSI. * * @return the generated interactorRef Element. */ public Element createInteractorReference( UserSessionDownload session, Element parent, Interactor interactor ) { // 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 " + INTERACTOR_REF_TAG_NAME + "." ); } if ( interactor == null ) { throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." ); } // 2. Initialising the element... Element element = session.createElement( INTERACTOR_REF_TAG_NAME ); Text refText = session.createTextNode( getInteractorId( session, interactor ) ); element.appendChild( refText ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
/** * Generates an interactorRef out of an IntAct interactor. * * @param session * @param parent the Element to which we will add the interactorRef. * @param interactor the IntAct interactor that we convert to PSI. * * @return the generated interactorRef Element. */ public Element createInteractorReference( UserSessionDownload session, Element parent, Interactor interactor ) { // 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 " + INTERACTOR_REF_TAG_NAME + "." ); } if ( interactor == null ) { throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." ); } // 2. Initialising the element... Element element = session.createElement( INTERACTOR_REF_TAG_NAME ); Text refText = session.createTextNode( getInteractorId( session, interactor ) ); element.appendChild( refText ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
/** * Generates an interactorRef out of an IntAct interactor. * * @param session * @param parent the Element to which we will add the interactorRef. * @param interactor the IntAct interactor that we convert to PSI. * * @return the generated interactorRef Element. */ public Element createInteractorReference( UserSessionDownload session, Element parent, Interactor interactor ) { // 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 " + INTERACTOR_REF_TAG_NAME + "." ); } if ( interactor == null ) { throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." ); } // 2. Initialising the element... Element element = session.createElement( INTERACTOR_REF_TAG_NAME ); Text refText = session.createTextNode( getInteractorId( session, interactor ) ); element.appendChild( refText ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
element.setAttribute( "id", getInteractorId( session, interactor ) );
element.setAttribute( "id", getInteractorId( session, interactor ) );
element.setAttribute( "id", getInteractorId( session, interactor ) );