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

fr.insee.vtl.prov.prov.Program Maven / Gradle / Ivy

There is a newer version: 1.7.0
Show newest version
package fr.insee.vtl.prov.prov;

import java.util.HashSet;
import java.util.Set;

/* Filled thanks to listener, except for dataframInstances */
public class Program {

    String id;
    String label;
    Set programSteps = new HashSet<>();

    /* Provided running preview mode */
    Set dataframeInstances = new HashSet<>();

    String sourceCode;

    public Program() {
    }

    public Program(String id, String label) {
        this.id = id;
        this.label = label;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Set getProgramSteps() {
        return programSteps;
    }

    public void setProgramSteps(Set programSteps) {
        this.programSteps = programSteps;
    }

    public Set getDataframeInstances() {
        return dataframeInstances;
    }

    public void setDataframeInstances(Set dataframeInstances) {
        this.dataframeInstances = dataframeInstances;
    }

    public String getSourceCode() {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }

    public ProgramStep getProgramStepByLabel(String label) {
        return programSteps.stream()
                .filter(p -> p.getLabel().equals(label))
                .findFirst()
                .orElse(null);
    }

    public ProgramStep getProgramStepByIndex(int index) {
        return programSteps.stream()
                .filter(p -> p.getIndex() == index)
                .findFirst()
                .orElse(null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy