/** * 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() ); } } }
/** * 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() ); } } }
/** * 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() ); } } }