Package org.apache.oodt.cas.metadata

Examples of org.apache.oodt.cas.metadata.Metadata


        wInst.setCurrentTaskStartDateTimeIsoStr((String) workflowInstance
                .get("current_task_start_date_time"));
        wInst.setCurrentTaskEndDateTimeIsoStr((String) workflowInstance
                .get("current_task_end_date_time"));
        if (workflowInstance.get("sharedContext") != null) {
            Metadata met = new Metadata();
            met.addMetadata((Hashtable) workflowInstance.get("sharedContext"));
            wInst.setSharedContext(met);
        } else
            wInst.setSharedContext(new Metadata());

        return wInst;
    }
View Full Code Here


*/
public final class WorkflowInstanceMetMap implements WorkflowInstanceMetMapKeys{
    private Metadata map;

    public WorkflowInstanceMetMap() {
        map = new Metadata();
    }
View Full Code Here

    private ProtocolFile pFile;

    public RemoteFile(ProtocolFile pFile) {
        this.pFile = pFile;
        this.metadata = new Metadata();
        this.metadata.addMetadata(RETRIEVED_FROM_LOC, pFile.getProtocolPath()
                .getPathString());
        this.metadata.addMetadata(FILENAME, pFile.getName());
        this.metadata.addMetadata(DATA_PROVIDER, pFile.getHostName());
    }
View Full Code Here

        }

        repositoryPath = PathUtils.replaceEnvVariables(repositoryPath);

        // grab metadata
        Metadata met = null;
        Element metadataRoot = XMLUtils.getFirstElement("metadata",
                productTypeElem);
        if (metadataRoot != null) {
            Hashtable<String, Object> metHash = new Hashtable<String, Object>();
            met = new Metadata();
            NodeList keyValElems = metadataRoot.getElementsByTagName("keyval");

            for (int i = 0; i < keyValElems.getLength(); i++) {
                Element keyValElem = (Element) keyValElems.item(i);

                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

    }

    public synchronized boolean addMetadata(Hashtable<String, Object> productHash,
            Hashtable<String, String> metadata) throws CatalogException {
        Product p = XmlRpcStructFactory.getProductFromXmlRpc(productHash);
        Metadata m = new Metadata();
        m.addMetadata((Hashtable)metadata);
        return addMetadata(p, m);
    }
View Full Code Here

      // first, create the product
      p.setTransferStatus(Product.STATUS_TRANSFER);
      catalogProduct(p);

      // now add the metadata
      Metadata m = new Metadata();
      m.addMetadata((Hashtable)metadata);
      addMetadata(p, m);

      if (!clientTransfer) {
        LOG.log(Level.FINEST,
            "File Manager: ingest: no client transfer enabled, "
View Full Code Here

   
    public Hashtable<String, Object> getCatalogValues(
            Hashtable<String, Object> metadataHash,
            Hashtable<String, Object> productTypeHash)
            throws RepositoryManagerException {
        Metadata m = new Metadata();
        m.addMetadata(metadataHash);
        ProductType productType = XmlRpcStructFactory.getProductTypeFromXmlRpc(productTypeHash);
        return this.getCatalogValues(m, productType).getHashtable();
    }
View Full Code Here

   
    public Hashtable<String, Object> getOrigValues(
            Hashtable<String, Object> metadataHash,
            Hashtable<String, Object> productTypeHash)
            throws RepositoryManagerException {
        Metadata m = new Metadata();
        m.addMetadata(metadataHash);
        ProductType productType = XmlRpcStructFactory.getProductTypeFromXmlRpc(productTypeHash);
        return this.getOrigValues(m, productType).getHashtable();
    }
View Full Code Here

            LOG.log(Level.SEVERE, "Failed to get handlers for product '" + p
                    + "' : " + e.getMessage());
        }
       
        // first do server side metadata extraction
        Metadata metadata = null;

        try {
            metadata = runExtractors(p, m);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        } catch (RepositoryManagerException e) {
            e.printStackTrace();
            return null;
        }

        Metadata met = new Metadata();
        met.addMetadata(metadata.getHashtable());

        if (product.getProductType().getExtractors() != null
                && product.getProductType().getExtractors().size() > 0) {
            for (Iterator<ExtractorSpec> i = product.getProductType().getExtractors()
                    .iterator(); i.hasNext();) {
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.metadata.Metadata

Copyright © 2018 www.massapicom. 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.