Convert the input string into the appropriate Format setting.

@param name
@return AccessLog.Format
182675
public static AccessLog.Format convertNCSAFormat(String name) {
        if (null == name) {
            return AccessLog.Format.COMMON;
        }
        AccessLog.Format format = AccessLog.Format.COMMON;
        String test = name.trim().toLowerCase();
        if ("combined".equals(test)) {
            format = AccessLog.Format.COMBINED;
        }
        return format;
    }
148406
public String getMimeType(final String name) {
		String mimeType = null;
		if (name != null && name.length() > 0 && name.contains(".")) {
			final String[] segments = name.split("\\.");
			mimeType = mimeMappings.get(segments[segments.length - 1]);
		}
		if (mimeType == null) {
			mimeType = httpContext.getMimeType(name);
		}
		return mimeType;
	}
790132
public static String convertToFileSystemChar(String name) {
        String erg = "";
        Matcher m = Pattern.compile("[a-z0-9 _#&@\\[\\(\\)\\]\\-\\.]", Pattern.CASE_INSENSITIVE).matcher(name);
        while (m.find()) {
            erg += name.substring(m.start(), m.end());
        }
        if (erg.length() > 200) {
            erg = erg.substring(0, 200);
            System.out.println("cut filename: " + erg);
        }
        return erg;
    }
293539
public long getDateField(String name)
    {
        String val = valueParameters(get(name),null);
        if (val==null)
            return -1;

        if (_dateReceive==null)
       {
               _dateReceive=(SimpleDateFormat[])__dateReceiveCache.get();
               if (_dateReceive==null)
               {
                    _dateReceive=(SimpleDateFormat[]) new SimpleDateFormat[__dateReceiveSource.length];
                    __dateReceiveCache.set(_dateReceive);
               }
       }
       
        for (int i=0;i<_dateReceive.length;i++)
        {
            // clone formatter for thread safety
            if (_dateReceive[i]==null)
                _dateReceive[i]=(SimpleDateFormat)__dateReceiveSource[i].clone();
            
            try{
                Date date=(Date)_dateReceive[i].parseObject(val);
                return date.getTime();
            }
            catch(java.lang.Exception e)
            {
                LogSupport.ignore(log,e);
            }
        }
        if (val.endsWith(" GMT"))
        {
            val=val.substring(0,val.length()-4);
            for (int i=0;i<_dateReceive.length;i++)
            {
                try{
                    Date date=(Date)_dateReceive[i].parseObject(val);
                    return date.getTime();
                }
                catch(java.lang.Exception e)
                {
                    LogSupport.ignore(log,e);
                }
            }
        }

        throw new IllegalArgumentException(val);
    }
56507
public static CorpusFormat forName(@NonNull String name) {
      String format = StringUtils.trim(name).toUpperCase();
      boolean isOPL = format.endsWith("_OPL");
      final String normFormat = format.replaceAll("_OPL$", "").trim();
      if (formats.containsKey(normFormat)) {
         return isOPL ? new OnePerLineFormat(formats.get(normFormat)) : formats.get(normFormat);
      }
      throw new IllegalArgumentException(name + " is an unknown format.");
   }
1178271
public String serialize(String name, Configuration configuration) {
      try {
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         serialize(os, name, configuration);
         return os.toString("UTF-8");
      } catch (Exception e) {
         throw new CacheConfigurationException(e);
      }
   }
854596
public String getTextValueForPatternName(final String name) {
        Node n = this.getSingle(name);
        String text = n == null ? null : n.getText();
        return text;
    }
196566
public static String getFilenameExtension(String name) {
    if(name == null) {
      return null;
    }
    int index = name.lastIndexOf('.');
    return index < 0 ? null : name.substring(index + 1).toLowerCase();
  }
76689
public String getStringValue(String name) {
        //  Check if datum exists for name
        DbDatum datum = getDatum(name);
        if (datum == null)
            return null;

        //  Else get string value
        String[] array = datum.extractStringArray();
        String str = "";
        for (int i = 0; i < array.length; i++) {
            str += array[i];
            if (i < array.length - 1)
                str += "\n";
        }
        return str;
    }
1318460
public static String serializePropertyName(String name) {

        StringBuilder stringBuilder = new StringBuilder();
        for (char ch : name.toCharArray()) {
            if (Character.isLetterOrDigit(ch) || HYPHEN == ch || DOT == ch) {
                stringBuilder.append(ch);
            } else {
                stringBuilder.append(UNDERSCORE + Integer.toString((int) ch) + UNDERSCORE);
            }
        }
        return stringBuilder.toString();
    }
1360846
public static String capitalize(String name) {
		if (name == null || name.length() == 0) {
			return name;
		}
		return name.substring(0, 1).toUpperCase(ENGLISH) + name.substring(1);
	}
1250155
@Override
	public String format (LogRecord logRecord) {
		StringBuilder resultBuilder = new StringBuilder ();
		String prefix = logRecord.getLevel ().getName () + "\t";

		resultBuilder.append (prefix);

		resultBuilder.append (Thread.currentThread ().getName ())
				.append (" ")
				.append (sdf.format (new java.util.Date (logRecord.getMillis ())))
				.append (": ")
				.append (logRecord.getSourceClassName ())
				.append (":")
				.append (logRecord.getSourceMethodName ())
				.append (": ")
				.append (logRecord.getMessage ());

		Object[] params = logRecord.getParameters ();
		if (params != null) {
			resultBuilder.append ("\nParameters:");

			if (params.length < 1) {
				resultBuilder.append (" (none)");
			} else {
				for (int paramIndex = 0; paramIndex < params.length; paramIndex++) {
					Object param = params[paramIndex];
					if (param != null) {
						String paramString = param.toString ();

						resultBuilder.append ("\nParameter ")
								.append (String.valueOf (paramIndex))
								.append (" is a ")
								.append (param.getClass ().getName ())
								.append (": >")
								.append (paramString)
								.append ("<");
					} else {
						resultBuilder.append ("\nParameter ")
								.append (String.valueOf (paramIndex))
								.append (" is null.");
					}
				}
			}
		}

		Throwable t = logRecord.getThrown ();
		if (t != null) {
			resultBuilder.append ("\nThrowing:\n")
					.append (getFullThrowableMsg (t));
		}
		
		String result = resultBuilder.toString ().replaceAll ("\n", "\n" + prefix) + "\n";

		return result;
	}
132309
public String getFieldValue(String name) {
        PdfDictionary field = (PdfDictionary)fields.get(name);
        if (field == null)
            return null;
        PdfObject v = getPdfObject(field.get(PdfName.V));
        if (v == null)
            return null;
        if (v.isName())
            return PdfName.decodeName(((PdfName)v).toString());
        else if (v.isString()) {
            PdfString vs = (PdfString)v;
            if (encoding == null || vs.getEncoding() != null)
                return vs.toUnicodeString();
            byte b[] = vs.getBytes();
            if (b.length >= 2 && b[0] == (byte)254 && b[1] == (byte)255)
                return vs.toUnicodeString();
            try {
                if (encoding.equals(PdfName.SHIFT_JIS))
                    return new String(b, "SJIS");
                else if (encoding.equals(PdfName.UHC))
                    return new String(b, "MS949");
                else if (encoding.equals(PdfName.GBK))
                    return new String(b, "GBK");
                else if (encoding.equals(PdfName.BIGFIVE))
                    return new String(b, "Big5");
            }
            catch (Exception e) {
            }
            return vs.toUnicodeString();
        }
        return null;
    }
475620
public static String getValidName(String name) {
        StringBuilder validname = new StringBuilder();
        char ch = name.charAt(0);
        if (!XML11Char.isXML11NameStart(ch)) {
            LOG.warn("Prepend _ to " + name);
            validname.append("_");
        }
        for (int i = 0; i < name.length(); i++) {
            ch = name.charAt(i);
            if (!XML11Char.isXML11Name(ch)) {
                LOG.warn("Character " + ch + " in " + name
                    + " is converted to _");
                validname.append("_");
            } else {
                validname.append(ch);
            }
        }

        return validname.toString();
    }
14410
public static DataResource fromName(String name)
    {
        String[] parts = StringUtils.split(name, '/');

        if (!parts[0].equals(ROOT_NAME) || parts.length > 3)
            throw new IllegalArgumentException(String.format("%s is not a valid data resource name", name));

        if (parts.length == 1)
            return root();

        if (parts.length == 2)
            return keyspace(parts[1]);

        return columnFamily(parts[1], parts[2]);
    }
466226
function(name) {
        var parts = name.split(' ');
        parts[0] = parts[0].toLowerCase();
        for (var i = 1; i < parts.length; ++i) {
            parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].substr(1);
        }
        return parts.join('');
    }
593550
public T getValue(final String name) {
		if (name == null) {
			return null;
		}
		String uppercased = name.toUpperCase();
		return namesToValues.get(uppercased);
	}