agent.setId(id);
agent.setNames(Arrays.asList(new TextValue(name)));
if(address != null) {
agent.setAddresses(new ArrayList<Address>());
Address gedxAddress = new Address();
gedxAddress.setValue(address.getValue());
gedxAddress.setCity(address.getCity());
gedxAddress.setCountry(address.getCountry());
gedxAddress.setPostalCode(address.getPostalCode());
gedxAddress.setStateOrProvince(address.getState());
gedxAddress.setStreet(address.getAddressLine1());
gedxAddress.setStreet2(address.getAddressLine2());
gedxAddress.setStreet3(address.getAddressLine3());
agent.getAddresses().add(gedxAddress);
if(address.getName() != null) {
Marker addressContext = ConversionContext.getDetachedMarker("ADDR");
ConversionContext.addReference(addressContext);