Package org.apache.oodt.cas.catalog.page

Examples of org.apache.oodt.cas.catalog.page.Page


    assertEquals(ingestedMetadata.getMetadata("testkey1"), "testval1");
    assertEquals(ingestedMetadata.getAllMetadata("testkey1").size(), 2);

    //test query using std paging
    qe = QueryParser.parseQueryExpression("testkey1 == 'testval1'");
    Page page = cs.getPage(new PageInfo(20, PageInfo.FIRST_PAGE), qe);
    metadatas = cs.getMetadata(page);
    assertEquals(metadatas.size(), 1);
    ingestedMetadata = metadatas.get(0).getMetadata();
    assertEquals(ingestedMetadata.getMetadata("testkey1"), "testval1");
    assertEquals(ingestedMetadata.getAllMetadata("testkey1").size(), 2);
View Full Code Here


              }
            }else {
              currentIndex += entry.getValue();
            }
          }
          return new Page(new ProcessedPageInfo(pageInfo.getPageSize(), pageInfo.getPageNum(), totalResults), queryExpression, catalogIds, this.indexReceipts(this.getPossiblyUnindexedTransactionReceipts(pageOfReceipts)));
        }
      }catch (Exception e) {
        throw new CatalogServiceException(e.getMessage(), e);
      }
    }else {
View Full Code Here

  public List<TransactionalMetadata> getMetadata(Page page) throws CatalogServiceException {
    return this.getMetadata(page.getReceipts());
  }
 
  protected Page getPage(QueryExpression queryExpression, Set<String> restrictToCatalogIds, QueryPager queryPager) throws CatalogServiceException {
    return new Page(new ProcessedPageInfo(queryPager.getPageSize(), queryPager.getPageNum(), queryPager.getNumOfHits()), queryExpression, restrictToCatalogIds, this.indexReceipts(queryPager.getCurrentPage()));
  }
View Full Code Here

         Validate.isTrue(pageSize != -1, "Must specify pageSize");
         Validate.notNull(query, "Must specify query");

         QueryExpression queryExpression = QueryParser
               .parseQueryExpression(query);
         Page page = null;
         if (catalogIds == null) {
            page = getClient().getPage(new PageInfo(pageSize, pageNum),
                  queryExpression);
         } else {
            page = getClient().getPage(new PageInfo(pageSize, pageNum),
View Full Code Here

         Validate.notNull(query, "Must specify query");
         Validate.notNull(termNames, "Must specify termNames");

         QueryExpression queryExpression = QueryParser
               .parseQueryExpression(query);
         Page page = null;
         if (catalogIds == null) {
            page = getClient().getPage(new PageInfo(pageSize, pageNum),
                  queryExpression);
         } else {
            page = getClient().getPage(new PageInfo(pageSize, pageNum),
View Full Code Here

    assertEquals(ingestedMetadata.getMetadata("testkey1"), "testval1");
    assertEquals(ingestedMetadata.getAllMetadata("testkey1").size(), 2);

    // test query using std paging
    qe = QueryParser.parseQueryExpression("testkey1 == 'testval1'");
    Page page = cs.getPage(new PageInfo(20, PageInfo.FIRST_PAGE), qe);
    metadatas = cs.getMetadata(page);
    assertEquals(metadatas.size(), 1);
    ingestedMetadata = metadatas.get(0).getMetadata();
    assertEquals(ingestedMetadata.getMetadata("testkey1"), "testval1");
    assertEquals(ingestedMetadata.getAllMetadata("testkey1").size(), 2);
View Full Code Here

  protected String query;
  protected Set<String> catalogIds;
 
  public void performAction(CatalogServiceClient csClient) throws Exception {
    QueryExpression queryExpression = QueryParser.parseQueryExpression(query);
    Page page = null;
    if (catalogIds == null)
      page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression);
    else
      page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression, catalogIds);
    List<TransactionalMetadata> transactionMetadatas = csClient.getMetadata(page);
View Full Code Here

  protected Set<String> catalogIds;
  protected List<String> termNames;
 
  public void performAction(CatalogServiceClient csClient) throws Exception {
    QueryExpression queryExpression = QueryParser.parseQueryExpression(query);
    Page page = null;
    if (catalogIds == null)
      page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression);
    else
      page = csClient.getPage(new PageInfo(pageSize, pageNum), queryExpression, catalogIds);
    List<TransactionalMetadata> transactionMetadatas = csClient.getMetadata(page);
View Full Code Here

              }
            }else {
              currentIndex += entry.getValue();
            }
          }
          return new Page(new ProcessedPageInfo(pageInfo.getPageSize(), pageInfo.getPageNum(), totalResults), queryExpression, catalogIds, this.indexReceipts(this.getPossiblyUnindexedTransactionReceipts(pageOfReceipts)));
        }
      }catch (Exception e) {
        throw new CatalogServiceException(e.getMessage(), e);
      }
    }else {
View Full Code Here

  public List<TransactionalMetadata> getMetadata(Page page) throws CatalogServiceException {
    return this.getMetadata(page.getReceipts());
  }
 
  protected Page getPage(QueryExpression queryExpression, Set<String> restrictToCatalogIds, QueryPager queryPager) throws CatalogServiceException {
    return new Page(new ProcessedPageInfo(queryPager.getPageSize(), queryPager.getPageNum(), queryPager.getNumOfHits()), queryExpression, restrictToCatalogIds, this.indexReceipts(queryPager.getCurrentPage()));
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.catalog.page.Page

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.