当前位置: 首页>>代码示例>>Java>>正文


Java Product.setTransferStatus方法代码示例

本文整理汇总了Java中org.apache.oodt.cas.filemgr.structs.Product.setTransferStatus方法的典型用法代码示例。如果您正苦于以下问题:Java Product.setTransferStatus方法的具体用法?Java Product.setTransferStatus怎么用?Java Product.setTransferStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.oodt.cas.filemgr.structs.Product的用法示例。


在下文中一共展示了Product.setTransferStatus方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getProductFromXmlRpc

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public static Product getProductFromXmlRpc(Map<?, ?> productHash) {
  Product product = new Product();
  product.setProductId((String) productHash.get("id"));
  product.setProductName((String) productHash.get("name"));
  if (productHash.get("type") != null) {
    product.setProductType(getProductTypeFromXmlRpc(
        (Map<String, Object>) productHash.get("type")));
  }
  product.setProductStructure((String) productHash.get("structure"));
  product.setTransferStatus((String) productHash.get("transferStatus"));
  if (productHash.get("references") != null) {
    product.setProductReferences(getReferencesFromXmlRpc(
        (Vector<Map<String, Object>>) productHash
            .get("references")));
  }
  if (productHash.get("rootReference") != null) {
    product.setRootRef(getReferenceFromXmlRpc(
        (Map<String, Object>) productHash.get("rootReference")));
  }
  return product;
}
 
开发者ID:apache,项目名称:oodt,代码行数:23,代码来源:XmlRpcStructFactory.java

示例2: getProduct

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
public static Product getProduct(ResultSet rs, boolean getType, boolean productIdString)
        throws SQLException {
    Product product = new Product();
    if (productIdString) {
    	product.setProductId(rs.getString("product_id"));
    } else {
    	product.setProductId(String.valueOf(rs.getInt("product_id")));
    }
    product.setProductName(rs.getString("product_name"));
    product.setProductStructure(rs.getString("product_structure"));
    product.setTransferStatus(rs.getString("product_transfer_status"));
    if (getType) {
        product.setProductType(getProductType(rs));
    } else {
        // still grab the ID
        ProductType type = new ProductType();
        type.setProductTypeId(rs.getString("product_type_id"));
        product.setProductType(type);
    }

    return product;
}
 
开发者ID:apache,项目名称:oodt,代码行数:23,代码来源:DbStructFactory.java

示例3: getClient

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
public FileManagerClient getClient() throws MalformedURLException,
      ConnectionException {
   return new DummyFileManagerClient(new URL("http://localhost:9000"),
         false) {
      public Product getProductByName(String name) {
         Product p = new Product();
         p.setProductId(PRODUCT_ID);
         p.setProductName(name);
         ProductType pt = new ProductType();
         pt.setName(PRODUCT_TYPE_NAME);
         p.setProductType(pt);
         p.setProductStructure(PRODUCT_STRUCTURE);
         p.setTransferStatus(PRODUCT_STATUS);
         p.setRootRef(new Reference("file:/dummy/path", ROOT_REF, 2));
         p.setProductReferences(Lists.newArrayList(new Reference(
               ORIG_REF_1, DS_REF_1, FILE_SIZE_REF_1), new Reference(
               ORIG_REF_2, DS_REF_2, FILE_SIZE_REF_2)));
         return p;
      }
   };
}
 
开发者ID:apache,项目名称:oodt,代码行数:22,代码来源:TestGetProductByNameCliAction.java

示例4: getClient

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
public FileManagerClient getClient() throws MalformedURLException,
      ConnectionException {
   return new DummyFileManagerClient(new URL("http://localhost:9000"),
         false) {
      public Product getProductById(String productId) {
         Product p = new Product();
         p.setProductId(productId);
         p.setProductName(PRODUCT_NAME);
         ProductType pt = new ProductType();
         pt.setName(PRODUCT_TYPE_NAME);
         p.setProductType(pt);
         p.setProductStructure(PRODUCT_STRUCTURE);
         p.setTransferStatus(PRODUCT_STATUS);
         p.setRootRef(new Reference("file:/dummy/path", ROOT_REF, 2));
         p.setProductReferences(Lists.newArrayList(new Reference(
               ORIG_REF_1, DS_REF_1, FILE_SIZE_REF_1), new Reference(
               ORIG_REF_2, DS_REF_2, FILE_SIZE_REF_2)));
         return p;
      }
   };
}
 
开发者ID:apache,项目名称:oodt,代码行数:22,代码来源:TestGetProductByIdCliAction.java

示例5: getProductById

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
@Override
public Product getProductById(String productId) {
   lastMethodCallDetails = new MethodCallDetails("getProductById",
         Lists.newArrayList((Object) productId));
   Product p = new Product();
   p.setProductId(productId);
   p.setProductName("TestProductName");
   p.setProductReferences(Lists.newArrayList(
         new Reference("file:/orig/file", "file:/ds/file", 3)));
   p.setProductStructure(Product.STRUCTURE_FLAT);
   p.setTransferStatus(Product.STATUS_RECEIVED);
   ProductType pt = new ProductType();
   pt.setName("TestProductType");
   p.setProductType(pt);
   return p;
}
 
开发者ID:apache,项目名称:oodt,代码行数:17,代码来源:MockFileManagerClient.java

示例6: getProductByName

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
@Override
public Product getProductByName(String productName) {
   lastMethodCallDetails = new MethodCallDetails("getProductByName",
         Lists.newArrayList((Object) productName));
   Product p = new Product();
   p.setProductId("TestProductId");
   p.setProductName(productName);
   p.setProductReferences(Lists.newArrayList(
         new Reference("file:/orig/file", "file:/ds/file", 3)));
   p.setProductStructure(Product.STRUCTURE_FLAT);
   p.setTransferStatus(Product.STATUS_RECEIVED);
   ProductType pt = new ProductType();
   pt.setName("TestProductType");
   p.setProductType(pt);
   return p;
}
 
开发者ID:apache,项目名称:oodt,代码行数:17,代码来源:MockFileManagerClient.java

示例7: testCreateProductZipFileFromHierarchicalProduct

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
public void testCreateProductZipFileFromHierarchicalProduct(){
	//Data store reference needs absolute path to test data
	String cwd=System.getProperty("user.dir");

	Product product = new Product();
	product.setProductId("TestProductId");
	product.setProductName("TestProductName");
	product.setProductReferences(Lists.newArrayList(
		new Reference("file:///orig/data/", "file://" + cwd + "/src/test/resources/", 4096),
		new Reference("file:///orig/data/test-file-1.txt", "file://" + cwd + "/src/test/resources/test-file-1.txt", 20),
		new Reference("file:///orig/data/test-file-2.txt", "file://" + cwd + "/src/test/resources/test-file-2.txt", 20),
		new Reference("file:///orig/data/test-file-3.txt", "file://" + cwd + "/src/test/resources/test-file-3.txt", 20)));
	product.setProductStructure(Product.STRUCTURE_HIERARCHICAL);
	product.setTransferStatus(Product.STATUS_RECEIVED);
	ProductType pt = new ProductType();
	pt.setName("TestProductType");

	Metadata metadata = new Metadata();

	String workingDirPath;
	workingDir = Files.createTempDir();
	workingDirPath = workingDir.getAbsolutePath();
	workingDir.deleteOnExit();

	String productZipFilePath = null;
	try {
		productZipFilePath = DataUtils.createProductZipFile(product, metadata, workingDirPath);
	} catch (Exception e) {
		fail(e.getMessage());
	}
	String zipFileName = product.getProductName() + ".zip";
	assertEquals(productZipFilePath, workingDirPath + "/" + zipFileName);
}
 
开发者ID:apache,项目名称:oodt,代码行数:34,代码来源:TestDataUtils.java

示例8: toScienceDataProduct

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
public static Product toScienceDataProduct(ResultSet rs) throws SQLException {
  Product product = new Product();
  product.setProductId(rs.getString("granule_id"));
  product.setProductName(rs.getString("filename"));
  product.setProductStructure(Product.STRUCTURE_FLAT);
  product.setTransferStatus(Product.STATUS_RECEIVED);
  ProductType type = new ProductType();
  type.setProductTypeId(rs.getString("dataset_id"));
  product.setProductType(type);
  return product;
}
 
开发者ID:apache,项目名称:oodt,代码行数:12,代码来源:DbStructFactory.java

示例9: getFirstPage

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
@Override
public ProductPage getFirstPage(ProductType pt) {
   ProductPage pp = new ProductPage();
   pp.setPageNum(PAGE_NUM);
   pp.setTotalPages(TOTAL_PAGES);
   pp.setPageSize(PAGE_SIZE);
   Product p1 = new Product();
   p1.setProductId(PRODUCT_ID_1);
   p1.setProductName(PRODUCT_NAME_1);
   p1.setProductType(pt);
   p1.setProductStructure(PRODUCT_STRUCTURE);
   p1.setTransferStatus(PRODUCT_STATUS);
   Product p2 = new Product();
   p2.setProductId(PRODUCT_ID_2);
   p2.setProductName(PRODUCT_NAME_2);
   p2.setProductType(pt);
   p2.setProductStructure(PRODUCT_STRUCTURE);
   p2.setTransferStatus(PRODUCT_STATUS);
   Product p3 = new Product();
   p3.setProductId(PRODUCT_ID_3);
   p3.setProductName(PRODUCT_NAME_3);
   p3.setProductType(pt);
   p3.setProductStructure(PRODUCT_STRUCTURE);
   p3.setTransferStatus(PRODUCT_STATUS);
   pp.setPageProducts(Lists.newArrayList(p1, p2, p3));
   return pp;
}
 
开发者ID:apache,项目名称:oodt,代码行数:28,代码来源:TestGetNextPageCliAction.java

示例10: getNextPage

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
@Override
public ProductPage getNextPage(ProductType pt, ProductPage currentPage) {
   ProductPage pp = new ProductPage();
   pp.setPageNum(currentPage.getPageNum() + 1);
   pp.setTotalPages(currentPage.getTotalPages());
   pp.setPageSize(currentPage.getPageSize());
   Product p4 = new Product();
   p4.setProductId(PRODUCT_ID_4);
   p4.setProductName(PRODUCT_NAME_4);
   p4.setProductType(pt);
   p4.setProductStructure(PRODUCT_STRUCTURE);
   p4.setTransferStatus(PRODUCT_STATUS);
   pp.setPageProducts(Lists.newArrayList(p4));
   return pp;
}
 
开发者ID:apache,项目名称:oodt,代码行数:16,代码来源:TestGetNextPageCliAction.java

示例11: getPrevPage

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
@Override
public ProductPage getPrevPage(ProductType pt, ProductPage currentPage) {
   ProductPage pp = new ProductPage();
   pp.setPageNum(currentPage.getPageNum() - 1);
   pp.setTotalPages(currentPage.getTotalPages());
   pp.setPageSize(currentPage.getPageSize());
   Product p4 = new Product();
   p4.setProductId(PRODUCT_ID_4);
   p4.setProductName(PRODUCT_NAME_4);
   p4.setProductType(pt);
   p4.setProductStructure(PRODUCT_STRUCTURE);
   p4.setTransferStatus(PRODUCT_STATUS);
   pp.setPageProducts(Lists.newArrayList(p4));
   return pp;
}
 
开发者ID:apache,项目名称:oodt,代码行数:16,代码来源:TestGetPrevPageCliAction.java

示例12: updateCatalogMetadata

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
/**
 * Updates the cataloged {@link Metadata} for a {@link Product} in the CAS
 * File Manager.
 * 
 * @param product
 *          The {@link Product} to update {@link Metadata} for.
 * @throws CatalogException
 *           If any error occurs during the update.
 * @throws IOException
 * @throws FileNotFoundException
 */
public void updateCatalogMetadata(Product product, Metadata newMetadata)
    throws CatalogException, IOException {
  InputStream is = new FileInputStream(CurationService.config.getFileMgrProps());
  try {
    System.getProperties().load(is);
  }
  finally{
    is.close();
  }
  Catalog catalog = this.getCatalog();
  
  Metadata oldMetadata = catalog.getMetadata(product);
  List<Reference> references = catalog.getProductReferences(product);
  Product newProduct = new Product(product.getProductName(), product
      .getProductType(), product.getProductStructure(), product
      .getTransferStatus(), product.getProductReferences());
  // Constructor is bugged and doesn't set transfer status
  newProduct.setTransferStatus(product.getTransferStatus());
  catalog.removeMetadata(oldMetadata, product);
  catalog.removeProduct(product);
  newProduct.setProductId(product.getProductId());
  catalog.addProduct(newProduct);
  newProduct.setProductReferences(references);
  catalog.addProductReferences(newProduct);
  catalog.addMetadata(newMetadata, newProduct);
}
 
开发者ID:apache,项目名称:oodt,代码行数:38,代码来源:MetadataResource.java

示例13: setProductTransferStatus

import org.apache.oodt.cas.filemgr.structs.Product; //导入方法依赖的package包/类
@Override
public void setProductTransferStatus(Product product)
      throws CatalogException {
   Product ingestedProduct = products.get(product.getProductId());
   ingestedProduct.setTransferStatus(product.getTransferStatus());
}
 
开发者ID:apache,项目名称:oodt,代码行数:7,代码来源:MockCatalog.java


注:本文中的org.apache.oodt.cas.filemgr.structs.Product.setTransferStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。