本文整理匯總了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);
}
}