import org.jgrapht.graph.SimpleWeightedGraph;

import java.time.Duration;
import java.util.Map;

//Can't just write the graph, because I need the occupancy data too.
//Makes most sense to serialize object and write that to a file.
//Which means there's no reason to split map data and graph data up.
public class GraphWithMapData implements java.io.Serializable {

    private String sourceFilename;
    private final SimpleWeightedGraph graph;
    private Integer numWells;
    private Integer alphaCount;
    private Integer betaCount;
    private Integer lowThreshold;
    private Integer highThreshold;
    private final Map<Integer, Integer> distCellsMapAlphaKey;
    private final Map<Integer, Integer> plateVtoAMap;
    private final Map<Integer, Integer> plateVtoBMap;
    private final Map<Integer, Integer> plateAtoVMap;
    private final Map<Integer, Integer> plateBtoVMap;
    private final Map<Integer, Integer> alphaWellCounts;
    private final Map<Integer, Integer> betaWellCounts;
    private final Duration time;

    public GraphWithMapData(SimpleWeightedGraph graph, Integer numWells, Integer alphaCount, Integer betaCount,
                            Integer lowThreshold, Integer highThreshold,
                            Map<Integer, Integer> distCellsMapAlphaKey, Map<Integer, Integer> plateVtoAMap,
                            Map<Integer,Integer> plateVtoBMap, Map<Integer, Integer> plateAtoVMap,
                            Map<Integer, Integer> plateBtoVMap, Map<Integer, Integer> alphaWellCounts,
                            Map<Integer, Integer> betaWellCounts, Duration time) {
        this.graph = graph;
        this.numWells = numWells;
        this.alphaCount = alphaCount;
        this.betaCount = betaCount;
        this.lowThreshold = lowThreshold;
        this.highThreshold = highThreshold;
        this.distCellsMapAlphaKey = distCellsMapAlphaKey;
        this.plateVtoAMap = plateVtoAMap;
        this.plateVtoBMap = plateVtoBMap;
        this.plateAtoVMap = plateAtoVMap;
        this.plateBtoVMap = plateBtoVMap;
        this.alphaWellCounts = alphaWellCounts;
        this.betaWellCounts = betaWellCounts;
        this.time = time;
    }

    public SimpleWeightedGraph getGraph() {
        return graph;
    }

    public Integer getNumWells() {
        return numWells;
    }

    public Integer getAlphaCount() {
        return alphaCount;
    }

    public Integer getBetaCount() {
        return betaCount;
    }

    public Integer getLowThreshold() {
        return lowThreshold;
    }

    public Integer getHighThreshold() {
        return highThreshold;
    }

    public Map<Integer, Integer> getDistCellsMapAlphaKey() {
        return distCellsMapAlphaKey;
    }

    public Map<Integer, Integer> getPlateVtoAMap() {
        return plateVtoAMap;
    }

    public Map<Integer, Integer> getPlateVtoBMap() {
        return plateVtoBMap;
    }

    public Map<Integer, Integer> getPlateAtoVMap() {
        return plateAtoVMap;
    }

    public Map<Integer, Integer> getPlateBtoVMap() {
        return plateBtoVMap;
    }

    public Map<Integer, Integer> getAlphaWellCounts() {
        return alphaWellCounts;
    }

    public Map<Integer, Integer> getBetaWellCounts() {
        return betaWellCounts;
    }

    public Duration getTime() {
        return time;
    }

    public void setSourceFilename(String filename) {
        this.sourceFilename = filename;
    }

    public String getSourceFilename() {
        return sourceFilename;
    }
}
