Codota Logo
SmooksContentHandler.getHandler
Code IndexAdd Codota to your IDE (free)

How to use
getHandler
method
in
org.milyn.delivery.SmooksContentHandler

Best Java code snippets using org.milyn.delivery.SmooksContentHandler.getHandler (Showing top 8 results out of 315)

  • Common ways to obtain SmooksContentHandler
private void myMethod () {
SmooksContentHandler s =
  • Codota IconExecutionContext executionContext;SmooksContentHandler.getHandler(executionContext)
  • Codota IconExecutionContext executionContext;(SmooksContentHandler) executionContext.getAttribute(DefaultHandler2.class)
  • Smart code suggestions by Codota
}
origin: smooks/smooks

public static void addDynamicVisitor(SAXVisitor visitor, ExecutionContext executionContext) {
  SmooksContentHandler contentHandler = SmooksContentHandler.getHandler(executionContext);
  SmooksContentHandler nestedContentHandler = contentHandler.getNestedContentHandler();
  if(nestedContentHandler == null) {
    DynamicSAXElementVisitorList list = getList(executionContext);
    if(visitor instanceof SAXVisitBefore) {
      list.visitBefores.add((SAXVisitBefore) visitor);
    }
    if(visitor instanceof SAXVisitChildren) {
      list.childVisitors.add((SAXVisitChildren) visitor);
    }
    if(visitor instanceof SAXVisitAfter) {
      list.visitAfters.add((SAXVisitAfter) visitor);
    }
  } else {
    addDynamicVisitor(visitor, nestedContentHandler.getExecutionContext());
  }
}
origin: org.milyn/milyn-smooks-all

public static void addDynamicVisitor(SAXVisitor visitor, ExecutionContext executionContext) {
  SmooksContentHandler contentHandler = SmooksContentHandler.getHandler(executionContext);
  SmooksContentHandler nestedContentHandler = contentHandler.getNestedContentHandler();
  if(nestedContentHandler == null) {
    DynamicSAXElementVisitorList list = getList(executionContext);
    if(visitor instanceof SAXVisitBefore) {
      list.visitBefores.add((SAXVisitBefore) visitor);
    }
    if(visitor instanceof SAXVisitChildren) {
      list.childVisitors.add((SAXVisitChildren) visitor);
    }
    if(visitor instanceof SAXVisitAfter) {
      list.visitAfters.add((SAXVisitAfter) visitor);
    }
  } else {
    addDynamicVisitor(visitor, nestedContentHandler.getExecutionContext());
  }
}
origin: org.milyn/milyn-smooks-core

public static void addDynamicVisitor(SAXVisitor visitor, ExecutionContext executionContext) {
  SmooksContentHandler contentHandler = SmooksContentHandler.getHandler(executionContext);
  SmooksContentHandler nestedContentHandler = contentHandler.getNestedContentHandler();
  if(nestedContentHandler == null) {
    DynamicSAXElementVisitorList list = getList(executionContext);
    if(visitor instanceof SAXVisitBefore) {
      list.visitBefores.add((SAXVisitBefore) visitor);
    }
    if(visitor instanceof SAXVisitChildren) {
      list.childVisitors.add((SAXVisitChildren) visitor);
    }
    if(visitor instanceof SAXVisitAfter) {
      list.visitAfters.add((SAXVisitAfter) visitor);
    }
  } else {
    addDynamicVisitor(visitor, nestedContentHandler.getExecutionContext());
  }
}
origin: org.virtuslab/milyn-smooks-core

public static void addDynamicVisitor(SAXVisitor visitor, ExecutionContext executionContext) {
  SmooksContentHandler contentHandler = SmooksContentHandler.getHandler(executionContext);
  SmooksContentHandler nestedContentHandler = contentHandler.getNestedContentHandler();
  if(nestedContentHandler == null) {
    DynamicSAXElementVisitorList list = getList(executionContext);
    if(visitor instanceof SAXVisitBefore) {
      list.visitBefores.add((SAXVisitBefore) visitor);
    }
    if(visitor instanceof SAXVisitChildren) {
      list.childVisitors.add((SAXVisitChildren) visitor);
    }
    if(visitor instanceof SAXVisitAfter) {
      list.visitAfters.add((SAXVisitAfter) visitor);
    }
  } else {
    addDynamicVisitor(visitor, nestedContentHandler.getExecutionContext());
  }
}
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: 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.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: 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.deliverySmooksContentHandlergetHandler

Popular methods of SmooksContentHandler

  • attachHandler
  • endElement
  • getExecutionContext
  • getNamespaceDeclarationStack
  • getNestedContentHandler
  • replay
  • resetNestedContentHandler
  • startDocument
  • startElement

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now