edu.isi.pegasus.planner.code.generator

## Class Stork

- java.lang.Object
- - edu.isi.pegasus.planner.code.generator.Abstract
  - - edu.isi.pegasus.planner.code.generator.Stork

All Implemented Interfaces:
  CodeGenerator

    public class Stork
    extends Abstract

This implementation generates files that can be understood by Stork.

Version:
  $Revision$
Author:
  Karan Vahi

### Field Summary

Fields
`static java.lang.String` `mEndSeparator` The nice end separator, define once, use often.
`private LogManager` `mLogger` The LogManager object which is used to log all the messages.
`static java.lang.String` `mStartSeparator` The nice start separator, define once, use often.

### Fields inherited from class edu.isi.pegasus.planner.code.generator.Abstract

`mBag, mPOptions, mProps, mSubmitFileDir`

### Fields inherited from interface edu.isi.pegasus.planner.code.CodeGenerator

`VERSION`

### Constructor Summary

Constructors
Constructor and Description
`Stork()` The default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.util.Collection<java.io.File>` `generateCode(ADag dag)` Generates the code for the concrete workflow in the input format of the workflow executor being used.
`void` `generateCode(ADag dag, Job job)` Generates the code for a single job in the Stork format.
`java.util.Map<java.lang.String,java.lang.String>` `getAdditionalBraindumpEntries(ADag workflow)` Returns an empty map
`java.lang.String` `getFileBaseName(Job job)` Returns the basename of the file to which the job is written to.
`void` `initialize(PegasusBag bag)` Initializes the Code Generator implementation.

### Methods inherited from class edu.isi.pegasus.planner.code.generator.Abstract

`getDAGFilename, getDAGFilename, getWriter, reset, startMonitoring, writeOutBraindump, writeOutDAXReplicaStore, writeOutNotifications, writeOutStampedeEvents`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### mStartSeparator

    public static final java.lang.String mStartSeparator

The nice start separator, define once, use often.

See Also:
  Constant Field Values

#### mEndSeparator

    public static final java.lang.String mEndSeparator

The nice end separator, define once, use often.

See Also:
  Constant Field Values

#### mLogger

    private LogManager mLogger

The LogManager object which is used to log all the messages.

### Constructor Detail

#### Stork

    public Stork()

The default constructor.

### Method Detail

#### initialize

    public void initialize(PegasusBag bag)
                    throws CodeGeneratorException

Initializes the Code Generator implementation.

Specified by:
  `initialize` in interface `CodeGenerator`
Overrides:
  `initialize` in class `Abstract`
Parameters:
  `bag` - the bag of initialization objects.
Throws:
  `CodeGeneratorException` - in case of any error occuring code generation.

#### generateCode

    public java.util.Collection<java.io.File> generateCode(ADag dag)
                                                    throws CodeGeneratorException

Generates the code for the concrete workflow in the input format of the workflow executor being used. The method is not yet implemented.

Parameters:
  `dag` - the concrete workflow.
Returns:
  null
Throws:
  `CodeGeneratorException` - in case of any error occuring code generation.

#### generateCode

    public void generateCode(ADag dag,
                             Job job)
                      throws CodeGeneratorException

Generates the code for a single job in the Stork format.

Parameters:
  `dag` - the dag of which the job is a part of.
  `job` - the `Job` object holding the information about that particular job.
Throws:
  `CodeGeneratorException` - in case of any error occuring code generation.

#### getFileBaseName

    public java.lang.String getFileBaseName(Job job)

Returns the basename of the file to which the job is written to.

Overrides:
  `getFileBaseName` in class `Abstract`
Parameters:
  `job` - the job whose job information needs to be written.
Returns:
  the basename of the file.

#### getAdditionalBraindumpEntries

    public java.util.Map<java.lang.String,java.lang.String> getAdditionalBraindumpEntries(ADag workflow)

Returns an empty map

Specified by:
  `getAdditionalBraindumpEntries` in class `Abstract`
Parameters:
  `workflow` - the workflow.
Returns:
  map containing extra entries