/** * Run an IQL query in the objectstore and print the first results to the console. * @param os the objectstore * @param iql and IQL query string */ private static void runIqlQuery(ObjectStoreInterMineImpl os, String iql) { System.out .println("Running query in database " + os.getDatabase().getName() + " - " + iql); System.out .println("See intermine.log for query execution details."); Query q = parseIqlQuery(os.getModel(), iql); Results results = os.execute(q); Iterator<?> resIter = results.iterator(); int count = 0; while (resIter.hasNext() && count < MAX_ROWS) { ResultsRow<?> rr = (ResultsRow<?>) resIter.next(); System.out .println(count + " - " + rr); count += 1; } if (resIter.hasNext()) { System.out .println("Only fetching first " + MAX_ROWS + " rows."); } }
/** * Run an IQL query in the objectstore and print the first results to the console. * @param os the objectstore * @param iql and IQL query string */ private static void runIqlQuery(ObjectStoreInterMineImpl os, String iql) { System.out .println("Running query in database " + os.getDatabase().getName() + " - " + iql); System.out .println("See intermine.log for query execution details."); Query q = parseIqlQuery(os.getModel(), iql); Results results = os.execute(q); Iterator<?> resIter = results.iterator(); int count = 0; while (resIter.hasNext() && count < MAX_ROWS) { ResultsRow<?> rr = (ResultsRow<?>) resIter.next(); System.out .println(count + " - " + rr); count += 1; } if (resIter.hasNext()) { System.out .println("Only fetching first " + MAX_ROWS + " rows."); } }
OrganismRepository or = OrganismRepository.getOrganismRepository(); try { LOG.info("Querying FlyBase DB: " + db.getName()); for (String clsName : clsCol) { conn = db.getConnection();
err.printf(FAILURE_MSG, database, db.getName()); throw new BuildException(e);
err.printf(FAILURE_MSG, database, db.getName()); throw new BuildException(e);