本文整理汇总了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;
}
示例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);
}
}
示例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);
}
}