try {
// object-create rules are called at the beginning element-tags, in the same order as defined
// first create the wrapper
digester.addObjectCreate("*/plan/executablePlan/planWorkflow", NodeContentWrapper.class);
// then an element for workflowConf
digester.addRule("*/plan/executablePlan/planWorkflow/workflowConf", new NodeCreateRule());
// CallMethod and SetNext rules are called at closing element-tags, (last in - first out!)
CallMethodRule rr = new CallMethodRule(1, "setNodeContent", 2);
digester.addRule("*/plan/executablePlan/planWorkflow/workflowConf", rr);
// right below the wrapper is an instance of ExecutablePlanDefinition
digester.addCallParam("*/plan/executablePlan/planWorkflow/workflowConf", 0 , 1);
// provide the name of the setter method
digester.addObjectParam("*/plan/executablePlan/planWorkflow/workflowConf", 1, "setExecutablePlan");
// the generated node is not accessible as CallParam (why?!?), but available for addSetNext
digester.addSetNext("*/plan/executablePlan/planWorkflow/workflowConf", "setNode");
} catch (ParserConfigurationException e) {
PlatoLogger.getLogger(this.getClass()).error(e.getMessage(),e);
}
//
// Import EPrints executable plan if present
//
try {
digester.addObjectCreate("*/plan/executablePlan/eprintsPlan", NodeContentWrapper.class);
// then an element for workflowConf
digester.addRule("*/plan/executablePlan/eprintsPlan", new NodeCreateRule());
CallMethodRule rr2 = new CallMethodRule(1, "setNodeContentEPrintsPlan", 2);
digester.addRule("*/plan/executablePlan/eprintsPlan", rr2);
// right below the wrapper is an instance of ExecutablePlanDefinition
digester.addCallParam("*/plan/executablePlan/eprintsPlan", 0 , 1);