private SmlResponsibleParty parseResponsibleParty(ResponsibleParty responsibleParty) { SmlResponsibleParty smlRespParty = new SmlResponsibleParty(); if (responsibleParty != null) { if (!Strings.isNullOrEmpty(responsibleParty.getIndividualName())) { smlRespParty.setIndividualName(responsibleParty.getIndividualName()); } if (!Strings.isNullOrEmpty(responsibleParty.getOrganizationName())) { smlRespParty.setOrganizationName(responsibleParty.getOrganizationName()); } if (!Strings.isNullOrEmpty(responsibleParty.getPositionName())) { smlRespParty.setPositionName(responsibleParty.getPositionName()); } if (responsibleParty.getContactInfo() != null) { ContactInfo contactInfo = responsibleParty.getContactInfo(); if (contactInfo.getAddress() != null) { Address address = contactInfo.getAddress(); if (!Strings.isNullOrEmpty(address.getAdministrativeArea())) { smlRespParty.setAdministrativeArea(address.getAdministrativeArea()); } if (!Strings.isNullOrEmpty(address.getCity())) { smlRespParty.setCity(address.getCity()); } if (!Strings.isNullOrEmpty(address.getCountry())) { smlRespParty.setCountry(address.getCountry()); } if (address.getDeliveryPointArray() != null && address.getDeliveryPointArray().length > 0) { for (String deliveryPoint : address.getDeliveryPointArray()) { smlRespParty.addDeliveryPoint(deliveryPoint); } } if (!Strings.isNullOrEmpty(address.getElectronicMailAddress())) { smlRespParty.setEmail(address.getElectronicMailAddress()); } if (!Strings.isNullOrEmpty(address.getPostalCode())) { smlRespParty.setPostalCode(address.getPostalCode()); } } if (!Strings.isNullOrEmpty(contactInfo.getContactInstructions())) { smlRespParty.setContactInstructions(contactInfo.getContactInstructions()); } if (!Strings.isNullOrEmpty(contactInfo.getHoursOfService())) { smlRespParty.setHoursOfService(contactInfo.getHoursOfService()); } if (contactInfo.getOnlineResourceArray() != null && contactInfo.getOnlineResourceArray().length > 0) { for (OnlineResource onlineResource : contactInfo.getOnlineResourceArray()) { if (!Strings.isNullOrEmpty(onlineResource.getHref())) { smlRespParty.addOnlineResource(onlineResource.getHref()); } } } if (contactInfo.getPhone() != null) { Phone phone = contactInfo.getPhone(); if (phone.getVoiceArray() != null && phone.getVoiceArray().length > 0) { for (String phoneVoice : phone.getVoiceArray()) { smlRespParty.addPhoneVoice(phoneVoice); } } if (phone.getFacsimileArray() != null && phone.getFacsimileArray().length > 0) { for (String phoneFax : phone.getFacsimileArray()) { smlRespParty.addPhoneFax(phoneFax); } } } } } return smlRespParty; }