本文整理匯總了Java中org.pentaho.di.repository.Repository.getStepAttributeInteger方法的典型用法代碼示例。如果您正苦於以下問題:Java Repository.getStepAttributeInteger方法的具體用法?Java Repository.getStepAttributeInteger怎麽用?Java Repository.getStepAttributeInteger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.repository.Repository
的用法示例。
在下文中一共展示了Repository.getStepAttributeInteger方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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{
source = rep.getStepAttributeString (id_step, "source"); //$NON-NLS-1$
layerName = rep.getStepAttributeString (id_step, "layer_name");
spatialFilter = rep.getStepAttributeString (id_step, "spatial_filter"); //$NON-NLS-1$
attributeFilter = rep.getStepAttributeString (id_step, "attribute_filter"); //$NON-NLS-1$
skipFailureAdded = rep.getStepAttributeBoolean(id_step, "skip_failure"); //$NON-NLS-1$
rowLimit = (int)rep.getStepAttributeInteger(id_step, "limit"); //$NON-NLS-1$
rowNrAdded = rep.getStepAttributeBoolean(id_step, "add_rownr"); //$NON-NLS-1$
rowNrField = rep.getStepAttributeString (id_step, "field_rownr"); //$NON-NLS-1$
passingThruFields = rep.getStepAttributeBoolean(id_step, "passing_through_fields");
isSourceInField = rep.getStepAttributeBoolean(id_step, "issourceinfield");
sourceField = rep.getStepAttributeString (id_step, "sourcefield");
isLayerNameInField = rep.getStepAttributeBoolean(id_step, "islayernameinfield");
layerNameField = rep.getStepAttributeString (id_step, "layernamefield");
isFileSource = rep.getStepAttributeBoolean(id_step, "isfilesource");
}catch(Exception e){
throw new KettleException(Messages.getString("OGRFileInputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository"), e); //$NON-NLS-1$
}
}
示例2: 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
{
int nrfields = rep.countNrStepAttributes(id_step, "field_name"); //$NON-NLS-1$
allocate(nrfields);
for (int i=0;i<nrfields;i++)
{
name[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(Messages.getString("InjectorMeta.Exception.ErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
}
}
示例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 {
this.cassandraNodes = rep.getStepAttributeString(id_step, 0, CASSANDRA_NODES);
this.cassandraPort = rep.getStepAttributeString(id_step, 0, CASSANDRA_PORT);
this.username = rep.getStepAttributeString(id_step, 0, USERNAME);
this.password = rep.getStepAttributeString(id_step, 0, PASSWORD);
if (!Const.isEmpty(this.password)) {
this.password = Encr.decryptPasswordOptionallyEncrypted(this.password);
}
this.keyspace = rep.getStepAttributeString(id_step, 0, CASSANDRA_KEYSPACE);
this.SslEnabled = rep.getStepAttributeBoolean(id_step, CASSANDRA_WITH_SSL);
this.trustStoreFilePath = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_FILE_PATH);
this.trustStorePass = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_PASS);
String sCompression = rep.getStepAttributeString(id_step, 0, COMPRESSION);
this.cqlStatement = rep.getStepAttributeString(id_step, 0, CQL);
this.executeForEachInputRow = rep.getStepAttributeBoolean(id_step, EXECUTE_FOR_EACH_INPUT);
this.rowLimit = ((int) rep.getStepAttributeInteger(id_step, ROW_LIMIT));
if (!Const.isEmpty(this.trustStorePass)) {
this.trustStorePass = Encr.decryptPasswordOptionallyEncrypted(this.trustStorePass);
}
checkNulls();
if (this.cqlStatement == null) {
this.cqlStatement = "";
}
this.compression = (Const.isEmpty(sCompression) ? ConnectionCompression.SNAPPY : ConnectionCompression.fromString(sCompression));
}
示例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 {
int nrfields = rep.countNrStepAttributes(id_step, "field_name");
allocate(nrfields);
for (int i = 0; i < nrfields; i++) {
outputFields[i] = new TextFileField();
outputFields[i].setName(rep.getStepAttributeString(id_step, i,
"field_name"));
outputFields[i].setType(rep.getStepAttributeString(id_step, i,
"field_type"));
outputFields[i].setFormat(rep.getStepAttributeString(id_step, i,
"field_format"));
outputFields[i].setCurrencySymbol(rep.getStepAttributeString(
id_step, i, "field_currency"));
outputFields[i].setDecimalSymbol(rep.getStepAttributeString(
id_step, i, "field_decimal"));
outputFields[i].setGroupingSymbol(rep.getStepAttributeString(
id_step, i, "field_group"));
outputFields[i].setTrimType(ValueMeta.getTrimTypeByCode(rep
.getStepAttributeString(id_step, i, "field_trim_type")));
outputFields[i].setNullString(rep.getStepAttributeString(id_step,
i, "field_nullif"));
outputFields[i].setLength((int) rep.getStepAttributeInteger(
id_step, i, "field_length"));
outputFields[i].setPrecision((int) rep.getStepAttributeInteger(
id_step, i, "field_precision"));
}
targetFieldName = rep.getStepAttributeString(id_step,
ConcatFieldsNodeNameSpace + "targetFieldName");
targetFieldLength = (int) rep.getStepAttributeInteger(id_step,
ConcatFieldsNodeNameSpace + "targetFieldLength");
}
示例5: FormulaMetaFunction
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public FormulaMetaFunction(Repository rep, long id_step, int nr) throws KettleException
{
fieldName = rep.getStepAttributeString(id_step, nr, "field_name");
formula = rep.getStepAttributeString(id_step, nr, "formula_string");
valueType = ValueMeta.getType( rep.getStepAttributeString(id_step, nr, "value_type") );
valueLength = (int)rep.getStepAttributeInteger(id_step, nr, "value_length");
valuePrecision = (int)rep.getStepAttributeInteger(id_step, nr, "value_precision");
replaceField = rep.getStepAttributeString(id_step, nr, "replace_field");
}
示例6: FormulaMetaFunction
import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public FormulaMetaFunction(Repository rep, ObjectId id_step, int nr) throws KettleException
{
fieldName = rep.getStepAttributeString(id_step, nr, "field_name");
formula = rep.getStepAttributeString(id_step, nr, "formula_string");
valueType = ValueMeta.getType( rep.getStepAttributeString(id_step, nr, "value_type") );
valueLength = (int)rep.getStepAttributeInteger(id_step, nr, "value_length");
valuePrecision = (int)rep.getStepAttributeInteger(id_step, nr, "value_precision");
replaceField = rep.getStepAttributeString(id_step, nr, "replace_field");
}
示例7: 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"); //$NON-NLS-1$
databaseMeta = DatabaseMeta.findDatabase( databases, id_connection);
skipLookup = rep.getStepAttributeBoolean (id_step, "skip_lookup");
commitSize = (int)rep.getStepAttributeInteger(id_step, "commit"); //$NON-NLS-1$
schemaName = rep.getStepAttributeString(id_step, "schema"); //$NON-NLS-1$
tableName = rep.getStepAttributeString(id_step, "table"); //$NON-NLS-1$
errorIgnored = rep.getStepAttributeBoolean(id_step, "error_ignored"); //$NON-NLS-1$
ignoreFlagField = rep.getStepAttributeString (id_step, "ignore_flag_field"); //$NON-NLS-1$
int nrkeys = rep.countNrStepAttributes(id_step, "key_name"); //$NON-NLS-1$
int nrvalues = rep.countNrStepAttributes(id_step, "value_name"); //$NON-NLS-1$
allocate(nrkeys, nrvalues);
for (int i=0;i<nrkeys;i++)
{
keyStream[i] = rep.getStepAttributeString(id_step, i, "key_name"); //$NON-NLS-1$
keyLookup[i] = rep.getStepAttributeString(id_step, i, "key_field"); //$NON-NLS-1$
keyCondition[i] = rep.getStepAttributeString(id_step, i, "key_condition"); //$NON-NLS-1$
keyStream2[i] = rep.getStepAttributeString(id_step, i, "key_name2"); //$NON-NLS-1$
}
for (int i=0;i<nrvalues;i++)
{
updateLookup[i] = rep.getStepAttributeString(id_step, i, "value_name"); //$NON-NLS-1$
updateStream[i] = rep.getStepAttributeString(id_step, i, "value_rename"); //$NON-NLS-1$
}
}
catch(Exception e)
{
throw new KettleException(Messages.getString("UpdateMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
}
}
示例8: 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
{
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");
variableString[i] = rep.getStepAttributeString(id_step, i, "field_variable");
fieldType[i] = ValueMeta.getType(rep.getStepAttributeString (id_step, i, "field_type"));
fieldFormat[i] = rep.getStepAttributeString (id_step, i, "field_format");
currency[i] = rep.getStepAttributeString (id_step, i, "field_currency");
decimal[i] = rep.getStepAttributeString (id_step, i, "field_decimal");
group[i] = rep.getStepAttributeString (id_step, i, "field_group");
fieldLength[i] = (int)rep.getStepAttributeInteger(id_step, i, "field_length");
fieldPrecision[i] = (int)rep.getStepAttributeInteger(id_step, i, "field_precision");
trimType[i] = ValueMeta.getTrimTypeByCode(rep.getStepAttributeString(id_step, i, "field_trim_type"));
// Backward compatibility
//
if (fieldType[i]==ValueMetaInterface.TYPE_NONE) {
fieldType[i] = ValueMetaInterface.TYPE_STRING;
}
}
}
catch(Exception e)
{
throw new KettleException("Unexpected error reading step information from the repository", e);
}
}
示例9: 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"); //$NON-NLS-1$
databaseMeta = DatabaseMeta.findDatabase( databases, id_connection);
schemaName = rep.getStepAttributeString(id_step, "schema"); //$NON-NLS-1$
tableName = rep.getStepAttributeString(id_step, "table"); //$NON-NLS-1$
loadAction = rep.getStepAttributeString(id_step, "load_action"); //$NON-NLS-1$
PsqlPath = rep.getStepAttributeString(id_step, "PsqlPath"); //$NON-NLS-1$
dbNameOverride = rep.getStepAttributeString(id_step, "dbname_override");//$NON-NLS-1$
int nrvalues = rep.countNrStepAttributes(id_step, "stream_name"); //$NON-NLS-1$
allocate(nrvalues);
for (int i=0;i<nrvalues;i++)
{
fieldTable[i] = rep.getStepAttributeString(id_step, i, "stream_name"); //$NON-NLS-1$
fieldStream[i] = rep.getStepAttributeString(id_step, i, "field_name"); //$NON-NLS-1$
dateMask[i] = rep.getStepAttributeString(id_step, i, "date_mask"); //$NON-NLS-1$
}
}
catch(Exception e)
{
throw new KettleException(Messages.getString("GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
}
}
示例10: 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
{
databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
schemaName = rep.getStepAttributeString (id_step, "schema"); //$NON-NLS-1$
tablename = rep.getStepAttributeString (id_step, "table"); //$NON-NLS-1$
commitSize = (int)rep.getStepAttributeInteger(id_step, "commit"); //$NON-NLS-1$
cacheSize = (int)rep.getStepAttributeInteger(id_step, "cache_size"); //$NON-NLS-1$
replaceFields = rep.getStepAttributeBoolean(id_step, "replace"); //$NON-NLS-1$
useHash = rep.getStepAttributeBoolean(id_step, "crc"); //$NON-NLS-1$
hashField = rep.getStepAttributeString (id_step, "crcfield"); //$NON-NLS-1$
int nrkeys = rep.countNrStepAttributes(id_step, "lookup_key_name"); //$NON-NLS-1$
allocate(nrkeys);
for (int i=0;i<nrkeys;i++)
{
keyField[i] = rep.getStepAttributeString(id_step, i, "lookup_key_name"); //$NON-NLS-1$
keyLookup[i] = rep.getStepAttributeString(id_step, i, "lookup_key_field"); //$NON-NLS-1$
}
technicalKeyField = rep.getStepAttributeString (id_step, "return_name"); //$NON-NLS-1$
useAutoinc = rep.getStepAttributeBoolean(id_step, "use_autoinc"); //$NON-NLS-1$
sequenceFrom = rep.getStepAttributeString (id_step, "sequence"); //$NON-NLS-1$
techKeyCreation = rep.getStepAttributeString (id_step, "creation_method"); //$NON-NLS-1$
lastUpdateField = rep.getStepAttributeString (id_step, "last_update_field"); //$NON-NLS-1$
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "CombinationLookupMeta.Exception.UnexpectedErrorWhileReadingStepInfo"), e); //$NON-NLS-1$
}
}
示例11: 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
{
int nrfiles = rep.countNrStepAttributes(id_step, "file_name");
fileTypeFilter=FileInputList.FileTypeFilter.getByName(rep.getStepAttributeString(id_step, "filterfiletype"));
dynamicFilenameField = rep.getStepAttributeString(id_step, "filename_Field");
dynamicWildcardField = rep.getStepAttributeString(id_step, "wildcard_Field");
includeRowNumber = rep.getStepAttributeBoolean(id_step, "rownum");
isaddresult = rep.getStepAttributeBoolean(id_step, rep.getStepAttributeString(id_step, "isaddresult"));
filefield = rep.getStepAttributeBoolean(id_step, "filefield");
rowNumberField = rep.getStepAttributeString (id_step, "rownum_field");
rowLimit = rep.getStepAttributeInteger(id_step, "limit");
allocate(nrfiles);
for (int i = 0; i < nrfiles; i++)
{
fileName[i] = rep.getStepAttributeString(id_step, i, "file_name");
fileMask[i] = rep.getStepAttributeString(id_step, i, "file_mask");
fileRequired[i] = rep.getStepAttributeString(id_step, i, "file_required");
if(!YES.equalsIgnoreCase(fileRequired[i])) fileRequired[i] = NO;
}
}
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, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleException
{
try
{
databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
schemaName = rep.getStepAttributeString (id_step, "schema");
tablename = rep.getStepAttributeString (id_step, "table");
truncateTable = rep.getStepAttributeBoolean(id_step, "truncate");
createTable = rep.getStepAttributeBoolean(id_step, "create");
encoding = rep.getStepAttributeString (id_step, "encoding");
dateformat = rep.getStepAttributeString (id_step, "dateformat");
AddToResult = rep.getStepAttributeBoolean(id_step, "addtoresult");
StartNewLine = rep.getStepAttributeBoolean(id_step, "startnewline");
fileName = rep.getStepAttributeString (id_step, "file_name");
extension = rep.getStepAttributeString (id_step, "file_extention");
fileAppended = rep.getStepAttributeBoolean(id_step, "file_append");
splitEvery = (int)rep.getStepAttributeInteger(id_step, "file_split");
stepNrInFilename = rep.getStepAttributeBoolean(id_step, "file_add_stepnr");
partNrInFilename = rep.getStepAttributeBoolean(id_step, "file_add_partnr");
dateInFilename = rep.getStepAttributeBoolean(id_step, "file_add_date");
timeInFilename = rep.getStepAttributeBoolean(id_step, "file_add_time");
createparentfolder = rep.getStepAttributeBoolean(id_step, "create_parent_folder");
DoNotOpenNewFileInit = rep.getStepAttributeBoolean(id_step, "DoNotOpenNewFileInit");
}
catch(Exception e)
{
throw new KettleException("Unexpected error reading step information from the repository", e);
}
}
示例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
{
urlInField = rep.getStepAttributeBoolean(id_step, "url_in_field");
urlFieldname = rep.getStepAttributeString (id_step, "url_field_name");
includeRowNumber = rep.getStepAttributeBoolean(id_step, "rownum");
rowNumberField = rep.getStepAttributeString (id_step, "rownum_field");
includeUrl = rep.getStepAttributeBoolean(id_step, "include_url");
urlField = rep.getStepAttributeString (id_step, "url_Field");
readfrom = rep.getStepAttributeString (id_step, "read_from");
rowLimit = rep.getStepAttributeInteger(id_step, "limit");
int nrFields = rep.countNrStepAttributes(id_step, "field_name");
int nrUrls = rep.countNrStepAttributes(id_step, "url_name");
allocate(nrUrls,nrFields);
for (int i=0;i<nrUrls;i++)
{
url[i] = rep.getStepAttributeString (id_step, i, "url_name");
}
for (int i=0;i<nrFields;i++)
{
RssInputField field = new RssInputField();
field.setName( rep.getStepAttributeString (id_step, i, "field_name") );
field.setColumn( RssInputField.getColumnByCode( rep.getStepAttributeString (id_step, i, "field_column") ));
field.setType( ValueMeta.getType( rep.getStepAttributeString (id_step, i, "field_type") ) );
field.setFormat( rep.getStepAttributeString (id_step, i, "field_format") );
field.setCurrencySymbol( rep.getStepAttributeString (id_step, i, "field_currency") );
field.setDecimalSymbol( rep.getStepAttributeString (id_step, i, "field_decimal") );
field.setGroupSymbol( rep.getStepAttributeString (id_step, i, "field_group") );
field.setLength( (int)rep.getStepAttributeInteger(id_step, i, "field_length") );
field.setPrecision( (int)rep.getStepAttributeInteger(id_step, i, "field_precision") );
field.setTrimType( RssInputField.getTrimTypeByCode( rep.getStepAttributeString (id_step, i, "field_trim_type") ));
field.setRepeated( rep.getStepAttributeBoolean(id_step, i, "field_repeat") );
inputFields[i] = field;
}
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "RssInputMeta.Exception.ErrorReadingRepository"), e);
}
}
示例14: 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
{
includeFilename = rep.getStepAttributeBoolean(id_step, "include");
filenameField = rep.getStepAttributeString (id_step, "include_field");
addResultFile = rep.getStepAttributeBoolean(id_step, "addresultfile");
validating = rep.getStepAttributeBoolean(id_step, "validating");
IsIgnoreEmptyFile = rep.getStepAttributeBoolean(id_step, "IsIgnoreEmptyFile");
doNotFailIfNoFile = rep.getStepAttributeBoolean(id_step, "doNotFailIfNoFile");
includeRowNumber = rep.getStepAttributeBoolean(id_step, "rownum");
rowNumberField = rep.getStepAttributeString (id_step, "rownum_field");
rowLimit = rep.getStepAttributeInteger(id_step, "limit");
encoding = rep.getStepAttributeString (id_step, "encoding");
int nrFiles = rep.countNrStepAttributes(id_step, "file_name");
int nrFields = rep.countNrStepAttributes(id_step, "field_name");
allocate(nrFiles, nrFields);
for (int i=0;i<nrFiles;i++)
{
fileName[i] = rep.getStepAttributeString (id_step, i, "file_name" );
fileMask[i] = rep.getStepAttributeString (id_step, i, "file_mask" );
fileRequired[i] = rep.getStepAttributeString(id_step, i, "file_required");
includeSubFolders[i] = rep.getStepAttributeString(id_step, i, "include_subfolders");
}
for (int i=0;i<nrFields;i++)
{
YamlInputField field = new YamlInputField();
field.setName( rep.getStepAttributeString (id_step, i, "field_name") );
field.setPath( rep.getStepAttributeString (id_step, i, "field_path") );
field.setType( ValueMeta.getType( rep.getStepAttributeString (id_step, i, "field_type") ) );
field.setFormat( rep.getStepAttributeString (id_step, i, "field_format") );
field.setCurrencySymbol( rep.getStepAttributeString (id_step, i, "field_currency") );
field.setDecimalSymbol( rep.getStepAttributeString (id_step, i, "field_decimal") );
field.setGroupSymbol( rep.getStepAttributeString (id_step, i, "field_group") );
field.setLength( (int)rep.getStepAttributeInteger(id_step, i, "field_length") );
field.setPrecision( (int)rep.getStepAttributeInteger(id_step, i, "field_precision") );
field.setTrimType( YamlInputField.getTrimTypeByCode( rep.getStepAttributeString (id_step, i, "field_trim_type") ));
inputFields[i] = field;
}
inFields = rep.getStepAttributeBoolean (id_step, "IsInFields");
IsAFile = rep.getStepAttributeBoolean (id_step, "IsAFile");
yamlField = rep.getStepAttributeString (id_step, "YamlField");
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "YamlInputMeta.Exception.ErrorReadingRepository"), e);
}
}
示例15: 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
{
encoding = rep.getStepAttributeString(id_step, "encoding");
nameSpace = rep.getStepAttributeString(id_step, "name_space");
mainElement = rep.getStepAttributeString(id_step, "xml_main_element");
repeatElement = rep.getStepAttributeString(id_step, "xml_repeat_element");
fileName = rep.getStepAttributeString(id_step, "file_name");
extension = rep.getStepAttributeString(id_step, "file_extention");
doNotOpenNewFileInit = rep.getStepAttributeBoolean(id_step, "do_not_open_newfile_init");
splitEvery = (int) rep.getStepAttributeInteger(id_step, "file_split");
stepNrInFilename = rep.getStepAttributeBoolean(id_step, "file_add_stepnr");
dateInFilename = rep.getStepAttributeBoolean(id_step, "file_add_date");
timeInFilename = rep.getStepAttributeBoolean(id_step, "file_add_time");
SpecifyFormat = rep.getStepAttributeBoolean(id_step, "SpecifyFormat");
date_time_format = rep.getStepAttributeString (id_step, "date_time_format");
addToResultFilenames = rep.getStepAttributeBoolean(id_step, "add_to_result_filenames");
zipped = rep.getStepAttributeBoolean(id_step, "file_zipped");
int nrfields = rep.countNrStepAttributes(id_step, "field_name");
allocate(nrfields);
for (int i = 0; i < nrfields; i++)
{
outputFields[i] = new XMLField();
outputFields[i].setFieldName(rep.getStepAttributeString(id_step, i, "field_name"));
outputFields[i].setElementName(rep.getStepAttributeString(id_step, i, "field_element"));
outputFields[i].setType(rep.getStepAttributeString(id_step, i, "field_type"));
outputFields[i].setFormat(rep.getStepAttributeString(id_step, i, "field_format"));
outputFields[i].setCurrencySymbol(rep.getStepAttributeString(id_step, i, "field_currency"));
outputFields[i].setDecimalSymbol(rep.getStepAttributeString(id_step, i, "field_decimal"));
outputFields[i].setGroupingSymbol(rep.getStepAttributeString(id_step, i, "field_group"));
outputFields[i].setNullString(rep.getStepAttributeString(id_step, i, "field_nullif"));
outputFields[i].setLength((int) rep.getStepAttributeInteger(id_step, i, "field_length"));
outputFields[i]
.setPrecision((int) rep.getStepAttributeInteger(id_step, i, "field_precision"));
}
} catch (Exception e)
{
throw new KettleException("Unexpected error reading step information from the repository", e);
}
}