private static Collection<? extends Address> MapAddress(List<org.uddi.api_v2.Address> address) { List<Address> r = new ArrayList<Address>(); if (address == null) { return r; } for (int i = 0; i < address.size(); i++) { Address x = new Address(); x.setSortCode(address.get(i).getSortCode()); x.setTModelKey(address.get(i).getTModelKey()); x.setUseType(address.get(i).getUseType()); x.getAddressLine().addAll(MapAddressLine(address.get(i).getAddressLine())); r.add(x); } return r; }
public static void PrintContacts(Contacts contacts) { if (contacts == null) { return; } for (int i = 0; i < contacts.getContact().size(); i++) { System.out.println("Contact " + i + " type:" + contacts.getContact().get(i).getUseType()); System.out.println("Name: " + contacts.getContact().get(i).getPersonName()); for (int k = 0; k < contacts.getContact().get(i).getEmail().size(); k++) { System.out.println("Email: " + contacts.getContact().get(i).getEmail().get(k).getValue()); } for (int k = 0; k < contacts.getContact().get(i).getAddress().size(); k++) { System.out.println("Address sort code " + contacts.getContact().get(i).getAddress().get(k).getSortCode()); System.out.println("Address use type " + contacts.getContact().get(i).getAddress().get(k).getUseType()); System.out.println("Address tmodel key " + contacts.getContact().get(i).getAddress().get(k).getTModelKey()); for (int x = 0; x < contacts.getContact().get(i).getAddress().get(k).getAddressLine().size(); x++) { System.out.println("Address line value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getValue()); System.out.println("Address line key name " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyName()); System.out.println("Address line key value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyValue()); } } for (int k = 0; k < contacts.getContact().get(i).getDescription().size(); k++) { System.out.println("Desc: " + contacts.getContact().get(i).getDescription().get(k).getValue()); } for (int k = 0; k < contacts.getContact().get(i).getPhone().size(); k++) { System.out.println("Phone: " + contacts.getContact().get(i).getPhone().get(k).getValue()); } } }