Package java.lang

Examples of java.lang.String$CaseInsensitiveComparator


     */
    public boolean startWithLanguage (Language language)
    {
        try {
            if(! cache.containsKey(language.toString())) {
                String templateFileName = dir + "/" + namePrefix + "." + language.toString() + templateExtension;
                if (mLog == null) {
                    KFMSystem.log.info("Template::StartWithLanguage: Try to load file \""
                                 + templateFileName + "\" and put it into the cache.");
                } else {
                    mLog.info("Template::StartWithLanguage: Try to load file \""
                              + templateFileName + "\" and put it into the cache.");
                }

                //
                // * Read from file.
                //
                // @@@ Should be in a convenience function somewhere.
                BufferedReader in = new BufferedReader(new FileReader(templateFileName));
                StringBuffer inBuf = new StringBuffer();
                String line;
                readline: while(true) {
                    line = in.readLine();
                    if(line == null) break readline;
                    inBuf.append(line);
                    inBuf.append('\n');
View Full Code Here


     * because `toString� should not modify the object at all.
     */
    public String writeToString() {
        privateCheckHtml();

        String tRet = html;
        html = null;
        return tRet;
    }
View Full Code Here

            if(starttagM == null) {
                return replacementOccured;
            }

            int offset = starttagM.endOffset(0);
            String html2 = html.substring(offset);
            MatchResult endtagM = RegExp.match("\\</KfmIf\\s*\\>", html2);
            if(endtagM == null) {
                return replacementOccured;
            }
            replacementOccured = true;
            String replacement = (keep ? html.substring(starttagM.endOffset(0), endtagM.beginOffset(0) + offset) : "" );
            if(domark) {
                //D KFMSystem.log.detail("replaceAllKfmIf: mark!");
                replacement = markTag(starttagM.group(0)) + replacement + markTag(endtagM.group(0));
            }
            if(debug) {
View Full Code Here

            //D KFMSystem.log.detail("param not found.");
            return "";
        }
        // Now we must strip the quotes.
        // return valueM.group(1);
        String t = valueM.group(1);
        t = t.replace('�', '>');
        return t.substring(1, t.length()-1);
    }
View Full Code Here

    public boolean replaceKfm (String label, boolean aKeep, String aBefore, String aAfter)
    {
        privateCheckHtml();
        // This regexp ensures that start tag is before end tag.
        MatchResult elementM = null;
        String p = "";
        try {
            p = "(" + cmdPattern("Kfm", label) + ")"            /*group 1: start tag*/
    // This seems very suspect (WARNING: it can cause StackOverflow Errors!):
    //            + "((?:.|\\n)*?)"                             /*group 2: content*/
    // lets try: .*?
                + "(.*?)"                                       /*group 2: content replaced*/
                + "(" + "\\</Kfm\\s*\\>" + ")";                 /*group 3: end tag */
            elementM = RegExp.match(p, html, false, true);
        } catch(Error e) {
            mLog.error(
                "Template::replace,RegExp.match caused Error: " + e + "\n"
                + "Arguments: p = '" + p + "'\n"
                + "html = '" + html + "'");
            return false;
        }
        final int starttagI = 1;
        final int contentI  = 2;
        final int endtagI   = 3;

        if(elementM == null) return false;
        String replacement = aBefore + (aKeep ? elementM.group(contentI) : "") + aAfter;
        if(domark) {
            //D KFMSystem.log.detail("replaceKfm: mark!");
            replacement = markTag(elementM.group(starttagI))
                + replacement + markTag(elementM.group(endtagI));
        }
View Full Code Here

        t.replaceAllKfm("Title", "xxx");
        t.replaceAllKfm("Clients", "yyy");

        // A loop like this will only work correctly when the HTML code is wellformed and follows our restrictions.
        String x, y;
        do {
            x = t.getKfmParam("Point", "x");
            y = t.getKfmParam("Point", "y");
        } while(t.replaceKfm("Point", "(" + x + ", " + y + ")"));
View Full Code Here

    public void replaceAllKfmTextInputField (String kfmLabel, String name,
                                             String value, String maxLength, boolean highlighted)
    {
        // A loop like this will only work correctly when the HTML code is wellformed and follows our restrictions.
        // All params must appear.
        String size;
        if(! highlighted)
            do {
                size  = getKfmParam(kfmLabel, "size");
            } while(replaceKfm(kfmLabel,
                           createTextInputField(kfmLabel, name, value, size, maxLength)));
View Full Code Here

    public void replaceAllKfmInputPassword (String kfmLabel, String name,
                                             String value, String maxLength, boolean highlighted)
    {
        // A loop like this will only work correctly when the HTML code is wellformed and follows our restrictions.
        // All params must appear.
        String size;
        if(! highlighted)
            do {
                size  = getKfmParam(kfmLabel, "size");
                } while(replaceKfm(     kfmLabel,
                                        createInputPassword(kfmLabel, name, value, size, maxLength)));
View Full Code Here

     */
    public void replaceAllKfmTextAreaField (String kfmLabel, String name, String content)
    {
        // A loop like this will only work correctly when the HTML code is wellformed and follows our restrictions.
        // All params must appear.
        String rows, cols;
        do {
            rows = getKfmParam(kfmLabel, "rows");
            cols = getKfmParam(kfmLabel, "cols");
        } while(replaceKfm(kfmLabel,
                           createTextAreaField(kfmLabel, name, content, rows, cols)));
View Full Code Here

        String[] texts,
        String selectedvalue)
    {
        // A loop like this will only work correctly when the HTML code is wellformed and follows our restrictions.
        // All params must appear.
        String size;
        do {
            size = getKfmParam(kfmLabel, "size");
        } while(replaceKfm(kfmLabel,
                           createSelect(kfmLabel, name, size, values, texts, selectedvalue)));
    }
View Full Code Here

TOP

Related Classes of java.lang.String$CaseInsensitiveComparator

Copyright © 2018 www.massapicom. 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.