public RowMetaAndData getRow() {
    RowMetaAndData row = new RowMetaAndData();

    // First the type
    row.addValue( new ValueMetaString( "type" ), getTypeDesc() );

    // The filename
    row.addValue( new ValueMetaString( "filename" ), file.getName().getBaseName() );

    // The path
    row.addValue( new ValueMetaString( "path" ), Const.optionallyDecodeUriString( file.getName().getURI() ) );

    // The origin parent
    row.addValue( new ValueMetaString( "parentorigin" ), originParent );

    // The origin
    row.addValue( new ValueMetaString( "origin" ), origin );

    // The comment
    row.addValue( new ValueMetaString( "comment" ), comment );

    // The timestamp
    row.addValue( new ValueMetaDate( "timestamp" ), timestamp );

    return row;
  }
@Test
  public void testGetRow() throws KettleFileException, FileSystemException {
    File tempDir = new File( new TemporaryFolder().toString() );
    FileObject tempFile = KettleVFS.createTempFile( "prefix", "suffix", tempDir.toString() );
    Date timeBeforeFile = Calendar.getInstance().getTime();
    ResultFile resultFile = new ResultFile( ResultFile.FILE_TYPE_GENERAL, tempFile, "myOriginParent", "myOrigin" );
    Date timeAfterFile = Calendar.getInstance().getTime();

    assertNotNull( resultFile );
    RowMetaInterface rm = resultFile.getRow().getRowMeta();
    assertEquals( 7, rm.getValueMetaList().size() );
    assertEquals( ValueMetaInterface.TYPE_STRING, rm.getValueMeta( 0 ).getType() );
    assertEquals( ValueMetaInterface.TYPE_STRING, rm.getValueMeta( 1 ).getType() );
    assertEquals( ValueMetaInterface.TYPE_STRING, rm.getValueMeta( 2 ).getType() );
    assertEquals( ValueMetaInterface.TYPE_STRING, rm.getValueMeta( 3 ).getType() );
    assertEquals( ValueMetaInterface.TYPE_STRING, rm.getValueMeta( 4 ).getType() );
    assertEquals( ValueMetaInterface.TYPE_STRING, rm.getValueMeta( 5 ).getType() );
    assertEquals( ValueMetaInterface.TYPE_DATE, rm.getValueMeta( 6 ).getType() );

    assertEquals( ResultFile.FILE_TYPE_GENERAL, resultFile.getType() );
    assertEquals( "myOrigin", resultFile.getOrigin() );
    assertEquals( "myOriginParent", resultFile.getOriginParent() );
    assertTrue( "ResultFile timestamp is created in the expected window",
      timeBeforeFile.compareTo( resultFile.getTimestamp() ) <= 0
      && timeAfterFile.compareTo( resultFile.getTimestamp() ) >= 0 );

    tempFile.delete();
    tempDir.delete();
  }