Tabnine Logo
NestedExecutionVisitor
Code IndexAdd Tabnine to your IDE (free)

How to use
NestedExecutionVisitor
in
org.milyn.delivery.nested

Best Java code snippets using org.milyn.delivery.nested.NestedExecutionVisitor (Showing top 4 results out of 315)

origin: org.milyn/milyn-smooks-core

public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException {
  Smooks smooks = getSmooksInstance();
  ExecutionContext nestedExecutionContext = smooks.createExecutionContext();
  // In case there's an attached event listener...
  nestedExecutionContext.setEventListener(executionContext.getEventListener());
  // Copy over the XMLReader stack...
  AbstractParser.setReaders(AbstractParser.getReaders(executionContext), nestedExecutionContext);
  // Attach the NamespaceDeclarationStack to the nested execution context...
  NamespaceDeclarationStack nsStack = NamespaceMappings.getNamespaceDeclarationStack(executionContext);
  NamespaceMappings.setNamespaceDeclarationStack(nsStack, nestedExecutionContext);
  SmooksContentHandler parentContentHandler = SmooksContentHandler.getHandler(executionContext);
  if(parentContentHandler.getNestedContentHandler() != null) {
    throw new SmooksException("Illegal use of more than one nested content handler fired on the same element.");
  }
  SmooksContentHandler nestedContentHandler = new SAXHandler(nestedExecutionContext, element.getWriter(this), parentContentHandler);
  DynamicSAXElementVisitorList.propogateDynamicVisitors(executionContext, nestedExecutionContext);
  // Attach the XMLReader instance to the nested ExecutionContext and then swap the content handler on
  // the XMLReader to be the nested handler created here.  All events wll be forwarded to the ..
  XMLReader xmlReader = AbstractParser.getXMLReader(executionContext);
  AbstractParser.attachXMLReader(xmlReader, nestedExecutionContext);
  xmlReader.setContentHandler(nestedContentHandler);
  executionContext.setAttribute(NestedExecutionVisitor.class, nestedExecutionContext);
  // Note we do not execute the Smooks filterSource methods for a nested instance... we just install
  // the content handler and redirect the reader events to it...
}
origin: org.milyn/milyn-smooks-all

public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException {
  Smooks smooks = getSmooksInstance();
  ExecutionContext nestedExecutionContext = smooks.createExecutionContext();
  // In case there's an attached event listener...
  nestedExecutionContext.setEventListener(executionContext.getEventListener());
  // Copy over the XMLReader stack...
  AbstractParser.setReaders(AbstractParser.getReaders(executionContext), nestedExecutionContext);
  // Attach the NamespaceDeclarationStack to the nested execution context...
  NamespaceDeclarationStack nsStack = NamespaceMappings.getNamespaceDeclarationStack(executionContext);
  NamespaceMappings.setNamespaceDeclarationStack(nsStack, nestedExecutionContext);
  SmooksContentHandler parentContentHandler = SmooksContentHandler.getHandler(executionContext);
  if(parentContentHandler.getNestedContentHandler() != null) {
    throw new SmooksException("Illegal use of more than one nested content handler fired on the same element.");
  }
  SmooksContentHandler nestedContentHandler = new SAXHandler(nestedExecutionContext, element.getWriter(this), parentContentHandler);
  DynamicSAXElementVisitorList.propogateDynamicVisitors(executionContext, nestedExecutionContext);
  // Attach the XMLReader instance to the nested ExecutionContext and then swap the content handler on
  // the XMLReader to be the nested handler created here.  All events wll be forwarded to the ..
  XMLReader xmlReader = AbstractParser.getXMLReader(executionContext);
  AbstractParser.attachXMLReader(xmlReader, nestedExecutionContext);
  xmlReader.setContentHandler(nestedContentHandler);
  executionContext.setAttribute(NestedExecutionVisitor.class, nestedExecutionContext);
  // Note we do not execute the Smooks filterSource methods for a nested instance... we just install
  // the content handler and redirect the reader events to it...
}
origin: smooks/smooks

public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException {
  Smooks smooks = getSmooksInstance();
  ExecutionContext nestedExecutionContext = smooks.createExecutionContext();
  // In case there's an attached event listener...
  nestedExecutionContext.setEventListener(executionContext.getEventListener());
  // Copy over the XMLReader stack...
  AbstractParser.setReaders(AbstractParser.getReaders(executionContext), nestedExecutionContext);
  // Attach the NamespaceDeclarationStack to the nested execution context...
  NamespaceDeclarationStack nsStack = NamespaceMappings.getNamespaceDeclarationStack(executionContext);
  NamespaceMappings.setNamespaceDeclarationStack(nsStack, nestedExecutionContext);
  SmooksContentHandler parentContentHandler = SmooksContentHandler.getHandler(executionContext);
  if(parentContentHandler.getNestedContentHandler() != null) {
    throw new SmooksException("Illegal use of more than one nested content handler fired on the same element.");
  }
  SmooksContentHandler nestedContentHandler = new SAXHandler(nestedExecutionContext, element.getWriter(this), parentContentHandler);
  DynamicSAXElementVisitorList.propogateDynamicVisitors(executionContext, nestedExecutionContext);
  // Attach the XMLReader instance to the nested ExecutionContext and then swap the content handler on
  // the XMLReader to be the nested handler created here.  All events wll be forwarded to the ..
  XMLReader xmlReader = AbstractParser.getXMLReader(executionContext);
  AbstractParser.attachXMLReader(xmlReader, nestedExecutionContext);
  xmlReader.setContentHandler(nestedContentHandler);
  executionContext.setAttribute(NestedExecutionVisitor.class, nestedExecutionContext);
  // Note we do not execute the Smooks filterSource methods for a nested instance... we just install
  // the content handler and redirect the reader events to it...
}
origin: org.virtuslab/milyn-smooks-core

public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException {
  Smooks smooks = getSmooksInstance();
  ExecutionContext nestedExecutionContext = smooks.createExecutionContext();
  // In case there's an attached event listener...
  nestedExecutionContext.setEventListener(executionContext.getEventListener());
  // Copy over the XMLReader stack...
  AbstractParser.setReaders(AbstractParser.getReaders(executionContext), nestedExecutionContext);
  // Attach the NamespaceDeclarationStack to the nested execution context...
  NamespaceDeclarationStack nsStack = NamespaceMappings.getNamespaceDeclarationStack(executionContext);
  NamespaceMappings.setNamespaceDeclarationStack(nsStack, nestedExecutionContext);
  SmooksContentHandler parentContentHandler = SmooksContentHandler.getHandler(executionContext);
  if(parentContentHandler.getNestedContentHandler() != null) {
    throw new SmooksException("Illegal use of more than one nested content handler fired on the same element.");
  }
  SmooksContentHandler nestedContentHandler = new SAXHandler(nestedExecutionContext, element.getWriter(this), parentContentHandler);
  DynamicSAXElementVisitorList.propogateDynamicVisitors(executionContext, nestedExecutionContext);
  // Attach the XMLReader instance to the nested ExecutionContext and then swap the content handler on
  // the XMLReader to be the nested handler created here.  All events wll be forwarded to the ..
  XMLReader xmlReader = AbstractParser.getXMLReader(executionContext);
  AbstractParser.attachXMLReader(xmlReader, nestedExecutionContext);
  xmlReader.setContentHandler(nestedContentHandler);
  executionContext.setAttribute(NestedExecutionVisitor.class, nestedExecutionContext);
  // Note we do not execute the Smooks filterSource methods for a nested instance... we just install
  // the content handler and redirect the reader events to it...
}
org.milyn.delivery.nestedNestedExecutionVisitor

Javadoc

Nested Smooks execution visitor.

Most used methods

  • getSmooksInstance

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • getContentResolver (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now