// Path: src/main/java/com/lambdazen/pixy/PipeVisitor.java
// public interface PipeVisitor {
// 	public void visit(PixyPipe pp);
// 
// 	public void mark();
// 
// 	public void reset();
// }
// 
// Path: src/main/java/com/lambdazen/pixy/PixyPipe.java
// public interface PixyPipe {
// 	public GraphTraversal pixyStep(GraphTraversal inputPipe);
// 	
// 	public void visit(PipeVisitor visitor);
// }
// 
// Path: src/main/java/com/lambdazen/pixy/gremlin/GraphTraversalExt.java
// public class GraphTraversalExt {
// 	/** Method to add a CoalescePipe with one named step. Emits the value of the named step, like select(stepName) */
//     public static GraphTraversal coalesce(GraphTraversal pipeline, String stepName) {
//     	return coalesce(pipeline, new String[] {stepName});
//     }
// 
//     /** Method to add a CoalescePipe with multiple named steps. Emits the first non-null valued named step. */
//     public static <S, T, E> GraphTraversal coalesce(GraphTraversal pipeline, String[] stepNames) {
//     	return pipeline.asAdmin().addStep(new PixyCoalesceStep(pipeline.asAdmin(), stepNames));
//     }
// 
//     /** Method to add a PixySplitMerge pipe */
//     public static GraphTraversal pixySplitMerge(GraphTraversal pipeline, List<GraphTraversal> pipes) {
//     	return pipeline.asAdmin().addStep(new PixySplitMergeStep(pipeline.asAdmin(), pipes));
//     }
// 
//     /** Method to add a PixyEval pipe */
//     public static GraphTraversal pixyEval(GraphTraversal pipeline, List<PixyDatum> ops) {
//     	return pipeline.asAdmin().addStep(new PixyEvalStep(pipeline.asAdmin(), ops));
//     }
// 
// 	public static GraphTraversal pixyCut(GraphTraversal pipeline) {
// 		return pipeline.asAdmin().addStep(new PixyCutStep(pipeline.asAdmin()));
// 	}
// }


import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import com.lambdazen.pixy.PipeVisitor;
import com.lambdazen.pixy.PixyPipe;
import com.lambdazen.pixy.gremlin.GraphTraversalExt;
package com.lambdazen.pixy.pipes;



public class LabelPipe implements PixyPipe, NamedInputPipe, NamedOutputPipe {
	private String inStep;
	private String outStep;

	public LabelPipe(String namedStep, String varName) {
		this.inStep = namedStep;
		this.outStep = varName;
	}
	
	public String toString() {
		return ((inStep == null) ? "" : "coalesce('" + inStep + "') -> ") 
				+ "label()"
				+ ((outStep == null) ? "" : " -> as('" + outStep + "')");
						
	}

	@Override
// Path: src/main/java/com/lambdazen/pixy/PipeVisitor.java
// public interface PipeVisitor {
// 	public void visit(PixyPipe pp);
// 
// 	public void mark();
// 
// 	public void reset();
// }
// 
// Path: src/main/java/com/lambdazen/pixy/PixyPipe.java
// public interface PixyPipe {
// 	public GraphTraversal pixyStep(GraphTraversal inputPipe);
// 	
// 	public void visit(PipeVisitor visitor);
// }
// 
// Path: src/main/java/com/lambdazen/pixy/gremlin/GraphTraversalExt.java
// public class GraphTraversalExt {
// 	/** Method to add a CoalescePipe with one named step. Emits the value of the named step, like select(stepName) */
//     public static GraphTraversal coalesce(GraphTraversal pipeline, String stepName) {
//     	return coalesce(pipeline, new String[] {stepName});
//     }
// 
//     /** Method to add a CoalescePipe with multiple named steps. Emits the first non-null valued named step. */
//     public static <S, T, E> GraphTraversal coalesce(GraphTraversal pipeline, String[] stepNames) {
//     	return pipeline.asAdmin().addStep(new PixyCoalesceStep(pipeline.asAdmin(), stepNames));
//     }
// 
//     /** Method to add a PixySplitMerge pipe */
//     public static GraphTraversal pixySplitMerge(GraphTraversal pipeline, List<GraphTraversal> pipes) {
//     	return pipeline.asAdmin().addStep(new PixySplitMergeStep(pipeline.asAdmin(), pipes));
//     }
// 
//     /** Method to add a PixyEval pipe */
//     public static GraphTraversal pixyEval(GraphTraversal pipeline, List<PixyDatum> ops) {
//     	return pipeline.asAdmin().addStep(new PixyEvalStep(pipeline.asAdmin(), ops));
//     }
// 
// 	public static GraphTraversal pixyCut(GraphTraversal pipeline) {
// 		return pipeline.asAdmin().addStep(new PixyCutStep(pipeline.asAdmin()));
// 	}
// }


// Path: src/main/java/com/lambdazen/pixy/pipes/LabelPipe.java
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import com.lambdazen.pixy.PipeVisitor;
import com.lambdazen.pixy.PixyPipe;
import com.lambdazen.pixy.gremlin.GraphTraversalExt;

package com.lambdazen.pixy.pipes;



public class LabelPipe implements PixyPipe, NamedInputPipe, NamedOutputPipe {
	private String inStep;
	private String outStep;

	public LabelPipe(String namedStep, String varName) {
		this.inStep = namedStep;
		this.outStep = varName;
	}
	
	public String toString() {
		return ((inStep == null) ? "" : "coalesce('" + inStep + "') -> ") 
				+ "label()"
				+ ((outStep == null) ? "" : " -> as('" + outStep + "')");
						
	}

	@Override
	public GraphTraversal pixyStep(GraphTraversal inputPipe) {