Пример #1
0
 public void process(org.atlasapi.remotesite.pa.profiles.bindings.Person paPerson) {
   Person person = ingestPerson(paPerson);
   Optional<Person> existing = personResolver.person(person.getCanonicalUri());
   if (!existing.isPresent()) {
     personWriter.createOrUpdatePerson(person);
   } else {
     merge(existing.get(), person);
     personWriter.createOrUpdatePerson(existing.get());
   }
 }
Пример #2
0
 /**
  * PA People are ingested separately from PA biogs people. Therefore we set a direct equivalence
  * on the PA person if they exist. In the future this will change to an equivalence job so the
  * equivalence will be asserted at a later stage even if the PA person doesn't exist at the time
  * when the PA biog person is ingested.
  *
  * @param person
  */
 private void setDirectEquivalentToPAPerson(Person person, String id) {
   Optional<Person> paPerson = personResolver.person(PA_PERSON_URI_PREFIX + id);
   if (paPerson.isPresent()) {
     person.setEquivalentTo(ImmutableSet.of(LookupRef.from(paPerson.get())));
   }
 }