Package org.uddi.api_v2

Examples of org.uddi.api_v2.TModelList


  }
 
  public void findTModel() {
    try {
      FindTModel body = (FindTModel)EntityCreator.buildFromDoc(FIND_TMODEL_XML, "org.uddi.api_v3");
      TModelList result = inquiry.findTModel(body);
      if (result == null)
        Assert.fail("Null result from find tModel operation");
      TModelInfos tInfos = result.getTModelInfos();
      if (tInfos == null)
        Assert.fail("No result from find tModel operation");
      List<TModelInfo> tiList = tInfos.getTModelInfo();
      if (tiList == null || tiList.size() == 0)
        Assert.fail("No result from find tModel operation");
View Full Code Here


  }
 
  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

          // 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

      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

  }
 
  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

  }
 
  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

      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

          // 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

        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

        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

TOP

Related Classes of org.uddi.api_v2.TModelList

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.