Package org.apache.cocoon.xml

Examples of org.apache.cocoon.xml.ParamSaxBuffer$Parameter


        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


                // 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

                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

                    String key =  atts.getValue(AT_KEY);
                    if (key == null) {
                        throw new SAXException("<" + EL_MESSAGE + "> must have '" +
                                               AT_KEY + "' attribute.");
                    }
                    buffer = new ParamSaxBuffer();
                    values.put(key, buffer);
                    state ++;
                    break;
                case 2:
                    buffer.startElement(ns, localName, qName, atts);
View Full Code Here

            // test number of parameters
            if (firstParameters.size() == secondParameters.size())
            {
                for (int i = 0; i < firstParameters.size() && sameSignature; i++)
                {
                    final Parameter firstParameter = (Parameter)firstParameters.get(i);
                    final Parameter secondParameter = (Parameter)secondParameters.get(i);

                    // test each parameter's type
                    sameSignature =
                        isEqual(
                            firstParameter.getType(),
                            secondParameter.getType());
                }
            }
            else
            {
                sameSignature = false;
View Full Code Here

        Iterator iterator = this.metaObject.getOwnedParameters().iterator();

        boolean commaNeeded = false;
        while (iterator.hasNext())
        {
            Parameter parameter = (Parameter)iterator.next();

            if (!parameter.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL))
            {
                if (commaNeeded)
                {
                    buffer.append(", ");
                }
                buffer.append(parameter.getName());
                commaNeeded = true;
            }
        }
        return buffer.toString();
    }
View Full Code Here

        Iterator iterator = this.metaObject.getOwnedParameters().iterator();

        boolean commaNeeded = false;
        while (iterator.hasNext())
        {
            Parameter parameter = (Parameter)iterator.next();

            if (!parameter.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL))
            {
                if (commaNeeded)
                {
                    buffer.append(", ");
                }
View Full Code Here

            arguments,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    Parameter p = (Parameter)object;
                    return !p.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL) && !p.isException();
                }
            });
        return arguments;
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.xml.ParamSaxBuffer$Parameter

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.