• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Rank类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.gbif.api.vocabulary.Rank的典型用法代码示例。如果您正苦于以下问题:Java Rank类的具体用法?Java Rank怎么用?Java Rank使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Rank类属于org.gbif.api.vocabulary包,在下文中一共展示了Rank类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getHigherRank

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
String getHigherRank(Rank rank)
   {
NameUsage<? extends NubNameUsage> n = getNameUsage();
if(n != this && n instanceof NubNameUsage) {
    return ((NubNameUsage)n).getHigherRank(rank);
}
if(scientificNameUsage != null) {
    return scientificNameUsage.getHigherRank(rank);
}
else if (nameUsageSearchResult != null) {
    return  nameUsageSearchResult.getHigherRank(rank);
}
else if (nameUsageSuggestResult != null) {
    return nameUsageSuggestResult.getHigherRank(rank);
}
else {
    return null;
}
   }
 
开发者ID:nomencurator,项目名称:taxonaut,代码行数:20,代码来源:NubNameUsage.java


示例2: getHigherRankKey

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
Integer getHigherRankKey(Rank rank)
   {
NameUsage<? extends NubNameUsage> n = getNameUsage();
if(n != this && n instanceof NubNameUsage) {
    return ((NubNameUsage)n).getHigherRankKey(rank);
}
if(scientificNameUsage != null) {
    return scientificNameUsage.getHigherRankKey(rank);
}
else if (nameUsageSearchResult != null) {
    return  nameUsageSearchResult.getHigherRankKey(rank);
}
else if (nameUsageSuggestResult != null) {
    return nameUsageSuggestResult.getHigherRankKey(rank);
}
else {
    return null;
}
   }
 
开发者ID:nomencurator,项目名称:taxonaut,代码行数:20,代码来源:NubNameUsage.java


示例3: parseToCanonical

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Override
// parses the name without authorship and returns the ParsedName.canonicalName() string
public String parseToCanonical(String scientificName, @Nullable Rank rank) {
  if (Strings.isNullOrEmpty(scientificName)) {
    return null;
  }
  try {
    ParsedName pn = parse(scientificName, rank);
    if (pn != null) {
      return pn.canonicalName();
    }
  } catch (UnparsableException e) {
    logUnparsable(e);
  }
  return null;
}
 
开发者ID:gbif,项目名称:name-parser,代码行数:17,代码来源:NameParserGbifV1.java


示例4: parseQuietly

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Test
public void parseQuietly() throws Exception {
  ParsedName pn = parser.parseQuietly("Navicula var. fasciata", Rank.VARIETY);
  assertNull(pn.getSpecificEpithet());
  assertEquals(NameType.INFORMAL, pn.getType());

  assertEquals("Abies alba", parser.parseQuietly("Abies alba Mill.").canonicalName());
  pn = parser.parseQuietly("Abies alba x Pinus graecus L.");
  assertEquals("Abies alba x Pinus graecus L.", pn.getScientificName());
  assertEquals(NameType.HYBRID, pn.getType());
  assertNull(pn.getGenusOrAbove());

  assertFalse(parser.parseQuietly("Protoscenium simplex  (Cleve, 1899), Jørgensen, 1905 ", Rank.SPECIES).isParsedPartially());
  assertFalse(parser.parseQuietly("Plagiacanthidae", Rank.SPECIES).isParsedPartially());

  pn = parser.parseQuietly("Plagiacanthidae WhatTheHeck @%&/ (please dont parse me[ he?5789])", Rank.SPECIES);
  assertTrue(pn.isParsed());
  assertTrue(pn.isParsedPartially());
  assertEquals("Plagiacanthidae", pn.getGenusOrAbove());
}
 
开发者ID:gbif,项目名称:name-parser,代码行数:21,代码来源:NameParserGbifV1Test.java


示例5: match

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
private OccurrenceParseResult<NameUsageMatch> match(Map<Term, String> terms) {
  Rank rank = interpretRank(terms);
  return match(
      value(terms, DwcTerm.kingdom),
      value(terms, DwcTerm.phylum),
      value(terms, DwcTerm.class_),
      value(terms, DwcTerm.order),
      value(terms, DwcTerm.family),
      value(terms, DwcTerm.genus),
      value(terms, DwcTerm.scientificName),
      value(terms, DwcTerm.scientificNameAuthorship),
      value(terms, GbifTerm.genericName),
      value(terms, DwcTerm.specificEpithet),
      value(terms, DwcTerm.infraspecificEpithet),
      rank);
}
 
开发者ID:gbif,项目名称:occurrence,代码行数:17,代码来源:TaxonomyInterpreter.java


示例6: updateSelfReferences

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
private void updateSelfReferences(NameUsage u) {
  if (u.getBasionymKey() != null && u.getBasionymKey() == -1) {
    u.setBasionymKey(u.getKey());
  }
  if (u.getParentKey() != null && u.getParentKey() == -1) {
    u.setParentKey(u.getKey());
  }
  if (u.getAcceptedKey() != null && u.getAcceptedKey() == -1) {
    u.setAcceptedKey(u.getKey());
  }
  if (u.getProParteKey() != null && u.getProParteKey() == -1) {
    u.setProParteKey(u.getKey());
  }
  for (Rank r : Rank.LINNEAN_RANKS) {
    if (u.getHigherRankKey(r) != null && u.getHigherRankKey(r) == -1) {
      ClassificationUtils.setHigherRankKey(u, r, u.getKey());
    }
  }
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:20,代码来源:UsageSyncServiceMyBatis.java


示例7: testMatching

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Test
public void testMatching() throws IOException, InterruptedException {
  matcher = NubMatchingTestModule.provideLookup();

  assertMatch("Abies", "", "", Rank.GENUS, Kingdom.PLANTAE, 1);

  assertNoMatch("Abies alba", null, null, Rank.SPECIES, Kingdom.ANIMALIA);
  assertNoMatch("Abies alba", null, null, Rank.GENUS, Kingdom.PLANTAE);
  assertNoMatch("Abies alba", null, null, Rank.SUBSPECIES, Kingdom.PLANTAE);
  assertMatch("Abies alba", null, null, Rank.SPECIES, Kingdom.PLANTAE, 2);
  assertMatch("Abies alba", "", "", Rank.SPECIES, Kingdom.PLANTAE, 2);
  assertMatch("Abies alba", "", "1768", Rank.SPECIES, Kingdom.PLANTAE, 2);
  assertMatch("Abies alba", "Mill.", "", Rank.SPECIES, Kingdom.PLANTAE, 2);
  assertMatch("Abies alba", "Miller", "", Rank.SPECIES, Kingdom.PLANTAE, 2);
  assertMatch("Abies alba", "Mill.", "1800", Rank.SPECIES, Kingdom.INCERTAE_SEDIS, 2);
  assertMatch("Abies alba", "nothing but a year", "1768", Rank.SPECIES, Kingdom.INCERTAE_SEDIS, 2);
  assertNoMatch("Abies alba", "DC", "", Rank.SPECIES, Kingdom.PLANTAE);
  assertNoMatch("Abies alba", "DeCandole", "1770", Rank.SPECIES, Kingdom.PLANTAE);
  assertNoMatch("Abies alba", "Linnaeus", "", Rank.SPECIES, Kingdom.PLANTAE);
  assertNoMatch("Abies alba", "L.", "1989", Rank.SPECIES, Kingdom.PLANTAE);
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:22,代码来源:IdLookupImplIT.java


示例8: testGetParent

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Test
public void testGetParent() throws Exception {
  UsageDao dao = UsageDao.temporaryDao(10);
  NubDb db = NubDb.create(dao, AuthorComparator.createWithoutAuthormap());
  try (Transaction tx = dao.beginTx()) {
    final NubUsage plantae = db.addRoot(buildNub(Kingdom.PLANTAE, "Plantae", Rank.KINGDOM, TaxonomicStatus.ACCEPTED));
    final NubUsage oenanteP = db.addUsage(plantae, buildNub("Oenanthe Vieillot, 1816", Rank.GENUS, TaxonomicStatus.ACCEPTED));
    db.addUsage(oenanteP, buildNub("Oenanthe aquatica Poir.", Rank.SPECIES, TaxonomicStatus.ACCEPTED));
    NubUsage acc = db.addUsage(plantae, buildNub("Palma aquatica (Senser.)", Rank.SPECIES, TaxonomicStatus.ACCEPTED));
    db.addUsage(acc, buildNub("Oenanthe aquatica Senser.", Rank.SPECIES, TaxonomicStatus.SYNONYM));
    db.addUsage(oenanteP, buildNub("Oenanthe carolina (Mill.)", Rank.SPECIES, TaxonomicStatus.DOUBTFUL));

    assertNull(db.parent((NubUsage) null));
    assertNull(db.parent(new NubUsage()));
    assertNull(db.parent(plantae));
    assertNotNull(db.parent(oenanteP));
  }
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:19,代码来源:NubDbTest.java


示例9: nubusage

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
public static NubUsage nubusage(int key) {
  NubUsage u = new NubUsage();
  u.usageKey = key;
  u.datasetKey = UUID.randomUUID();
  u.kingdom = Kingdom.byNubUsageId(RND.nextInt(8));
  u.origin = Origin.SOURCE;
  u.addRemark(StringUtils.randomSpecies());
  u.parsedName = new ParsedName();
  u.parsedName.setGenusOrAbove(StringUtils.randomGenus());
  u.parsedName.setSpecificEpithet(StringUtils.randomEpithet());
  if (key % 5 == 0) {
    u.rank = Rank.SUBSPECIES;
    u.parsedName.setInfraSpecificEpithet(StringUtils.randomEpithet());
  } else {
    u.rank = Rank.SPECIES;
  }
  u.parsedName.setAuthorship(StringUtils.randomAuthor());
  u.parsedName.setYear(StringUtils.randomSpeciesYear());
  u.parsedName.setScientificName(u.parsedName.fullName());
  u.status = TaxonomicStatus.ACCEPTED;
  return u;
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:23,代码来源:UsageDaoTest.java


示例10: testSetHigherRank

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Test
public void testSetHigherRank() throws Exception {
  NameUsage lck = new NameUsage();

  ClassificationUtils.setHigherRank(lck, Rank.GENUS, "harry");
  assertEquals("harry", lck.getGenus());
  assertNull(lck.getGenusKey());

  ClassificationUtils.setHigherRank(lck, Rank.GENUS, "harrys", 432);
  assertEquals("harrys", lck.getGenus());
  assertEquals((Integer) 432, lck.getGenusKey());

  ClassificationUtils.setHigherRank(lck, null, "klinke", 1);
  assertEquals("harrys", lck.getGenus());
  assertEquals((Integer) 432, lck.getGenusKey());
}
 
开发者ID:gbif,项目名称:gbif-api,代码行数:17,代码来源:ClassificationUtilsTest.java


示例11: applyClassification

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
private void applyClassification(Node n) {
  RankedName highest;
  if (meta.isParentNameMapped()) {
    // verify if we already have a classification, that it ends with a known rank
    highest = getDirectParent(n);
    if (highest.node != n && (highest.rank == null || UNKNOWN_RANKS.contains(highest.rank))) {
      LOG.debug("Node {} already has a classification which ends in an uncomparable rank.", n.getId());
      addIssueRemark(n, null, NameUsageIssue.CLASSIFICATION_NOT_APPLIED);
      return;
    }
  } else {
    // use this node
    highest = dao.readRankedName(n);
  }
  // shortcut: exit if highest is already a kingdom, the denormed classification cannot add to it anymore!
  if (highest.rank != null && highest.rank == Rank.KINGDOM) {
    return;
  }
  LinneanClassification lc = dao.readUsage(n, false);
  applyClassification(highest, lc);
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:22,代码来源:Normalizer.java


示例12: testMatching

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Test
  public void testMatching() throws IOException, InterruptedException {
    assertMatch("Abies", Rank.GENUS, Kingdom.PLANTAE, 2684876);

    assertNoMatch("Abies alba", Rank.SPECIES, Kingdom.ANIMALIA);
    assertNoMatch("Abies alba", Rank.GENUS, Kingdom.PLANTAE);
    assertNoMatch("Abies alba", Rank.SUBSPECIES, Kingdom.PLANTAE);

    assertMatch("Abies alba", Rank.SPECIES, Kingdom.PLANTAE, 2685484);
    assertMatch("Abies alba", Rank.SPECIES, Kingdom.PLANTAE, 2685484);
    assertMatch("Abies alba 1768", Rank.SPECIES, Kingdom.PLANTAE, 2685484);
    assertMatch("Abies alba Mill.", Rank.SPECIES, Kingdom.PLANTAE, 2685484);
    assertMatch("Abies alba Miller", Rank.SPECIES, Kingdom.PLANTAE, 2685484);
    assertMatch("Abies alba Mill., 1800", Rank.SPECIES, Kingdom.INCERTAE_SEDIS, 2685484);
    assertNoMatch("Abies alba DC", Rank.SPECIES, Kingdom.PLANTAE);
    assertNoMatch("Abies alba de Candolle, 1769", Rank.SPECIES, Kingdom.PLANTAE);
    assertNoMatch("Abies alba Linnaeus", Rank.SPECIES, Kingdom.PLANTAE);
    assertNoMatch("Abies alba L., 1989", Rank.SPECIES, Kingdom.PLANTAE);
//    assertMatch("Abies alba nothing but a year, 1768", Rank.SPECIES, Kingdom.INCERTAE_SEDIS, 2685484);
  }
 
开发者ID:gbif,项目名称:checklistbank,代码行数:21,代码来源:NubMatchingServiceImplStrictIT.java


示例13: createTaxonWithClassification

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
/**
 * Creates a new taxon in neo and the name usage kvp using the source usages as a template for the classification properties.
 * Only copies the classification above genus and ignores genus and below!
 * A verbatim usage is created with just the parentNameUsage(ID) values so they can get resolved into proper neo relations later.
 *
 * @param taxonID the optional taxonID to apply to the new node
 */
private Node createTaxonWithClassification(Origin origin, String sciname, Rank rank, TaxonomicStatus status, NameUsageNode source,
                                           @Nullable String taxonID, @Nullable String remarks, VerbatimNameUsage sourceVerbatim) {
  NameUsage u = new NameUsage();
  u.setScientificName(sciname);
  u.setCanonicalName(sciname);
  u.setRank(rank);
  u.setOrigin(origin);
  u.setTaxonomicStatus(status);
  u.setTaxonID(taxonID);
  u.setRemarks(remarks);
  // copy verbatim classification from source
  ClassificationUtils.copyLinneanClassification(source.usage, u);
  removeGenusAndBelow(u);
  Node n = create(u, false).node;
  // copy parent props from source
  VerbatimNameUsage v = new VerbatimNameUsage();
  v.setCoreField(DwcTerm.parentNameUsageID, sourceVerbatim.getCoreField(DwcTerm.parentNameUsageID));
  v.setCoreField(DwcTerm.parentNameUsage, sourceVerbatim.getCoreField(DwcTerm.parentNameUsage));
  dao.store(n.getId(), v);
  return n;
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:29,代码来源:Normalizer.java


示例14: testVernacularNames

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Test
public void testVernacularNames() {
  SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> resp =
    search("Sciurus vulgaris Linnaeus", NameUsageSearchParameter.RANK, Rank.SPECIES);
  assertEquals(1, resp.getResults().size());
  NameUsageSearchResult nu = resp.getResults().get(0);
  assertEquals(2, nu.getVernacularNames().size());

  resp = search("Sciurus vulgaris Linnaeus", NameUsageSearchParameter.RANK, Rank.SPECIES);
  assertEquals(2, resp.getResults().get(0).getVernacularNames().size());

  resp = search("Sciurus vulgaris Linnaeus", NameUsageSearchParameter.RANK, Rank.SPECIES);
  assertEquals(2, resp.getResults().get(0).getVernacularNames().size());

  resp = search("Eichhörnchen", null, null);
  assertEquals(2, resp.getResults().size());

  resp = search("Europäisches Eichhörnchen", null, null);
  assertEquals(1, resp.getResults().size());
  assertEquals(2, resp.getResults().get(0).getVernacularNames().size());
  Set<String> vnames = getVernacularNamesSet(resp.getResults().get(0));
  assertTrue(vnames.contains("Europäisches Eichhörnchen"));
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:24,代码来源:NameUsageSearchServiceIT.java


示例15: testProParte

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Test
public void testProParte() throws Exception {
  IdGenerator gen = new IdGenerator(newTestLookup(), 1000);
  // wrong kingdom
  assertEquals(1000, gen.issue("Admetidae", null, null, Rank.FAMILY, Kingdom.PLANTAE));
  // regular canonical match
  assertEquals(20, gen.issue("Admetidae", null, null, Rank.FAMILY, Kingdom.ANIMALIA));
  assertEquals(1001, gen.issue("Admetidae", null, null, Rank.FAMILY, Kingdom.ANIMALIA));
  assertEquals(17, gen.issue("Admetidae", "Troschel", null, Rank.FAMILY, Kingdom.ANIMALIA));
  // pro parte matching
  assertEquals(1002, gen.issue("Admetidae", "Troschel", null, Rank.FAMILY, Kingdom.ANIMALIA, 100));
  // deleted, but reissued
  assertEquals(18, gen.issue("Admetidae", "Troschel", null, Rank.FAMILY, Kingdom.ANIMALIA, 110));
  assertEquals(19, gen.issue("Admetidae", "Troschel", null, Rank.FAMILY, Kingdom.ANIMALIA, 111));
  assertEquals(1003, gen.issue("Admetidae", "Troschel", null, Rank.FAMILY, Kingdom.ANIMALIA, 200));

  assertEquals(8710209, gen.issue("Bombylius scintillans", "Brunetti", "1909", Rank.SPECIES, Kingdom.ANIMALIA, 1673124));
  assertEquals(5093664, gen.issue("Bombylius scintillans", "Brunetti", "1909", Rank.SPECIES, Kingdom.ANIMALIA));
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:20,代码来源:IdGeneratorTest.java


示例16: assertClassification

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Override
public void assertClassification(int usageKey, LinneanClassification classification) {
  try (Transaction tx = db.beginTx()) {
    NubUsage usage = getUsage(usageKey);
    Map<Rank, String> parents = db.parentsMap(usage.node);
    for (Rank r : Rank.DWC_RANKS) {
      if (!StringUtils.isBlank(classification.getHigherRank(r))) {
        if (!parents.get(r).equalsIgnoreCase(classification.getHigherRank(r))) {
          valid = false;
          LOG.error("Unexpected {} {} for {} {}", r, classification.getHigherRank(r), usage.toStringComplete());
        }
      }
    }

  } catch (AssertionError e) {
    valid = false;
    LOG.error("Classification assertion failed for {}", usageKey, e);
  }
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:20,代码来源:NeoAssertionEngine.java


示例17: assertUsage

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
@Override
public void assertUsage(int usageKey, Rank rank, String name, String accepted, Kingdom kingdom) {
  NameUsage u = null;
  try {
    u = usageService.get(usageKey, null);
    Assert.assertNotNull("Usage "+usageKey+" not existing", u);
    Assert.assertEquals("Wrong rank", rank, u.getRank());
    Assert.assertTrue("Wrong scientific name", u.getScientificName().startsWith(name));

    if (StringUtils.isBlank(accepted)) {
      Assert.assertFalse("Not accepted", u.isSynonym());
    } else {
      Assert.assertTrue("Not a synonym", u.isSynonym());
      Assert.assertTrue("Wrong accepted name", u.getAccepted().startsWith(accepted));
    }

    if (kingdom != null) {
      Assert.assertEquals("Wrong kingdom", kingdom.nubUsageID(), u.getKingdomKey());
      Assert.assertEquals("Wrong kingdom", kingdom.scientificName(), u.getKingdom());
    }

  } catch (AssertionError e) {
    LOG.error("Usage {} {} wrong: {}\n{}", usageKey, name, e.getMessage(), u);
    valid = false;
  }
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:27,代码来源:PgAssertionEngine.java


示例18: testNubLookup

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
private void testNubLookup() throws IOException {
  CSVReader reader = CSVReaderFactory.build(FileUtils.getClasspathFile("lookup_checks.txt"), "UTF-8", ",", '"', 1);

  while (reader.hasNext()) {
    String[] row = reader.next();
    if (row.length >= 9) {
      String r = Strings.emptyToNull(getCol(row, 9));
      Rank rank = r==null? null : Rank.valueOf(r);
      LinneanClassification cl = new NameUsageMatch();
      cl.setKingdom(getCol(row, 1));
      cl.setPhylum(getCol(row, 2));
      cl.setClazz(getCol(row, 3));
      cl.setOrder(getCol(row, 4));
      cl.setFamily(getCol(row, 5));
      cl.setGenus(getCol(row, 6));
      testQuery(getColAsInt(row, 0), cl, getCol(row, 7), getCol(row, 8), rank);
    } else {
      // probably a comment
      System.out.println(StringUtils.join(row));
    }
  }
}
 
开发者ID:gbif,项目名称:checklistbank,代码行数:23,代码来源:DeployedNubLookupCorrectnessTest.java


示例19: fullTextSearch

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
public List<NameUsageSearchResult> fullTextSearch(String name, Rank rank, Integer higherTaxonKey,
					      TaxonomicStatus status, Boolean isExtinct, Habitat habitat, ThreatStatus threat,
					      NameType nameType, NomenclaturalStatus nomenclaturalStatus, Boolean highlight,
					      Set<NameUsageSearchParameter> facet, Integer facetMinCount, Boolean facetMultiselect,
					      UUID ... datasetKey)
   {
NameUsageSearchRequest searchRequest = new NameUsageSearchRequest();
searchRequest.setQ(name);
if(rank != null)
    searchRequest.addRankFilter(rank);
if(status != null)
    searchRequest.addTaxonomicStatusFilter(status);
if(higherTaxonKey != null)
    searchRequest.addHigherTaxonFilter(higherTaxonKey);
if(isExtinct != null)
    searchRequest.addExtinctFilter(isExtinct.booleanValue());
if(habitat != null)
    searchRequest.addHabitatFilter(habitat);
if(threat != null)
    searchRequest.addThreatStatusFilter(threat);
if(nameType != null)
    searchRequest.addParameter(NameUsageSearchParameter.NAME_TYPE, nameType);
if(nomenclaturalStatus != null)
    searchRequest.addTaxonomicStatusFilter(nomenclaturalStatus);
if(facet != null)
    searchRequest.setFacets(facet);
if(facetMinCount != null)
    searchRequest.setFacetMinCount(facetMinCount);
if(facetMultiselect != null)
    searchRequest.setMultiSelectFacets(facetMultiselect.booleanValue());

if(datasetKey != null) {
    for (UUID key : datasetKey) {
	searchRequest.addChecklistFilter(key);
    }
}

return fullTextSearch(searchRequest);
   }
 
开发者ID:nomencurator,项目名称:taxonaut,代码行数:40,代码来源:SpeciesAPIClient.java


示例20: suggest

import org.gbif.api.vocabulary.Rank; //导入依赖的package包/类
public List<NameUsageSuggestResult> suggest(String name, Rank rank, @Nullable UUID ... datasetKey)
   {
NameUsageSuggestRequest suggestRequest = new NameUsageSuggestRequest();
suggestRequest.setQ(name);
if(rank != null)
    suggestRequest.addParameter(NameUsageSearchParameter.RANK, rank.name());
if(datasetKey != null) {
    for (UUID key : datasetKey) {
	suggestRequest.addParameter(NameUsageSearchParameter.DATASET_KEY, key.toString());
    }
}

return suggest(suggestRequest);
   }
 
开发者ID:nomencurator,项目名称:taxonaut,代码行数:15,代码来源:SpeciesAPIClient.java



注:本文中的org.gbif.api.vocabulary.Rank类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GameStoppedServerEvent类代码示例发布时间:2022-05-23
下一篇:
Java DocumentViewer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap