Package com.adaptris.core.poi
Class ExcelToXml
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.poi.ExcelToXml
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Convert an Excel Spreadsheet to XML", tag="service,transform,excel,xml") public class ExcelToXml extends ServiceImp
Service to extract data from an Excel spreadsheet.In the adapter configuration file this class is aliased as excel-to-xml-service which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: STANDARD
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description ExcelToXml()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeService()
void
doService(AdaptrisMessage msg)
java.lang.Boolean
getIgnoreNullRows()
XmlStyle
getXmlStyle()
boolean
ignoreNullRows()
void
initService()
org.slf4j.Logger
logger()
void
prepare()
void
setIgnoreNullRows(java.lang.Boolean b)
Set to true to ignore null rows.void
setXmlStyle(XmlStyle style)
protected void
writeXmlDocument(org.w3c.dom.Document doc, AdaptrisMessage msg)
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
- Specified by:
doService
in interfaceService
- Throws:
ServiceException
-
writeXmlDocument
protected void writeXmlDocument(org.w3c.dom.Document doc, AdaptrisMessage msg) throws java.lang.Exception
- Throws:
java.lang.Exception
-
initService
public void initService() throws CoreException
- Specified by:
initService
in classServiceImp
- Throws:
CoreException
-
closeService
public void closeService()
- Specified by:
closeService
in classServiceImp
-
prepare
public void prepare() throws CoreException
- Specified by:
prepare
in interfaceComponentLifecycleExtension
- Throws:
CoreException
-
getXmlStyle
public XmlStyle getXmlStyle()
-
setXmlStyle
public void setXmlStyle(XmlStyle style)
-
getIgnoreNullRows
public java.lang.Boolean getIgnoreNullRows()
-
setIgnoreNullRows
public void setIgnoreNullRows(java.lang.Boolean b)
Set to true to ignore null rows.In some spreadsheets it is possible to get a null Row object when doing
Row row = sheet.getRow(i)
. Set this to be true to silently ignore errors, which means you may a mismatch between the number of rows in the spreadsheet vs the number of Row elements in the resulting XML.- Parameters:
b
- true to ignore rows that are null; default null (false).- Since:
- 3.0.3
-
ignoreNullRows
public boolean ignoreNullRows()
-
logger
public org.slf4j.Logger logger()
-
-