Package org.apache.juddi.datatype.response

Examples of org.apache.juddi.datatype.response.PublisherInfo


    PublisherList list = new PublisherList();
    list.setGeneric("1.0");
    list.setOperator("jUDDI.org");
    list.setTruncated(false);
    list.addPublisherInfo(new PublisherInfo("sviens","Steve Viens"));
    list.addPublisherInfo(new PublisherInfo("jdoe","John Doe"));

    System.out.println();

    RegistryObject regObject = list;
    handler.marshal(regObject,parent);
View Full Code Here


    this.maker = maker;
  }

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

    // Attributes
    obj.setPublisherID(element.getAttribute("publisherID"));

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,NameHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(NameHandler.TAG_NAME);
      obj.setName((Name)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    return obj;
  }
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    PublisherInfo info = (PublisherInfo)object;
    Element element = parent.getOwnerDocument().createElement(TAG_NAME);
    AbstractHandler handler = null;

    String publisherID = info.getPublisherID();
    if (publisherID != null)
      element.setAttribute("publisherID",publisherID);

    Name name = info.getName();
    if (name != null)
    {
      handler = maker.lookup(NameHandler.TAG_NAME);
      handler.marshal(name,element);
    }
View Full Code Here

   *
   */
  public PublisherInfo fetchPublisherInfo(String publisherID)
    throws org.apache.juddi.error.RegistryException
  {
    PublisherInfo info = null;

    if ((publisherID != null) && (connection != null))
    {
      try
      {
        Publisher publisher = PublisherTable.select(publisherID,connection);
        info = new PublisherInfo();
        info.setPublisherID(publisherID);
        info.setNameValue(publisher.getName());
      }
      catch(java.sql.SQLException sqlex)
      {
        throw new RegistryException(sqlex);
      }
View Full Code Here

  {
    PublisherList object = new PublisherList();
    object.setGeneric("1.0");
    object.setOperator("jUDDI.org");
    object.setTruncated(false);
    object.addPublisherInfo(new PublisherInfo("guest1","Guest1"));
    object.addPublisherInfo(new PublisherInfo("guest2","Guest2"));

    return object;

  }
View Full Code Here

      if (publisherInfoVector == null) {
        System.out.println("No publishers found matching criteria");
        System.exit(0);
      }
      for (int index = 0; index < publisherInfoVector.size(); index++) {
        PublisherInfo publisherInfo = (PublisherInfo)publisherInfoVector.elementAt(index);
        System.out.println("Publisher ID is ["
                           + publisherInfo.getPublisherID()
                           + "], Publisher name is ["
                           + publisherInfo.getNameValue()
                           + "]");
      }
    }
    catch(Exception ex)
    {
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.response.PublisherInfo

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.