Examples of BusinessDetail


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

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

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

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    BusinessDetail obj = new BusinessDetail();
    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,BusinessEntityHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(BusinessEntityHandler.TAG_NAME);
      obj.addBusinessEntity((BusinessEntity)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here

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

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    BusinessDetail detail = (BusinessDetail)object;
    String generic = detail.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 = detail.getOperator();
    if (operator != null)
      element.setAttribute("operator",operator);
    else
      element.setAttribute("operator","");

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

    Vector vector = detail.getBusinessEntityVector();
    if ((vector!=null) && (vector.size() > 0))
    {
      handler = maker.lookup(BusinessEntityHandler.TAG_NAME);
      for (int i=0; i < vector.size(); i++)
        handler.marshal((BusinessEntity)vector.elementAt(i),element);
View Full Code Here

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

    business.setCategoryBag(catBag);
    business.setIdentifierBag(idBag);
    business.setContacts(contacts);
    business.setBusinessServices(services);

    BusinessDetail detail = new BusinessDetail();
    detail.setGeneric("2.0");
    detail.setOperator("jUDDI.org");
    detail.setTruncated(false);
    detail.addBusinessEntity(business);
    detail.addBusinessEntity(business);

    System.out.println();

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

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

      }

      dataStore.commit();

      // create a new BusinessDetail and stuff the new businessVector into it.
      BusinessDetail detail = new BusinessDetail();
      detail.setGeneric(generic);
      detail.setOperator(Config.getOperator());
      detail.setBusinessEntityVector(businessVector);
      return detail;
    }
    catch(InvalidKeyPassedException keyex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
View Full Code Here

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

      // create & execute the SaveBusiness request
      SaveBusiness request = new SaveBusiness();
      request.setAuthInfo(authInfo);
      request.setBusinessEntityVector(businessEntityVector);
      BusinessDetail detail = (BusinessDetail)reg.execute(request);
    }
    catch (Exception ex)
    {
      // write execption to the console
      ex.printStackTrace();
View Full Code Here

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

      }

      dataStore.commit();

      // create a new BusinessDetail and stuff the new businessVector into it.
      BusinessDetail detail = new BusinessDetail();
      detail.setGeneric(generic);
      detail.setOperator(Config.getOperator());
      detail.setBusinessEntityVector(businessVector);
      return detail;
    }
    catch(InvalidKeyPassedException keyex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
View Full Code Here

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

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    BusinessDetail obj = new BusinessDetail();
    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,BusinessEntityHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(BusinessEntityHandler.TAG_NAME);
      obj.addBusinessEntity((BusinessEntity)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here

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

    return obj;
  }

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

    String generic = detail.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 = detail.getOperator();
    if (operator != null)
      element.setAttribute("operator",operator);
    else
      element.setAttribute("operator","");

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

    Vector vector = detail.getBusinessEntityVector();
    if ((vector!=null) && (vector.size() > 0))
    {
      handler = maker.lookup(BusinessEntityHandler.TAG_NAME);
      for (int i=0; i < vector.size(); i++)
        handler.marshal((BusinessEntity)vector.elementAt(i),element);
View Full Code Here

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

    business.setCategoryBag(catBag);
    business.setIdentifierBag(idBag);
    business.setContacts(contacts);
    business.setBusinessServices(services);

    BusinessDetail detail = new BusinessDetail();
    detail.setGeneric("2.0");
    detail.setOperator("jUDDI.org");
    detail.setTruncated(false);
    detail.addBusinessEntity(business);
    detail.addBusinessEntity(business);

    System.out.println();

    RegistryObject regObject = detail;
    handler.marshal(regObject,parent);
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.