本文整理匯總了Java中org.pentaho.di.repository.Repository.getStepAttributeString方法的典型用法代碼示例。如果您正苦於以下問題:Java Repository.getStepAttributeString方法的具體用法?Java Repository.getStepAttributeString怎麽用?Java Repository.getStepAttributeString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.repository.Repository
的用法示例。
在下文中一共展示了Repository.getStepAttributeString方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step,
List<DatabaseMeta> databases) throws KettleException {
super.readRep(rep, metaStore, id_step, databases);
String truncateStr = rep.getStepAttributeString(id_step, "truncate");
if (truncateStr.equals("true")) {
setTruncate(true);
} else {
setTruncate(false);
}
int nrStreamFields = rep.countNrStepAttributes(id_step, "stream_field_name");
streamFields = new ArrayList<String>(nrStreamFields);
for (int i = 0; i < nrStreamFields; i++) {
streamFields.add(rep.getStepAttributeString(id_step, i, "stream_field_name"));
}
}
示例2: readFieldsFromRepository
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
private void readFieldsFromRepository( Repository rep, ObjectId id_step ) throws KettleException {
int nrFields = rep.countNrStepAttributes( id_step, "trim_type" );
allocateFields( nrFields );
for ( int i = 0; i < nrFields; i++ ) {
SdmxInputField field = new SdmxInputField();
field.setName( rep.getStepAttributeString( id_step, i, "name" ) );
field.setType( rep.getStepAttributeString( id_step, i, "type" ) );
field.setLength( (int) rep.getStepAttributeInteger( id_step, i, "length" ) );
field.setPrecision( (int) rep.getStepAttributeInteger( id_step, i, "precision" ) );
field.setTrimType( ValueMetaBase.getTrimTypeByCode( rep.getStepAttributeString( id_step, i, "trim_type" ) ) );
field.setFormat( rep.getStepAttributeString( id_step, i, "format" ) );
field.setCurrencySymbol( rep.getStepAttributeString( id_step, i, "currency" ) );
field.setDecimalSymbol( rep.getStepAttributeString( id_step, i, "decimal" ) );
field.setGroupSymbol( rep.getStepAttributeString( id_step, i, "group" ) );
String srepeat = rep.getStepAttributeString( id_step, i, "repeat" );
if ( srepeat != null ) {
field.setRepeated( YES.equalsIgnoreCase( srepeat ) );
} else {
field.setRepeated( false );
}
fields[i] = field;
}
}
示例3: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override
public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases)
throws KettleException {
String connectionName = rep.getStepAttributeString(id_step, TAG_CONNECTION);
if (StringUtils.isNotEmpty(connectionName)) {
try {
connection = HCPConnectionUtils.getConnectionFactory(metaStore).loadElement(connectionName);
} catch (MetaStoreException e) {
// We just log the message but we don't abort the complete meta-data
// loading.
//
log.logError(BaseMessages.getString(PKG, "HCPGetMeta.Error.HCPConnectionNotFound", connectionName));
connection = null;
}
}
sourceFileField = rep.getStepAttributeString(id_step, TAG_SOURCE_FILE);
targetFileField = rep.getStepAttributeString(id_step, TAG_TARGET_FILE);
responseCodeField = rep.getStepAttributeString(id_step, TAG_RESPONSE_CODE_FIELD);
responseTimeField = rep.getStepAttributeString(id_step, TAG_RESPONSE_TIME_FIELD);
responseSizeField = rep.getStepAttributeString(id_step, TAG_RESPONSE_SIZE_FIELD);
}
示例4: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override
public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases)
throws KettleException {
String connectionName = rep.getStepAttributeString(id_step, TAG_CONNECTION);
if (StringUtils.isNotEmpty(connectionName)) {
try {
connection = HCPConnectionUtils.getConnectionFactory(metaStore).loadElement(connectionName);
} catch(MetaStoreException e) {
// We just log the message but we don't abort the complete meta-data loading.
//
log.logError(BaseMessages.getString(PKG, "HCPPutMeta.Error.HCPConnectionNotFound", connectionName));
connection = null;
}
}
targetFileField = rep.getStepAttributeString(id_step, TAG_TARGET_FILE_FIELD);
responseCodeField = rep.getStepAttributeString(id_step, TAG_RESPONSE_CODE_FIELD);
responseTimeField = rep.getStepAttributeString(id_step, TAG_RESPONSE_TIME_FIELD);
}
示例5: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override
public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases)
throws KettleException {
String connectionName = rep.getStepAttributeString(id_step, TAG_CONNECTION);
if (StringUtils.isNotEmpty(connectionName)) {
try {
connection = HCPConnectionUtils.getConnectionFactory(metaStore).loadElement(connectionName);
} catch(MetaStoreException e) {
// We just log the message but we don't abort the complete meta-data loading.
//
log.logError(BaseMessages.getString(PKG, "HCPPutMeta.Error.HCPConnectionNotFound", connectionName));
connection = null;
}
}
sourceFileField = rep.getStepAttributeString(id_step, TAG_SOURCE_FILE_FIELD);
targetFileField = rep.getStepAttributeString(id_step, TAG_TARGET_FILE_FIELD);
updating = rep.getStepAttributeBoolean(id_step, TAG_UPDATING);
responseCodeField = rep.getStepAttributeString(id_step, TAG_RESPONSE_CODE_FIELD);
responseTimeField = rep.getStepAttributeString(id_step, TAG_RESPONSE_TIME_FIELD);
}
示例6: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
/**
* Read the steps information from a Kettle repository
*
* @param rep The repository to read from
* @param idStep The step ID
* @param databases The databases to reference
* @param counters The counters to reference
* @throws KettleException When an unexpected error occurred (database, network, etc)
*/
@Override public void readRep(Repository rep, ObjectId idStep, List<DatabaseMeta> databases,
Map<String, Counter> counters) throws KettleException {
try {
tabelName = rep.getStepAttributeString(idStep, "TableName");
mdkeySize = rep.getStepAttributeString(idStep, "MDKeySize");
measureCount = rep.getStepAttributeString(idStep, "Measurecount");
heirAndKeySize = rep.getStepAttributeString(idStep, "HeirAndKeySize");
databaseName = rep.getStepAttributeString(idStep, "databaseName");
tableName = rep.getStepAttributeString(idStep, "tableName");
groupByEnabled = rep.getStepAttributeString(idStep, "isGroupByEnabled");
aggregatorClassString = rep.getStepAttributeString(idStep, "aggregatorClassString");
aggregatorString = rep.getStepAttributeString(idStep, "aggregatorString");
factDimLensString = rep.getStepAttributeString(idStep, "factDimLensString");
levelAnddataTypeString = rep.getStepAttributeString(idStep, "levelAnddataTypeString");
partitionID = rep.getStepAttributeString(idStep, "partitionID");
segmentId = rep.getStepAttributeString(idStep, "segmentId");
taskNo = rep.getStepAttributeString(idStep, "taskNo");
} catch (Exception exception) {
throw new KettleException(BaseMessages
.getString(PKG, "CarbonDataWriterStepMeta.Exception.UnexpectedErrorInReadingStepInfo"),
exception);
}
}
示例7: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
/**
* Read the steps information from a Kettle repository
*
* @param rep The repository to read from
* @param idStep The step ID
* @param databases The databases to reference
* @param counters The counters to reference
* @throws KettleException When an unexpected error occurred (database, network, etc)
*/
public void readRep(Repository rep, ObjectId idStep, List<DatabaseMeta> databases,
Map<String, Counter> counters) throws KettleException {
try {
this.tabelName = rep.getStepAttributeString(idStep, "TableName");
this.outputRowSize = rep.getStepAttributeString(idStep, "outputRowSize");
this.databaseName = rep.getStepAttributeString(idStep, "databaseName");
this.tableName = rep.getStepAttributeString(idStep, "tableName");
this.dimensionCount = rep.getStepAttributeString(idStep, "dimensionCount");
this.noDictionaryDims = rep.getStepAttributeString(idStep, "noDictionaryDims");
this.noDictionaryDims = rep.getStepAttributeString(idStep, "noDictionaryDimsMapping");
this.complexDimensionCount = rep.getStepAttributeString(idStep, "complexDimensionCount");
this.measureCount = rep.getStepAttributeString(idStep, "measureCount");
this.updateMemberRequest = rep.getStepAttributeString(idStep, "isUpdateMemberRequest");
this.measureDataType = rep.getStepAttributeString(idStep, "measureDataType");
this.partitionID = rep.getStepAttributeString(idStep, "partitionID");
this.segmentId = rep.getStepAttributeString(idStep, "segmentId");
this.taskNo = rep.getStepAttributeString(idStep, "taskNo");
} catch (Exception ex) {
throw new KettleException(BaseMessages
.getString(PKG, "CarbonDataWriterStepMeta.Exception.UnexpectedErrorInReadingStepInfo",
new String[0]), ex);
}
}
示例8: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override public void readRep(Repository rep, ObjectId idStep, List<DatabaseMeta> databases,
Map<String, Counter> counters) throws KettleException {
try {
tableName = rep.getStepAttributeString(idStep, "TableName");
aggregateLevels = rep.getStepAttributeString(idStep, "AggregateLevels");
numberOfCores = rep.getStepAttributeString(idStep, "NumberOfCores");
databaseName = rep.getStepAttributeString(idStep, "databaseName");
tableName = rep.getStepAttributeString(idStep, "tableName");
noDictionaryDims = rep.getStepAttributeString(idStep, "noDictionaryDims");
measureCount = rep.getStepAttributeString(idStep, "measureCount");
columnGroupsString = rep.getStepAttributeString(idStep, "dimensionsStoreType");
dimensionCount = rep.getStepAttributeString(idStep, "dimensionCount");
complexDimsCount = rep.getStepAttributeString(idStep, "complexDimsCount");
complexTypeString = rep.getStepAttributeString(idStep, "complexTypeString");
measureDataType = rep.getStepAttributeString(idStep, "measureDataType");
taskNo = rep.getStepAttributeString(idStep, "taskNo");
factTimeStamp = rep.getStepAttributeString(idStep, "factTimeStamp");
partitionID = rep.getStepAttributeString(idStep, "partitionID");
isUseInvertedIndex = rep.getStepAttributeString(idStep, "isUseInvertedIndex");
segmentId = rep.getStepAttributeString(idStep, "segmentId");
noDictionaryDimsMapping = rep.getStepAttributeString(idStep, "noDictionaryDimsMapping");
} catch (Exception e) {
throw new KettleException(BaseMessages
.getString(pkg, "CarbonMDKeyStepMeta.Exception.UnexpectedErrorInReadingStepInfo"), e);
}
}
示例9: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId stepId, List<DatabaseMeta> databases )
throws KettleException {
try {
broker = rep.getStepAttributeString( stepId, "BROKER" );
topic = rep.getStepAttributeString( stepId, "TOPIC" );
m_topicIsFromField = rep.getStepAttributeBoolean( stepId, "TOPIC_IS_FROM_FIELD" );
field = rep.getStepAttributeString( stepId, "FIELD" );
clientId = rep.getStepAttributeString( stepId, "CLIENT_ID" );
timeout = rep.getStepAttributeString( stepId, "TIMEOUT" );
qos = rep.getStepAttributeString( stepId, "QOS" );
requiresAuth = Boolean.parseBoolean( rep.getStepAttributeString( stepId, "REQUIRES_AUTH" ) );
username = rep.getStepAttributeString( stepId, "USERNAME" );
password = rep.getStepAttributeString( stepId, "PASSWORD" );
sslCaFile = rep.getStepAttributeString( stepId, "SSL_CA_FILE" );
sslCertFile = rep.getStepAttributeString( stepId, "SSL_CERT_FILE" );
sslKeyFile = rep.getStepAttributeString( stepId, "SSL_KEY_FILE" );
sslKeyFilePass = rep.getStepAttributeString( stepId, "SSL_KEY_FILE_PASS" );
} catch ( Exception e ) {
throw new KettleException( "MQTTClientMeta.Exception.loadRep", e );
}
}
示例10: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, long id_step,
List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleException {
try {
fileName = rep.getStepAttributeString(id_step, "filename");
isFileNameInField = rep.getStepAttributeBoolean(id_step,
"isfilenameinfield");
fileNameField = rep
.getStepAttributeString(id_step, "filenamefield");
featureNameField = rep.getStepAttributeString(id_step,
"featurenamefield");
featureDescField = rep.getStepAttributeString(id_step,
"featuredescfield");
exportingFeatureName = rep.getStepAttributeBoolean(id_step,
"exportingfeaturename");
exportingFeatureDesc = rep.getStepAttributeBoolean(id_step,
"exportingfeaturedesc");
acceptingStepName = rep.getStepAttributeString(id_step,
"accept_stepname");
} catch (Exception e) {
throw new KettleException(
Messages.getString("KMLFileOutputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository"), e); //$NON-NLS-1$
}
}
示例11: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
try
{
int nrfields = rep.countNrStepAttributes(id_step, "field_name");
allocate(nrfields);
for (int i=0;i<nrfields;i++)
{
fieldName[i] = rep.getStepAttributeString(id_step, i, "field_name");
fieldType[i] = getType( rep.getStepAttributeString(id_step, i, "field_type"));
}
}
catch(Exception e)
{
throw new KettleException("Unexpected error reading step information from the repository", e);
}
}
示例12: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, long id_step, List<DatabaseMeta> databases, Map<String,Counter> counters)
throws KettleException
{
try
{
fieldToUse = rep.getStepAttributeString(id_step, "field_to_use"); //$NON-NLS-1$
targetField = rep.getStepAttributeString(id_step, "target_field"); //$NON-NLS-1$
nonMatchDefault = rep.getStepAttributeString(id_step, "non_match_default"); //$NON-NLS-1$
int nrfields = rep.countNrStepAttributes(id_step, "source_value"); //$NON-NLS-1$
allocate(nrfields);
for (int i=0;i<nrfields;i++)
{
sourceValue[i] = rep.getStepAttributeString(id_step, i, "source_value"); //$NON-NLS-1$
targetValue[i] = rep.getStepAttributeString(id_step, i, "target_value"); //$NON-NLS-1$
}
}
catch(Exception e)
{
throw new KettleException(Messages.getString("ValueMapperMeta.RuntimeError.UnableToReadRepository.VALUEMAPPER0005"), e); //$NON-NLS-1$
}
}
示例13: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException {
try
{
splitField = rep.getStepAttributeString(id_step, "splitfield"); //$NON-NLS-1$
delimiter = rep.getStepAttributeString(id_step, "delimiter"); //$NON-NLS-1$
newFieldname = rep.getStepAttributeString(id_step, "newfield"); //$NON-NLS-1$
includeRowNumber = rep.getStepAttributeBoolean(id_step, "rownum");
rowNumberField = rep.getStepAttributeString (id_step, "rownum_field");
resetRowNumber = rep.getStepAttributeBoolean (id_step, "reset_rownumber");
isDelimiterRegex = rep.getStepAttributeBoolean(id_step, 0, "delimiter_is_regex", false);
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "SplitFieldToRowsMeta.Exception.UnexpectedErrorInReadingStepInfo"), e); //$NON-NLS-1$
}
}
示例14: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, long id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleException
{
try
{
long id_connection = rep.getStepAttributeInteger(id_step, "id_connection");
databaseMeta = DatabaseMeta.findDatabase( databases, id_connection);
sql = rep.getStepAttributeString (id_step, "sql");
catalog = rep.getStepAttributeString(id_step, "catalog");
variableReplacementActive = rep.getStepAttributeBoolean(id_step, "variables_active");
}
catch(Exception e)
{
throw new KettleException("Unexpected error reading step information from the repository", e);
}
}
示例15: readRep
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleException
{
try
{
int nrfields = rep.countNrStepAttributes(id_step, "field_name"); //$NON-NLS-1$
allocate(nrfields);
for (int i=0;i<nrfields;i++)
{
fieldname[i] = rep.getStepAttributeString (id_step, i, "field_name"); //$NON-NLS-1$
type[i] = ValueMeta.getType( rep.getStepAttributeString (id_step, i, "field_type")); //$NON-NLS-1$
length[i] = (int)rep.getStepAttributeInteger(id_step, i, "field_length"); //$NON-NLS-1$
precision[i] = (int)rep.getStepAttributeInteger(id_step, i, "field_precision"); //$NON-NLS-1$
}
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "RowsFromResultMeta.Exception.ErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
}
}