Examples of TModelList


Examples of org.uddi.api_v3.TModelList

      org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
      findQualifiers.mapApiFindQualifiers(body.getFindQualifiers());

      List<?> keysFound = InquiryHelper.findTModel(body, findQualifiers, em);

      TModelList result = InquiryHelper.getTModelListFromKeys(body, findQualifiers, em, keysFound);

      tx.commit();
                        long procTime = System.nanoTime() - startTime;
                        serviceCounter.update(InquiryQuery.FIND_TMODEL, QueryStatus.SUCCESS, procTime);                     
View Full Code Here

Examples of org.uddi.api_v3.TModelList

  }
 
  public static TModelList getTModelListFromKeys(FindTModel body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                           Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {
    TModelList result = new TModelList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);

    // Sort and retrieve the final results taking paging into account
    List<?> queryResults = FetchTModelsQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
    if (queryResults != null && queryResults.size() > 0)
      result.setTModelInfos(new org.uddi.api_v3.TModelInfos());
   
    // Set the currentIndex to 0 or the value of the subscriptionStartIndex
    int currentIndex = 0;
    if (subscriptionStartIndex != null && subscriptionStartIndex.value != null)
      currentIndex = subscriptionStartIndex.value;

    int returnedRowCount = 0;
   
    while (currentIndex < queryResults.size()) {
      Object item = queryResults.get(currentIndex);
     
      org.apache.juddi.model.Tmodel modelTModel = (org.apache.juddi.model.Tmodel)item;
      org.uddi.api_v3.TModelInfo apiTModelInfo = new org.uddi.api_v3.TModelInfo();
     
      if (modifiedAfter != null && modifiedAfter.after(modelTModel.getModifiedIncludingChildren())) {
        currentIndex++;
        continue;
      }
     
      if (modifiedBefore != null && modifiedBefore.before(modelTModel.getModifiedIncludingChildren())) {
        currentIndex++;
        continue;
      }
     
      MappingModelToApi.mapTModelInfo(modelTModel, apiTModelInfo);
     
      result.getTModelInfos().getTModelInfo().add(apiTModelInfo);
     
      returnedRowCount++;
      // If the returned rows equals the max allowed, we can end the loop (applies to subscription calls only)
      if (subscriptionMaxRows != null) {
        if (returnedRowCount == subscriptionMaxRows)
View Full Code Here

Examples of org.uddi.api_v3.TModelList

  }
 
  public static TModelList getTModelListFromKeys(FindTModel body, FindQualifiers findQualifiers, EntityManager em, List<?> keysFound,
                           Date modifiedAfter, Date modifiedBefore, Holder<Integer> subscriptionStartIndex, Integer subscriptionMaxRows)
           throws DispositionReportFaultMessage {
    TModelList result = new TModelList();
    ListDescription listDesc = new ListDescription();
    result.setListDescription(listDesc);

    // Sort and retrieve the final results taking paging into account
    List<?> queryResults = FetchTModelsQuery.select(em, findQualifiers, keysFound, body.getMaxRows(), body.getListHead(), listDesc);
    if (queryResults != null && queryResults.size() > 0)
      result.setTModelInfos(new org.uddi.api_v3.TModelInfos());
   
    // Set the currentIndex to 0 or the value of the subscriptionStartIndex
    int currentIndex = 0;
    if (subscriptionStartIndex != null && subscriptionStartIndex.value != null)
      currentIndex = subscriptionStartIndex.value;

    int returnedRowCount = 0;
   
    while (currentIndex < queryResults.size()) {
      Object item = queryResults.get(currentIndex);
     
      org.apache.juddi.model.Tmodel modelTModel = (org.apache.juddi.model.Tmodel)item;
      org.uddi.api_v3.TModelInfo apiTModelInfo = new org.uddi.api_v3.TModelInfo();
     
      if (modifiedAfter != null && modifiedAfter.after(modelTModel.getModifiedIncludingChildren())) {
        currentIndex++;
        continue;
      }
     
      if (modifiedBefore != null && modifiedBefore.before(modelTModel.getModifiedIncludingChildren())) {
        currentIndex++;
        continue;
      }
     
      MappingModelToApi.mapTModelInfo(modelTModel, apiTModelInfo);
     
      result.getTModelInfos().getTModelInfo().add(apiTModelInfo);
     
      returnedRowCount++;
      // If the returned rows equals the max allowed, we can end the loop (applies to subscription calls only)
      if (subscriptionMaxRows != null) {
        if (returnedRowCount == subscriptionMaxRows)
View Full Code Here

Examples of org.uddi.api_v3.TModelList

      org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
      findQualifiers.mapApiFindQualifiers(body.getFindQualifiers());
 
      List<?> keysFound = InquiryHelper.findTModel(body, findQualifiers, em);
 
      TModelList result = InquiryHelper.getTModelListFromKeys(body, findQualifiers, em, keysFound);
     
      tx.commit();
      return result;
    } finally {
      if (tx.isActive()) {
View Full Code Here

Examples of org.uddi.api_v3.TModelList

          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          // If more results are to be had, chunkData will come out with a value and a new token will be generated below.  Otherwise, it will
          // be null and no token will be generated.
          TModelList tmodelList = InquiryHelper.getTModelListFromKeys(ft, findQualifiers, em, currentMatchingKeys,
                                        startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
 
          // Upon exiting above function, if more results are to be had, the subscriptionStartIndex will contain the latest value (or null
          // if no more results)
          chunkData = subscriptionStartIndex.value;
View Full Code Here

Examples of org.uddi.api_v3.TModelList

        public TModelList findJoeTModelDetail() {
                try {

                        FindTModel body = (FindTModel) EntityCreator.buildFromDoc(FIND_TMODEL_XML, "org.uddi.api_v3");
                        TModelList result = inquiry.findTModel(body);

                        return result;

                } catch (Exception e) {
                        logger.error(e.getMessage(), e);
View Full Code Here

Examples of org.uddi.api_v3.TModelList

        public TModelList findJoeTModelDetailByCategoryBag() {
                try {

                        FindTModel body = (FindTModel) EntityCreator.buildFromDoc(FIND_TMODEL_XML_BY_CAT, "org.uddi.api_v3");
                        TModelList result = inquiry.findTModel(body);

                        return result;

                } catch (Exception e) {
                        logger.error(e.getMessage(), e);
View Full Code Here

Examples of org.uddi.api_v3.TModelList

                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 {
                                for (int i = 0; i < findService.getTModelInfos().getTModelInfo().size(); i++) {
                                        sb.append(findService.getTModelInfos().getTModelInfo().get(i).getName().getValue()).
                                                append(" lang=").append(findService.getTModelInfos().getTModelInfo().get(i).getName().getLang()).
                                                append(" ").append(findService.getTModelInfos().getTModelInfo().get(i).getTModelKey())
                                                .append(System.getProperty("line.separator"));
                                }
                        }
                } catch (Exception ex) {
                        return ex.getMessage();
View Full Code Here

Examples of org.uddi.api_v3.TModelList

      org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
      findQualifiers.mapApiFindQualifiers(body.getFindQualifiers());

      List<?> keysFound = InquiryHelper.findTModel(body, findQualifiers, em);

      TModelList result = InquiryHelper.getTModelListFromKeys(body, findQualifiers, em, keysFound);

      tx.rollback();
                        long procTime = System.currentTimeMillis() - startTime;
                        serviceCounter.update(InquiryQuery.FIND_TMODEL, QueryStatus.SUCCESS, procTime);                     
View Full Code Here

Examples of org.uddi.api_v3.TModelList

          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          // If more results are to be had, chunkData will come out with a value and a new token will be generated below.  Otherwise, it will
          // be null and no token will be generated.
          TModelList tmodelList = InquiryHelper.getTModelListFromKeys(ft, findQualifiers, em, currentMatchingKeys,
                                        startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
 
          // Upon exiting above function, if more results are to be had, the subscriptionStartIndex will contain the latest value (or null
          // if no more results)
          chunkData = subscriptionStartIndex.value;
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.