org.intermine.sql.Database.getName()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.intermine.sql.Database.getName()方法的一些代码示例,展示了Database.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Database.getName()方法的具体详情如下:
包路径:org.intermine.sql.Database
类名称:Database
方法名:getName

Database.getName介绍

[英]Gets the database name only, not the full URL.
[中]仅获取数据库名称,而不是完整的URL。

代码示例

代码示例来源:origin: intermine/intermine

  1. /**
  2. * Run an IQL query in the objectstore and print the first results to the console.
  3. * @param os the objectstore
  4. * @param iql and IQL query string
  5. */
  6. private static void runIqlQuery(ObjectStoreInterMineImpl os, String iql) {
  7. System.out .println("Running query in database " + os.getDatabase().getName()
  8. + " - " + iql);
  9. System.out .println("See intermine.log for query execution details.");
  10. Query q = parseIqlQuery(os.getModel(), iql);
  11. Results results = os.execute(q);
  12. Iterator<?> resIter = results.iterator();
  13. int count = 0;
  14. while (resIter.hasNext() && count < MAX_ROWS) {
  15. ResultsRow<?> rr = (ResultsRow<?>) resIter.next();
  16. System.out .println(count + " - " + rr);
  17. count += 1;
  18. }
  19. if (resIter.hasNext()) {
  20. System.out .println("Only fetching first " + MAX_ROWS + " rows.");
  21. }
  22. }

代码示例来源:origin: org.intermine/intermine-objectstore

  1. /**
  2. * Run an IQL query in the objectstore and print the first results to the console.
  3. * @param os the objectstore
  4. * @param iql and IQL query string
  5. */
  6. private static void runIqlQuery(ObjectStoreInterMineImpl os, String iql) {
  7. System.out .println("Running query in database " + os.getDatabase().getName()
  8. + " - " + iql);
  9. System.out .println("See intermine.log for query execution details.");
  10. Query q = parseIqlQuery(os.getModel(), iql);
  11. Results results = os.execute(q);
  12. Iterator<?> resIter = results.iterator();
  13. int count = 0;
  14. while (resIter.hasNext() && count < MAX_ROWS) {
  15. ResultsRow<?> rr = (ResultsRow<?>) resIter.next();
  16. System.out .println(count + " - " + rr);
  17. count += 1;
  18. }
  19. if (resIter.hasNext()) {
  20. System.out .println("Only fetching first " + MAX_ROWS + " rows.");
  21. }
  22. }

代码示例来源:origin: org.intermine/bio-core

  1. OrganismRepository or = OrganismRepository.getOrganismRepository();
  2. try {
  3. LOG.info("Querying FlyBase DB: " + db.getName());
  4. for (String clsName : clsCol) {
  5. conn = db.getConnection();

代码示例来源:origin: org.intermine/intermine-objectstore

  1. err.printf(FAILURE_MSG, database, db.getName());
  2. throw new BuildException(e);

代码示例来源:origin: intermine/intermine

  1. err.printf(FAILURE_MSG, database, db.getName());
  2. throw new BuildException(e);

相关文章