Package org.apache.oodt.cas.metadata

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


            case CUSTOM:
                combinedMetadata.addMetadata(
                        this.customMetadata.getHashtable(), true);
                for (Iterator<String> iter = this.keyLinkMap.keySet().iterator(); iter.hasNext(); ) {
                    String key = iter.next();
                    combinedMetadata.replaceMetadata(key, this.getMetadataValues(key));
                }
                break;
            }
        }
        return combinedMetadata;
View Full Code Here


                }
                if (metadataElement.getAttribute(WORKFLOW_MET_ATTR)
                        .toLowerCase().equals("true"))
                  localPgeMetadata.addWorkflowMetadataKey(key);
               
                curPlusLocalMetadata.replaceMetadata(key, curPgeMetadata.getMetadataValues(key));
            }
        }
        return localPgeMetadata;
    }
View Full Code Here

          String rewriteFieldStr = ((CopyAndRewriteConfig) this.config)
                  .getProperty(rewriteFieldName + ".pattern");
          LOG.log(Level.FINE, "Rewrite string: [" + rewriteFieldStr + "]");
          rewriteFieldStr = PathUtils.replaceEnvVariables(rewriteFieldStr,
                  met);
          met.replaceMetadata(rewriteFieldName, rewriteFieldStr);
      }

      return met;

  }
View Full Code Here

                        String delimiter = metadataElement.getAttribute("delimiter");
                        if (delimiter == null || delimiter.equals(""))
                            delimiter = ",";
                        vals = (val + delimiter).split(delimiter);
                    }
                    metadata.replaceMetadata(key, Arrays.asList(vals));
                    inputMetadata.replaceMetadata(key, Arrays.asList(vals));
                } else if (inputMetadata.getMetadata(key) != null
                        && !inputMetadata.getMetadata(key).equals("")) {
                    metadata.replaceMetadata(key, inputMetadata
                            .getAllMetadata(key));
View Full Code Here

                    }
                    metadata.replaceMetadata(key, Arrays.asList(vals));
                    inputMetadata.replaceMetadata(key, Arrays.asList(vals));
                } else if (inputMetadata.getMetadata(key) != null
                        && !inputMetadata.getMetadata(key).equals("")) {
                    metadata.replaceMetadata(key, inputMetadata
                            .getAllMetadata(key));
                }
            }
        }
        return metadata;
View Full Code Here

                            .getName())) {
                        try {
                            PcsMetFileWriter writer = (PcsMetFileWriter) Class
                                    .forName(regExprFiles.getConverterClass())
                                    .newInstance();
                            outputMetadata.replaceMetadata(this.getMetadataForFile(
                    (regExprFiles.getRenamingConv() != null)
                  ? createdFile = this.renameFile(createdFile, regExprFiles.getRenamingConv())
                  : createdFile, writer, regExprFiles.getArgs()));
                        } catch (Exception e) {
                            LOG.log(Level.SEVERE,
View Full Code Here

        }
    }

    protected File renameFile(File file, RenamingConv renamingConv) throws Exception {
      Metadata curMetadata = this.pgeMetadata.getMetadata();
      curMetadata.replaceMetadata(renamingConv.getTmpReplaceMet());
      String newFileName = PathUtils.doDynamicReplacement(renamingConv.getRenamingString(), curMetadata);
      File newFile = new File(file.getParentFile(), newFileName);
        LOG.log(Level.INFO, "Renaming file '" + file.getAbsolutePath()
            + "' to '" + newFile.getAbsolutePath() + "'");
      if (!file.renameTo(newFile))
View Full Code Here

    public Metadata getMetadataForFile(File sciPgeCreatedDataFile,
            PgeMetadata pgeMetadata, Object... customArgs) throws Exception {
        try {
            Metadata inputMetadata = pgeMetadata.getMetadata();

            inputMetadata.replaceMetadata(CoreMetKeys.FILENAME,
                    sciPgeCreatedDataFile.getName());
            inputMetadata.replaceMetadata(CoreMetKeys.FILE_LOCATION,
                    sciPgeCreatedDataFile.getParentFile().getAbsolutePath());
            inputMetadata.replaceMetadata(FILE_SIZE, Long.toString(new File(
          inputMetadata.getMetadata(CoreMetKeys.FILE_LOCATION),
View Full Code Here

        try {
            Metadata inputMetadata = pgeMetadata.getMetadata();

            inputMetadata.replaceMetadata(CoreMetKeys.FILENAME,
                    sciPgeCreatedDataFile.getName());
            inputMetadata.replaceMetadata(CoreMetKeys.FILE_LOCATION,
                    sciPgeCreatedDataFile.getParentFile().getAbsolutePath());
            inputMetadata.replaceMetadata(FILE_SIZE, Long.toString(new File(
          inputMetadata.getMetadata(CoreMetKeys.FILE_LOCATION),
          inputMetadata.getMetadata(CoreMetKeys.FILENAME)).length()));
           
View Full Code Here

            inputMetadata.replaceMetadata(CoreMetKeys.FILENAME,
                    sciPgeCreatedDataFile.getName());
            inputMetadata.replaceMetadata(CoreMetKeys.FILE_LOCATION,
                    sciPgeCreatedDataFile.getParentFile().getAbsolutePath());
            inputMetadata.replaceMetadata(FILE_SIZE, Long.toString(new File(
          inputMetadata.getMetadata(CoreMetKeys.FILE_LOCATION),
          inputMetadata.getMetadata(CoreMetKeys.FILENAME)).length()));
           
            return this.getSciPgeSpecificMetadata(
                    sciPgeCreatedDataFile, inputMetadata, customArgs);
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.