org.specrunner.dumper.core
Class SourceDumperWritables

java.lang.Object
  extended by org.specrunner.source.core.EncodedImpl
      extended by org.specrunner.dumper.core.AbstractSourceDumperFile
          extended by org.specrunner.dumper.core.SourceDumperWritables
All Implemented Interfaces:
ISourceDumper, IEncoded

public class SourceDumperWritables
extends AbstractSourceDumperFile

Dumps the writables associated to the result set.

Author:
Thiago Santos

Field Summary
static String LABEL_FIELD
          Label name.
 
Fields inherited from class org.specrunner.dumper.core.AbstractSourceDumperFile
GAP, outputDirectory, outputFile, outputName
 
Fields inherited from interface org.specrunner.source.IEncoded
DEFAULT_ENCODING, FEATURE_ENCODING
 
Constructor Summary
SourceDumperWritables()
           
 
Method Summary
protected  void addElement(int index, String prefixToRemove, IWritable w, Map<String,String> references, IBlock block)
          Add element parts of writable elements.
protected  void addWritable(File dir, int index, String prefixToRemove, IResult r)
          Write elements.
 void dump(ISource source, IResultSet result, Map<String,Object> model)
          Extra information to be dumped.
 
Methods inherited from class org.specrunner.dumper.core.AbstractSourceDumperFile
appendResources, checkParent, clean, detailReport, getOutputDirectory, getOutputFile, getOutputName, getSerializer, outputDirectory, outputName, saveTo, set, setFeatures, setOutputDirectory, setOutputFile, setOutputName
 
Methods inherited from class org.specrunner.source.core.EncodedImpl
getEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.specrunner.source.IEncoded
getEncoding
 

Field Detail

LABEL_FIELD

public static final String LABEL_FIELD
Label name.

See Also:
Constant Field Values
Constructor Detail

SourceDumperWritables

public SourceDumperWritables()
Method Detail

dump

public void dump(ISource source,
                 IResultSet result,
                 Map<String,Object> model)
          throws SourceDumperException
Description copied from interface: ISourceDumper
Extra information to be dumped.

Parameters:
source - The specification input.
result - The result.
model - Extra information model.
Throws:
SourceDumperException - On dumping error.

addWritable

protected void addWritable(File dir,
                           int index,
                           String prefixToRemove,
                           IResult r)
                    throws ResultException
Write elements.

Parameters:
dir - The snapshot file.
index - The index.
prefixToRemove - The text prefix to remove on relative links.
r - The result set.
Throws:
ResultException - On result exception.

addElement

protected void addElement(int index,
                          String prefixToRemove,
                          IWritable w,
                          Map<String,String> references,
                          IBlock block)
Add element parts of writable elements.

Parameters:
index - The index.
prefixToRemove - The prefix to remove in case o relative references.
w - The writable.
references - A mapping of references.
block - The block.


Copyright © 2014. All rights reserved.