@Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Node attr = node.getAttribute("method"); if (null != attr) { attr.setValue(MethodType.get((String)attr.getValue())); } return super.parse(instance, node, value); } }
/** * Fix the node object to store a parsed list of viewParams instead of a raw string. This * prevents the parse() method choking later on... */ public static void fixNodeObject(Node node) throws Exception { List viewParams = null; if (node.hasAttribute("viewParams")) { Node viewParamsAttribute = node.getAttribute("viewParams"); viewParams = (List) wfsSqlViewKvpParser.parse((String) viewParamsAttribute.getValue()); EList viewParamsList = new org.eclipse.emf.common.util.BasicEList(); viewParamsList.addAll(viewParams); viewParamsAttribute.setValue(viewParamsList); } }