Examples of BusinessEntity


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

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

Examples of org.apache.juddi.datatype.business.BusinessEntity

    if (businessVector == null)
      return null;
   
    for (int i=0; i<businessVector.size(); i++)
    {
      BusinessEntity business = (BusinessEntity)businessVector.elementAt(i);
     
      CategoryBag catBag = business.getCategoryBag();
      if (catBag != null)
      {
        Vector refs = catBag.getKeyedReferenceVector();
        if ((refs != null) && (refs.size() > 0))
          validate(refs);
      }
   
      IdentifierBag idBag = business.getIdentifierBag();
      if (idBag != null)
      {
        Vector refs = idBag.getKeyedReferenceVector();
        if ((refs != null) && (refs.size() > 0))
          validate(refs);
      }
     
      BusinessServices services = business.getBusinessServices();
      if (services != null)
      {
        Vector serviceVector = services.getBusinessServiceVector();
        if (serviceVector != null)
          validateServiceVector(serviceVector);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity business = new BusinessEntity();
    business.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    business.setAuthorizedName("Steve Viens");
    business.setOperator("jUDDI");
    business.addName(new org.apache.juddi.datatype.Name("businessNm"));
    business.addName(new org.apache.juddi.datatype.Name("businessNm2","en"));
    business.addDescription(new Description("business whatever"));
    business.addDescription(new Description("business whatever too","fr"));
    business.setDiscoveryURLs(discURLs);
    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);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

      // generate a BusinessServices
      BusinessServices services = new BusinessServices();
      services.addBusinessService(service);

      // generate a BusinessEntity
      BusinessEntity businessEntity = new BusinessEntity();
      businessEntity.setBusinessKey(null);
      businessEntity.setNameVector(nameVector);
      businessEntity.setBusinessServices(services);

      // generate a BusinessEntity Vector
      Vector businessEntityVector = new Vector();
      businessEntityVector.add(businessEntity);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

   * @throws java.sql.SQLException
   */
  public static BusinessEntity select(String businessKey,Connection connection)
    throws java.sql.SQLException
  {
    BusinessEntity business = null;
    PreparedStatement statement = null;
    ResultSet resultSet = null;

    try
    {
      statement = connection.prepareStatement(selectSQL);
      statement.setString(1,businessKey.toString());

      if (log.isDebugEnabled()) {
          log.debug("select from " + tablePrefix + "BUSINESS_ENTITY table:\n\n\t" + selectSQL +
            "\n\t BUSINESS_KEY=" + businessKey.toString() + "\n");
      }

      resultSet = statement.executeQuery();
      if (resultSet.next())
      {
        business = new BusinessEntity();
        business.setBusinessKey(businessKey);
        business.setAuthorizedName(resultSet.getString(1));//("AUTHORIZED_NAME"));
        business.setOperator(resultSet.getString(2));//("OPERATOR"));
      }

      return business;
    }
    finally
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    this.maker = maker;
  }

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

    // Attributes
    obj.setBusinessKey(element.getAttribute("businessKey"));
    obj.setOperator(element.getAttribute("operator"));
    obj.setAuthorizedName(element.getAttribute("authorizedName"));

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,NameHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(NameHandler.TAG_NAME);
      Name name = (Name )handler.unmarshal((Element)nodeList.elementAt(i));
      if (name != null)
        obj.addName(name);
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,DescriptionHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(DescriptionHandler.TAG_NAME);
      Description descr = (Description)handler.unmarshal((Element)nodeList.elementAt(i));
      if (descr != null)
        obj.addDescription(descr);
    }

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

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

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

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

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

    return obj;
  }
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    return obj;
  }

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

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

    String authName = business.getAuthorizedName();
    if (authName != null)
      element.setAttribute("authorizedName",authName);

    DiscoveryURLs discURLs = business.getDiscoveryURLs();
    if (discURLs != null)
    {
      handler = maker.lookup(DiscoveryURLsHandler.TAG_NAME);
      handler.marshal(discURLs,element);
    }

    Vector nameVector = business.getNameVector();
    if ((nameVector!=null) && (nameVector.size() > 0))
    {
      handler = maker.lookup(NameHandler.TAG_NAME);
      for (int i=0; i < nameVector.size(); i++)
        handler.marshal((Name)nameVector.elementAt(i),element);
    }

    Vector descrVector = business.getDescriptionVector();
    if ((descrVector!=null) && (descrVector.size() > 0))
    {
      handler = maker.lookup(DescriptionHandler.TAG_NAME);
      for (int i=0; i < descrVector.size(); i++)
        handler.marshal((Description)descrVector.elementAt(i),element);
    }

    Contacts contacts = business.getContacts();
    if (contacts != null)
    {
      handler = maker.lookup(ContactsHandler.TAG_NAME);
      handler.marshal(contacts,element);
    }

    BusinessServices services = business.getBusinessServices();
    if (services != null)
    {
      handler = maker.lookup(BusinessServicesHandler.TAG_NAME);
      handler.marshal(services,element);
    }

    IdentifierBag identifierBag = business.getIdentifierBag();
    if ((identifierBag != null) && (identifierBag.getKeyedReferenceVector() != null) && (!identifierBag.getKeyedReferenceVector().isEmpty()))
    {
      handler = maker.lookup(IdentifierBagHandler.TAG_NAME);
      handler.marshal(identifierBag,element);
    }

    CategoryBag categoryBag = business.getCategoryBag();
    if ((categoryBag != null) && (categoryBag.getKeyedReferenceVector() != null) && (!categoryBag.getKeyedReferenceVector().isEmpty()))
    {
      handler = maker.lookup(CategoryBagHandler.TAG_NAME);
      handler.marshal(categoryBag,element);
    }
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity business = new BusinessEntity();
    business.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    business.setAuthorizedName("Steve Viens");
    business.setOperator("jUDDI");
    business.addName(new Name("businessNm"));
    business.addName(new Name("businessNm2","en"));
    business.addDescription(new Description("business whatever"));
    business.addDescription(new Description("business whatever too","fr"));
    business.setDiscoveryURLs(discURLs);
    business.setCategoryBag(catBag);
    business.setIdentifierBag(idBag);
    business.setContacts(contacts);
    business.setBusinessServices(services);

    System.out.println();

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

Examples of org.apache.juddi.datatype.business.BusinessEntity

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

    BusinessEntity business = new BusinessEntity();
    BusinessService service = new BusinessService();
    TModel tModel = new TModel();

    ValidateValues request = new ValidateValues();
    request.addBusinessEntity(business);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    String generic = getGeneric(null);
    String namespace = getUDDINamespace(generic);
    Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);
    AbstractHandler handler = null;

    BusinessEntity business = businessExt.getBusinessEntity();
    if (business != null)
    {
      handler = maker.lookup(BusinessEntityHandler.TAG_NAME);
      handler.marshal(business,element);
    }
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.