當前位置: 首頁>>代碼示例>>Java>>正文


Java NameUsage.setRemarks方法代碼示例

本文整理匯總了Java中org.gbif.api.model.checklistbank.NameUsage.setRemarks方法的典型用法代碼示例。如果您正苦於以下問題:Java NameUsage.setRemarks方法的具體用法?Java NameUsage.setRemarks怎麽用?Java NameUsage.setRemarks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.gbif.api.model.checklistbank.NameUsage的用法示例。


在下文中一共展示了NameUsage.setRemarks方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: convert

import org.gbif.api.model.checklistbank.NameUsage; //導入方法依賴的package包/類
private NameUsage convert(NubUsage nub) {
  NameUsage u = new NameUsage();
  u.setKey(nub.usageKey);
  u.setConstituentKey(nub.datasetKey);
  //TODO: add a scientificNameID property to NameUsage
  //nub.scientificNameID
  u.setTaxonID("gbif:" + nub.usageKey);
  u.setScientificName(nub.parsedName.getScientificName());
  u.setCanonicalName(canonicalOrScientificName(nub.parsedName));
  u.setRank(nub.rank);
  u.setTaxonomicStatus(nub.status);
  u.setNomenclaturalStatus(nub.nomStatus);
  u.setPublishedIn(nub.publishedIn);
  u.setOrigin(nub.origin);
  if (!nub.sourceIds.isEmpty()) {
    u.setSourceTaxonKey(nub.sourceIds.getInt(0));
  } else if (nub.origin.equals(Origin.SOURCE)) {
    LOG.warn("Source usage without source id found {} {}", u.getKey(), u.getScientificName());
  }
  u.setRemarks(remarkJoiner.join(nub.remarks));
  u.setIssues(nub.issues);
  return u;
}
 
開發者ID:gbif,項目名稱:checklistbank,代碼行數:24,代碼來源:UsageDao.java

示例2: createTaxonWithClassification

import org.gbif.api.model.checklistbank.NameUsage; //導入方法依賴的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

示例3: create

import org.gbif.api.model.checklistbank.NameUsage; //導入方法依賴的package包/類
protected NameUsageNode create(Origin origin, String sciname, Rank rank, TaxonomicStatus status, boolean isRoot, @Nullable String taxonID, @Nullable String remark) {
  NameUsage u = new NameUsage();
  u.setScientificName(sciname);
  // or generate via parsed name below???
  u.setCanonicalName(sciname);
  u.setRank(rank);
  u.setOrigin(origin);
  u.setTaxonomicStatus(status);
  u.setTaxonID(taxonID);
  u.setRemarks(remark);
  return create(u, isRoot);
}
 
開發者ID:gbif,項目名稱:checklistbank,代碼行數:13,代碼來源:ImportDb.java

示例4: addRemark

import org.gbif.api.model.checklistbank.NameUsage; //導入方法依賴的package包/類
/**
 * Adds a string remark to the taxonRemarks property of a usage but does not flush the change into the storage.
 * You need to make sure the usage is stored afterwards to not lose it.
 * Existing remarks are left untouched and the new string is appended.
 */
public static void addRemark(NameUsage usage, String remark) {
    if (StringUtils.isBlank(usage.getRemarks())) {
        usage.setRemarks(remark);
    } else {
        usage.setRemarks(usage.getRemarks() + "; " + remark);
    }
}
 
開發者ID:gbif,項目名稱:checklistbank,代碼行數:13,代碼來源:NameUsageNode.java

示例5: createSynonyms100710497

import org.gbif.api.model.checklistbank.NameUsage; //導入方法依賴的package包/類
/**
    * Creates response to http://api.gbif.org/v1/species/100710497/synonyms
    */
   private PagingResponse<NameUsage> createSynonyms100710497 ()
   {
PagingResponse<NameUsage> expected = new PagingResponse<NameUsage>(0,20);
expected.setEndOfRecords(true);
List<NameUsage> results = newArrayList();
expected.setResults(results);
NameUsage result = new NameUsage();
results.add(result);
result.setKey(102382983);
result.setNubKey(3204909);
result.setTaxonID("1290714");
result.setKingdom("Protista");
result.setPhylum("Ciliophora");
result.setClazz("Oligohymenophora");
result.setOrder("Scuticociliatida");
result.setFamily("Cohnilembidae");
result.setGenus("Cohnilembus");
result.setKingdomKey(102545060);
result.setPhylumKey(102545140);
result.setClassKey(102514394);
result.setOrderKey(102143947);
result.setFamilyKey(102238321);
result.setGenusKey(100710497);
result.setDatasetKey(UUID.fromString("0938172b-2086-439c-a1dd-c21cb0109ed5"));
result.setParentKey(102238321);
result.setParent("Cohnilembidae");
result.setAcceptedKey(100710497);
result.setAccepted("Cohnilembus Kahl, 1933");
result.setScientificName("Lembus Cohn, 1866");
result.setCanonicalName("Lembus");
result.setAuthorship("Cohn, 1866");
result.setNameType(NameType.SCIENTIFIC);
result.setRank(Rank.GENUS);
result.setOrigin(Origin.SOURCE);
result.setTaxonomicStatus(TaxonomicStatus.SYNONYM);
result.setRemarks("See Cohnilembus Kahl 1933. (Nomen. Zool.).");
result.setPublishedIn("Z. wiss. Zool. , 16, 270.");
result.setAccordingTo("SN2000 unverified; Nomenclator Zoologicus");
result.setNumDescendants(0);
result.setModified(parseDateTime("2014-06-15T15:45:33.692+0000"));
result.setLastInterpreted(parseDateTime("2014-11-03T15:22:26.302+0000"));
result.setSynonym(true);
return expected;
   }
 
開發者ID:nomencurator,項目名稱:taxonaut,代碼行數:48,代碼來源:SpeciesAPIClientTest.java

示例6: createSynonyms126926284

import org.gbif.api.model.checklistbank.NameUsage; //導入方法依賴的package包/類
/**
    * Creates response to http://api.gbif.org/v1/species/126926284/synonyms
    */
   private PagingResponse<NameUsage> createSynonyms126926284 () {
PagingResponse<NameUsage> expected = new PagingResponse<NameUsage>(0,20);
expected.setEndOfRecords(true);
List<NameUsage> results = newArrayList();
expected.setResults(results);
NameUsage result = new NameUsage();
results.add(result);

result.setKey(100496585);
result.setKingdom("Protista");
result.setPhylum("Ciliophora");
result.setClazz("Oligohymenophora");
result.setOrder("Scuticociliatida");
result.setFamily("Cohnilembidae");
result.setKingdomKey(126940483);
result.setPhylumKey(100533110);
result.setClassKey(126940663);
result.setOrderKey(126940683);
result.setFamilyKey(126940686);
result.setDatasetKey(UUID.fromString("714c64e3-2dc1-4bb7-91e4-54be5af4da12"));
result.setNubKey(3204909);
result.setParentKey(126940686);
result.setParent("Cohnilembidae");
result.setAcceptedKey(126926284);
result.setAccepted("Cohnilembus");
result.setScientificName("Lembus Cohn, 1866");
result.setCanonicalName("Lembus");
result.setAuthorship("Cohn, 1866");
result.setNameType(NameType.SCIENTIFIC);
result.setRank(Rank.GENUS);
result.setOrigin(Origin.SOURCE);
result.setTaxonomicStatus(TaxonomicStatus.SYNONYM);
result.setRemarks("See Cohnilembus Kahl 1933. (Nomen. Zool.).");
result.setPublishedIn("Z. wiss. Zool. , 16, 270.");
result.setAccordingTo("SN2000 unverified; Nomenclator Zoologicus");
result.setNumDescendants(0);
/*
Identifier identifier = new Identifier();
result.addIdentifier(identifier);
identifier.setKey(4467557);
identifier.setUsageKey(100496585);
identifier.setDatasetKey(UUID.fromString("714c64e3-2dc1-4bb7-91e4-54be5af4da12"));
identifier.setIdentifier("1290714");
// identifier.setType(IdentifierType.SOURCE_ID);
*/
// result.setTaxonID("1290714");
result.setSynonym(true);

return expected;
   }
 
開發者ID:nomencurator,項目名稱:taxonaut,代碼行數:54,代碼來源:SpeciesAPIClientTest.java


注:本文中的org.gbif.api.model.checklistbank.NameUsage.setRemarks方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。