// Path: src/main/java/org/calrissian/flowmix/api/Flow.java
// public class Flow implements Serializable{
// 
//     String id;
//     String name;
//     String description;
// 
//     Map<String,StreamDef> streams = new HashMap<String, StreamDef>();
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public Collection<StreamDef> getStreams() {
//         return streams.values();
//     }
// 
//     public StreamDef getStream(String name) {
//         return streams.get(name);
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     public void setStreams(List<StreamDef> streams) {
//         for(StreamDef def : streams)
//             this.streams.put(def.getName(), def);
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         Flow flow = (Flow) o;
// 
//         if (description != null ? !description.equals(flow.description) : flow.description != null) return false;
//         if (id != null ? !id.equals(flow.id) : flow.id != null) return false;
//         if (name != null ? !name.equals(flow.name) : flow.name != null) return false;
//         if (streams != null ? !streams.equals(flow.streams) : flow.streams != null) return false;
// 
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = id != null ? id.hashCode() : 0;
//         result = 31 * result + (name != null ? name.hashCode() : 0);
//         result = 31 * result + (description != null ? description.hashCode() : 0);
//         result = 31 * result + (streams != null ? streams.hashCode() : 0);
//         return result;
//     }
// 
//     @Override
//     public String toString() {
//         return "Flow{" +
//                 "id='" + id + '\'' +
//                 ", name='" + name + '\'' +
//                 ", description='" + description + '\'' +
//                 ", streams=" + streams +
//                 '}';
//     }
// }
// 
// Path: src/main/java/org/calrissian/flowmix/core/Constants.java
// public static final String FLOW_LOADER_STREAM = "flowLoaderStream";


import java.util.Collection;
import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichSpout;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Values;
import org.calrissian.flowmix.api.Flow;
import static org.calrissian.flowmix.core.Constants.FLOW_LOADER_STREAM;
package org.calrissian.flowmix.api.storm.spout;




public abstract class FlowLoaderBaseSpout extends BaseRichSpout {

  @Override
  public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {
    outputFieldsDeclarer.declareStream(FLOW_LOADER_STREAM, new Fields("flows"));
  }


// Path: src/main/java/org/calrissian/flowmix/api/Flow.java
// public class Flow implements Serializable{
// 
//     String id;
//     String name;
//     String description;
// 
//     Map<String,StreamDef> streams = new HashMap<String, StreamDef>();
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public Collection<StreamDef> getStreams() {
//         return streams.values();
//     }
// 
//     public StreamDef getStream(String name) {
//         return streams.get(name);
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     public void setStreams(List<StreamDef> streams) {
//         for(StreamDef def : streams)
//             this.streams.put(def.getName(), def);
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
// 
//         Flow flow = (Flow) o;
// 
//         if (description != null ? !description.equals(flow.description) : flow.description != null) return false;
//         if (id != null ? !id.equals(flow.id) : flow.id != null) return false;
//         if (name != null ? !name.equals(flow.name) : flow.name != null) return false;
//         if (streams != null ? !streams.equals(flow.streams) : flow.streams != null) return false;
// 
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = id != null ? id.hashCode() : 0;
//         result = 31 * result + (name != null ? name.hashCode() : 0);
//         result = 31 * result + (description != null ? description.hashCode() : 0);
//         result = 31 * result + (streams != null ? streams.hashCode() : 0);
//         return result;
//     }
// 
//     @Override
//     public String toString() {
//         return "Flow{" +
//                 "id='" + id + '\'' +
//                 ", name='" + name + '\'' +
//                 ", description='" + description + '\'' +
//                 ", streams=" + streams +
//                 '}';
//     }
// }
// 
// Path: src/main/java/org/calrissian/flowmix/core/Constants.java
// public static final String FLOW_LOADER_STREAM = "flowLoaderStream";


// Path: src/main/java/org/calrissian/flowmix/api/storm/spout/FlowLoaderBaseSpout.java
import java.util.Collection;
import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichSpout;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Values;
import org.calrissian.flowmix.api.Flow;
import static org.calrissian.flowmix.core.Constants.FLOW_LOADER_STREAM;

package org.calrissian.flowmix.api.storm.spout;




public abstract class FlowLoaderBaseSpout extends BaseRichSpout {

  @Override
  public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {
    outputFieldsDeclarer.declareStream(FLOW_LOADER_STREAM, new Fields("flows"));
  }


  protected void emitFlows(SpoutOutputCollector collector, Collection<Flow> flows) {