예제 #1
0
  public Object end(final String uri, final String localName, final ExtensibleXmlParser parser)
      throws SAXException {
    final Element element = parser.endElementBuilder();

    final FromDescr fromDescr = (FromDescr) parser.getCurrent();

    Object parent = parser.getParent();

    final PatternDescr patternDescr = (PatternDescr) parent;

    final ConditionalElementDescr parentDescr = (ConditionalElementDescr) parser.getParent(1);

    if (element.getElementsByTagName("expression").getLength() > 0) {
      patternDescr.setSource(fromDescr);
    }

    return fromDescr;
  }
예제 #2
0
  public Object end(final String uri, final String localName, final ExtensibleXmlParser parser)
      throws SAXException {

    final Element element = parser.endElementBuilder();
    final AccumulateDescr accumulateDescr = (AccumulateDescr) parser.getCurrent();

    final Object parent = parser.getParent();

    if (parent.getClass().getName().equals(FromDescr.class.getName())) {
      final PatternDescr result = (PatternDescr) parser.getParent(1);
      result.setSource(accumulateDescr);

    } else if (parent instanceof ConditionalElementDescr) {
      final ConditionalElementDescr parentDescr = (ConditionalElementDescr) parent;
      parentDescr.addDescr(accumulateDescr);
    }

    return accumulateDescr;
  }