Package com.sun.xml.registry.uddi.bindings_v2_2

Examples of com.sun.xml.registry.uddi.bindings_v2_2.Address


 
    /**
     * Get UDDI Address given JAXR Postal Address
     */
  public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
    Address address = objectFactory.createAddress();

    AddressLine[] addarr = new AddressLine[6];

        String stnum = postalAddress.getStreetNumber();
        String st = postalAddress.getStreet();
        String city = postalAddress.getCity();
        String country = postalAddress.getCountry();
        String code = postalAddress.getPostalCode();
        String state = postalAddress.getStateOrProvince();

    AddressLine stnumAL = objectFactory.createAddressLine();
        stnumAL.setKeyName("STREET_NUMBER");
    if (stnum != null) {
        stnumAL.setKeyValue(stnum);
    }

    AddressLine stAL = objectFactory.createAddressLine();
        stAL.setKeyName("STREET");
    if (st != null) {
        stAL.setKeyValue(st);
    }

    AddressLine cityAL = objectFactory.createAddressLine();
        cityAL.setKeyName("CITY");
    if (city != null) {
        cityAL.setKeyValue(city);
    }

    AddressLine countryAL = objectFactory.createAddressLine();
        countryAL.setKeyName("COUNTRY");
    if (country != null) {
        countryAL.setKeyValue(country);
    }

    AddressLine codeAL = objectFactory.createAddressLine();
        codeAL.setKeyName("POSTALCODE");
    if (code != null) {
        codeAL.setKeyValue(code);
    }

    AddressLine stateAL = objectFactory.createAddressLine();
        stateAL.setKeyName("STATE");
    if (state != null) {
        stateAL.setKeyValue(state);
    }

    // Add the AddressLine to vector
    addarr[0] = stnumAL;
    addarr[1] = stAL;
    addarr[2] = cityAL;
    addarr[3] = countryAL;
    addarr[4] = codeAL;
    addarr[5] = stateAL;

    address.getAddressLine().addAll(Arrays.asList(addarr));

        return address;
    }
View Full Code Here


 
    /**
     * Get UDDI Address given JAXR Postal Address
     */
  public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
    Address address = objectFactory.createAddress();

    AddressLine[] addarr = new AddressLine[6];

        String stnum = postalAddress.getStreetNumber();
        String st = postalAddress.getStreet();
        String city = postalAddress.getCity();
        String country = postalAddress.getCountry();
        String code = postalAddress.getPostalCode();
        String state = postalAddress.getStateOrProvince();

    AddressLine stnumAL = objectFactory.createAddressLine();
        stnumAL.setKeyName("STREET_NUMBER");
    if (stnum != null) {
        stnumAL.setKeyValue(stnum);
    }

    AddressLine stAL = objectFactory.createAddressLine();
        stAL.setKeyName("STREET");
    if (st != null) {
        stAL.setKeyValue(st);
    }

    AddressLine cityAL = objectFactory.createAddressLine();
        cityAL.setKeyName("CITY");
    if (city != null) {
        cityAL.setKeyValue(city);
    }

    AddressLine countryAL = objectFactory.createAddressLine();
        countryAL.setKeyName("COUNTRY");
    if (country != null) {
        countryAL.setKeyValue(country);
    }

    AddressLine codeAL = objectFactory.createAddressLine();
        codeAL.setKeyName("POSTALCODE");
    if (code != null) {
        codeAL.setKeyValue(code);
    }

    AddressLine stateAL = objectFactory.createAddressLine();
        stateAL.setKeyName("STATE");
    if (state != null) {
        stateAL.setKeyValue(state);
    }

    // Add the AddressLine to vector
    addarr[0] = stnumAL;
    addarr[1] = stAL;
    addarr[2] = cityAL;
    addarr[3] = countryAL;
    addarr[4] = codeAL;
    addarr[5] = stateAL;

    address.getAddressLine().addAll(Arrays.asList(addarr));

        return address;
    }
View Full Code Here

                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;
        }
View Full Code Here

    addressLineThree.setKeyName("zip");
    addressLineThree.setKeyValue("zip");
    addressLineThree.setValue(data.getZip(5));
   
    //One address for the contact. Can be more but only one here.
    Address address = new Address();
    address.setLang("en");
    address.setSortCode("1");
    address.setTModelKey("uddi:tmodelKey:address");
    address.setUseType("HQ");
    address.getAddressLine().add(addressLineOne);
    address.getAddressLine().add(addressLineTwo);
    address.getAddressLine().add(addressLineThree);
   
    //Contacts phone number details
    Phone phone = new Phone();
    phone.setUseType("Hotline");
    phone.setValue(data.getUSPhoneNumber());
View Full Code Here

   * @param useType
   * @return
   */
  public static Address generateAddress(List<AddressLine> addressLines, String lang, String sortCode, String tModelKey, String useType)
  {
    Address address = new Address();
    if (addressLines != null)
      for (AddressLine al : addressLines)
        address.getAddressLine().add(al);
    if (lang != null)
      address.setLang(lang);
    if (sortCode != null)
      address.setSortCode(sortCode);
    if (tModelKey != null)
      address.setTModelKey(tModelKey);
    if (useType != null)
      address.setUseType(useType);
   
    return address;
  }
View Full Code Here

  }
 
  public static Address getAddress(List<Address> entityList, String lang) {
   
    if (entityList.size()==0) {
      Address address = new Address();
      address.setLang(lang);
      entityList.add(address);
    }
    if (lang==null) return entityList.get(0);
    for (Address entity : entityList) {
      if (lang.equalsIgnoreCase(entity.getLang())) {
View Full Code Here

        PersonName n = new PersonName();
        n.setValue("Bob");
        c.getPersonName().add(n);

        cc.getContact().add(c);
        Address a = new Address();
        if (oversizedSortCode) {
            a.setSortCode(str11);
        } else {
            a.setSortCode(str10);
        }
        if (oversizedLang) {
            a.setLang(str27);
        } else {
            a.setLang(str26);
        }
        if (oversizedTmodel) {
            a.setTModelKey(str256);
        } else {
            a.setTModelKey(str255);
        }
        if (oversizedUseType) {
            a.setUseType(str256);
        } else {
            a.setUseType(str255);
        }
        if (oversizedSortCode) {
            a.setSortCode(str11);
        } else {
            a.setSortCode(str10);
        }
        AddressLine al = new AddressLine();
        if (oversizedAddressKN) {
            al.setKeyName(str256); //optional
        } else {
            al.setKeyName(str255); //optional
        }
        if (oversizedAddressKV) {
            al.setKeyValue(str256); //optional
        } else {
            al.setKeyValue(str255); //optional
        }
        if (oversizedAddressLineValue) {
            al.setValue(str81); //this one is required
        } else {
            al.setValue(str80);
        }
        a.getAddressLine().add(al);
        c.getAddress().add(a);
        return cc;
    }
View Full Code Here

                Contact admin = new Contact();
                admin.setUseType("it support");
                admin.getEmail().add(new Email("admin@localhost", "primary"));
                admin.getDescription().add(new Description("the guy in that keeps the lights green", "en"));
                admin.getPersonName().add(new PersonName("admin1", "en"));
                Address r=new Address();
                r.setLang("en");
                r.setSortCode("none");
                r.setTModelKey(domainprefix + "address");
                r.setUseType("mailing address");
                r.getAddressLine().add(new AddressLine("keyname","keyval","1313 mockingbird lane"));
                admin.getAddress().add(r);
                c.getContact().add(admin);
                return c;
               
        }
View Full Code Here

                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;

        }
View Full Code Here

                PersonName n = new PersonName();
                n.setValue("Bob");
                c.getPersonName().add(n);

                cc.getContact().add(c);
                Address a = new Address();
                if (oversizedSortCode) {
                        a.setSortCode(str11);
                } else {
                        a.setSortCode(str10);
                }
                if (oversizedLang) {
                        a.setLang(str27);
                } else {
                        a.setLang(str26);
                }
                if (oversizedTmodel) {
                        a.setTModelKey(str256);
                } else {
                        a.setTModelKey(str255);
                }
                if (oversizedUseType) {
                        a.setUseType(str256);
                } else {
                        a.setUseType(str255);
                }
                if (oversizedSortCode) {
                        a.setSortCode(str11);
                } else {
                        a.setSortCode(str10);
                }
                AddressLine al = new AddressLine();
                if (oversizedAddressKN) {
                        al.setKeyName(str256); //optional
                } else {
                        al.setKeyName(str255); //optional
                }
                if (oversizedAddressKV) {
                        al.setKeyValue(str256); //optional
                } else {
                        al.setKeyValue(str255); //optional
                }
                if (oversizedAddressLineValue) {
                        al.setValue(str81); //this one is required
                } else {
                        al.setValue(str80);
                }
                a.getAddressLine().add(al);
                c.getAddress().add(a);
                return cc;
        }
View Full Code Here

TOP

Related Classes of com.sun.xml.registry.uddi.bindings_v2_2.Address

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.