@Override protected void enterCollect(final Node node) { final Map<String, String> attributes = resolvedAttributeMap(node); // flushWith should not be passed to the headPipe object via a // setter (see newInstance): attributes.remove(AttributeName.FLUSH_WITH.getString()); if (!getCollectFactory().containsKey(node.getLocalName())) { throw new MorphBuildException("Collector " + node.getLocalName() + NOT_FOUND); } final Collect collect; if (ENTITY.equals(node.getLocalName())) { collect = getCollectFactory().newInstance(node.getLocalName(), attributes, metamorph); } else { collect = getCollectFactory().newInstance(node.getLocalName(), attributes); } collect.setSourceLocation(getSourceLocation(node)); stack.push(new StackFrame(collect)); }
collector.setWaitForFlush(true); registerFlush(flushWith, collector);