@Test public void testGetXml() { String xml = jsonInputMeta.getXML(); Assert.assertEquals( xml, TEST_XML ); }
@Override public String getXML() { StringBuilder retval = new StringBuilder( 400 ); retval.append( " " ).append( XMLHandler.addTagValue( "include", includeFilename ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_field", filenameField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum", includeRowNumber ) ); retval.append( " " ).append( XMLHandler.addTagValue( "addresultfile", addResultFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "readurl", readurl ) ); retval.append( " " ).append( XMLHandler.addTagValue( "removeSourceField", removeSourceField ) ); retval.append( " " + XMLHandler.addTagValue( "IsIgnoreEmptyFile", isIgnoreEmptyFile ) ); retval.append( " " + XMLHandler.addTagValue( "doNotFailIfNoFile", doNotFailIfNoFile ) ); retval.append( " " + XMLHandler.addTagValue( "ignoreMissingPath", ignoreMissingPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum_field", rowNumberField ) ); retval.append( " <file>" ).append( Const.CR ); for ( int i = 0; i < getFileName().length; i++ ) { retval.append( " " ).append( XMLHandler.addTagValue( "name", getFileName()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "filemask", getFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "exclude_filemask", getExcludeFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "file_required", getFileRequired()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_subfolders", getIncludeSubFolders()[i] ) ); } retval.append( " </file>" ).append( Const.CR ); retval.append( " <fields>" ).append( Const.CR ); for ( int i = 0; i < getInputFields().length; i++ ) { JsonInputField field = getInputFields()[i]; retval.append( field.getXML() ); } retval.append( " </fields>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "limit", rowLimit ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsInFields", inFields ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsAFile", isAFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "valueField", valueField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "shortFileFieldName", getShortFileNameField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "pathFieldName", getPathField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "hiddenFieldName", isHiddenField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "lastModificationTimeFieldName", getLastModificationDateField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "uriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rootUriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "extensionFieldName", getExtensionField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sizeFieldName", getSizeField() ) ); return retval.toString(); }
JsonInputMeta extends
    BaseFileInputMeta<JsonInputMeta.AdditionalFileOutputFields, JsonInputMeta.InputFiles, JsonInputField> implements
    StepMetaInterface { @Override public String getXML() { StringBuilder retval = new StringBuilder( 400 ); retval.append( " " ).append( XMLHandler.addTagValue( "include", includeFilename ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_field", filenameField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum", includeRowNumber ) ); retval.append( " " ).append( XMLHandler.addTagValue( "addresultfile", addResultFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "readurl", readurl ) ); retval.append( " " ).append( XMLHandler.addTagValue( "removeSourceField", removeSourceField ) ); retval.append( " " + XMLHandler.addTagValue( "IsIgnoreEmptyFile", isIgnoreEmptyFile ) ); retval.append( " " + XMLHandler.addTagValue( "doNotFailIfNoFile", doNotFailIfNoFile ) ); retval.append( " " + XMLHandler.addTagValue( "ignoreMissingPath", ignoreMissingPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum_field", rowNumberField ) ); retval.append( " <file>" ).append( Const.CR ); for ( int i = 0; i < getFileName().length; i++ ) { retval.append( " " ).append( XMLHandler.addTagValue( "name", getFileName()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "filemask", getFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "exclude_filemask", getExcludeFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "file_required", getFileRequired()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_subfolders", getIncludeSubFolders()[i] ) ); } retval.append( " </file>" ).append( Const.CR ); retval.append( " <fields>" ).append( Const.CR ); for ( int i = 0; i < getInputFields().length; i++ ) { JsonInputField field = getInputFields()[i]; retval.append( field.getXML() ); } retval.append( " </fields>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "limit", rowLimit ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsInFields", inFields ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsAFile", isAFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "valueField", valueField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "shortFileFieldName", getShortFileNameField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "pathFieldName", getPathField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "hiddenFieldName", isHiddenField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "lastModificationTimeFieldName", getLastModificationDateField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "uriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rootUriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "extensionFieldName", getExtensionField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sizeFieldName", getSizeField() ) ); return retval.toString(); } }
JsonInputMeta extends
    BaseFileInputMeta<JsonInputMeta.AdditionalFileOutputFields, JsonInputMeta.InputFiles, JsonInputField> implements
    StepMetaInterface { @Override public String getXML() { StringBuilder retval = new StringBuilder( 400 ); retval.append( " " ).append( XMLHandler.addTagValue( "include", includeFilename ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_field", filenameField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum", includeRowNumber ) ); retval.append( " " ).append( XMLHandler.addTagValue( "addresultfile", addResultFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "readurl", readurl ) ); retval.append( " " ).append( XMLHandler.addTagValue( "removeSourceField", removeSourceField ) ); retval.append( " " + XMLHandler.addTagValue( "IsIgnoreEmptyFile", isIgnoreEmptyFile ) ); retval.append( " " + XMLHandler.addTagValue( "doNotFailIfNoFile", doNotFailIfNoFile ) ); retval.append( " " + XMLHandler.addTagValue( "ignoreMissingPath", ignoreMissingPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum_field", rowNumberField ) ); retval.append( " <file>" ).append( Const.CR ); for ( int i = 0; i < getFileName().length; i++ ) { retval.append( " " ).append( XMLHandler.addTagValue( "name", getFileName()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "filemask", getFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "exclude_filemask", getExcludeFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "file_required", getFileRequired()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_subfolders", getIncludeSubFolders()[i] ) ); } retval.append( " </file>" ).append( Const.CR ); retval.append( " <fields>" ).append( Const.CR ); for ( int i = 0; i < getInputFields().length; i++ ) { JsonInputField field = getInputFields()[i]; retval.append( field.getXML() ); } retval.append( " </fields>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "limit", rowLimit ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsInFields", inFields ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsAFile", isAFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "valueField", valueField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "shortFileFieldName", getShortFileNameField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "pathFieldName", getPathField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "hiddenFieldName", isHiddenField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "lastModificationTimeFieldName", getLastModificationDateField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "uriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rootUriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "extensionFieldName", getExtensionField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sizeFieldName", getSizeField() ) ); return retval.toString(); } JsonInputMeta(); }
JsonInputMeta extends
    BaseFileInputMeta<JsonInputMeta.AdditionalFileOutputFields, JsonInputMeta.InputFiles, JsonInputField> implements
    StepMetaInterface { @Override public String getXML() { StringBuilder retval = new StringBuilder( 400 ); retval.append( " " ).append( XMLHandler.addTagValue( "include", includeFilename ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_field", filenameField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum", includeRowNumber ) ); retval.append( " " ).append( XMLHandler.addTagValue( "addresultfile", addResultFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "readurl", readurl ) ); retval.append( " " ).append( XMLHandler.addTagValue( "removeSourceField", removeSourceField ) ); retval.append( " " + XMLHandler.addTagValue( "IsIgnoreEmptyFile", isIgnoreEmptyFile ) ); retval.append( " " + XMLHandler.addTagValue( "doNotFailIfNoFile", doNotFailIfNoFile ) ); retval.append( " " + XMLHandler.addTagValue( "ignoreMissingPath", ignoreMissingPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum_field", rowNumberField ) ); retval.append( " <file>" ).append( Const.CR ); for ( int i = 0; i < getFileName().length; i++ ) { retval.append( " " ).append( XMLHandler.addTagValue( "name", getFileName()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "filemask", getFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "exclude_filemask", getExcludeFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "file_required", getFileRequired()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_subfolders", getIncludeSubFolders()[i] ) ); } retval.append( " </file>" ).append( Const.CR ); retval.append( " <fields>" ).append( Const.CR ); for ( int i = 0; i < getInputFields().length; i++ ) { JsonInputField field = getInputFields()[i]; retval.append( field.getXML() ); } retval.append( " </fields>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "limit", rowLimit ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsInFields", inFields ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsAFile", isAFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "valueField", valueField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "shortFileFieldName", getShortFileNameField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "pathFieldName", getPathField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "hiddenFieldName", isHiddenField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "lastModificationTimeFieldName", getLastModificationDateField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "uriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rootUriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "extensionFieldName", getExtensionField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sizeFieldName", getSizeField() ) ); return retval.toString(); } JsonInputMeta(); String getShortFileNameField(); void setShortFileNameField( String field ); String getPathField(); void setPathField( String field ); String isHiddenField(); void setIsHiddenField( String field ); String getLastModificationDateField(); void setLastModificationDateField( String field ); String getUriField(); void setUriField( String field ); String getRootUriField(); void setRootUriField( String field ); String getExtensionField(); void setExtensionField( String field ); String getSizeField(); void setSizeField( String field ); boolean addResultFile(); boolean isReadUrl(); void setReadUrl( boolean readurl ); boolean isRemoveSourceField(); void setRemoveSourceField( boolean removeSourceField ); void setAddResultFile( boolean addResultFile ); JsonInputField[] getInputFields(); void setInputFields( JsonInputField[] inputFields ); @Deprecated String[] getExludeFileMask(); String[] getExcludeFileMask(); void setExcludeFileMask( String[] excludeFileMask ); String getFieldValue(); void setFieldValue( String value ); boolean isInFields(); void setInFields( boolean inFields ); String[] getFileMask(); void setFileMask( String[] fileMask ); String[] getFileRequired(); void setFileRequired( String[] fileRequiredin ); void setIncludeSubFolders( String[] includeSubFoldersin ); String[] getFileName(); void setFileName( String[] fileName ); String getFilenameField(); void setFilenameField( String filenameField ); boolean includeFilename(); void setIncludeFilename( boolean includeFilename ); boolean includeRowNumber(); void setIncludeRowNumber( boolean includeRowNumber ); long getRowLimit(); void setRowLimit( long rowLimit ); boolean isIgnoreEmptyFile(); void setIgnoreEmptyFile( boolean isIgnoreEmptyFile ); @Deprecated boolean isdoNotFailIfNoFile(); @Deprecated void setdoNotFailIfNoFile( boolean doNotFailIfNoFile ); boolean isDoNotFailIfNoFile(); void setDoNotFailIfNoFile( boolean doNotFailIfNoFile ); boolean isIgnoreMissingPath(); void setIgnoreMissingPath( boolean ignoreMissingPath ); String getRowNumberField(); void setRowNumberField( String rowNumberField ); boolean getIsAFile(); void setIsAFile( boolean isAFile ); String[] getIncludeSubFolders(); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); @Override JsonInputMeta clone(); @Override String getXML(); String getRequiredFilesDesc( String tt ); @Deprecated //?needs to be public? void allocate( int nrFiles, int nrFields ); @Override void setDefault(); @Override void getFields( RowMetaInterface rowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); FileInputList getFiles( VariableSpace space ); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ); @Override StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
      Trans trans ); @Override StepDataInterface getStepData(); @Override boolean supportsErrorHandling(); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
    ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); @Override String getEncoding(); }
JsonInputMeta extends
    BaseFileInputMeta<JsonInputMeta.AdditionalFileOutputFields, JsonInputMeta.InputFiles, JsonInputField> implements
    StepMetaInterface { @Override public String getXML() { StringBuilder retval = new StringBuilder( 400 ); retval.append( " " ).append( XMLHandler.addTagValue( "include", includeFilename ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_field", filenameField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum", includeRowNumber ) ); retval.append( " " ).append( XMLHandler.addTagValue( "addresultfile", addResultFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "readurl", readurl ) ); retval.append( " " ).append( XMLHandler.addTagValue( "removeSourceField", removeSourceField ) ); retval.append( " " + XMLHandler.addTagValue( "IsIgnoreEmptyFile", isIgnoreEmptyFile ) ); retval.append( " " + XMLHandler.addTagValue( "doNotFailIfNoFile", doNotFailIfNoFile ) ); retval.append( " " + XMLHandler.addTagValue( "ignoreMissingPath", ignoreMissingPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rownum_field", rowNumberField ) ); retval.append( " <file>" ).append( Const.CR ); for ( int i = 0; i < getFileName().length; i++ ) { retval.append( " " ).append( XMLHandler.addTagValue( "name", getFileName()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "filemask", getFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "exclude_filemask", getExcludeFileMask()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "file_required", getFileRequired()[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "include_subfolders", getIncludeSubFolders()[i] ) ); } retval.append( " </file>" ).append( Const.CR ); retval.append( " <fields>" ).append( Const.CR ); for ( int i = 0; i < getInputFields().length; i++ ) { JsonInputField field = getInputFields()[i]; retval.append( field.getXML() ); } retval.append( " </fields>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "limit", rowLimit ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsInFields", inFields ) ); retval.append( " " ).append( XMLHandler.addTagValue( "IsAFile", isAFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "valueField", valueField ) ); retval.append( " " ).append( XMLHandler.addTagValue( "shortFileFieldName", getShortFileNameField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "pathFieldName", getPathField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "hiddenFieldName", isHiddenField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "lastModificationTimeFieldName", getLastModificationDateField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "uriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "rootUriNameFieldName", getUriField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "extensionFieldName", getExtensionField() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sizeFieldName", getSizeField() ) ); return retval.toString(); } JsonInputMeta(); String getShortFileNameField(); void setShortFileNameField( String field ); String getPathField(); void setPathField( String field ); String isHiddenField(); void setIsHiddenField( String field ); String getLastModificationDateField(); void setLastModificationDateField( String field ); String getUriField(); void setUriField( String field ); String getRootUriField(); void setRootUriField( String field ); String getExtensionField(); void setExtensionField( String field ); String getSizeField(); void setSizeField( String field ); boolean addResultFile(); boolean isReadUrl(); void setReadUrl( boolean readurl ); boolean isRemoveSourceField(); void setRemoveSourceField( boolean removeSourceField ); void setAddResultFile( boolean addResultFile ); JsonInputField[] getInputFields(); void setInputFields( JsonInputField[] inputFields ); @Deprecated String[] getExludeFileMask(); String[] getExcludeFileMask(); void setExcludeFileMask( String[] excludeFileMask ); String getFieldValue(); void setFieldValue( String value ); boolean isInFields(); void setInFields( boolean inFields ); String[] getFileMask(); void setFileMask( String[] fileMask ); String[] getFileRequired(); void setFileRequired( String[] fileRequiredin ); void setIncludeSubFolders( String[] includeSubFoldersin ); String[] getFileName(); void setFileName( String[] fileName ); String getFilenameField(); void setFilenameField( String filenameField ); boolean includeFilename(); void setIncludeFilename( boolean includeFilename ); boolean includeRowNumber(); void setIncludeRowNumber( boolean includeRowNumber ); long getRowLimit(); void setRowLimit( long rowLimit ); boolean isIgnoreEmptyFile(); void setIgnoreEmptyFile( boolean isIgnoreEmptyFile ); @Deprecated boolean isdoNotFailIfNoFile(); @Deprecated void setdoNotFailIfNoFile( boolean doNotFailIfNoFile ); boolean isDoNotFailIfNoFile(); void setDoNotFailIfNoFile( boolean doNotFailIfNoFile ); boolean isIgnoreMissingPath(); void setIgnoreMissingPath( boolean ignoreMissingPath ); String getRowNumberField(); void setRowNumberField( String rowNumberField ); boolean getIsAFile(); void setIsAFile( boolean isAFile ); String[] getIncludeSubFolders(); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); @Override JsonInputMeta clone(); @Override String getXML(); String getRequiredFilesDesc( String tt ); @Deprecated //?needs to be public? void allocate( int nrFiles, int nrFields ); @Override void setDefault(); @Override void getFields( RowMetaInterface rowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); FileInputList getFiles( VariableSpace space ); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ); @Override StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
      Trans trans ); @Override StepDataInterface getStepData(); @Override boolean supportsErrorHandling(); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
    ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); @Override String getEncoding(); static final String[] RequiredFilesDesc; }