本文整理了Java中org.intermine.sql.Database.getName()
方法的一些代码示例,展示了Database.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Database.getName()
方法的具体详情如下:
包路径:org.intermine.sql.Database
类名称:Database
方法名:getName
[英]Gets the database name only, not the full URL.
[中]仅获取数据库名称,而不是完整的URL。
代码示例来源:origin: intermine/intermine
/**
* 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.");
}
}
代码示例来源:origin: org.intermine/intermine-objectstore
/**
* 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.");
}
}
代码示例来源:origin: org.intermine/bio-core
OrganismRepository or = OrganismRepository.getOrganismRepository();
try {
LOG.info("Querying FlyBase DB: " + db.getName());
for (String clsName : clsCol) {
conn = db.getConnection();
代码示例来源:origin: org.intermine/intermine-objectstore
err.printf(FAILURE_MSG, database, db.getName());
throw new BuildException(e);
代码示例来源:origin: intermine/intermine
err.printf(FAILURE_MSG, database, db.getName());
throw new BuildException(e);
内容来源于网络,如有侵权,请联系作者删除!