本文整理匯總了Java中org.gbif.api.model.Constants.NUB_DATASET_KEY屬性的典型用法代碼示例。如果您正苦於以下問題:Java Constants.NUB_DATASET_KEY屬性的具體用法?Java Constants.NUB_DATASET_KEY怎麽用?Java Constants.NUB_DATASET_KEY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.gbif.api.model.Constants
的用法示例。
在下文中一共展示了Constants.NUB_DATASET_KEY屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addKingdoms
private void addKingdoms() {
try (Transaction tx = db.beginTx()) {
LOG.info("Adding kingdom");
currSrc = new ClbSource(null, Constants.NUB_DATASET_KEY, "Backbone kingdoms");
for (Kingdom k : Kingdom.values()) {
NubUsage ku = new NubUsage();
ku.usageKey = idGen.reissue(k.nubUsageKey());
ku.sourceIds.add(ku.usageKey);
ku.kingdom = k;
ku.datasetKey = Constants.NUB_DATASET_KEY;
ku.origin = Origin.SOURCE;
ku.rank = Rank.KINGDOM;
ku.status = TaxonomicStatus.ACCEPTED;
ku.parsedName = new ParsedName();
ku.parsedName.setType(NameType.SCIENTIFIC);
ku.parsedName.setGenusOrAbove(k.scientificName());
ku.parsedName.setScientificName(k.scientificName());
// treat incertae sedis placeholder kingdom different
if (k == Kingdom.INCERTAE_SEDIS) {
ku.status = TaxonomicStatus.DOUBTFUL;
ku.parsedName.setType(NameType.PLACEHOLDER);
}
db.addRoot(ku);
}
tx.success();
}
}
示例2: runLocalExport
@Test
public void runLocalExport() throws Exception {
AdminCommand cmd = new AdminCommand();
AdminConfiguration cfg = configureLocal( (AdminConfiguration) cmd.getConfigurationObject());
cfg.operation = AdminOperation.EXPORT;
cfg.key = Constants.NUB_DATASET_KEY;
cmd.doRun();
}
示例3: NubMatchingModule
/**
* Creates a memory based nub index which is built from scratch every time the webservice starts up.
*/
public NubMatchingModule() {
this(null, false, Constants.NUB_DATASET_KEY);
}