Examples of IngestReceipt


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

            }
          }
        }
      }
      conn.commit();
      return new IngestReceipt(catalogTransactionId, calendar.getTime());
    }catch (Exception e) {
      throw new IngestServiceException("Failed to ingest metadata for transaction id '" + catalogTransactionId + "' : " + e.getMessage(), e);
    }finally {
      try {
        conn.close();
View Full Code Here

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

            }catch (Exception e) {
              LOG.log(Level.WARNING, "Failed to ingest term: '" + transactionId + "','" + termBucket.getName() + "','" + term.getName() + "','" + value + "'");
            }
      Calendar calendar = DateUtils.getCurrentLocalTime();
      stmt.execute("UPDATE transactions SET transaction_date = '" + DateUtils.toString(calendar) + "' WHERE transaction_id = '" + transactionId + "'");
      return new IngestReceipt(transactionId, calendar.getTime());
    }catch (Exception e) {
      throw new IngestServiceException("Failed to ingest metadata for transaction id '" + transactionId + "' : " + e.getMessage(), e);
    }finally {
      try {
        conn.close();
View Full Code Here

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

          LOG.log(Level.INFO, "Performing Query: " + sqlQuery);
      rs = stmt.executeQuery(sqlQuery)

      List<IngestReceipt> receipts = new Vector<IngestReceipt>();
      while (rs.next())
        receipts.add(new IngestReceipt(this.getTransactionIdFactory().createTransactionId(rs.getString("transaction_id")), DateUtils.toCalendar(rs.getString("transaction_date"), DateUtils.FormatType.LOCAL_FORMAT).getTime()));
      return receipts;
    }catch (Exception e) {
      throw new QueryServiceException("Failed to query Workflow Instances Database : " + e.getMessage(), e);
    }finally {
      try {
View Full Code Here

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

      List<IngestReceipt> receipts = new Vector<IngestReceipt>();
      int index = 0;
      while (startIndex > index && rs.next()) index++;
      while (rs.next() && index++ <= endIndex)
        receipts.add(new IngestReceipt(this.getTransactionIdFactory().createTransactionId(rs.getString("transaction_id")), DateUtils.toCalendar(rs.getString("transaction_date"), DateUtils.FormatType.LOCAL_FORMAT).getTime()));
      return receipts;
    }catch (Exception e) {
      throw new QueryServiceException("Failed to query Workflow Instances Database : " + e.getMessage(), e);
    }finally {
      try {
View Full Code Here

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

    try {
      if (this.isIngestable()) {
        List<TermBucket> termBuckets = this.getTermBuckets(metadata);
        if (termBuckets.size() > 0) {
          LOG.log(Level.INFO, "Catalog '" + this + "' attemping update metadata for catalog TransactionId [id = '" + transactionId + "']");
          IngestReceipt ingestReceipt = ((IngestService) this.index).update(transactionId, termBuckets);
          if (ingestReceipt != null)
            return new CatalogReceipt(ingestReceipt, this.getId());
          else
            return null;
        }else {
View Full Code Here

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

          LOG.log(Level.INFO, "Performing Query: " + sqlQuery);
      rs = stmt.executeQuery(sqlQuery);
     
      List<IngestReceipt> receipts = new Vector<IngestReceipt>();
      while (rs.next())
                receipts.add(new IngestReceipt(new LongTransactionIdFactory().createTransactionId(rs.getString("workflow_instance_id")), DateConvert.isoParse(rs.getString("start_date_time"))));
      return receipts;
    }catch (Exception e) {
      throw new QueryServiceException("Failed to query Workflow Instances Database : " + e.getMessage(), e);
    }finally {
      try {
View Full Code Here

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

     
      List<IngestReceipt> receipts = new Vector<IngestReceipt>();
      int index = 0;
      while (startIndex > index && rs.next()) index++;
      while (rs.next() && index++ <= endIndex)
        receipts.add(new IngestReceipt(new LongTransactionIdFactory().createTransactionId(rs.getString("workflow_instance_id")), DateConvert.isoParse(rs.getString("start_date_time"))));
      return receipts;
    }catch (Exception e) {
      throw new QueryServiceException("Failed to query Workflow Instances Database : " + e.getMessage(), e);
    }finally {
      try {
View Full Code Here

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

      rs = stmt.executeQuery("SELECT CAT_TRANS_ID, CAT_TRANS_FACTORY, CAT_TRANS_DATE FROM CatalogServiceMapper WHERE CAT_SERV_TRANS_ID = '"+ catalogServiceTransactionId + "' AND CATALOG_ID = '" + catalogId + "'");
     
      if(rs.next()) {
        TransactionId<?> catalogTransactionId =  ((TransactionIdFactory) Class.forName(rs.getString("CAT_TRANS_FACTORY")).newInstance()).createTransactionId(rs.getString("CAT_TRANS_ID"));
        Date transactionDate = DateUtils.toCalendar(rs.getString("CAT_TRANS_DATE"), DateUtils.FormatType.UTC_FORMAT).getTime();
        return new CatalogReceipt(new IngestReceipt(catalogTransactionId, transactionDate), catalogId);
      }else {
        return null;
      }
    }catch (Exception e) {
      throw new CatalogRepositoryException(e.getMessage(), e);
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.