Package org.apache.oodt.cas.metadata

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


        } else if (e.getColumn() == 3) {
          if (oldKey != null) {
            String newEnvReplace = ((String) table.getValueAt(e.getFirstRow(),
                e.getColumn())).toLowerCase();
            if (newEnvReplace.equals("true"))
              staticMet.replaceMetadata(oldKey + "/envReplace", newEnvReplace);
            else
              staticMet.removeMetadata(oldKey + "/envReplace");
            notifyListeners();
          }
        }
View Full Code Here


                @SuppressWarnings("unchecked")
                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

      if (curChild.getNodeName().equals("configuration")) {
        Metadata curMetadata = new Metadata();
        if (!((Element) curChild).getAttribute("extends").equals(""))
          for (String extension : ((Element) curChild).getAttribute("extends")
              .split(","))
            curMetadata
                .replaceMetadata(globalConfGroups.containsKey(extension) ? globalConfGroups
                    .get(extension) : this.loadConfGroup(rootElements,
                    extension, globalConfGroups));
        curMetadata.replaceMetadata(XmlStructFactory
            .getConfigurationAsMetadata(curChild));
View Full Code Here

              .split(","))
            curMetadata
                .replaceMetadata(globalConfGroups.containsKey(extension) ? globalConfGroups
                    .get(extension) : this.loadConfGroup(rootElements,
                    extension, globalConfGroups));
        curMetadata.replaceMetadata(XmlStructFactory
            .getConfigurationAsMetadata(curChild));
        NamedNodeMap attrMap = curChild.getAttributes();
        String configName = null;
        for (int j = 0; j < attrMap.getLength(); j++) {
          Attr attr = (Attr) attrMap.item(j);
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

    public Metadata getReducedMetadata(Product product, List<String> elements) throws CatalogException {
        Metadata fullMetadata = getMetadata(product);
        Metadata reducedMetadata = new Metadata();
        for (String element : elements) {
            if (fullMetadata.containsKey(element))
                reducedMetadata.replaceMetadata(element, fullMetadata.getAllMetadata(element));
        }
        return reducedMetadata;
    }

    /*
 
View Full Code Here

         throw new IOException("Failed to create temp directory");
      }
      tmpFile.delete();
      File testFile = new File(tmpDir, "TestProduct.txt");
      Metadata m = new Metadata();
      m.replaceMetadata("NewName", "NewProduct.txt");

      // Test failure.
      PathUtilsNamingConvention nc = new PathUtilsNamingConvention();
      nc.setNamingConv("[NewName]");
      try {
View Full Code Here

      metadata.addMetadata(newMetadata);
     
      // replace metadata values for keys specified in HTTP request (not others)
      if (replace) {
        for (String key : newMetadata.getAllKeys()) {
          metadata.replaceMetadata(key, newMetadata.getAllMetadata(key));
        }
      }
     
      // remove metadata tags
      if (remove) {
View Full Code Here

  private Metadata convertToMetadata(WorkflowTaskConfiguration config,
      Metadata dynMetadata) throws Exception {
    Metadata metadata = new Metadata();
    for (Entry entry : config.getProperties().entrySet())
      metadata.replaceMetadata((String) entry.getKey(), (String) entry.getValue());
    return metadata;
  }

    public void addWorkflowMetadataKey(String key) {
        this.workflowMetKeys.add(key);
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.