/** * Fetch publication primaryId from experiment. * * @param experimentAc the experiment AC for which we want the primary pubmed ID. * * @return a pubmed Id or null if none found. */ private String getPubmedId( String experimentAc ) { if ( expAcToPmid == null ) { // map all exps to pmid expAcToPmid = ExperimentListGeneratorDao.getExperimentAcAndPmid( searchPattern ); } String pubmedId = expAcToPmid.get( experimentAc ); if ( pubmedId == null ) { experimentsWithErrors.put( experimentAc, "Null pubmed Id" ); } try { Integer.parseInt( pubmedId ); } catch ( NumberFormatException e ) { experimentsWithErrors.put( experimentAc, "Not a number pubmedId" ); } return pubmedId; }
/** * Fetch publication primaryId from experiment. * * @param experimentAc the experiment AC for which we want the primary pubmed ID. * * @return a pubmed Id or null if none found. */ private String getPubmedId( String experimentAc ) { if ( expAcToPmid == null ) { // map all exps to pmid expAcToPmid = ExperimentListGeneratorDao.getExperimentAcAndPmid( searchPattern ); } String pubmedId = expAcToPmid.get( experimentAc ); if ( pubmedId == null ) { experimentsWithErrors.put( experimentAc, "Null pubmed Id" ); } try { Integer.parseInt( pubmedId ); } catch ( NumberFormatException e ) { experimentsWithErrors.put( experimentAc, "Not a number pubmedId" ); } return pubmedId; }
/** * Fetch publication primaryId from experiment. * * @param experimentAc the experiment AC for which we want the primary pubmed ID. * * @return a pubmed Id or null if none found. */ private String getPubmedId( String experimentAc ) { if ( expAcToPmid == null ) { // map all exps to pmid expAcToPmid = ExperimentListGeneratorDao.getExperimentAcAndPmid( searchPattern ); } String pubmedId = expAcToPmid.get( experimentAc ); if ( pubmedId == null ) { experimentsWithErrors.put( experimentAc, "Null pubmed Id" ); } try { Integer.parseInt( pubmedId ); } catch ( NumberFormatException e ) { experimentsWithErrors.put( experimentAc, "Not a number pubmedId" ); } return pubmedId; }
public static Map<String, String> getExperimentAcAndLabelWithoutPubmedId( String shortLabelLike ) { List<Object[]> allExps = getSession().createCriteria( Experiment.class ) .add( Restrictions.like( "shortLabel", shortLabelLike ) ) .setProjection( Projections.projectionList() .add( Projections.distinct( Projections.property( "ac" ) ) ) .add( Projections.property( "shortLabel" ) ) ).list(); Map<String, String> filteredExpsMap = new HashMap<String, String>(); for ( Object[] exp : allExps ) { filteredExpsMap.put( (String) exp[ 0 ], (String) exp[ 1 ] ); } Map<String, String> expsAndPmid = getExperimentAcAndPmid( shortLabelLike ); for ( String expWithPmid : expsAndPmid.keySet() ) { filteredExpsMap.remove( expWithPmid ); } return filteredExpsMap; }
public static Map<String, String> getExperimentAcAndLabelWithoutPubmedId( String shortLabelLike ) { List<Object[]> allExps = getSession().createCriteria( Experiment.class ) .add( Restrictions.like( "shortLabel", shortLabelLike ) ) .setProjection( Projections.projectionList() .add( Projections.distinct( Projections.property( "ac" ) ) ) .add( Projections.property( "shortLabel" ) ) ).list(); Map<String, String> filteredExpsMap = new HashMap<String, String>(); for ( Object[] exp : allExps ) { filteredExpsMap.put( (String) exp[ 0 ], (String) exp[ 1 ] ); } Map<String, String> expsAndPmid = getExperimentAcAndPmid( shortLabelLike ); for ( String expWithPmid : expsAndPmid.keySet() ) { filteredExpsMap.remove( expWithPmid ); } return filteredExpsMap; }
public static Map<String, String> getExperimentAcAndLabelWithoutPubmedId( String shortLabelLike ) { List<Object[]> allExps = getSession().createCriteria( Experiment.class ) .add( Restrictions.like( "shortLabel", shortLabelLike ) ) .setProjection( Projections.projectionList() .add( Projections.distinct( Projections.property( "ac" ) ) ) .add( Projections.property( "shortLabel" ) ) ).list(); Map<String, String> filteredExpsMap = new HashMap<String, String>(); for ( Object[] exp : allExps ) { filteredExpsMap.put( (String) exp[ 0 ], (String) exp[ 1 ] ); } Map<String, String> expsAndPmid = getExperimentAcAndPmid( shortLabelLike ); for ( String expWithPmid : expsAndPmid.keySet() ) { filteredExpsMap.remove( expWithPmid ); } return filteredExpsMap; }