Examples of IncludeAttributes


Examples of com.volantis.mcs.papi.IncludeAttributes

    // Javadoc inherited.
    protected int exprElementEnd(
            MarinerRequestContext context,
            PAPIAttributes papiAttributes)
            throws PAPIException {
        IncludeAttributes attributes = (IncludeAttributes) papiAttributes;

        if (attributes.getHref() == null) {
            throw new PAPIException(
                    exceptionLocalizer.format("include-href-missing"));
        } else {
            // @todo this is a bit duff since it relies on markup naming not to change; do this a different way
            // Set up the markup that will be sent down the pipeline
            StringBuffer markup = new StringBuffer();
            InputSource inputSource;

            markup.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
            markup.append("<urid:fetch xmlns:urid=\"").
                    append(Namespace.URID.getURI()).append("\" href=\"").
                    append(attributes.getHref()).
                    append("\"");

            if (attributes.getParse() != null) {
                markup.append(" parse=\"").
                        append(attributes.getParse()).
                        append("\"");
            }

            if (attributes.getEncoding() != null) {
                markup.append(" encoding=\"").
                        append(attributes.getEncoding()).
                        append("\"");
            }

            markup.append("/>");
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.