Package org.apache.cocoon.template.script.event

Examples of org.apache.cocoon.template.script.event.SubstituteAttribute


        if (e instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) e;
            uri = copy.getValue();
        } else {
            StringBuffer buf = new StringBuffer();
            SubstituteAttribute substAttr = (SubstituteAttribute) e;
            Iterator i = substAttr.getSubstitutions().iterator();
            while (i.hasNext()) {
                Subst subst = (Subst) i.next();
                Object val;
                try {
                    val = subst.getValue(objectModel);
View Full Code Here


            return getExpressionValue((Subst) this.value, objectModel);
        else if (this.value instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) this.value;
            return copy.getValue();
        } else if (this.value instanceof SubstituteAttribute) {
            SubstituteAttribute substEvent = (SubstituteAttribute) this.value;
            if (substEvent.getSubstitutions().size() == 1
                    && substEvent.getSubstitutions().get(0) instanceof JXTExpression)
                return getExpressionValue((Subst) substEvent.getSubstitutions().get(0), objectModel);
            else
                return substEvent.getSubstitutions().toString(getLocation(), objectModel);

        } else {
            throw new Error("this shouldn't have happened");
        }
    }
View Full Code Here

            return getExpressionValue((JXTExpression) this.value, expressionContext);
        else if (this.value instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) this.value;
            return copy.getValue();
        } else if (this.value instanceof SubstituteAttribute) {
            SubstituteAttribute substEvent = (SubstituteAttribute) this.value;
            if (substEvent.getSubstitutions().size() == 1
                    && substEvent.getSubstitutions().get(0) instanceof JXTExpression)
                return getExpressionValue((JXTExpression) substEvent.getSubstitutions().get(0), expressionContext);
            else
                return substEvent.getSubstitutions().toString(getLocation(), expressionContext);

        } else {
            throw new Error("this shouldn't have happened");
        }
    }
View Full Code Here

        if (e instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) e;
            uri = copy.getValue();
        } else {
            StringBuffer buf = new StringBuffer();
            SubstituteAttribute substAttr = (SubstituteAttribute) e;
            Iterator i = substAttr.getSubstitutions().iterator();
            while (i.hasNext()) {
                Subst subst = (Subst) i.next();
                if (subst instanceof Literal) {
                    Literal lit = (Literal) subst;
                    buf.append(lit.getValue());
View Full Code Here

            return getExpressionValue((Subst) this.value, objectModel);
        else if (this.value instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) this.value;
            return copy.getValue();
        } else if (this.value instanceof SubstituteAttribute) {
            SubstituteAttribute substEvent = (SubstituteAttribute) this.value;
            if (substEvent.getSubstitutions().size() == 1
                    && substEvent.getSubstitutions().get(0) instanceof JXTExpression)
                return getExpressionValue((Subst) substEvent.getSubstitutions().get(0), objectModel);
            else
                return substEvent.getSubstitutions().toString(getLocation(), objectModel);

        } else {
            throw new Error("this shouldn't have happened");
        }
    }
View Full Code Here

        if (e instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) e;
            uri = copy.getValue();
        } else {
            StringBuffer buf = new StringBuffer();
            SubstituteAttribute substAttr = (SubstituteAttribute) e;
            Iterator i = substAttr.getSubstitutions().iterator();
            while (i.hasNext()) {
                Subst subst = (Subst) i.next();
                Object val;
                try {
                    val = subst.getValue(objectModel);
View Full Code Here

        if (e instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) e;
            uri = copy.getValue();
        } else {
            StringBuffer buf = new StringBuffer();
            SubstituteAttribute substAttr = (SubstituteAttribute) e;
            Iterator i = substAttr.getSubstitutions().iterator();
            while (i.hasNext()) {
                Subst subst = (Subst) i.next();
                if (subst instanceof Literal) {
                    Literal lit = (Literal) subst;
                    buf.append(lit.getValue());
View Full Code Here

            return getExpressionValue((JXTExpression) this.value, expressionContext);
        else if (this.value instanceof CopyAttribute) {
            CopyAttribute copy = (CopyAttribute) this.value;
            return copy.getValue();
        } else if (this.value instanceof SubstituteAttribute) {
            SubstituteAttribute substEvent = (SubstituteAttribute) this.value;
            if (substEvent.getSubstitutions().size() == 1
                    && substEvent.getSubstitutions().get(0) instanceof JXTExpression)
                return getExpressionValue((JXTExpression) substEvent.getSubstitutions().get(0), expressionContext);
            else
                return substEvent.getSubstitutions().toString(getLocation(), expressionContext);

        } else {
            throw new Error("this shouldn't have happened");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.template.script.event.SubstituteAttribute

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.