public class StructuredFileStoreConnector extends ConnectorBase implements StructuredFileStore
ConnectorBase.ProtectedConnectionconnectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, isActive, securedProperties| Constructor and Description |
|---|
StructuredFileStoreConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
Close the config file
|
List<String> |
getColumnNames()
Return the list of column names associated with this structured file.
|
String |
getFileName()
Return the name of the file to read.
|
Date |
getLastUpdateDate()
Return the last update data for the file.
|
long |
getRecordCount()
Return the number of records in the file.
|
void |
initialize(String connectorInstanceId,
ConnectionProperties connectionProperties)
Initialize the connector.
|
List<String> |
readRecord(int dataRecordNumber)
Return the requested data record.
|
equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initializeConnectedAssetProperties, isActive, start, toStringpublic void initialize(String connectorInstanceId, ConnectionProperties connectionProperties)
initialize in class ConnectorBaseconnectorInstanceId - - unique id for the connector instance - useful for messages etcconnectionProperties - - POJO for the configuration used to create the connector.public String getFileName() throws FileReadException
getFileName in interface StructuredFileStoreFileReadException - - the file name is null, the file does not exist, or is a directory or
is not readable.public Date getLastUpdateDate() throws FileReadException
getLastUpdateDate in interface StructuredFileStoreFileReadException - - the file name is null, the file does not exist, or is a directory or
is not readable.public long getRecordCount()
throws FileReadException
getRecordCount in interface StructuredFileStoreFileReadException - unable to find, open or scan the file.public List<String> getColumnNames() throws FileReadException
getColumnNames in interface StructuredFileStoreFileReadException - unable to retrieve the column namespublic List<String> readRecord(int dataRecordNumber) throws FileReadException
readRecord in interface StructuredFileStoredataRecordNumber - longFileReadException - unable to find, open or read the file, or the file does not include the requested record.public void disconnect()
disconnect in class ConnectorBaseCopyright © 2018 ODPi. All rights reserved.