/** * A long-term, persistent, globally unique identifier for this subject. * * @param persistentId A long-term, persistent, globally unique identifier for this subject. */ @JsonIgnore @org.codehaus.jackson.annotate.JsonIgnore public void setPersistentId(URI persistentId) { if (this.identifiers == null) { this.identifiers = new ArrayList<Identifier>(); } //clear out any other primary ids. Iterator<Identifier> it = this.identifiers.iterator(); while (it.hasNext()) { if (IdentifierType.Persistent.equals(it.next().getKnownType())) { it.remove(); } } Identifier identifier = new Identifier(); identifier.setKnownType(IdentifierType.Persistent); identifier.setValue(persistentId); this.identifiers.add(identifier); }
/** * A long-term, persistent, globally unique identifier for this source. * * @param persistentId A long-term, persistent, globally unique identifier for this source. */ @JsonIgnore @org.codehaus.jackson.annotate.JsonIgnore public void setPersistentId(URI persistentId) { if (this.identifiers == null) { this.identifiers = new ArrayList<Identifier>(); } //clear out any other primary ids. Iterator<Identifier> it = this.identifiers.iterator(); while (it.hasNext()) { if (IdentifierType.Persistent.equals(it.next().getKnownType())) { it.remove(); } } Identifier identifier = new Identifier(); identifier.setKnownType(IdentifierType.Persistent); identifier.setValue(persistentId); this.identifiers.add(identifier); }
public PersonMatchResultsState updateMatchStatus(Entry entry, MatchStatus status, StateTransitionOption... options) { URI updateStatusUri = UriBuilder.fromUri(getSelfUri()).replaceQueryParam(FamilySearchOptions.STATUS, status.name().toLowerCase()).build(); ClientRequest request = createAuthenticatedRequest() .type(GedcomxConstants.GEDCOMX_JSON_MEDIA_TYPE) .accept(AtomModel.ATOM_GEDCOMX_JSON_MEDIA_TYPE) .entity(new Gedcomx().person(new Person().identifier(new Identifier(entry.getId(), IdentifierType.Persistent)))) .build(updateStatusUri, HttpMethod.POST); return ((FamilySearchStateFactory)this.stateFactory).newPersonMatchResultsState(request, invoke(request, options), this.accessToken); }
if (primaryIdentifier != null) { fatherChildRelationship.setIdentifiers(new ArrayList<>(1)); fatherChildRelationship.getIdentifiers().add(new Identifier()); fatherChildRelationship.getIdentifiers().get(0).setType(FamilySearchIdentifierType.ChildAndParentsRelationship.toQNameURI(), true); fatherChildRelationship.getIdentifiers().get(0).setValue(primaryIdentifier.getValue()); if (primaryIdentifier != null) { motherChildRelationship.setIdentifiers(new ArrayList<>(1)); motherChildRelationship.getIdentifiers().add(new Identifier()); motherChildRelationship.getIdentifiers().get(0).setType(FamilySearchIdentifierType.ChildAndParentsRelationship.toQNameURI(), true); motherChildRelationship.getIdentifiers().get(0).setValue(primaryIdentifier.getValue());