use of org.mycore.frontend.xeditor.MCRBinding in project mycore by MyCoRe-Org.
the class MCRSwapInsertTarget method handle.
public void handle(String swapParameter, MCRBinding root) throws JaxenException, JDOMException {
String[] tokens = swapParameter.split("\\|");
String parentXPath = tokens[0];
String posString = tokens[1];
int pos = Integer.parseInt(posString);
String method = tokens[2];
String elementNameWithPredicates = swapParameter.substring(parentXPath.length() + posString.length() + method.length() + 3);
MCRBinding parentBinding = new MCRBinding(parentXPath, false, root);
MCRRepeatBinding repeatBinding = new MCRRepeatBinding(elementNameWithPredicates, parentBinding, method);
handle(pos, repeatBinding);
repeatBinding.detach();
parentBinding.detach();
}
Aggregations