Package org.any_openeai_enterprise.moa.objects.resources.v1_0

Examples of org.any_openeai_enterprise.moa.objects.resources.v1_0.Name


                StringBuilder sb = new StringBuilder();
                FindService fs = new FindService();
                fs.setAuthInfo(authinfo);
                fs.setFindQualifiers(new FindQualifiers());
                fs.getFindQualifiers().getFindQualifier().add("approximateMatch");
                fs.getName().add(new Name("%", null));
                try {
                        ServiceList findService = inquiry.findService(fs);
                        if (findService.getServiceInfos() == null) {
                                return ("NO SERVICES RETURNED!");
                        } else {
View Full Code Here


                StringBuilder sb = new StringBuilder();
                FindTModel fs = new FindTModel();
                fs.setAuthInfo(authinfo);
                fs.setFindQualifiers(new FindQualifiers());
                fs.getFindQualifiers().getFindQualifier().add("approximateMatch");
                fs.setName(new Name("%", null));
                try {
                        TModelList findService = inquriy.findTModel(fs);
                        if (findService.getTModelInfos()== null) {
                                return ("NO TMODELS RETURNED!");
                        } else {
View Full Code Here

                StringBuilder sb = new StringBuilder();
                FindBusiness fs = new FindBusiness();
                fs.setAuthInfo(authinfo);
                fs.setFindQualifiers(new FindQualifiers());
                fs.getFindQualifiers().getFindQualifier().add("approximateMatch");
                fs.getName().add(new Name("%", null));
                try {
                        BusinessList findService = inquriy.findBusiness(fs);
                        if (findService.getBusinessInfos() == null) {
                                return ("NO BUSINESSES RETURNED!");
                        } else {
View Full Code Here

    }
    assertEquals(names1.size(), names2.size());
    Iterator<Name> names1Itr = names1.iterator();
    Iterator<Name> names2Itr = names2.iterator();
    while (names1Itr.hasNext()) {
      Name name1 = names1Itr.next();
      Name name2 = names2Itr.next();
      assertEquals(name1.getLang(), name2.getLang());
      assertEquals(name1.getValue(), name2.getValue());
    }
  }
View Full Code Here

      //service
      String lang = "en"; //default to english
      if (uddiService.lang()!=null) {
        lang = uddiService.lang();
      }
      Name name = new Name();
      name.setLang(lang);
      service.setBusinessKey(TokenResolver.replaceTokens(uddiService.businessKey(),properties));
      service.setServiceKey(TokenResolver.replaceTokens(uddiService.serviceKey(),properties));
      if (!"".equals(uddiService.serviceName())) {
        name.setValue(TokenResolver.replaceTokens(uddiService.serviceName(),properties));
      } else if (webServiceAnnotation!=null && !"".equals(webServiceAnnotation.serviceName())) {
        name.setValue(webServiceAnnotation.serviceName());
      } else {
        name.setValue(clazz.getSimpleName());
      }
      service.getName().add(name);
      Description description = new Description();
      description.setLang(lang);
      description.setValue(TokenResolver.replaceTokens(uddiService.description(),properties));
View Full Code Here

  }
  @Override
  protected void execute() throws Exception
 
    //Business name in English.
    Name name = new Name();
    name.setLang("en");
    name.setValue(businessName);
   
    //Business description in English.
    Description description = new Description();
    description.setLang("en");
    description.setValue(data.getText(2, 5, false));
View Full Code Here

   * @param lang
   * @return
   */
  public static Name generateName(String value, String lang)
  {
    Name name = new Name();
    name.setValue(value);
    if(lang != null)
      name.setLang(lang);
     
    return name;
  }
View Full Code Here

  @Override
  protected void postValidate() throws Exception
  {
    BusinessList businessList;
   
    Name name = new Name();
    name.setValue(businessEntity.getName().get(0).getValue());
    name.setLang(businessEntity.getName().get(0).getLang());
   
    FindBusiness findBusiness = new FindBusiness();
    findBusiness.getName().add(name);
   
    inqueryService = JUDDIServiceProvider.getInquiryService();
View Full Code Here

  {
    GeneralDataProvider data = GeneralDataProvider.getInstance();
    serviceName = data.getCountry(false);// retrieves random service name from country file
   
    //Name of the service in English.
    Name name = new Name();
    name.setLang("en");
    name.setValue(serviceName);

    //Description of the service in English.
    Description description = new Description();
    description.setLang("en");
    description.setValue(data.getText(1, false));
View Full Code Here

    if (body.getFindTModel()==null && body.getCategoryBag()==null &&
        ( body.getTModelBag()==null || body.getTModelBag().getTModelKey().size() == 0)
        && body.getName().size() == 0 && body.getBusinessKey() != null) {
      //support searching for all services for a business
      findQualifiers.setApproximateMatch(true);
      body.getName().add(new Name("%", null));
    }
    keysFound = FindServiceByNameQuery.select(em, findQualifiers, body.getName(), body.getBusinessKey(), keysFound);
   
    if (body.getTModelBag().getTModelKey().size()==0) body.setTModelBag(null);
    return keysFound;
View Full Code Here

TOP

Related Classes of org.any_openeai_enterprise.moa.objects.resources.v1_0.Name

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.