Class CsvXmlTransformImpl

java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.csv.transform.CsvXmlTransformImpl
All Implemented Interfaces:
AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, ConfigComment, MessageEventGenerator, Service, StateManagedComponent
Direct Known Subclasses:
CsvToXmlServiceImpl, StreamingCsvToXml

public abstract class CsvXmlTransformImpl extends ServiceImp
Base class for transforming CSV into XML.
  • Field Details

  • Constructor Details

    • CsvXmlTransformImpl

      public CsvXmlTransformImpl()
  • Method Details

    • initService

      protected void initService() throws CoreException
      Specified by:
      initService in class ServiceImp
      Throws:
      CoreException
    • closeService

      protected void closeService()
      Specified by:
      closeService in class ServiceImp
    • prepare

      public void prepare() throws CoreException
      Throws:
      CoreException
    • evaluateEncoding

      protected String evaluateEncoding(AdaptrisMessage msg)
    • includeLineNumberAttribute

      protected boolean includeLineNumberAttribute()
    • safeElementNames

      protected static String[] safeElementNames(String[] input)
    • safeElementNames

      protected static List<String> safeElementNames(List<String> input)
    • getOutputMessageEncoding

      public String getOutputMessageEncoding()
      Set the encoding for the resulting XML document.

      If not specified the following rules will be applied:

      1. If the AdaptrisMessage.getCharEncoding() is non-null then that will be used.
      2. UTF-8

      As a result; the character encoding on the message is always set using AdaptrisMessage.setCharEncoding(String).

    • setOutputMessageEncoding

      public void setOutputMessageEncoding(String outputMessageEncoding)
      Set the encoding for the resulting XML document.

      If not specified the following rules will be applied:

      1. If the AdaptrisMessage.getCharEncoding() is non-null then that will be used.
      2. UTF-8

      As a result; the character encoding on the message is always set using AdaptrisMessage.setCharEncoding(String).

    • getIncludeLineNumberAttribute

      public Boolean getIncludeLineNumberAttribute()
      Specify whether or not to include the line number as an attribute on each record.
    • setIncludeLineNumberAttribute

      public void setIncludeLineNumberAttribute(Boolean includeLineNumberAttribute)
      Specify whether or not to include the line number as an attribute on each record.