private Object restoreValue(String text, DataType dataType, ExtensibleXmlParser parser) throws SAXException { if (text == null || "".equals(text)) { return null; } if (dataType == null) { throw new SAXParseException( "Null datatype", parser.getLocator()); } return dataType.readValue(text); }
private Object restoreValue(String text, DataType dataType, ExtensibleXmlParser parser) throws SAXException { if (text == null || "".equals(text)) { return null; } if (dataType == null) { throw new SAXParseException( "Null datatype", parser.getLocator()); } return dataType.readValue(text); }
node.setMetaData("x", Integer.parseInt(x)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'x' attribute", parser.getLocator()); node.setMetaData("y", new Integer(y)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'y' attribute", parser.getLocator()); node.setMetaData("width", new Integer(width)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'width' attribute", parser.getLocator()); node.setMetaData("height", new Integer(height)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'height' attribute", parser.getLocator());
node.setMetaData("x", new Integer(x)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'x' attribute", parser.getLocator()); node.setMetaData("y", new Integer(y)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'y' attribute", parser.getLocator()); node.setMetaData("width", new Integer(width)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'width' attribute", parser.getLocator()); node.setMetaData("height", new Integer(height)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'height' attribute", parser.getLocator()); node.setMetaData("color", new Integer(color)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'color' attribute", parser.getLocator());
"Could not find datatype " + name, parser.getLocator()); } catch (InstantiationException e) { throw new SAXParseException( "Could not instantiate datatype " + name, parser.getLocator()); } catch (IllegalAccessException e) { throw new SAXParseException( "Could not access datatype " + name, parser.getLocator());
parser.getLocator() ); parser.getLocator() );
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException { parser.startElementBuilder( localName, attrs ); Mappable mappable = (Mappable) parser.getParent(); final String type = attrs.getValue("type"); emptyAttributeCheck(localName, "type", type, parser); final String fromName = attrs.getValue("from"); emptyAttributeCheck(localName, "from", fromName, parser); final String toName = attrs.getValue("to"); emptyAttributeCheck(localName, "to", toName, parser); if ("in".equals(type)) { mappable.addInMapping(toName, fromName); } else if ("out".equals(type)) { mappable.addOutMapping(fromName, toName); } else { throw new SAXParseException( "Unknown mapping type " + type, parser.getLocator()); } return null; }
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException { parser.startElementBuilder( localName, attrs ); ContextContainer contextContainer = (ContextContainer) parser.getParent(); final String name = attrs.getValue("name"); emptyAttributeCheck(localName, "name", name, parser); VariableScope variableScope = (VariableScope) contextContainer.getDefaultContext(VariableScope.VARIABLE_SCOPE); Variable variable = new Variable(); if (variableScope != null) { variable.setName(name); List<Variable> variables = variableScope.getVariables(); if (variables == null) { variables = new ArrayList<Variable>(); variableScope.setVariables(variables); } variables.add(variable); } else { throw new SAXParseException( "Could not find default variable scope.", parser.getLocator()); } return variable; }
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException { parser.startElementBuilder( localName, attrs ); WorkflowProcessImpl process = (WorkflowProcessImpl) parser.getParent(); final String name = attrs.getValue("name"); emptyAttributeCheck(localName, "name", name, parser); SwimlaneContext swimlaneContext = (SwimlaneContext) process.getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE); if (swimlaneContext != null) { Swimlane swimlane = new Swimlane(); swimlane.setName(name); swimlaneContext.addSwimlane(swimlane); } else { throw new SAXParseException( "Could not find default swimlane context.", parser.getLocator()); } return null; }
SAXParseException saxpe = new SAXParseException( message, parser.getLocator() ); parser.warning(saxpe);
throw new SAXParseException("Unknown exception handler type " + type, parser.getLocator());
private Object restoreValue(String text, DataType dataType, ExtensibleXmlParser parser) throws SAXException { if (text == null || "".equals(text)) { return null; } if (dataType == null) { throw new SAXParseException( "Null datatype", parser.getLocator()); } return dataType.readValue(text); }
private Object restoreValue(String text, DataType dataType, ExtensibleXmlParser parser) throws SAXException { if (text == null || "".equals(text)) { return null; } if (dataType == null) { throw new SAXParseException( "Null datatype", parser.getLocator()); } return dataType.readValue(text); }
node.setMetaData("x", Integer.parseInt(x)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'x' attribute", parser.getLocator()); node.setMetaData("y", new Integer(y)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'y' attribute", parser.getLocator()); node.setMetaData("width", new Integer(width)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'width' attribute", parser.getLocator()); node.setMetaData("height", new Integer(height)); } catch (NumberFormatException exc) { throw new SAXParseException("<" + localName + "> requires an Integer 'height' attribute", parser.getLocator());
"Could not find datatype " + name, parser.getLocator()); } catch (InstantiationException e) { throw new SAXParseException( "Could not instantiate datatype " + name, parser.getLocator()); } catch (IllegalAccessException e) { throw new SAXParseException( "Could not access datatype " + name, parser.getLocator());
parser.getLocator() ); parser.getLocator() );
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException { parser.startElementBuilder( localName, attrs ); Mappable mappable = (Mappable) parser.getParent(); final String type = attrs.getValue("type"); emptyAttributeCheck(localName, "type", type, parser); final String fromName = attrs.getValue("from"); emptyAttributeCheck(localName, "from", fromName, parser); final String toName = attrs.getValue("to"); emptyAttributeCheck(localName, "to", toName, parser); if ("in".equals(type)) { mappable.addInMapping(toName, fromName); } else if ("out".equals(type)) { mappable.addOutMapping(fromName, toName); } else { throw new SAXParseException( "Unknown mapping type " + type, parser.getLocator()); } return null; }
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException { parser.startElementBuilder( localName, attrs ); ContextContainer contextContainer = (ContextContainer) parser.getParent(); final String name = attrs.getValue("name"); emptyAttributeCheck(localName, "name", name, parser); VariableScope variableScope = (VariableScope) contextContainer.getDefaultContext(VariableScope.VARIABLE_SCOPE); Variable variable = new Variable(); if (variableScope != null) { variable.setName(name); List<Variable> variables = variableScope.getVariables(); if (variables == null) { variables = new ArrayList<Variable>(); variableScope.setVariables(variables); } variables.add(variable); } else { throw new SAXParseException( "Could not find default variable scope.", parser.getLocator()); } return variable; }
public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException { parser.startElementBuilder( localName, attrs ); WorkflowProcessImpl process = (WorkflowProcessImpl) parser.getParent(); final String name = attrs.getValue("name"); emptyAttributeCheck(localName, "name", name, parser); SwimlaneContext swimlaneContext = (SwimlaneContext) process.getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE); if (swimlaneContext != null) { Swimlane swimlane = new Swimlane(); swimlane.setName(name); swimlaneContext.addSwimlane(swimlane); } else { throw new SAXParseException( "Could not find default swimlane context.", parser.getLocator()); } return null; }
throw new SAXParseException("Unknown exception handler type " + type, parser.getLocator());