Example usage for java.lang String toLowerCase

List of usage examples for java.lang String toLowerCase

Introduction

In this page you can find the example usage for java.lang String toLowerCase.

Prototype

public String toLowerCase() 

Source Link

Document

Converts all of the characters in this String to lower case using the rules of the default locale.

Usage

From source file:Main.java

private static String findFor(String xml, String pattern) {
    String ref = findUriFor(xml, pattern);
    if (ref != null) {
        String uri = ref.toLowerCase();
        if (isAxelNS(uri)) {
            return ref;
        }/*from www .j  av a  2 s . com*/
    }
    return null;
}

From source file:com.google.gdt.eclipse.designer.gxt.actions.ConfigureExtGwtOperation.java

static String getJarPath(String libraryLocation) {
    File libraryFolder = new File(libraryLocation);
    for (String jarName : libraryFolder.list()) {
        String jarNameLower = jarName.toLowerCase();
        if (jarNameLower.startsWith("gxt") && jarNameLower.endsWith(".jar")) {
            if (jarNameLower.endsWith("-gwt22.jar")) {
                return libraryLocation + "/" + jarName;
            }/* w  w  w.  ja  v a 2  s .com*/
        }
    }
    return libraryLocation + "/gxt.jar";
}

From source file:com.monarchapis.driver.hash.HasherUtils.java

/**
 * Translates a simple algorithm name to the Java standard name.
 * //from   w ww .  j  av  a  2  s  .  co m
 * @param algorithm
 *            The simple algorithm name
 * @return the Java algorithm name
 */
public static String getMessageDigestAlgorithm(String algorithm) {
    Validate.notBlank(algorithm, "algorithm is a required parameter.");

    String digestAlgorithm = algrithmLookup.get(algorithm.toLowerCase());

    if (digestAlgorithm == null) {
        throw new ApiException("Invalid algorithm " + algorithm);
    }

    return digestAlgorithm;
}

From source file:edu.utah.further.core.util.composite.UTestComposite.java

/**
 * A factory template method of grid nodes.
 * /*  w w w.ja  v  a2 s. co m*/
 * @param type
 * @param name
 * @return
 */
private static Source newSource(final SourceType type, final String name) {
    final String domain = replace(name.toLowerCase(), " ", "") + ".net";
    InternetAddress admin;
    try {
        admin = new InternetAddress("admin@" + domain);
    } catch (final AddressException e) {
        throw new ApplicationException("Bad admin address", e);
    }

    switch (type) {
    case DATA: {
        return new DataSource(name, name + " description", "http://" + domain, admin);
    }

    case COMPOSITE: {
        return new CompositeSource(name, name + " description", "http://" + name.toLowerCase() + ".net", admin);
    }

    default: {
        return null;
    }
    }
}

From source file:Main.java

public static String aggregatedTextEndsWith(final String text) {
    return format("substring(%s, string-length(normalize-space(string(.))) - string-length('%s') +1) = '%s'",
            translateTextForPath("normalize-space(string(.))"), text, text.toLowerCase());
}

From source file:com.gtafe.tools.utils.MimeUtils.java

/**
 * Return the mime type for a given extension. Extensions can include the
 * dot or just be the extension without the dot. Extension mappings are
 * found in the mimeTypes.properties file in the org.extremecomponents.util
 * package./*  w  w w . j ava2s  .  co  m*/
 */
public static String getExtensionMimeType(String extension) {
    String result = null;

    if (StringUtils.isBlank(extension)) {
        return result;
    }

    extension = extension.toLowerCase();

    if (!extension.startsWith(".")) {
        extension = "." + extension;
    }

    result = (String) properties.get(extension);

    return result;
}

From source file:de.tudarmstadt.ukp.dkpro.tc.features.ngram.meta.ChunkTripleMetaCollector.java

public static Set<String> getTriples(JCas jcas, boolean lowerCase) {
    Set<String> triples = new HashSet<String>();

    for (Chunk vc : JCasUtil.select(jcas, VC.class)) {
        String triple = getTriple(jcas, vc);
        if (lowerCase) {
            triple = triple.toLowerCase();
        }//from w  ww  .j  a  v  a 2s.c om
        triples.add(triple);
    }

    return triples;
}