Package org.apache.oodt.cas.metadata

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


    public Metadata getReducedMetadata(Product product, List<String> elements) throws CatalogException {
        Metadata fullMetadata = getMetadata(product);
        Metadata reducedMetadata = new Metadata();
        for (int i = 0; i < elements.size(); i++) {
            String element = elements.get(i);
            reducedMetadata.addMetadata(element, fullMetadata
                    .getMetadata(element));
        }
        return reducedMetadata;
    }
View Full Code Here


                    String[] elemValues = doc.getValues(element
                            .getElementName());

                    if (elemValues != null && elemValues.length > 0) {
                        for (int j = 0; j < elemValues.length; j++) {
                            metadata.addMetadata(element.getElementName(),
                                    elemValues[j]);
                        }
                    }
                }
            }
View Full Code Here

        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        Metadata m = new Metadata();
        m.addMetadata(metadata);
        return m;

    }

    public Metadata getReducedMetadata(Product product, List elements)
View Full Code Here

        } catch (IOException e) {
            throw new CatalogException(e.getMessage());
        }

        Metadata m = new Metadata();
        m.addMetadata(metadata);
        return m;

    }

    public boolean removeFile(String filePath) throws DataTransferException {
View Full Code Here

        Vector<Object> args = new Vector<Object>();
        args.add(metadata.getHashtable());
        args.add(XmlRpcStructFactory.getXmlRpcProductType(productType));

        Metadata m = new Metadata();
        m.addMetadata((Hashtable<String, Object>) this.client.execute(
                "filemgr.getCatalogValues", args));

        return m;
    }
View Full Code Here

        Vector<Object> args = new Vector<Object>();
        args.add(metadata.getHashtable());
        args.add(XmlRpcStructFactory.getXmlRpcProductType(productType));

        Metadata m = new Metadata();
        m.addMetadata((Hashtable<String, Object>) this.client.execute(
                "filemgr.getOrigValues", args));

        return m;
    }
View Full Code Here

        LOG.log(Level.WARNING, "Unable to obtain field: ["
            + map.getFieldLocalName(fld) + "] from result set: message: "
            + e.getMessage());
      }

      met.addMetadata(elem.getName(), (String) elem.getValues().get(0));

      profile.getProfileElements().put(fld.getName(), elem);
    }

    if (resLocationSpec != null) {
View Full Code Here

            public List<QueryResult> complexQuery(ComplexQuery complexQuery) {
               clientSetComplexQuery = complexQuery;
               Product p = new Product();
               p.setProductId("TestProductId");
               Metadata m = new Metadata();
               m.addMetadata("Filename", TEST_FILENAME);
               m.addMetadata("Owners", Lists.newArrayList("Bob", "Billy"));
               QueryResult qr = new QueryResult(p, m);
               qr.setToStringFormat(complexQuery.getToStringResultFormat());
               return Lists.newArrayList(qr);
            }
View Full Code Here

               clientSetComplexQuery = complexQuery;
               Product p = new Product();
               p.setProductId("TestProductId");
               Metadata m = new Metadata();
               m.addMetadata("Filename", TEST_FILENAME);
               m.addMetadata("Owners", Lists.newArrayList("Bob", "Billy"));
               QueryResult qr = new QueryResult(p, m);
               qr.setToStringFormat(complexQuery.getToStringResultFormat());
               return Lists.newArrayList(qr);
            }
         };
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

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.