Package org.apache.juddi.datatype

Examples of org.apache.juddi.datatype.Address


      statement.setInt(2, contactID);
 
      int listSize = addrList.size();
      for (int addressID = 0; addressID < listSize; addressID++)
      {
        Address address = (Address) addrList.elementAt(addressID);
        statement.setInt(3, addressID);
        statement.setString(4, address.getUseType());
        statement.setString(5, address.getSortCode());
        statement.setString(6, address.getTModelKey());
 
        if (log.isDebugEnabled()) {
        log.debug(
          "insert into " + tablePrefix + "ADDRESS table:\n\n\t"
            + insertSQL
            + "\n\t BUSINESS_KEY="
            + businessKey.toString()
            + "\n\t CONTACT_ID="
            + contactID
            + "\n\t ADDRESS_ID="
            + addressID
            + "\n\t USE_TYPE="
            + address.getUseType()
            + "\n\t SORT_CODE="
            + address.getSortCode()
            + "\n\t TMODEL_KEY="
            + address.getTModelKey()
            + "\n");
        }
 
        statement.executeUpdate();
      }
View Full Code Here


      // execute the statement
      resultSet = statement.executeQuery();
      while (resultSet.next())
      {
        Address address = new Address();
        address.setUseType(resultSet.getString(1));//("USE_TYPE"));
        address.setSortCode(resultSet.getString(2));//("SORT_CODE"));
        address.setTModelKey(resultSet.getString(3));//("TMODEL_KEY"));
        addrList.add(address);
        address = null;
      }

      return addrList;
View Full Code Here

    AbstractHandler handler = maker.lookup(ContactsHandler.TAG_NAME);

    Element parent = XMLUtils.newRootElement();
    Element child = null;

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    DiscoveryURLs discURLs = new DiscoveryURLs();
    discURLs.addDiscoveryURL(new DiscoveryURL("http","http://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("https","https://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("smtp","servicemngr@sviens.com"));

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    HandlerMaker maker = HandlerMaker.getInstance();
    AbstractHandler handler = maker.lookup(ContactHandler.TAG_NAME);
    Element parent = XMLUtils.newRootElement();
    Element child = null;

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    //contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    DiscoveryURLs discURLs = new DiscoveryURLs();
    discURLs.addDiscoveryURL(new DiscoveryURL("http","http://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("https","https://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("smtp","servicemngr@sviens.com"));

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    DiscoveryURLs discURLs = new DiscoveryURLs();
    discURLs.addDiscoveryURL(new DiscoveryURL("http","http://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("https","https://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("smtp","servicemngr@sviens.com"));

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    DiscoveryURLs discURLs = new DiscoveryURLs();
    discURLs.addDiscoveryURL(new DiscoveryURL("http","http://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("https","https://www.sviens.com/service.wsdl"));
    discURLs.addDiscoveryURL(new DiscoveryURL("smtp","servicemngr@sviens.com"));

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    Address obj = new Address();
    Vector nodeList = null;
    AbstractHandler handler = null;

    // Attributes
    String useType = element.getAttribute("useType");
    if ((useType != null) && (useType.trim().length() > 0))
      obj.setUseType(useType);

    String sortCode = element.getAttribute("sortCode");
    if ((sortCode != null) && (sortCode.trim().length() > 0))
      obj.setSortCode(sortCode);

    String tModelKey = element.getAttribute("tModelKey");
    if ((tModelKey != null) && (tModelKey.trim().length() > 0))
      obj.setTModelKey(tModelKey);

    // Text Node Value
    // {none}

    // Child Elements
    handler = maker.lookup(AddressLineHandler.TAG_NAME);
    nodeList = XMLUtils.getChildElementsByTagName(element,AddressLineHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      obj.addAddressLine((AddressLine)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    Address address = (Address)object;
    String generic = getGeneric(null);
    String namespace = getUDDINamespace(generic);
    Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);

    String useType = address.getUseType();
    if ((useType != null) && (useType.trim().length() > 0))
      element.setAttribute("useType",useType);

    String sortCode = address.getSortCode();
    if ((sortCode != null) && (sortCode.trim().length() > 0))
      element.setAttribute("sortCode",sortCode);

    String tModelKey = address.getTModelKey();
    if ((tModelKey != null) && (tModelKey.trim().length() > 0))
      element.setAttribute("tModelKey",tModelKey);

    Vector vector = address.getAddressLineVector();
    if ((vector!=null) && (vector.size() > 0))
    {
      AbstractHandler handler = maker.lookup(AddressLineHandler.TAG_NAME);
      for (int i=0; i < vector.size(); i++)
      {
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.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.