FileModel.java

package org.docascode.chrono;

import java.util.HashMap;

public class FileModel{
    private String input = null;
    private HashMap<String,String> output = new HashMap<>();
    private HashMap<String, AttachedModel> attached = new HashMap<>();

    public FileModel(String input){
        this.input=input;
    }

    public void put(String outputPath, String output){
        this.output.put(outputPath,output);
    }

    public void put(String classifier, String outputPath, String output){
        this.attached.get(classifier).put(outputPath,output);
    }

    public String getInput(){
        return this.input;
    }

    public String getOutput(String outputPath){
        return this.output.get(outputPath);
    }

    public String getOutput(String classifier, String outputPath){
        return this.attached.get(classifier).getOutput(outputPath);
    }

    public void attach(String classifier,String input){
        AttachedModel attachedModel = new AttachedModel(input);
        this.attached.put(classifier,attachedModel);
    }

    public String getInput(String classifier) {
        return this.attached.get(classifier).getInput();
    }
}