All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lumiomedical.flow.impl.pipeline.compiler.stream.StreamPipeline Maven / Gradle / Ivy

package com.lumiomedical.flow.impl.pipeline.compiler.stream;

import com.lumiomedical.flow.compiler.NotImplementedException;
import com.lumiomedical.flow.node.AbstractNode;
import com.lumiomedical.flow.node.Node;
import com.lumiomedical.flow.stream.StreamGenerator;

import java.util.*;

/**
 * @author Pierre Lecerf ([email protected])
 * Created on 2020/12/03
 */
public class StreamPipeline extends AbstractNode
{
    private final StreamGenerator generatorNode;
    private final LinkedList nodes;
    private String pivot;
    private Set potentialPivots;

    /**
     *
     * @param generatorNode
     */
    public StreamPipeline(StreamGenerator generatorNode)
    {
        super();
        this.generatorNode = generatorNode;
        this.nodes = new LinkedList<>();
    }

    @Override
    public List getUpstream()
    {
        return this.generatorNode.getUpstream();
    }

    @Override
    public List getRequirements()
    {
        return this.generatorNode.getRequirements();
    }

    @Override
    public Node after(Node other)
    {
        throw new NotImplementedException();
    }

    @Override
    public Node after(Collection others)
    {
        throw new NotImplementedException();
    }

    public StreamGenerator getGeneratorNode()
    {
        return this.generatorNode;
    }

    public StreamPipeline push(Node node)
    {
        this.nodes.push(node);
        return this;
    }

    public List getNodes()
    {
        return this.nodes;
    }

    public StreamPipeline setPotentialPivots(Set pivots)
    {
        this.potentialPivots = pivots;
        return this;
    }

    public Set getPotentialPivots()
    {
        return this.potentialPivots;
    }

    public StreamPipeline setPivot(String pivot)
    {
        this.pivot = pivot;
        return this;
    }

    public String getPivot()
    {
        return this.pivot;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy