dataModel.put("bigDecimal2", new SimpleNumber(java.math.BigDecimal.valueOf(1, 16)));
}
else if (testName.equals("default-xmlns")) {
InputSource is = new InputSource(getClass().getResourceAsStream("test-defaultxmlns1.xml"));
NodeModel nm = NodeModel.parse(is);
dataModel.put("doc", nm);
}
else if (testName.equals("multimodels")) {
dataModel.put("test", "selftest");
dataModel.put("self", "self");
dataModel.put("zero", new Integer(0));
dataModel.put("data", new MultiModel1());
}
else if (testName.equals("nodelistmodel")) {
org.jdom.Document doc = new SAXBuilder().build(new InputSource(getClass().getResourceAsStream("test-xml.xml")));
dataModel.put("doc", new NodeListModel(doc));
}
else if (testName.equals("test-stringbimethods")) {
dataModel.put("multi", new TestBoolean());
}
else if (testName.equals("type-builtins")) {
dataModel.put("testmethod", new TestMethod());
dataModel.put("testnode", new TestNode());
dataModel.put("testcollection", new SimpleCollection(new ArrayList()));
}
else if (testName.equals("var-layers")) {
dataModel.put("x", new Integer(4));
dataModel.put("z", new Integer(4));
conf.setSharedVariable("y", new Integer(7));
}
else if (testName.equals("xml-fragment")) {
DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
f.setNamespaceAware(true);
DocumentBuilder db = f.newDocumentBuilder();
org.w3c.dom.Document doc = db.parse(new InputSource(getClass().getResourceAsStream("test-xmlfragment.xml")));
dataModel.put("node", NodeModel.wrap(doc.getDocumentElement().getFirstChild().getFirstChild()));
}
else if (testName.equals("xmlns1")) {
InputSource is = new InputSource(getClass().getResourceAsStream("test-xmlns.xml"));
NodeModel nm = NodeModel.parse(is);
dataModel.put("doc", nm);
}
else if (testName.equals("xmlns2")) {
InputSource is = new InputSource(getClass().getResourceAsStream("test-xmlns2.xml"));
NodeModel nm = NodeModel.parse(is);
dataModel.put("doc", nm);
}
else if (testName.equals("xmlns3") || testName.equals("xmlns4")) {
InputSource is = new InputSource(getClass().getResourceAsStream("test-xmlns3.xml"));
NodeModel nm = NodeModel.parse(is);
dataModel.put("doc", nm);
}
else if (testName.equals("xmlns5")) {
InputSource is = new InputSource(getClass().getResourceAsStream("test-defaultxmlns1.xml"));
NodeModel nm = NodeModel.parse(is);
dataModel.put("doc", nm);
}
else if (testName.startsWith("sequence-builtins-with-")) {
Set abcSet = new TreeSet();