Package org.apache.oodt.cas.metadata

Examples of org.apache.oodt.cas.metadata.Metadata.replaceMetadata()


    Reference r = product.getProductReferences().get(0);
    String finalLocation = VersioningUtils.getAbsolutePathFromUri(r
        .getDataStoreReference());
    if (this.replaceLocation) {
      extractMet.replaceMetadata(FILE_LOCATION,
          new File(finalLocation).getParent());
    } else {
      extractMet
          .addMetadata(FILE_LOCATION, new File(finalLocation).getParent());
    }
View Full Code Here


            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                    "./src/testdata/ingest").getCanonicalPath());
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                    "./src/testdata/ingest/test.txt"), prodMet);
           
            prodMet.replaceMetadata(CoreMetKeys.PRODUCT_NAME, "TestTypeFile");
            prodMet.replaceMetadata(CoreMetKeys.PRODUCT_TYPE, "TestType");
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                "./src/testdata/ingest/test.txt"), prodMet);
        } catch (Exception e) {
            fail(e.getMessage());
View Full Code Here

                    "./src/testdata/ingest").getCanonicalPath());
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                    "./src/testdata/ingest/test.txt"), prodMet);
           
            prodMet.replaceMetadata(CoreMetKeys.PRODUCT_NAME, "TestTypeFile");
            prodMet.replaceMetadata(CoreMetKeys.PRODUCT_TYPE, "TestType");
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                "./src/testdata/ingest/test.txt"), prodMet);
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

  }

    private Metadata buildProductMetadata(Product product, Metadata metadata)
      throws CatalogException {
    Metadata pMet = new Metadata();
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_ID, product.getProductId() != null ?
        product.getProductId():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_NAME, product.getProductName() != null ?
        product.getProductName():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_STRUCTURE, product
        .getProductStructure() != null ? product.getProductStructure():"unknown");
View Full Code Here

    private Metadata buildProductMetadata(Product product, Metadata metadata)
      throws CatalogException {
    Metadata pMet = new Metadata();
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_ID, product.getProductId() != null ?
        product.getProductId():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_NAME, product.getProductName() != null ?
        product.getProductName():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_STRUCTURE, product
        .getProductStructure() != null ? product.getProductStructure():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS, product
        .getTransferStatus() != null ? product.getTransferStatus():"unknown");
View Full Code Here

    Metadata pMet = new Metadata();
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_ID, product.getProductId() != null ?
        product.getProductId():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_NAME, product.getProductName() != null ?
        product.getProductName():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_STRUCTURE, product
        .getProductStructure() != null ? product.getProductStructure():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS, product
        .getTransferStatus() != null ? product.getTransferStatus():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_ROOT_REFERENCE, product.getRootRef() != null ?
        VersioningUtils
View Full Code Here

        product.getProductId():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_NAME, product.getProductName() != null ?
        product.getProductName():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_STRUCTURE, product
        .getProductStructure() != null ? product.getProductStructure():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS, product
        .getTransferStatus() != null ? product.getTransferStatus():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_ROOT_REFERENCE, product.getRootRef() != null ?
        VersioningUtils
        .getAbsolutePathFromUri(product.getRootRef().getDataStoreReference()):"unknown");
View Full Code Here

        product.getProductName():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_STRUCTURE, product
        .getProductStructure() != null ? product.getProductStructure():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS, product
        .getTransferStatus() != null ? product.getTransferStatus():"unknown");
    pMet.replaceMetadata(ProductMetKeys.PRODUCT_ROOT_REFERENCE, product.getRootRef() != null ?
        VersioningUtils
        .getAbsolutePathFromUri(product.getRootRef().getDataStoreReference()):"unknown");

    List<Reference> refs = product.getProductReferences();
View Full Code Here

    if (refs == null || (refs != null && refs.size() == 0)) {
      refs = this.catalog.getProductReferences(product);
    }

    for (Reference r : refs) {
      pMet.replaceMetadata(ProductMetKeys.PRODUCT_ORIG_REFS, r.getOrigReference() != null
          ? VersioningUtils
          .getAbsolutePathFromUri(r.getOrigReference()):"unknown");
      pMet.replaceMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS,
          r.getDataStoreReference() != null ?
              VersioningUtils.getAbsolutePathFromUri(r.getDataStoreReference()):"unknown");
View Full Code Here

    for (Reference r : refs) {
      pMet.replaceMetadata(ProductMetKeys.PRODUCT_ORIG_REFS, r.getOrigReference() != null
          ? VersioningUtils
          .getAbsolutePathFromUri(r.getOrigReference()):"unknown");
      pMet.replaceMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS,
          r.getDataStoreReference() != null ?
              VersioningUtils.getAbsolutePathFromUri(r.getDataStoreReference()):"unknown");
      pMet.replaceMetadata(ProductMetKeys.PRODUCT_FILE_SIZES, String.valueOf(r
          .getFileSize()));
      pMet.replaceMetadata(ProductMetKeys.PRODUCT_MIME_TYPES,
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.