private void checkResult(AnnotatedObject<?, ?> annotatedObject, String ac, String type) { if (annotatedObject == null) { throw new IntactException("No " + type + " found with: " + ac); } } }
System.err.println( "Root cause: " + e.getRootCause() ); e.printStackTrace(); System.exit( 1 );
throw new IntactException( "invalid class!" ); e.printStackTrace();
MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for " + "BioSource having the taxid: " + taxid ) ); e.printStackTrace(); String msg = "Could not find BioSource for the taxid: " + taxid + ". Error was: " + e.getMessage(); MessageHolder.getInstance().addCheckerMessage( new Message( msg ) ); e.printStackTrace(); sb.append( ", CellType: " ).append( cellType ); sb.append( ", Tissue: " ).append( tissue ); sb.append( " Reason " ).append( e.getMessage() ); sb.append( ExceptionUtils.getStackTrace( e ) );
MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for " + "BioSource having the taxid: " + taxid ) ); e.printStackTrace(); String msg = "Could not find BioSource for the taxid: " + taxid + ". Error was: " + e.getMessage(); MessageHolder.getInstance().addCheckerMessage( new Message( msg ) ); e.printStackTrace(); sb.append( ", CellType: " ).append( cellType ); sb.append( ", Tissue: " ).append( tissue ); sb.append( " Reason " ).append( e.getMessage() ); sb.append( ExceptionUtils.getStackTrace( e ) );
public static <T> T newInstance(Class<T> clazz) { T instance; try { instance = clazz.newInstance(); } catch (Exception e) { throw new IntactException(e); } return instance; } }
/** * create the lucene index. Gets first all search objects (experiments, interactions, proteins, cvs and biosources) * out of the database and creates then the index of these objects. This is a very trivial (first) version it writes * everything on scratch without using the RAM. It is recommanded to use instead the method 'createLuceneIndex' * * @param aSearchObject a search object */ public void createIndex( final SearchObject aSearchObject ) { SearchObjectIndexer searchObjectIndexer = new SearchObjectIndexer( analyzer, index.getPath() ); logger.info( "Write the index into: " + index.getPath() ); Collection allSearchObjects = null; Chrono time = new Chrono(); try { time.start(); allSearchObjects = dao.getAllSearchObjects(); time.stop(); System.out.println( "time to get " + allSearchObjects.size() + " search objects: " + time.toString() ); } catch ( IntactException e ) { logger.error( e ); e.printStackTrace(); } for ( Iterator iterator = allSearchObjects.iterator(); iterator.hasNext(); ) { SearchObject searchObject = (SearchObject) iterator.next(); searchObjectIndexer.createIndex( searchObject ); } }
MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for " + "BioSource having the taxid: " + taxid ) ); e.printStackTrace(); String msg = "Could not find BioSource for the taxid: " + taxid + ". Error was: " + e.getMessage(); MessageHolder.getInstance().addCheckerMessage( new Message( msg ) ); e.printStackTrace(); sb.append( ", CellType: " ).append( cellType ); sb.append( ", Tissue: " ).append( tissue ); sb.append( " Reason " ).append( e.getMessage() ); sb.append( ExceptionUtils.getStackTrace( e ) );
System.err.println( "Root cause: " + e.getRootCause() ); e.printStackTrace(); System.exit( 1 );
public void addPackageWithEntities( String packageName ) { if ( isInitialized() ) { throw new IntactException( "Cannot add package after the sessionFactory has been initialized" ); } packagesWithEntities.add( packageName ); }
/** * create the lucene index. Gets first all search objects (experiments, interactions, proteins, cvs and biosources) * out of the database and creates then the index of these objects. This is a very trivial (first) version it writes * everything on scratch without using the RAM. It is recommanded to use instead the method 'createLuceneIndex' * * @param aSearchObject a search object */ public void createIndex( final SearchObject aSearchObject ) { SearchObjectIndexer searchObjectIndexer = new SearchObjectIndexer( analyzer, index.getPath() ); logger.info( "Write the index into: " + index.getPath() ); Collection allSearchObjects = null; Chrono time = new Chrono(); try { time.start(); allSearchObjects = dao.getAllSearchObjects(); time.stop(); System.out.println( "time to get " + allSearchObjects.size() + " search objects: " + time.toString() ); } catch ( IntactException e ) { logger.error( e ); e.printStackTrace(); } for ( Iterator iterator = allSearchObjects.iterator(); iterator.hasNext(); ) { SearchObject searchObject = ( SearchObject ) iterator.next(); searchObjectIndexer.createIndex( searchObject ); } }
String message = "Could not for the protein having Biosource(" + proteinInteractor.getOrganism().getTaxId() + ") and Xref: " + db + "(" + proteinId + "). Reason: " + ie.getMessage(); ie.printStackTrace();
System.err.println( "Root cause: " + e.getRootCause() ); e.printStackTrace(); System.exit( 1 );
/** * Creates a SchemaVersion using the String provided * * @param version the version to parse * * @return the SchemaVersion instance */ public static SchemaVersion parse( String version ) { SchemaVersion schemaVersion = null; Pattern p = Pattern.compile( "(\\d+)\\.(\\d+)\\.(\\d+)" ); Matcher m = p.matcher( version ); if ( m.find() ) { int major = Integer.parseInt( m.group( 1 ) ); int minor = Integer.parseInt( m.group( 2 ) ); int build = Integer.parseInt( m.group( 3 ) ); schemaVersion = new SchemaVersion( major, minor, build ); } else { throw new IntactException( "A schema version must follow this pattern: \\d+\\.\\d+\\.\\d+" ); } return schemaVersion; }
e.printStackTrace(); logOutWriter.write( "" ); logOutWriter.write( "There went something wrong with fetching the search objects out of the database" );
String message = "Could not for the protein having Biosource(" + proteinInteractor.getOrganism().getTaxId() + ") and Xref: " + db + "(" + proteinId + "). Reason: " + ie.getMessage(); ie.printStackTrace();
private Collection<Experiment> getExperiments( int firstResult, int maxResults ) { output.println( "Retrieving data from DB store, from " + firstResult ); if ( searchPattern.contains( "," ) ) { throw new IntactException( "Lists with comma-separated experiments are not accepted anymore" ); } Collection<Experiment> searchResults = getDaoFactory().getExperimentDao().getByShortLabelLike( searchPattern, true, firstResult, maxResults, true ); int resultSize = searchResults.size(); output.println( "done (retrieved " + resultSize + " experiment" + ( resultSize > 1 ? "s" : "" ) + ")" ); return searchResults; }
e.printStackTrace(); logOutWriter.write( "" ); logOutWriter.write( "There went something wrong with fetching the search objects out of the database" );
String message = "Could not for the protein having Biosource(" + proteinInteractor.getOrganism().getTaxId() + ") and Xref: " + db + "(" + proteinId + "). Reason: " + ie.getMessage(); ie.printStackTrace();