public class ExcelXlsxConnector extends BaseDataSetConnector implements DataSetConnector<ExcelConnectorParams,ConnectorResult>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ExcelXlsxConnector.xssfDataType
The type of the data value is indicated by an attribute on the cell.
|
(package private) class |
ExcelXlsxConnector.XSSFSheetHandler
The Class XSSFSheetHandler.
|
DEFAULT_IMPORT
APP, COMMAND, ETL_DRIVER, FORMATTER, IDE_NODE, NO_RANK, WIDGET
Constructor and Description |
---|
ExcelXlsxConnector() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Checks if connector can read data.
|
boolean |
canWrite()
Checks if connector can write data.
|
void |
cleanUp(ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Cleans up after DataSetConnector populated or persisted DataSet.
|
ExcelConnectorParams |
getDataSetConnectorParams()
Gets the DataSetConnectorParams.
|
String |
getDisplayName()
Gets the display name.
|
String |
getExt()
Gets the file ext.
|
String |
getName()
Gets the name.
|
String |
getVendor()
Gets the vendor.
|
String |
getVersion()
Gets the version of the extension module.
|
String |
getXmlConfigFileName()
Gets the path to the xml configuration file for the module.
|
String |
initQueryLabel()
The init query label.
|
void |
inlinePersist(ExcelConnectorParams params,
DataSet dataSet,
Driver driver,
DataSetRecord record,
int row,
int records)
Persists data set row.
|
boolean |
isFileConnector()
Checks if this is a connector to the file based data source.
|
boolean |
isTextFormat()
Checks if this is a connector for the text-based data format, such as
JOSN, XML, etc.
|
ConnectorResult |
persist(ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Persists data set.
|
ConnectorResult |
populate(ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Populates data set.
|
void |
postPersist(ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Called when DataSetConnector finished persisting data set.
|
void |
prePersist(ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Called when DataSetConnector starts persisting data set.
|
void |
process(org.apache.poi.openxml4j.opc.OPCPackage xlsxPackage,
String sheetName,
ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Initiates the processing of the XLS workbook file.
|
void |
processSheet(org.apache.poi.xssf.model.StylesTable styles,
org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings,
InputStream sheetInputStream,
ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Parses and shows the content of one sheet using the specified styles and
shared-strings tables.
|
boolean |
supportsNested()
Supports nested.
|
boolean |
supportsReadStreaming()
Supports read streaming.
|
boolean |
supportsWorksheets()
Checks if connector supports worksheets.
|
boolean |
supportsWriteStreaming()
Supports write streaming.
|
ConnectorResult |
writeMetaData(ExcelConnectorParams params,
DataSet dataSet,
Driver driver)
Writes meta data.
|
addValue, basePostPersist, getCommitPolicy, getInputStream, getIoProcessor, getLicensePropertyName, getReader, getType, postPersistWhenEmpty, setCommitPolicy, stream, testConnection
compareTo, getConfigFileName, getExtensionRank, getIconPath, getLocalUnitClassPath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supportsReordering, testConnection
public boolean canRead()
DataSetConnector
canRead
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public boolean canWrite()
DataSetConnector
canWrite
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public void cleanUp(ExcelConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
cleanUp
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic ExcelConnectorParams getDataSetConnectorParams()
DataSetConnector
getDataSetConnectorParams
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public String getDisplayName()
ExtensionModule
getDisplayName
in interface ExtensionModule
public String getExt()
BaseDataSetConnector
getExt
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
getExt
in class BaseDataSetConnector
public String getName()
DataSetConnector
getName
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public String getVendor()
ExtensionModule
getVendor
in interface ExtensionModule
public String getVersion()
ExtensionModule
getVersion
in interface ExtensionModule
public String getXmlConfigFileName()
ExtensionModule
getXmlConfigFileName
in interface ExtensionModule
getXmlConfigFileName
in class BaseExtension
public void inlinePersist(ExcelConnectorParams params, DataSet dataSet, Driver driver, DataSetRecord record, int row, int records) throws Exception
DataSetConnector
inlinePersist
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverrecord
- the recordrow
- the rowrecords
- the total number of recordsException
- in case of any errorpublic boolean isFileConnector()
DataSetConnector
isFileConnector
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public boolean isTextFormat()
DataSetConnector
isTextFormat
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public ConnectorResult persist(ExcelConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
persist
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic ConnectorResult populate(ExcelConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
populate
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic void postPersist(ExcelConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
postPersist
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic void prePersist(ExcelConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
prePersist
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic void process(org.apache.poi.openxml4j.opc.OPCPackage xlsxPackage, String sheetName, ExcelConnectorParams params, DataSet dataSet, Driver driver) throws IOException, org.apache.poi.openxml4j.exceptions.OpenXML4JException, ParserConfigurationException, org.xml.sax.SAXException
xlsxPackage
- the xlsx packagesheetName
- the sheet nameparams
- the paramsdataSet
- the data setdriver
- the driverIOException
- Signals that an I/O exception has occurred.org.apache.poi.openxml4j.exceptions.OpenXML4JException
- the open xm l4 j exceptionParserConfigurationException
- the parser configuration exceptionorg.xml.sax.SAXException
- the sAX exceptionpublic void processSheet(org.apache.poi.xssf.model.StylesTable styles, org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings, InputStream sheetInputStream, ExcelConnectorParams params, DataSet dataSet, Driver driver) throws IOException, ParserConfigurationException, org.xml.sax.SAXException
styles
- the stylesstrings
- the stringssheetInputStream
- the sheet input streamparams
- the paramsdataSet
- the data setdriver
- the driverIOException
- Signals that an I/O exception has occurred.ParserConfigurationException
- the parser configuration exceptionorg.xml.sax.SAXException
- the sAX exceptionpublic ConnectorResult writeMetaData(ExcelConnectorParams params, DataSet dataSet, Driver driver) throws Exception
DataSetConnector
writeMetaData
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorpublic String initQueryLabel()
DataSetConnector
initQueryLabel
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public boolean supportsReadStreaming()
DataSetConnector
supportsReadStreaming
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public boolean supportsWriteStreaming()
DataSetConnector
supportsWriteStreaming
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public boolean supportsNested()
DataSetConnector
supportsNested
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
public boolean supportsWorksheets()
DataSetConnector
supportsWorksheets
in interface DataSetConnector<ExcelConnectorParams,ConnectorResult>
supportsWorksheets
in class BaseDataSetConnector
Copyright © 2010-2020 Toolsverse. All Rights Reserved.