Package org.openiaml.model.drools.export

Examples of org.openiaml.model.drools.export.ExportDroolsJavaXml


    assertNotNull(root);
    assertEquals( "123", root.getAttribute("attr") );

    // test parsing some simple text
    new ExportDroolsJavaXml().parseJava(d, root, "insert(rw);");

    Element statement = xpathFirst(root, "statement");
    assertEquals(0, statement.getAttributes().getLength());

    Element method = xpathFirst(statement, "method");
View Full Code Here


    assertNotNull(root);
    assertEquals( "123", root.getAttribute("attr") );

    // test parsing some simple code
    new ExportDroolsJavaXml().parseJava(d, root, "// a comment\nRunInstanceWire rw = handler.generatedRunInstanceWire(sw, sw, event, operation);    rw.setName(\"run\");    insert(rw); insert(\"a complicated string. with full stops. and line breaks;\");");

    IterableElementList statements = xpath(root, "statement");
    assertEquals(4, statements.getLength());

    // first statement
View Full Code Here

    }

  }

  public void testDumpXml() throws Exception {
    ExportDroolsJavaXml dump = new ExportDroolsJavaXml();
    Map<String,Document> results = dump.getRuleXmlDocuments();

    for (String f : results.keySet()) {

      String name = f.substring(f.lastIndexOf("/"));
      IFile out = getProject().getFile(name + ".xml");
View Full Code Here

        originalNode.getParentNode().appendChild(t);
        Text t2 = document.createTextNode(sourceCode);
        t.appendChild(t2);

        // lets create the statements here
        new ExportDroolsJavaXml().parseJava(document, originalNode.getParentNode(), sourceCode);

        // find the rule node
        Element ruleNode = (Element) rhs.getParentNode();
        assertEquals(ruleNode.getNodeName(), "rule");
View Full Code Here

TOP

Related Classes of org.openiaml.model.drools.export.ExportDroolsJavaXml

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.