<commit_before>package dk.statsbiblioteket.newspaper.processmonitor.datasources;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: abr
 * Date: 9/17/13
 * Time: 10:32 AM
 * To change this template use File | Settings | File Templates.
 */
public class DataSourceMockup implements DataSource {

    private final ArrayList<Batch> dummyBatches;

    public DataSourceMockup() {


        Event e1 = new Event();
        e1.setEventID("foo");
        e1.setSucces(true);

        Event e2 = new Event();
        e2.setEventID("bar");
        e2.setSucces(false);

        Event e3 = new Event();
        e3.setEventID("baz");
        e3.setSucces(true);
        List<Event> b1Events = new ArrayList<Event>();
        b1Events.add(e1);
        b1Events.add(e2);
        b1Events.add(e3);

        Batch b1 = new Batch();
        b1.setBatchID("hans");
        b1.setEventList(b1Events);

        Event e4 = new Event();
        e4.setEventID("foo");
        e4.setSucces(true);

        Event e5 = new Event();
        e5.setEventID("bar");
        e5.setSucces(false);

        Event e6 = new Event();
        e6.setEventID("baz");
        e6.setSucces(false);

        List<Event> b2Events = new ArrayList<Event>();
        b2Events.add(e4);
        b2Events.add(e5);
        b2Events.add(e6);

        Batch b2 = new Batch();
        b2.setBatchID("bjarne");
        b2.setEventList(b2Events);

        dummyBatches = new ArrayList<Batch>();
        dummyBatches.add(b1);
        dummyBatches.add(b2);

    }

    @Override
    public List<Batch> getBatches(boolean includeDetails, Map<String, String> filters) {
        return dummyBatches;
    }

    @Override
    public Batch getBatch(String batchID, boolean includeDetails) {<commit_msg>remember the run nr method<commit_after>package dk.statsbiblioteket.newspaper.processmonitor.datasources;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: abr
 * Date: 9/17/13
 * Time: 10:32 AM
 * To change this template use File | Settings | File Templates.
 */
public class DataSourceMockup implements DataSource {

    private ArrayList<Batch> dummyBatches;


    public DataSourceMockup() {


        Event e1 = new Event();
        e1.setEventID("foo");
        e1.setSucces(true);

        Event e2 = new Event();
        e2.setEventID("bar");
        e2.setSucces(false);

        Event e3 = new Event();
        e3.setEventID("baz");
        e3.setSucces(true);
        List<Event> b1Events = new ArrayList<Event>();
        b1Events.add(e1);
        b1Events.add(e2);
        b1Events.add(e3);

        Batch b1 = new Batch();
        b1.setBatchID("hans");
        b1.setEventList(b1Events);

        Event e4 = new Event();
        e4.setEventID("foo");
        e4.setSucces(true);

        Event e5 = new Event();
        e5.setEventID("bar");
        e5.setSucces(false);

        Event e6 = new Event();
        e6.setEventID("baz");
        e6.setSucces(false);

        List<Event> b2Events = new ArrayList<Event>();
        b2Events.add(e4);
        b2Events.add(e5);
        b2Events.add(e6);

        Batch b2 = new Batch();
        b2.setBatchID("bjarne");
        b2.setEventList(b2Events);

        dummyBatches = new ArrayList<Batch>();
        dummyBatches.add(b1);
        dummyBatches.add(b2);

    }

    @Override
    public boolean isRunNrInBatchID() {
        return false;
    }

    @Override
    public List<Batch> getBatches(boolean includeDetails, Map<String, String> filters) {
        return dummyBatches;
    }

    @Override
    public Batch getBatch(String batchID, boolean includeDetails) {
{'fraction_non_alphanumeric': 0.12449474535165723, 'fraction_numerical': 0.0274858528698464, 'mean_word_length': 2.3806921675774135, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5402283', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1214, 'n_words': 255}