Package org.apache.oodt.cas.metadata

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


                String elemName = XMLUtils.read(keyValElem, "key");
                List<String> elemValues = XMLUtils.readMany(keyValElem, "val");
                metHash.put(elemName, elemValues);
            }

            met.replaceMetadata(metHash);
        }

        // grab extractors
        List<ExtractorSpec> extractors = null;
        Element extractorRoot = XMLUtils.getFirstElement("metExtractors",
View Full Code Here


                fail(e.getMessage());
            }
        }

        testProd.setProductName("ShouldBeFirstForPage.txt");
        met.replaceMetadata("CAS.ProdutName", "ShouldBeFirstForPage.txt");

        try {
            myCat.addProduct(testProd);
            myCat.addMetadata(met, testProd);
View Full Code Here

        prodMet.addMetadata("DataVersion", "3.6");
        myCat.addMetadata(prodMet, testProduct);

        // ingest second file
        testProduct.setProductId("24");
        prodMet.replaceMetadata(CoreMetKeys.FILENAME, "test-file-2.txt");
        prodMet.replaceMetadata("CAS.ProductName", "TestFile2");
        myCat.addMetadata(prodMet, testProduct);

        // ingest thrid file
        testProduct.setProductId("25");
View Full Code Here

        myCat.addMetadata(prodMet, testProduct);

        // ingest second file
        testProduct.setProductId("24");
        prodMet.replaceMetadata(CoreMetKeys.FILENAME, "test-file-2.txt");
        prodMet.replaceMetadata("CAS.ProductName", "TestFile2");
        myCat.addMetadata(prodMet, testProduct);

        // ingest thrid file
        testProduct.setProductId("25");
        prodMet.replaceMetadata(CoreMetKeys.FILENAME, "test-file-2.txt");
View Full Code Here

        prodMet.replaceMetadata("CAS.ProductName", "TestFile2");
        myCat.addMetadata(prodMet, testProduct);

        // ingest thrid file
        testProduct.setProductId("25");
        prodMet.replaceMetadata(CoreMetKeys.FILENAME, "test-file-2.txt");
        prodMet.replaceMetadata("CAS.ProductName", "TestFile3");
        prodMet.replaceMetadata("DataVersion", "4.6");
        myCat.addMetadata(prodMet, testProduct);

        // perform first query
View Full Code Here

        myCat.addMetadata(prodMet, testProduct);

        // ingest thrid file
        testProduct.setProductId("25");
        prodMet.replaceMetadata(CoreMetKeys.FILENAME, "test-file-2.txt");
        prodMet.replaceMetadata("CAS.ProductName", "TestFile3");
        prodMet.replaceMetadata("DataVersion", "4.6");
        myCat.addMetadata(prodMet, testProduct);

        // perform first query
        Query query = new Query();
View Full Code Here

        // ingest thrid file
        testProduct.setProductId("25");
        prodMet.replaceMetadata(CoreMetKeys.FILENAME, "test-file-2.txt");
        prodMet.replaceMetadata("CAS.ProductName", "TestFile3");
        prodMet.replaceMetadata("DataVersion", "4.6");
        myCat.addMetadata(prodMet, testProduct);

        // perform first query
        Query query = new Query();
        query
View Full Code Here

                String elemName = XMLUtils.read(keyValElem, "key");
                List<String> elemValues = XMLUtils.readMany(keyValElem, "val");
                metHash.put(elemName, elemValues);
            }

            met.replaceMetadata(metHash);
        }

        // grab extractors
        List<ExtractorSpec> extractors = null;
        Element extractorRoot = XMLUtils.getFirstElement("metExtractors",
View Full Code Here

          metadata.addMetadata("CAS.ProductTypeRepositoryPath", type
              .getProductRepositoryPath());
          metadata.addMetadata("CAS.ProductTypeVersioner", type.getVersioner());
          metadata.addMetadata("CAS.ProductTypeName", type.getName());
          metadata.addMetadata("ProductType", "ProductType");
          metadata.replaceMetadata(type.getTypeMetadata());
          if (delete) {
            try {
              server.deleteById(type.getProductTypeId());
            } catch (Exception e) {
              LOG.severe("Could not delete product type " + type.getName()
View Full Code Here

      metadata.addMetadata(typeMetadata);
    }
    if (productMetadata != null) {
      String accessKey = config.getProperty(ACCESS_KEY);
      // Product metadata takes precedence
      metadata.replaceMetadata(productMetadata);
      // If there is an access url configured add it to the metadata
      if (config.getProperty(ACCESS_URL) != null) {
        metadata.addMetadata(accessKey, config.getProperty(ACCESS_URL));
      }
      // Replace values for metadata keys specified in config. This allows
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.