示例#1
0
  @SuppressWarnings("unchecked")
  public Object start(
      final String uri,
      final String localName,
      final Attributes attrs,
      final ExtensibleXmlParser parser)
      throws SAXException {
    parser.startElementBuilder(localName, attrs);

    String id = attrs.getValue("id");
    String name = attrs.getValue("name");
    String implRef = attrs.getValue("implementationRef");

    ProcessBuildData buildData = (ProcessBuildData) parser.getData();
    List<Interface> interfaces = (List<Interface>) buildData.getMetaData("Interfaces");
    if (interfaces == null) {
      interfaces = new ArrayList<Interface>();
      buildData.setMetaData("Interfaces", interfaces);
    }
    Interface i = new Interface(id, name);
    if (implRef != null) {
      i.setImplementationRef(implRef);
    }
    interfaces.add(i);
    return i;
  }
示例#2
0
  public Object start(
      final String uri,
      final String localName,
      final Attributes attrs,
      final ExtensibleXmlParser xmlPackageReader)
      throws SAXException {
    xmlPackageReader.startElementBuilder(localName, attrs);

    WorkflowProcessImpl process = (WorkflowProcessImpl) xmlPackageReader.getParent();

    ActionNode actionNode = new ActionNode();

    final String name = attrs.getValue("name");
    emptyAttributeCheck(localName, "name", name, xmlPackageReader);
    actionNode.setName(name);

    final String id = attrs.getValue("id");
    emptyAttributeCheck(localName, "id", name, xmlPackageReader);
    actionNode.setId(new Long(id));

    process.addNode(actionNode);
    ((ProcessBuildData) xmlPackageReader.getData()).addNode(actionNode);

    return actionNode;
  }
示例#3
0
 public Object start(
     final String uri,
     final String localName,
     final Attributes attrs,
     final ExtensibleXmlParser parser)
     throws SAXException {
   parser.startElementBuilder(localName, attrs);
   return null;
 }
示例#4
0
 public Object start(
     final String uri,
     final String localName,
     final Attributes attrs,
     final ExtensibleXmlParser parser)
     throws SAXException {
   parser.startElementBuilder(localName, attrs);
   final FromDescr fromDesctiptor = new FromDescr();
   return fromDesctiptor;
 }
示例#5
0
  public Object start(
      final String uri,
      final String localName,
      final Attributes attrs,
      final ExtensibleXmlParser parser)
      throws SAXException {

    parser.startElementBuilder(localName, attrs);
    final AccumulateDescr accumulateDesrc = new AccumulateDescr();
    return accumulateDesrc;
  }
示例#6
0
 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;
 }