Examples of ConditionNode


Examples of org.apache.uima.ruta.explain.tree.ConditionNode

    } else if (element instanceof RuleElementMatchesNode) {
      RuleElementMatchesNode rems = (RuleElementMatchesNode) element;
      boolean matched = rems.matched();
      return owner.getImage(ExplainConstants.RULE_ELEMENT_MATCHES_TYPE + matched);
    } else if (element instanceof ConditionNode) {
      ConditionNode rems = (ConditionNode) element;
      boolean matched = rems.matched();
      return owner.getImage(ExplainConstants.EVAL_CONDITION_TYPE + matched);
    }
    return owner.getImage("element");
  }
View Full Code Here

Examples of org.apache.uima.ruta.explain.tree.ConditionNode

    } else if (element instanceof RuleElementMatchesNode) {
      RuleElementMatchesNode rems = (RuleElementMatchesNode) element;
      boolean matched = rems.matched();
      return owner.getImage(ExplainConstants.RULE_ELEMENT_MATCHES_TYPE + matched);
    } else if (element instanceof ConditionNode) {
      ConditionNode rems = (ConditionNode) element;
      boolean matched = rems.matched();
      return owner.getImage(ExplainConstants.EVAL_CONDITION_TYPE + matched);
    }
    return owner.getImage("element");
  }
View Full Code Here

Examples of org.pirkaengine.core.template.ConditionNode

    @Before
    public void setup() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("text");
        target = new ConditionNode(new StartTagNode("<p>", "prk:if", "display"), new EndTagNode("</p>"), nodes);
    }
View Full Code Here

Examples of org.pirkaengine.core.template.ConditionNode

    @Test(expected = IllegalArgumentException.class)
    public void test_constructor() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("text");
        new ConditionNode(null, new EndTagNode("</p>"), nodes);
    }
View Full Code Here

Examples of org.pirkaengine.core.template.ConditionNode

    @Test(expected = IllegalArgumentException.class)
    public void test_constructor2() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("text");
        new ConditionNode(new StartTagNode("<p>", "prk:if", "display"), null, nodes);
    }
View Full Code Here

Examples of org.pirkaengine.core.template.ConditionNode

        new ConditionNode(new StartTagNode("<p>", "prk:if", "display"), null, nodes);
    }

    @Test(expected = IllegalArgumentException.class)
    public void test_constructor3() {
        new ConditionNode(new StartTagNode("<p>", "prk:if", "display"), new EndTagNode("</p>"), null);
    }
View Full Code Here

Examples of org.pirkaengine.core.template.ConditionNode

    @Test
    public void createViewModel_condition() {
        XhtmlTemplate template = new XhtmlTemplate("test");
        StartTagNode start = new StartTagNode("div", "prk:if", "cond");
        EndTagNode end = new EndTagNode("div");
        template.stack(new ConditionNode(start, end, new Node[] {}));
        Map<String, Object> expected = new HashMap<String, Object>();
        expected.put("cond", XhtmlTemplate.NULL_VALUE);
        Assert.assertEquals(expected, template.createViewModel());
    }
View Full Code Here

Examples of org.pirkaengine.core.template.ConditionNode

    public void createViewModel_condition_with_expression() {
        XhtmlTemplate template = new XhtmlTemplate("test");
        StartTagNode start = new StartTagNode("div", "prk:if", "cond");
        EndTagNode end = new EndTagNode("div");
        ExpressionNode node = new ExpressionNode("name");
        template.stack(new ConditionNode(start, end, new Node[] { node }));
        Map<String, Object> expected = new HashMap<String, Object>();
        expected.put("cond", XhtmlTemplate.NULL_VALUE);
        expected.put("name", XhtmlTemplate.NULL_VALUE);
        Assert.assertEquals(expected, template.createViewModel());
    }
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.