Examples of loadMetadataFromXmlStream()


Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

      throws InstantiationException, FileNotFoundException, IOException,
      SolrServerException {
    LOG.info("Attempting to index product from metadata file.");
    try {
      SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
      metadata.loadMetadataFromXmlStream(new FileInputStream(file));
      metadata.addMetadata("id", metadata.getMetadata("CAS."
          + CoreMetKeys.PRODUCT_ID));
      metadata.addMetadata(config.getProperty(ACCESS_KEY), config
          .getProperty(ACCESS_URL)
          + metadata.getMetadata("CAS." + CoreMetKeys.PRODUCT_ID));
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

            System.err.println(usage);
            System.exit(1);
        }

        SerializableMetadata sm = new SerializableMetadata("UTF-8", false);
        sm.loadMetadataFromXmlStream(new File(metadataFilePath).toURL()
                .openStream());
        WorkflowTaskConfiguration config = new WorkflowTaskConfiguration();
        config.getProperties().load(
                new File(configPropertiesPath).toURL().openStream());
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

   *           If there is an IO problem opening the met file.
   */
  public Metadata readMetFile(String file) throws InstantiationException,
      FileNotFoundException, IOException {
    SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
    metadata.loadMetadataFromXmlStream(new FileInputStream(config
        .getMetAreaPath()
        + "/" + file));

    return metadata;
  }
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

      responseMap.put("file", file);
    }

    try {
      SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
      metadata
          .loadMetadataFromXmlStream(new FileInputStream(base + "/" + file));
      responseMap.put("metadata", metadata.getHashtable());
    } catch (InstantiationException e) {
      // no op
    } catch (FileNotFoundException e) {
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

   *           If there is an IO problem opening the met file.
   */
  public Metadata readMetFile(String file) throws InstantiationException,
      FileNotFoundException, IOException {
    SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
    metadata.loadMetadataFromXmlStream(new FileInputStream(config
        .getMetAreaPath()
        + "/" + file));

    return metadata;
  }
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

                    + "] does not exist: failing!");
        }

        try {
            SerializableMetadata met = new SerializableMetadata("UTF-8", false);
            met.loadMetadataFromXmlStream(new FileInputStream(metFileFullPath));
            return met;
        } catch (Exception e) {
            e.printStackTrace();
            throw new MetExtractionException(e.getMessage());
        }
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

            LOG.log(Level.INFO, "Met extraction successful for product file: ["
                    + file.getAbsolutePath() + "]");
            try {
                SerializableMetadata sm = new SerializableMetadata("UTF-8",
                        false);
                sm.loadMetadataFromXmlStream(new FileInputStream(metFile));
                return sm;
            } catch (Exception e) {
                e.printStackTrace();
                throw new MetExtractionException(e.getMessage());
            }
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

            System.err.println(usage);
            System.exit(1);
        }

        SerializableMetadata sm = new SerializableMetadata("UTF-8", false);
        sm.loadMetadataFromXmlStream(new File(metadataFilePath).toURL()
                .openStream());
        WorkflowTaskConfiguration config = new WorkflowTaskConfiguration();
        config.getProperties().load(
                new File(configPropertiesPath).toURL().openStream());
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

      throws InstantiationException, FileNotFoundException, IOException,
      SolrServerException {
    LOG.info("Attempting to index product from metadata file.");
    try {
      SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
      metadata.loadMetadataFromXmlStream(new FileInputStream(file));
      metadata.addMetadata("id", metadata.getMetadata("CAS."
          + CoreMetKeys.PRODUCT_ID));
      metadata.addMetadata(config.getProperty(ACCESS_KEY), config
          .getProperty(ACCESS_URL)
          + metadata.getMetadata("CAS." + CoreMetKeys.PRODUCT_ID));
View Full Code Here

Examples of org.apache.oodt.cas.metadata.SerializableMetadata.loadMetadataFromXmlStream()

  public void indexMetFile(File file, boolean delete)
      throws InstantiationException, FileNotFoundException, IOException,
      SolrServerException {
    SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
    metadata.loadMetadataFromXmlStream(new FileInputStream(file));
    if (delete) {
      server.deleteById(metadata.getMetadata("CAS." + CoreMetKeys.PRODUCT_ID));
    }
    server.add(this.getSolrDocument(metadata));
  }
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.