Search in sources :

Example 6 with PersonName

use of nl.knaw.huygens.timbuctoo.model.PersonName in project timbuctoo by HuygensING.

the class UriBearingPersonNames method addNameComponent.

public UriBearingPersonNames addNameComponent(String nameUri, PersonNameComponent.Type nameType, String value) {
    PersonName personName;
    if (nameUris.containsKey(nameUri)) {
        personName = list.get(nameUris.get(nameUri));
    } else {
        personName = new PersonName();
        list.add(personName);
        nameUris.put(nameUri, list.indexOf(personName));
    }
    insertNameComponentAtNaturalPosition(nameType, value, personName);
    return this;
}
Also used : PersonName(nl.knaw.huygens.timbuctoo.model.PersonName)

Aggregations

PersonName (nl.knaw.huygens.timbuctoo.model.PersonName)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 PersonNames (nl.knaw.huygens.timbuctoo.model.PersonNames)3 IOException (java.io.IOException)2 Test (org.junit.Test)2 PersonNameComponent (nl.knaw.huygens.timbuctoo.model.PersonNameComponent)1 Entity (nl.knaw.huygens.timbuctoo.rdf.Entity)1