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

How to use
SAXToXMLWriter
in
org.milyn.delivery.sax

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

origin: smooks/smooks

/**
 * Write the element text to any {@link StreamResult} instance that may have been supplied to the
 * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} 
 * method.
 * <p/>
 * <a href="#writing-text">See about writing text</a>.
 * 
 * @param element The element.
 * @throws IOException Exception writing.
 */
public void writeText(SAXElement element) throws IOException {
  writeText(element, element.getWriter(owner));
}    
origin: org.virtuslab/milyn-smooks-core

private static <U> void processStreamResultWriterAnnotations(U instance, SmooksResourceConfiguration config) {
  if(!(instance instanceof SAXVisitor)) {
    return;
  }
  
  List<Field> streamResFields = ClassUtil.getAnnotatedFields(instance.getClass(), StreamResultWriter.class);
  boolean encodeSpecialCharacters = config.getBoolParameter(Filter.ENTITIES_REWRITE, true);
  
  for(Field streamResField : streamResFields) {
    // If already initialized, ignore...
    try {
      if(ClassUtil.getField(streamResField, instance) != null) {
        continue;
      }
    } catch (IllegalAccessException e) {
      throw new SmooksConfigurationException("Unable to get property field value for '" + getLongMemberName(streamResField) + "'.", e);
    }
    
    Class<?> type = streamResField.getType();
    if(type == SAXToXMLWriter.class) {
      SAXToXMLWriter xmlWriter = new SAXToXMLWriter((SAXVisitor) instance, encodeSpecialCharacters);
      try {
        ClassUtil.setField(streamResField, instance, xmlWriter);
      } catch (IllegalAccessException e) {
        throw new SmooksConfigurationException("Unable to inject SAXToXMLWriter property field value for '" + getLongMemberName(streamResField) + "'.", e);
      }                
    }
  }
}
origin: smooks/smooks

private static <U> void processStreamResultWriterAnnotations(U instance, SmooksResourceConfiguration config) {
  if(!(instance instanceof SAXVisitor)) {
    return;
  }
  
  List<Field> streamResFields = ClassUtil.getAnnotatedFields(instance.getClass(), StreamResultWriter.class);
  boolean encodeSpecialCharacters = config.getBoolParameter(Filter.ENTITIES_REWRITE, true);
  
  for(Field streamResField : streamResFields) {
    // If already initialized, ignore...
    try {
      if(ClassUtil.getField(streamResField, instance) != null) {
        continue;
      }
    } catch (IllegalAccessException e) {
      throw new SmooksConfigurationException("Unable to get property field value for '" + getLongMemberName(streamResField) + "'.", e);
    }
    
    Class<?> type = streamResField.getType();
    if(type == SAXToXMLWriter.class) {
      SAXToXMLWriter xmlWriter = new SAXToXMLWriter((SAXVisitor) instance, encodeSpecialCharacters);
      try {
        ClassUtil.setField(streamResField, instance, xmlWriter);
      } catch (IllegalAccessException e) {
        throw new SmooksConfigurationException("Unable to inject SAXToXMLWriter property field value for '" + getLongMemberName(streamResField) + "'.", e);
      }                
    }
  }
}
origin: org.milyn/milyn-smooks-all

/**
 * Write the element text to any {@link StreamResult} instance that may have been supplied to the
 * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} 
 * method.
 * <p/>
 * <a href="#writing-text">See about writing text</a>.
 * 
 * @param element The element.
 * @throws IOException Exception writing.
 */
public void writeText(SAXElement element) throws IOException {
  writeText(element, element.getWriter(owner));
}    
origin: org.milyn/milyn-smooks-core

private static <U> void processStreamResultWriterAnnotations(U instance, SmooksResourceConfiguration config) {
  if(!(instance instanceof SAXVisitor)) {
    return;
  }
  
  List<Field> streamResFields = ClassUtil.getAnnotatedFields(instance.getClass(), StreamResultWriter.class);
  boolean encodeSpecialCharacters = config.getBoolParameter(Filter.ENTITIES_REWRITE, true);
  
  for(Field streamResField : streamResFields) {
    // If already initialized, ignore...
    try {
      if(ClassUtil.getField(streamResField, instance) != null) {
        continue;
      }
    } catch (IllegalAccessException e) {
      throw new SmooksConfigurationException("Unable to get property field value for '" + getLongMemberName(streamResField) + "'.", e);
    }
    
    Class<?> type = streamResField.getType();
    if(type == SAXToXMLWriter.class) {
      SAXToXMLWriter xmlWriter = new SAXToXMLWriter((SAXVisitor) instance, encodeSpecialCharacters);
      try {
        ClassUtil.setField(streamResField, instance, xmlWriter);
      } catch (IllegalAccessException e) {
        throw new SmooksConfigurationException("Unable to inject SAXToXMLWriter property field value for '" + getLongMemberName(streamResField) + "'.", e);
      }                
    }
  }
}
origin: org.milyn/milyn-smooks-core

/**
 * Write the element text to any {@link StreamResult} instance that may have been supplied to the
 * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} 
 * method.
 * <p/>
 * <a href="#writing-text">See about writing text</a>.
 * 
 * @param element The element.
 * @throws IOException Exception writing.
 */
public void writeText(SAXElement element) throws IOException {
  writeText(element, element.getWriter(owner));
}    
origin: org.milyn/milyn-smooks-all

private static <U> void processStreamResultWriterAnnotations(U instance, SmooksResourceConfiguration config) {
  if(!(instance instanceof SAXVisitor)) {
    return;
  }
  
  List<Field> streamResFields = ClassUtil.getAnnotatedFields(instance.getClass(), StreamResultWriter.class);
  boolean encodeSpecialCharacters = config.getBoolParameter(Filter.ENTITIES_REWRITE, true);
  
  for(Field streamResField : streamResFields) {
    // If already initialized, ignore...
    try {
      if(ClassUtil.getField(streamResField, instance) != null) {
        continue;
      }
    } catch (IllegalAccessException e) {
      throw new SmooksConfigurationException("Unable to get property field value for '" + getLongMemberName(streamResField) + "'.", e);
    }
    
    Class<?> type = streamResField.getType();
    if(type == SAXToXMLWriter.class) {
      SAXToXMLWriter xmlWriter = new SAXToXMLWriter((SAXVisitor) instance, encodeSpecialCharacters);
      try {
        ClassUtil.setField(streamResField, instance, xmlWriter);
      } catch (IllegalAccessException e) {
        throw new SmooksConfigurationException("Unable to inject SAXToXMLWriter property field value for '" + getLongMemberName(streamResField) + "'.", e);
      }                
    }
  }
}
origin: org.virtuslab/milyn-smooks-core

public void writeText(SAXElement element) throws IOException {
  writeText(element, element.getWriter(owner));
}    
org.milyn.delivery.saxSAXToXMLWriter

Javadoc

SAXElement to XML writer class.

This class encapsulates the writing of SAXElement content as XML. It allows writing of start, end and text parts of an element to a supplied Writer, or to the Writer associated with any StreamResult that may have been supplied in one of the Smooks#filterSource(javax.xml.transform.Source,javax.xml.transform.Result) method.

If you want to write text events with any of the writeText methods, you need to annotate the SAXVisitor instance provided in the #SAXToXMLWriter(SAXVisitor,boolean) with the TextConsumerAnnotation.

Most used methods

  • <init>
    Public constructor.
  • writeText
    Write the text event content to any StreamResult instance that may have been supplied to the Smooks#

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Reference (javax.naming)
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Join (org.hibernate.mapping)
  • Top 25 Plugins for Webstorm
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