Examples of ParamSaxBuffer


Examples of org.apache.cocoon.xml.ParamSaxBuffer

        this.objectModel = objectModel;

        untranslated = parameters.getParameter(I18N_UNTRANSLATED, defaultUntranslated);
        if (untranslated != null) {
            untranslatedRecorder = new ParamSaxBuffer();
            untranslatedRecorder.characters(untranslated.toCharArray(), 0, untranslated.length());
        }

        // Get current locale
        String lc = parameters.getParameter(I18N_LOCALE, null);
        Locale locale = I18nUtils.parseLocale(lc);
        if (getLogger().isDebugEnabled()) {
            getLogger().debug("Using locale '" + locale + "'");
        }

        // Initialize instance state variables
        this.locale             = locale;
        this.current_state      = STATE_OUTSIDE;
        this.prev_state         = STATE_OUTSIDE;
        this.currentKey        = null;
        this.currentCatalogueId = null;
        this.translate_copy     = false;
        this.tr_text_recorder   = null;
        this.text_recorder      = new ParamSaxBuffer();
        this.param_count        = 0;
        this.param_name         = null;
        this.param_value        = null;
        this.param_recorder     = null;
        this.indexedParams      = new HashMap(3);
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

                // Previously handeld to avoid the String() conversion.
                break;

            case STATE_INSIDE_TRANSLATE:
                if(tr_text_recorder == null) {
                    tr_text_recorder = new ParamSaxBuffer();
                }
                tr_text_recorder.characters(ch, 0, ch.length);
                break;

            case STATE_INSIDE_CHOOSE:
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

                if (tr_text_recorder == null) {
                    if (!text_recorder.isEmpty()) {
                        tr_text_recorder = getMessage(text_recorder.toString(), text_recorder);
                        if (tr_text_recorder == text_recorder) {
                            // If the default value was returned, make a copy
                            tr_text_recorder = new ParamSaxBuffer(text_recorder);
                        }
                    }
                }

                text_recorder.recycle();
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

        SaxBuffer value = getMessage(currentCatalogueId, key);
        if (value == null) {
            return defaultValue;
        }

        return new ParamSaxBuffer(value);
    }
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

        this.objectModel = objectModel;

        untranslated = parameters.getParameter(I18N_UNTRANSLATED, defaultUntranslated);
        if (untranslated != null) {
            untranslatedRecorder = new ParamSaxBuffer();
            untranslatedRecorder.characters(untranslated.toCharArray(), 0, untranslated.length());
        }

        // Get current locale
        String lc = parameters.getParameter(I18N_LOCALE, null);
        Locale locale = I18nUtils.parseLocale(lc);
        if (getLogger().isDebugEnabled()) {
            getLogger().debug("Using locale '" + locale + "'");
        }

        // Initialize instance state variables
        this.locale             = locale;
        this.current_state      = STATE_OUTSIDE;
        this.prev_state         = STATE_OUTSIDE;
        this.currentKey        = null;
        this.currentCatalogueId = null;
        this.translate_copy     = false;
        this.tr_text_recorder   = null;
        this.text_recorder      = new ParamSaxBuffer();
        this.param_count        = 0;
        this.param_name         = null;
        this.param_value        = null;
        this.param_recorder     = null;
        this.indexedParams      = new HashMap(3);
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

                // Previously handeld to avoid the String() conversion.
                return;

            case STATE_INSIDE_TRANSLATE:
                if (tr_text_recorder == null) {
                    tr_text_recorder = new ParamSaxBuffer();
                }
                buffer = tr_text_recorder;
                break;

            case STATE_INSIDE_CHOOSE:
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

                if (tr_text_recorder == null) {
                    if (!text_recorder.isEmpty()) {
                        tr_text_recorder = getMessage(text_recorder.toString(), text_recorder);
                        if (tr_text_recorder == text_recorder) {
                            // If the default value was returned, make a copy
                            tr_text_recorder = new ParamSaxBuffer(text_recorder);
                        }
                    }
                }

                text_recorder.recycle();
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

        SaxBuffer value = getMessage(currentCatalogueId, key);
        if (value == null) {
            return defaultValue;
        }

        return new ParamSaxBuffer(value);
    }
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

                    String key =  atts.getValue(AT_KEY);
                    if (key == null) {
                        throw new SAXException("<" + EL_MESSAGE + "> must have '" +
                                               AT_KEY + "' attribute.");
                    }
                    this.buffer = new ParamSaxBuffer();
                    this.values.put(key, this.buffer);
                    this.state++;
                    break;

                case 2:
View Full Code Here

Examples of org.apache.cocoon.xml.ParamSaxBuffer

        this.objectModel = objectModel;

        untranslated = parameters.getParameter(I18N_UNTRANSLATED, defaultUntranslated);
        if (untranslated != null) {
            untranslatedRecorder = new ParamSaxBuffer();
            untranslatedRecorder.characters(untranslated.toCharArray(), 0, untranslated.length());
        }

        // Get current locale
        String lc = parameters.getParameter(I18N_LOCALE, null);
        Locale locale = I18nUtils.parseLocale(lc);
        if (getLogger().isDebugEnabled()) {
            getLogger().debug("Using locale '" + locale + "'");
        }

        // Initialize instance state variables
        this.locale             = locale;
        this.current_state      = STATE_OUTSIDE;
        this.prev_state         = STATE_OUTSIDE;
        this.currentKey        = null;
        this.currentCatalogueId = null;
        this.translate_copy     = false;
        this.tr_text_recorder   = null;
        this.text_recorder      = new ParamSaxBuffer();
        this.param_count        = 0;
        this.param_name         = null;
        this.param_value        = null;
        this.param_recorder     = null;
        this.indexedParams      = new HashMap(3);
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.