Package org.apache.oodt.cas.catalog.struct

Examples of org.apache.oodt.cas.catalog.struct.QueryService


  }
   
  public List<CatalogReceipt> query(QueryExpression queryExpression) throws CatalogException {
    try {
      if (this.isQueriable()) {
        QueryService queryService = (QueryService) this.index;
        List<CatalogReceipt> catalogReceipts = new Vector<CatalogReceipt>();
        for (IngestReceipt ingestReceipt : queryService.query(queryExpression))
          catalogReceipts.add(new CatalogReceipt(ingestReceipt, this.getId()));
        return Collections.unmodifiableList(catalogReceipts);
      }else {
        LOG.log(Level.WARNING, "Catalog '" + this + "' is not queriable");
        return Collections.emptyList();
View Full Code Here


 

  public List<CatalogReceipt> query(QueryExpression queryExpression, int startIndex, int endIndex) throws CatalogException {
    try {
      if (this.isQueriable()) {
        QueryService queryService = (QueryService) this.index;
        List<CatalogReceipt> catalogReceipts = new Vector<CatalogReceipt>();
        for (IngestReceipt ingestReceipt : queryService.query(queryExpression, startIndex, endIndex))
          catalogReceipts.add(new CatalogReceipt(ingestReceipt, this.getId()));
        return Collections.unmodifiableList(catalogReceipts);
      }else {
        LOG.log(Level.WARNING, "Catalog '" + this + "' is not queriable");
        return Collections.emptyList();
View Full Code Here

  }
 
  public int sizeOf(QueryExpression queryExpression) throws CatalogException {
    try {
      if (this.isQueriable()) {
        QueryService queryService = (QueryService) this.index;
        return queryService.sizeOf(queryExpression);
      }else {
        LOG.log(Level.WARNING, "Catalog '" + this + "' is not queriable");
        return 0;
      }
    }catch (Exception e) {
View Full Code Here

  }
 
  public Metadata getMetadata(TransactionId<?> transactionId) throws CatalogException {
    try {
      if (this.isQueriable()) {
        QueryService queryService = (QueryService) this.index;
        return this.getMetadataFromBuckets(queryService.getBuckets(transactionId));
      }else {
        LOG.log(Level.WARNING, "Catalog '" + this + "' is not queriable");
        return new Metadata();
      }
    }catch(Exception e) {
View Full Code Here

 
  public Map<TransactionId<?>, Metadata> getMetadata(List<TransactionId<?>> transactionIds) throws CatalogException {
    try {
      Map<TransactionId<?>, Metadata> metadataMap = new HashMap<TransactionId<?>, Metadata>();
      if (this.isQueriable()) {
        QueryService queryService = (QueryService) this.index;
        Map<TransactionId<?>, List<TermBucket>> termBucketMap = queryService.getBuckets(transactionIds);
        for (TransactionId<?> transactionId : termBucketMap.keySet())
          metadataMap.put(transactionId, this.getMetadataFromBuckets(termBucketMap.get(transactionId)));
      }else {
        LOG.log(Level.WARNING, "Catalog '" + this + "' is not queriable");
      }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.catalog.struct.QueryService

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.