Examples of PathUtilsNamingConvention


Examples of org.apache.oodt.cas.metadata.filenaming.PathUtilsNamingConvention

      String outputFile = fileElement.getAttribute(REGEX_ATTR);
      if (outputFile.equals("")){
        outputFile = fillIn(fileElement.getAttribute(NAME_ATTR),
            metadata);
      }
      PathUtilsNamingConvention renamingConvention = null;
      NodeList renamingConvNodes = fileElement
          .getElementsByTagName(RENAMING_CONV_TAG);

      if (renamingConvNodes.getLength() > 0) {
        Element renamingElement = (Element) renamingConvNodes.item(0);
        String namingExpr = renamingElement
            .getAttribute(NAMING_EXPR_ATTR);
        if (renamingElement.getAttribute(ENV_REPLACE_ATTR)
            .toLowerCase().equals("true")){
          namingExpr = fillIn(namingExpr, metadata, false);
        }
        else if (!renamingElement.getAttribute(ENV_REPLACE_ATTR)
            .toLowerCase().equals("false")){
          namingExpr = fillIn(namingExpr, metadata);
        }
        renamingConvention = new PathUtilsNamingConvention();
        renamingConvention.setNamingConv(namingExpr);
        NodeList metadataNodes = renamingElement
            .getElementsByTagName(METADATA_TAG);
        for (int k = 0; k < metadataNodes.getLength(); k++) {
          renamingConvention.addTmpReplaceMet(((Element) metadataNodes
              .item(k)).getAttribute(KEY_ATTR), Arrays
              .asList(((Element) metadataNodes.item(k))
                  .getAttribute(VAL_ATTR).split(",")));
        }
      }
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.