Package org.apache.oodt.cas.metadata

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


            prodMet = new SerializableMetadata(new FileInputStream(
                new File(metUrl.getFile())));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                ingestUrl.getFile()).getCanonicalPath());
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                refUrl.getFile()), prodMet);
        } catch (Exception e) {
            fail(e.getMessage());
View Full Code Here


            prodMet = new SerializableMetadata(new FileInputStream(
                new File(metUrl.getFile())));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                ingestUrl.getFile()).getCanonicalPath());
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                refUrl.getFile()), prodMet);
        } catch (Exception e) {
            fail(e.getMessage());
View Full Code Here

               return p;
            }
            @Override
            public Metadata getMetadata(Product product) {
               Metadata m = new Metadata();
               m.addMetadata(FILENAME, FILE_NAME);
               return m;
            }
         };
      }
   }
View Full Code Here

            prodMet = new SerializableMetadata(new FileInputStream(
                new File(metUrl.getFile())));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                ingestUrl.getFile()).getCanonicalPath());
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                refUrl.getFile()), prodMet);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

            prodMet = new SerializableMetadata(new FileInputStream(
                new File(metUrl.getFile())));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                ingestUrl.getFile()).getCanonicalPath());
            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
                refUrl.getFile()), prodMet);
        } catch (Exception e) {
            fail(e.getMessage());
View Full Code Here

    }

    public void testAddMetadata() {
        Metadata met = new Metadata();
        met.addMetadata("ProductStructure", Product.STRUCTURE_FLAT);

        Product testProduct = getTestProduct();
        testProduct.setProductId("1"); // need to link metadata to prod

        try {
View Full Code Here

    }

    public void testRemoveMetadata() {
        Metadata met = new Metadata();
        met.addMetadata("Filename", "tempProduct");

        Product testProduct = getTestProduct();
        testProduct.setProductId("1"); // need to link metadata to prod

        try {
View Full Code Here

        Product testProduct = getTestProduct();
        testProduct.setProductId("23");
        Metadata prodMet = new Metadata();
        URL ingestUrl = this.getClass().getResource(
            "/ingest");
        prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
            ingestUrl.getFile()).getCanonicalPath());
        prodMet.addMetadata(CoreMetKeys.FILENAME, "test-file-1.txt");
        prodMet.addMetadata("CAS.ProductName", "TestFile1");
        prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
        prodMet.addMetadata("NominalDate", "2008-01-20");
View Full Code Here

        Metadata prodMet = new Metadata();
        URL ingestUrl = this.getClass().getResource(
            "/ingest");
        prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
            ingestUrl.getFile()).getCanonicalPath());
        prodMet.addMetadata(CoreMetKeys.FILENAME, "test-file-1.txt");
        prodMet.addMetadata("CAS.ProductName", "TestFile1");
        prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
        prodMet.addMetadata("NominalDate", "2008-01-20");
        prodMet.addMetadata("DataVersion", "3.6");
        myCat.addMetadata(prodMet, testProduct);
View Full Code Here

        URL ingestUrl = this.getClass().getResource(
            "/ingest");
        prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
            ingestUrl.getFile()).getCanonicalPath());
        prodMet.addMetadata(CoreMetKeys.FILENAME, "test-file-1.txt");
        prodMet.addMetadata("CAS.ProductName", "TestFile1");
        prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
        prodMet.addMetadata("NominalDate", "2008-01-20");
        prodMet.addMetadata("DataVersion", "3.6");
        myCat.addMetadata(prodMet, testProduct);
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.