Examples of RelatedBusinessesList


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

    /**
     * Create an instance of {@link RelatedBusinessesList }
     *
     */
    public RelatedBusinessesList createRelatedBusinessesList() {
        return new RelatedBusinessesList();
    }
View Full Code Here

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

    this.maker = maker;
  }

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

    // We could use the generic attribute value to
    // determine which version of UDDI was used to
    // format the request XML. - Steve

    // Attributes
    obj.setGeneric(element.getAttribute("generic"));
    obj.setOperator(element.getAttribute("operator"));

    // We can ignore the xmlns attribute since we
    // can always determine it's value using the
    // "generic" attribute. - Steve

    String truncValue = element.getAttribute("truncated");
    if (truncValue != null)
      obj.setTruncated(truncValue.equalsIgnoreCase("true"));

    // Text Node Value
    // {none}

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

    nodeList = XMLUtils.getChildElementsByTagName(element,RelatedBusinessInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(RelatedBusinessInfosHandler.TAG_NAME);
      obj.setRelatedBusinessInfos((RelatedBusinessInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    return obj;
  }
View Full Code Here

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

    return obj;
  }

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

    element.setAttribute("generic",generic);

    String operator = list.getOperator();
    if (operator != null)
      element.setAttribute("operator",operator);
    else
      element.setAttribute("operator","");

    boolean truncated = list.isTruncated();
    if (truncated)
      element.setAttribute("truncated","true");

    BusinessKey key = list.getBusinessKey();
    if (key != null)
    {
      handler = maker.lookup(BusinessKeyHandler.TAG_NAME);
      handler.marshal(key,element);
    }

    RelatedBusinessInfos infos = list.getRelatedBusinessInfos();
    if (infos != null)
    {
      handler = maker.lookup(RelatedBusinessInfosHandler.TAG_NAME);
      handler.marshal(infos,element);
    }
View Full Code Here

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

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

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

    RelatedBusinessesList list = new RelatedBusinessesList();
    list.setGeneric("2.0");
    list.setOperator("jUDDI.org");
    list.setTruncated(true);
    list.setBusinessKey(new BusinessKey("f9f0c35f-06ab-4bec-9c7d-b1469e73f0eb"));
    list.addRelatedBusinessInfo(new RelatedBusinessInfo("abc"));
    list.addRelatedBusinessInfo(new RelatedBusinessInfo("xyz"));

    System.out.println();

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

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

      dataStore.commit();

      // create a new RelatedBusinessesList instance and
      // stuff the new relatedBusinessInfoVector into it.
      RelatedBusinessesList list = new RelatedBusinessesList();
      list.setGeneric(generic);
      list.setOperator(Config.getOperator());
      list.setTruncated(truncatedResults);
      list.setBusinessKey(new BusinessKey(businessKey));
      list.setRelatedBusinessInfos(infos);
      return list;
    }
    catch(RegistryException regex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
View Full Code Here

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

    this.maker = maker;
  }

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

    // We could use the generic attribute value to
    // determine which version of UDDI was used to
    // format the request XML. - Steve

    // Attributes
    obj.setGeneric(element.getAttribute("generic"));
    obj.setOperator(element.getAttribute("operator"));

    // We can ignore the xmlns attribute since we
    // can always determine it's value using the
    // "generic" attribute. - Steve

    String truncValue = element.getAttribute("truncated");
    if (truncValue != null)
      obj.setTruncated(truncValue.equalsIgnoreCase("true"));

    // Text Node Value
    // {none}

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

    nodeList = XMLUtils.getChildElementsByTagName(element,RelatedBusinessInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(RelatedBusinessInfosHandler.TAG_NAME);
      obj.setRelatedBusinessInfos((RelatedBusinessInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    return obj;
  }
View Full Code Here

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

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    RelatedBusinessesList list = (RelatedBusinessesList)object;
    Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);
    AbstractHandler handler = null;

    String generic = list.getGeneric();
    if ((generic != null) && (generic.trim().length() > 0))
    {
      element.setAttribute("generic",generic);

      if (generic.equals(IRegistry.UDDI_V1_GENERIC))
        element.setAttribute("xmlns",IRegistry.UDDI_V1_NAMESPACE);
      else if (generic.equals(IRegistry.UDDI_V2_GENERIC))
        element.setAttribute("xmlns",IRegistry.UDDI_V2_NAMESPACE);
      else if (generic.equals(IRegistry.UDDI_V3_GENERIC))
        element.setAttribute("xmlns",IRegistry.UDDI_V3_NAMESPACE);
    }
    else // Default to UDDI v2 values
    {
      element.setAttribute("generic",IRegistry.UDDI_V2_GENERIC);
      element.setAttribute("xmlns",IRegistry.UDDI_V2_NAMESPACE);
    }

    String operator = list.getOperator();
    if (operator != null)
      element.setAttribute("operator",operator);
    else
      element.setAttribute("operator","");

    boolean truncated = list.isTruncated();
    if (truncated)
      element.setAttribute("truncated","true");

    BusinessKey key = list.getBusinessKey();
    if (key != null)
    {
      handler = maker.lookup(BusinessKeyHandler.TAG_NAME);
      handler.marshal(key,element);
    }

    RelatedBusinessInfos infos = list.getRelatedBusinessInfos();
    if (infos != null)
    {
      handler = maker.lookup(RelatedBusinessInfosHandler.TAG_NAME);
      handler.marshal(infos,element);
    }
View Full Code Here

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

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

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

    RelatedBusinessesList list = new RelatedBusinessesList();
    list.setGeneric("2.0");
    list.setOperator("jUDDI.org");
    list.setTruncated(true);
    list.setBusinessKey(new BusinessKey("f9f0c35f-06ab-4bec-9c7d-b1469e73f0eb"));
    list.addRelatedBusinessInfo(new RelatedBusinessInfo("abc"));
    list.addRelatedBusinessInfo(new RelatedBusinessInfo("xyz"));

    System.out.println();

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

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

    handler = ( RelatedBusinessesListHandler)maker.lookup( RelatedBusinessesListHandler.TAG_NAME);
  }

  private RegistryObject getRegistryObject()
  {
    RelatedBusinessesList object = new RelatedBusinessesList();
    object.setGeneric("2.0");
    object.setOperator("jUDDI.org");
    object.setTruncated(true);
    object.setBusinessKey(new BusinessKey("f9f0c35f-06ab-4bec-9c7d-b1469e73f0eb"));
    object.addRelatedBusinessInfo(new RelatedBusinessInfo("abc"));
    object.addRelatedBusinessInfo(new RelatedBusinessInfo("xyz"));


    return object;

  }
View Full Code Here

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

      dataStore.commit();

      // create a new RelatedBusinessesList instance and
      // stuff the new relatedBusinessInfoVector into it.
      RelatedBusinessesList list = new RelatedBusinessesList();
      list.setGeneric(generic);
      list.setOperator(Config.getOperator());
      list.setTruncated(truncatedResults);
      list.setRelatedBusinessInfos(infos);
      return list;
    }
    catch(RegistryException regex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.