private void encodeOwsContact(OwsContact contact, ContactType xcontact) { contact.getOnlineResource().ifPresent(site -> encodeOnlineResource(site, xcontact.addNewOnlineResource())); contact.getContactInstructions().ifPresent(xcontact::setContactInstructions); contact.getHoursOfService().ifPresent(xcontact::setHoursOfService); contact.getPhone().ifPresent(x -> encodeOwsPhone(x, xcontact.addNewPhone())); contact.getAddress().ifPresent(x -> encodeOwsAddress(x, xcontact.addNewAddress())); }
final AddressType address = contact.addNewAddress(); if (sosServiceProvider.getDeliveryPoint() != null) { address.addDeliveryPoint(sosServiceProvider.getDeliveryPoint());