Class ValidValueDataSetConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.adapters.connectors.referencedata.tabulardatasets.ReferenceDataSetConnectorBase
org.odpi.openmetadata.adapters.connectors.referencedata.tabulardatasets.ValidValueDataSetConnector
- All Implemented Interfaces:
AuditLoggingComponent,SecureConnectorExtension,ReadableTabularDataSource,TabularDataCollection,WritableTabularDataSource,VirtualConnectorExtension
public class ValidValueDataSetConnector
extends ReferenceDataSetConnectorBase
implements AuditLoggingComponent, ReadableTabularDataSource, WritableTabularDataSource, TabularDataCollection
ValidValueDataSetConnector enables interaction with a valid value set as if it is a tabular data set.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection -
Field Summary
FieldsFields inherited from class org.odpi.openmetadata.adapters.connectors.referencedata.tabulardatasets.ReferenceDataSetConnectorBase
auditLog, columnDescriptions, connectorContext, connectorNameFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendRecord(List<String> dataValues) Write the requested data record to the end of the data source.voiddeleteRecord(long rowNumber) Remove the requested data record.voidClose the fileReturn the list of column descriptions associated with this data source.longReturn the number of records in the data source.Return the description for this data source.Return the canonical table name for this data source.readRecord(long rowNumber) Return the requested data record.voidRefresh any cached values,voidsetTableName(String tableName, String tableDescription) Set up the canonical table name for this data source.voidstart()Indicates that the connector is completely configured and can begin processing.voidwriteRecord(long requestedRowNumber, List<String> dataValues) Write the requested data record.Methods inherited from class org.odpi.openmetadata.adapters.connectors.referencedata.tabulardatasets.ReferenceDataSetConnectorBase
getColumnNumber, getConnectorComponentDescription, getTabularColumnDescription, setAuditLog, setColumnDescriptions, setLocalEnvironmentMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestampMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
getConnectorComponentDescription, setAuditLogMethods inherited from interface org.odpi.openmetadata.frameworks.connectors.tabulardatasets.ReadableTabularDataSource
getColumnNumberMethods inherited from interface org.odpi.openmetadata.frameworks.connectors.tabulardatasets.WritableTabularDataSource
setColumnDescriptions
-
Field Details
-
validValueSetGUID
-
-
Constructor Details
-
ValidValueDataSetConnector
public ValidValueDataSetConnector()Default constructor
-
-
Method Details
-
start
Indicates that the connector is completely configured and can begin processing.- Overrides:
startin classReferenceDataSetConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.UserNotAuthorizedException- the connector was disconnected before/during start
-
refreshCache
Refresh any cached values,- Specified by:
refreshCachein classReferenceDataSetConnectorBase- Throws:
ConnectorCheckedException- unable to refresh
-
getRecordCount
public long getRecordCount()Return the number of records in the data source.- Specified by:
getRecordCountin interfaceReadableTabularDataSource- Specified by:
getRecordCountin interfaceWritableTabularDataSource- Returns:
- count
-
getTableName
Return the canonical table name for this data source. Each word in the name should be capitalized, with spaces between the words to allow translation between different naming conventions.- Specified by:
getTableNamein interfaceReadableTabularDataSource- Returns:
- string
- Throws:
ConnectorCheckedException- there is a problem accessing the data
-
getTableDescription
Return the description for this data source.- Specified by:
getTableDescriptionin interfaceReadableTabularDataSource- Returns:
- string
-
setTableName
Set up the canonical table name for this data source. Each word in the name should be capitalized, with spaces between the words to allow translation between different naming conventions.- Specified by:
setTableNamein interfaceTabularDataCollection- Parameters:
tableName- stringtableDescription- optional description
-
getColumnDescriptions
Return the list of column descriptions associated with this data source. The information should be sufficient to define the schema in a target data store. This list is the default column descriptions. The caller can override them.- Specified by:
getColumnDescriptionsin interfaceReadableTabularDataSource- Overrides:
getColumnDescriptionsin classReferenceDataSetConnectorBase- Returns:
- a list of column descriptions or null if not available.
-
readRecord
Return the requested data record. The first record is record 0.- Specified by:
readRecordin interfaceReadableTabularDataSource- Parameters:
rowNumber- long- Returns:
- list of values (as strings) where each string is the value from a column. The order is the same as the columns
- Throws:
ConnectorCheckedException- there is a problem accessing the data.
-
writeRecord
public void writeRecord(long requestedRowNumber, List<String> dataValues) throws ConnectorCheckedException Write the requested data record. The first data record is record 0. This process reads the entire file, inserts the record in the right place and writes it out again.- Specified by:
writeRecordin interfaceWritableTabularDataSource- Parameters:
requestedRowNumber- longdataValues- Map of column descriptions to strings, each string is the value for the column.- Throws:
ConnectorCheckedException- there is a problem accessing the data.
-
appendRecord
Write the requested data record to the end of the data source.- Specified by:
appendRecordin interfaceWritableTabularDataSource- Parameters:
dataValues- Map of column descriptions to strings, each string is the value for the column.- Throws:
ConnectorCheckedException- there is a problem accessing the data.
-
deleteRecord
Remove the requested data record. The first data record is record 0.- Specified by:
deleteRecordin interfaceWritableTabularDataSource- Parameters:
rowNumber- long- Throws:
ConnectorCheckedException- there is a problem accessing the data.
-
disconnect
public void disconnect()Close the file- Overrides:
disconnectin classReferenceDataSetConnectorBase
-