Package IRTree2

Examples of IRTree2.NAME


                break;
            case REG_ID:
                this.name = oidStrToInts(name);
                break;
            case DIR_NAME :
                this.name = new Name(name);
                break;
            case IP_ADDR :
                this.name = ipStrToBytes(name);
                break;
            default:
View Full Code Here


  public TModelList findTModel(String name, CategoryBag categoryBag,
      IdentifierBag identifierBag, FindQualifiers findQualifiers,
      int maxRows) throws RegistryException {
    FindTModel request = this.objectFactory.createFindTModel();

    Name jaxbName = this.objectFactory.createName();

    if (name != null) {
      jaxbName.setValue(name);
    }

    request.setName(jaxbName);

    if (categoryBag != null) {
View Full Code Here

    }

    private static Name getFirstName(InternationalString iname) throws JAXRException {
        for (Object o : iname.getLocalizedStrings()) {
            LocalizedString locName = (LocalizedString) o;
            Name name = objectFactory.createName();
            name.setValue(locName.getValue());
            name.setLang(locName.getLocale().getLanguage());
            return name;
        }
        return null;
    }
View Full Code Here

        return null;
    }
    private static void addNames(List<Name> names, InternationalString iname) throws JAXRException {
        for (Object o : iname.getLocalizedStrings()) {
            LocalizedString locName = (LocalizedString) o;
            Name name = objectFactory.createName();
            name.setValue(locName.getValue());
            name.setLang(locName.getLocale().getLanguage());
            names.add(name);
        }
    }
View Full Code Here

        Name[] result = new Name[namePatterns.size()];
        int currLoc = 0;
        for (Iterator i = namePatterns.iterator(); i.hasNext();)
        {
            Object obj = i.next();
            Name name = objectFactory.createName();
            if (obj instanceof String) {
                name.setValue((String)obj);
            } else if (obj instanceof LocalizedString) {
                LocalizedString ls = (LocalizedString)obj;
                name.setValue(ls.getValue());
                name.setLang(ls.getLocale().getLanguage());
            }
            result[currLoc] = name;
            currLoc++;
        }
        return result;
View Full Code Here

      for (String string : findQualifyers) {
        findQualifiers.getFindQualifier().add(string);
      }
      findBusiness.setFindQualifiers(findQualifiers);

      Name name = new Name();
      name.setValue(nameStr);
      findBusiness.getName().add(name);


      logger.debug("FindBusiness " + findBusiness + " sending findBusinesses request..");
      List<Business> businesses = new ArrayList<Business>();
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 {

    //Name of business were looking for in English.
    int max = 5;
    Name q = new Name();
    q.setLang("en");
    q.setValue(businessName);

    //Optional qualifiers that will modify the search.
    FindQualifiers findQualifiers = new FindQualifiers();
    findQualifiers.getFindQualifier().add("sortByNameDesc");
    findQualifiers.getFindQualifier().add("approximateMatch");

    //The FindBusiness object that is submitted via the inquiry service.
    FindBusiness findBusiness = new FindBusiness();
    findBusiness.setAuthInfo(authenticationToken.getAuthInfo());
    findBusiness.getName().add(q);
    findBusiness.setFindQualifiers(findQualifiers);
    findBusiness.setMaxRows(max);

    BusinessList businessList = inquiryService.findBusiness(findBusiness);
    businessInfos = businessList.getBusinessInfos();

    //Print out the names of the returned businesses
    for (BusinessInfo bi : businessInfos.getBusinessInfo()) {
      if (businessInfo == null) {
        businessInfo = bi;
      }
      Name _name = bi.getName().get(0);
      System.out.println("BusinessInfo: " + _name.getValue());
    }

   
  }
View Full Code Here

                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

TOP

Related Classes of IRTree2.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.