当前位置: 首页>>代码示例>>Java>>正文


Java Occurrence.addIssue方法代码示例

本文整理汇总了Java中org.gbif.api.model.occurrence.Occurrence.addIssue方法的典型用法代码示例。如果您正苦于以下问题:Java Occurrence.addIssue方法的具体用法?Java Occurrence.addIssue怎么用?Java Occurrence.addIssue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.gbif.api.model.occurrence.Occurrence的用法示例。


在下文中一共展示了Occurrence.addIssue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildOccurrence

import org.gbif.api.model.occurrence.Occurrence; //导入方法依赖的package包/类
private static Occurrence buildOccurrence(UUID datasetKey, UUID ook) {
  Occurrence occ1 = new Occurrence();
  occ1.setKey(1);
  occ1.setDatasetKey(datasetKey);
  occ1.setPublishingOrgKey(ook);
  occ1.setBasisOfRecord(BasisOfRecord.FOSSIL_SPECIMEN);
  occ1.setKingdomKey(1);
  occ1.setPhylumKey(1);
  occ1.setClassKey(1);
  occ1.setOrderKey(1);
  occ1.setFamilyKey(1);
  occ1.setGenusKey(1);
  occ1.setSpeciesKey(1);
  occ1.setScientificName("Ursus horribilis");
  occ1.addIssue(OccurrenceIssue.COUNTRY_COORDINATE_MISMATCH);
  occ1.setDecimalLatitude(1.234);
  occ1.setDecimalLongitude(4.567);
  occ1.setCountry(Country.AFGHANISTAN);
  occ1.setPublishingCountry(Country.CANADA);
  occ1.setProtocol(EndpointType.BIOCASE);

  return occ1;
}
 
开发者ID:gbif,项目名称:metrics,代码行数:24,代码来源:OccurrenceComparisonUtilTest.java

示例2: interpretBor

import org.gbif.api.model.occurrence.Occurrence; //导入方法依赖的package包/类
private static void interpretBor(VerbatimOccurrence verbatim, Occurrence occ) {
  ParseResult<BasisOfRecord> parsed = BOR_PARSER.parse(verbatim.getVerbatimField(DwcTerm.basisOfRecord));
  if (parsed.isSuccessful()) {
    occ.setBasisOfRecord(parsed.getPayload());
  } else {
    LOG.debug("Unknown basisOfRecord [{}]", verbatim.getVerbatimField(DwcTerm.basisOfRecord));
    occ.addIssue(OccurrenceIssue.BASIS_OF_RECORD_INVALID);
    occ.setBasisOfRecord(BasisOfRecord.UNKNOWN);
  }
}
 
开发者ID:gbif,项目名称:occurrence,代码行数:11,代码来源:OccurrenceInterpreter.java

示例3: interpretTaxonomy

import org.gbif.api.model.occurrence.Occurrence; //导入方法依赖的package包/类
public void interpretTaxonomy(VerbatimOccurrence verbatim, Occurrence occ) {

    // try core taxon fields first
    OccurrenceParseResult<NameUsageMatch> matchPR = match(verbatim.getVerbatimFields());

    // try the identification extension if no core match
    if (!matchPR.isSuccessful() && verbatim.getExtensions().containsKey(Extension.IDENTIFICATION)) {
      // there may be many identifications but we only want the latest, current one
      //TODO: use latest identification only sorting records by their dwc:dateIdentified
      for (Map<Term, String> rec : verbatim.getExtensions().get(Extension.IDENTIFICATION)) {
        matchPR = match(rec);
        if (matchPR.isSuccessful()) {
          // TODO: copy other identification terms to core???
          // identifiedBy
          // dateIdentified
          // identificationReferences
          // identificationRemarks
          // identificationQualifier
          // identificationVerificationStatus
          // typeStatus
          // taxonID
          // taxonConceptID
          // nameAccordingTo
          // nameAccordingToID
          // taxonRemarks
          break;
        }
      }
    }

    // apply taxonomy if we got a match
    if (matchPR.isSuccessful()) {
      applyMatch(occ, matchPR.getPayload(), matchPR.getIssues());
    } else {
      LOG.debug("No backbone match for occurrence {}", occ.getKey());
      occ.addIssue(OccurrenceIssue.TAXON_MATCH_NONE);
      // assign unknown kingdom
      applyKingdom(occ, Kingdom.INCERTAE_SEDIS);
    }
  }
 
开发者ID:gbif,项目名称:occurrence,代码行数:41,代码来源:TaxonomyInterpreter.java


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