@Override public List<StepInjectionMetaEntry> getStepInjectionMetadataEntries() throws KettleException { List<StepInjectionMetaEntry> all = new ArrayList<StepInjectionMetaEntry>(); StepInjectionMetaEntry fieldsEntry = new StepInjectionMetaEntry( "FIELDS", ValueMetaInterface.TYPE_NONE, "All the fields on the spreadsheets" ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( "FIELD", ValueMetaInterface.TYPE_NONE, "All the fields on the spreadsheets" ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : Entry.values() ) { if ( entry.getValueType() != ValueMetaInterface.TYPE_NONE ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry ); } } return all; }
@Override public List<StepInjectionMetaEntry> getStepInjectionMetadataEntries() throws KettleException { List<StepInjectionMetaEntry> all = new ArrayList<StepInjectionMetaEntry>(); // The fields // StepInjectionMetaEntry fieldsEntry = new StepInjectionMetaEntry( Entry.EXPRESSION_FIELDS.name(), ValueMetaInterface.TYPE_NONE, Entry.EXPRESSION_FIELDS.description ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.EXPRESSION_FIELD.name(), ValueMetaInterface.TYPE_NONE, Entry.EXPRESSION_FIELD.description ); fieldsEntry.getDetails().add( fieldEntry ); Entry[] fieldsEntries = new Entry[] { Entry.NEW_FIELDNAME, Entry.JAVA_EXPRESSION, Entry.VALUE_TYPE, Entry.LENGTH, Entry.PRECISION, Entry.REPLACE_VALUE, }; for ( Entry entry : fieldsEntries ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry ); } return all; }
protected StepInjectionMetaEntry createStepMetaInjectionEntry( StepMetaInjectionEnumEntry entry ) { StepInjectionMetaEntry stepInjectionMetaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); return stepInjectionMetaEntry; }
@Override public List<StepInjectionMetaEntry> getStepInjectionMetadataEntries() throws KettleException { List<StepInjectionMetaEntry> all = new ArrayList<StepInjectionMetaEntry>(); StepInjectionMetaEntry fieldsEntry = new StepInjectionMetaEntry( "FIELDS", ValueMetaInterface.TYPE_NONE, BaseMessages.getString( PKG, "ExcelWriterMetaInjection.AllFields" ) ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( "FIELD", ValueMetaInterface.TYPE_NONE, BaseMessages.getString( PKG, "ExcelWriterMetaInjection.AllFields" ) ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : Entry.values() ) { if ( entry.getValueType() != ValueMetaInterface.TYPE_NONE ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry ); } } return all; }
Entry.ADD_TO_RESULT, }; for ( Entry topEntry : topEntries ) { all.add( new StepInjectionMetaEntry( topEntry.name(), topEntry.getValueType(), topEntry.getDescription() ) ); new StepInjectionMetaEntry( Entry.JSON_FIELDS.name(), ValueMetaInterface.TYPE_NONE, Entry.JSON_FIELDS.description ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.JSON_FIELD.name(), ValueMetaInterface.TYPE_NONE, Entry.JSON_FIELD.description ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : fieldsEntries ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry );
Entry.RETURN_AUTO_GENERATED_KEY, Entry.AUTO_GENERATED_KEY_FIELD, }; for ( Entry topEntry : topEntries ) { all.add( new StepInjectionMetaEntry( topEntry.name(), topEntry.getValueType(), topEntry.getDescription() ) ); new StepInjectionMetaEntry( Entry.DATABASE_FIELDS.name(), ValueMetaInterface.TYPE_NONE, Entry.DATABASE_FIELDS.description ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.DATABASE_FIELD.name(), ValueMetaInterface.TYPE_NONE, Entry.DATABASE_FIELD.description ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : fieldsEntries ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry );
Entry.ADD_FILES_TO_RESULT, Entry.RUN_IN_PARALLEL, Entry.ENCODING, }; for ( Entry topEntry : topEntries ) { all.add( new StepInjectionMetaEntry( topEntry.name(), topEntry.getValueType(), topEntry.getDescription() ) ); new StepInjectionMetaEntry( Entry.FIELDS.name(), ValueMetaInterface.TYPE_NONE, Entry.FIELDS.description ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.FIELD.name(), ValueMetaInterface.TYPE_NONE, Entry.FIELD.description ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : aggEntries ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry );
Entry.FAST_DATA_DUMP, Entry.SPLIT_EVERY, Entry.ADD_ENDING_LINE, }; for ( Entry topEntry : topEntries ) { all.add( new StepInjectionMetaEntry( topEntry.name(), topEntry.getValueType(), topEntry.getDescription() ) ); new StepInjectionMetaEntry( Entry.CONCAT_FIELDS.name(), ValueMetaInterface.TYPE_NONE, Entry.CONCAT_FIELDS.description ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.CONCAT_FIELD.name(), ValueMetaInterface.TYPE_NONE, Entry.CONCAT_FIELD.description ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : fieldsEntries ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry );
Entry.GROUP_LINE_NUMBER_FIELDNAME, Entry.ALLWAYS_PASS_A_ROW, }; for ( Entry topEntry : topEntries ) { all.add( new StepInjectionMetaEntry( topEntry.name(), topEntry.getValueType(), topEntry.getDescription() ) ); new StepInjectionMetaEntry( Entry.GROUP_FIELDS.name(), ValueMetaInterface.TYPE_NONE, Entry.GROUP_FIELDS.description ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.GROUP_FIELD.name(), ValueMetaInterface.TYPE_NONE, Entry.GROUP_FIELD.description ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : fieldsEntries ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry ); new StepInjectionMetaEntry( Entry.AGG_FIELDS.name(), ValueMetaInterface.TYPE_NONE, Entry.AGG_FIELDS.description ); all.add( aggsEntry ); StepInjectionMetaEntry aggEntry = new StepInjectionMetaEntry( Entry.AGG_FIELD.name(), ValueMetaInterface.TYPE_NONE, Entry.AGG_FIELD.description ); aggsEntry.getDetails().add( aggEntry ); for ( Entry entry : aggEntries ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); aggEntry.getDetails().add( metaEntry );
/** * Creates the entry. * * @param attr the attr * @param PKG the pkg * @return the step injection meta entry */ protected StepInjectionMetaEntry createEntry( KettleAttributeInterface attr, Class<?> PKG ) { return new StepInjectionMetaEntry( attr.getKey(), attr.getType(), BaseMessages.getString( PKG, attr .getDescription() ) ); }
@Override public List<StepInjectionMetaEntry> getStepInjectionMetadataEntries() throws KettleException { List<StepInjectionMetaEntry> all = new ArrayList<StepInjectionMetaEntry>(); // Add the fields... // StepInjectionMetaEntry fieldsEntry = new StepInjectionMetaEntry( Entry.FIELDS.name(), Entry.FIELDS.getValueType(), Entry.FIELDS .getDescription() ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.FIELD.name(), Entry.FIELD.getValueType(), Entry.FIELD.getDescription() ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : Entry.values() ) { if ( entry.getParent() == Entry.FIELD ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry ); } else { if ( entry.getParent() == null && entry != Entry.FIELDS && entry != Entry.FIELD ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); all.add( metaEntry ); } } } return all; }
public static StepInjectionMetaEntry getEntry( StepMetaInjectionEntryInterface entryInterface, Object value ) { StepInjectionMetaEntry entry = new StepInjectionMetaEntry( entryInterface.name(), entryInterface.getValueType(),
StepInjectionMetaEntry fieldsEntry = new StepInjectionMetaEntry( Entry.FIELDS.name(), Entry.FIELDS.getValueType(), Entry.FIELDS.getDescription() ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.FIELD.name(), Entry.FIELD.getValueType(), Entry.FIELD.getDescription() ); fieldsEntry.getDetails().add( fieldEntry ); if ( entry.getParent() == Entry.FIELD ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry ); StepInjectionMetaEntry sheetsEntry = new StepInjectionMetaEntry( Entry.DATA_LINES.name(), Entry.DATA_LINES.getValueType(), Entry.DATA_LINES.getDescription() ); all.add( sheetsEntry ); StepInjectionMetaEntry sheetEntry = new StepInjectionMetaEntry( Entry.DATA_LINE.name(), Entry.DATA_LINE.getValueType(), Entry.DATA_LINE.getDescription() ); sheetsEntry.getDetails().add( sheetEntry ); if ( entry.getParent() == Entry.DATA_LINE ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); sheetEntry.getDetails().add( metaEntry );
all.add( new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ) ); new StepInjectionMetaEntry( Entry.FILENAME_LINES.name(), ValueMetaInterface.TYPE_NONE, Entry.FILENAME_LINES.description ); all.add( filesEntry ); StepInjectionMetaEntry fileEntry = new StepInjectionMetaEntry( Entry.FILENAME_LINE.name(), ValueMetaInterface.TYPE_NONE, Entry.FILENAME_LINE.description ); filesEntry.getDetails().add( fileEntry ); if ( entry.getParent() == Entry.FILENAME_LINE ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fileEntry.getDetails().add( metaEntry ); new StepInjectionMetaEntry( Entry.FIELDS.name(), Entry.FIELDS.getValueType(), Entry.FIELDS .getDescription() ); all.add( fieldsEntry ); StepInjectionMetaEntry fieldEntry = new StepInjectionMetaEntry( Entry.FIELD.name(), Entry.FIELD.getValueType(), Entry.FIELD.getDescription() ); fieldsEntry.getDetails().add( fieldEntry ); for ( Entry entry : Entry.values() ) { if ( entry.getParent() == Entry.FIELD ) { StepInjectionMetaEntry metaEntry = new StepInjectionMetaEntry( entry.name(), entry.getValueType(), entry.getDescription() ); fieldEntry.getDetails().add( metaEntry );