Package freemarker.template

Examples of freemarker.template.TemplateBooleanModel


     * @param configuration
     * @return
     */
    @Override
    public TemplateBooleanModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
        return new TemplateBooleanModel() {
            @Override
            public boolean getAsBoolean() throws TemplateModelException {
                return delegate.transform(nodeRDFBackend,node, configuration);
            }
        };
View Full Code Here


            while (hasNext) {
              clear();
                loopVar = it.next();
                hasNext = it.hasNext();
                put(iteratorBlock.getIndexName(), loopVar);
                TemplateBooleanModel hasNextModel = hasNext ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE;
                put(iteratorBlock.getIndexName() + "_has_next", hasNextModel);
                put(iteratorBlock.getIndexName() + "_index", new SimpleNumber(index));
                TemplateElement nestedBlock = iteratorBlock.getNestedBlock();
                if (nestedBlock != null) {
                    env.render(nestedBlock);
                }
                index++;
            }
        }
        else if (list instanceof TemplateSequenceModel) {
            TemplateSequenceModel tsm = (TemplateSequenceModel) list;
            int size = tsm.size();
            for (index =0; index <size; index++) {
              clear();
                loopVar = tsm.get(index);
                put(iteratorBlock.getIndexName(), loopVar);
                hasNext = (size > index + 1);
                TemplateBooleanModel hasNextModel = (size > index +1) ?  TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE;
                put(iteratorBlock.getIndexName() + "_has_next", hasNextModel);
                put(iteratorBlock.getIndexName() + "_index", new SimpleNumber(index));
                TemplateElement nestedBlock = iteratorBlock.getNestedBlock();
                if (nestedBlock != null) {
                    env.render(nestedBlock);
View Full Code Here

     * @param node
     * @return
     */
    @Override
    public TemplateBooleanModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node) throws IllegalArgumentException {
        return new TemplateBooleanModel() {
            @Override
            public boolean getAsBoolean() throws TemplateModelException {
                return delegate.transform(nodeRDFBackend,node);
            }
        };
View Full Code Here

     * @param node
     * @return
     */
    @Override
    public TemplateBooleanModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node) throws IllegalArgumentException {
        return new TemplateBooleanModel() {
            @Override
            public boolean getAsBoolean() throws TemplateModelException {
                return delegate.transform(nodeRDFBackend,node);
            }
        };
View Full Code Here

     * @param configuration
     * @return
     */
    @Override
    public TemplateBooleanModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
        return new TemplateBooleanModel() {
            @Override
            public boolean getAsBoolean() throws TemplateModelException {
                return delegate.transform(nodeRDFBackend,node, configuration);
            }
        };
View Full Code Here

TOP

Related Classes of freemarker.template.TemplateBooleanModel

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.