// Path: bte-core/src/main/java/gr/ekt/bte/core/DataLoader.java
// public interface DataLoader {
//     /**
//      * Loads all the records from the data source and returns them as a
//      * {@link RecordSet}.
//      *
//      * @return A {@link RecordSet} containing all the data in the
//      * data source in the form of {@link Record}s.
//      *
//      * @throws EmptySourceException If the data source does not
//      * contain any data
//      */
//     public RecordSet getRecords() throws MalformedSourceException;
// 
//     /**
//      * Loads records from the data source based on criteria defined by
//      * the {@link DataLoadingSpec} given as argument.
//      * <br>
//      * <br>
//      * The idea is that it might be more efficient to perform some
//      * initial filtering of records at the source, than to define and
//      * run {@link AbstractFilter}s later, for the whole set of
//      * records, that could be big.
//      *
//      * @param spec The criteria on which the initial filtering is
//      * based
//      *
//      * @return A {@link RecordSet} containing data specified by the
//      * argument in the data source in the form of {@link Record}s.
//      *
//      * @throws EmptySourceException If the source does not contain any
//      * data
//      */
//     public RecordSet getRecords(DataLoadingSpec spec) throws MalformedSourceException;
// }
// 
// Path: bte-core/src/main/java/gr/ekt/bte/core/Record.java
// public interface Record {
//     /**
//        Given the name of a field returns the list of values.
// 
//        @param field The name of the field
//        @return      The list of values of the specified field
//     */
//     public List<Value> getValues(String field);
// 
//     /**
//        Converts this record into a {@link MutableRecord}.
// 
//        @return a {@link MutableRecord} containing the exact same
//        values
//      */
//     public MutableRecord makeMutable();
// 
//     /**
//        Tests whether the record is mutable or not.
// 
//        @return <code>true</code> if the record is mutable
//      */
//     public boolean isMutable();
// 
//     public boolean hasField(String field);
// 
//     public Set<String> getFields();
// }
// 
// Path: bte-core/src/main/java/gr/ekt/bte/core/RecordSet.java
// public class RecordSet implements Iterable<Record> {
//     private List<Record> records;
// 
//     public RecordSet() {
//         records = new ArrayList<Record>();
//     }
// 
//     public RecordSet(List<Record> records) {
//         records = new ArrayList<Record>(records);
//     }
// 
//     @Override
//     public Iterator<Record> iterator() {
//         return records.iterator();
//     }
// 
//     public void addRecord(Record rec) {
//         // After a talk with kstamatis we decided that records can be
//         // inserted multiple times, therefore there is no way for this
//         // method to fail.
//         records.add(rec);
//     }
// 
//     public List<Record> getRecords() {
//         return records;
//     }
// 
//     public void setRecords(List<Record> records) {
//         this.records = records;
//     }
// 
//     public int size() {
//         return records.size();
//     }
// 
//     public void addAll(RecordSet other_records) {
//         for (Record rec : other_records) {
//             records.add(rec);
//         }
//     }
// }
// 
// Path: bte-core/src/main/java/gr/ekt/bte/exceptions/MalformedSourceException.java
// public class MalformedSourceException extends Exception {
// 
//     public MalformedSourceException(String message) {
//         super(message);
//     }
// 
//     private static final long serialVersionUID = 1L;
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import gr.ekt.bte.core.DataLoader;
import gr.ekt.bte.core.Record;
import gr.ekt.bte.core.RecordSet;
import gr.ekt.bte.exceptions.MalformedSourceException;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
        fields.put("day", "day");
        fields.put("dimensions", "dimensions");
        fields.put("fjournal", "fjournal");
        fields.put("howpublished", "howpublished");
        fields.put("ISBN", "ISBN");
        fields.put("ISBN-13", "ISBN-13");
        fields.put("ISSN", "ISSN");
        fields.put("ISSN-L", "ISSN-L");
        fields.put("journal", "journal");
        fields.put("keywords", "keywords");
        fields.put("LCCN", "LCCN");
        fields.put("month", "month");
        fields.put("note", "note");
        fields.put("number", "number");
        fields.put("pages", "pages");
        fields.put("paperback", "paperback");
        fields.put("price", "price");
        fields.put("pubcountry", "pubcountry");
        fields.put("publisher", "publisher");
        fields.put("school", "school");
        fields.put("thesaurus", "thesaurus");
        fields.put("title", "title");
        fields.put("treatment", "treatment");
        fields.put("type", "type");
        fields.put("URL", "URL");
        fields.put("volume", "volume");
        fields.put("year", "year");

        try {
            BibTeXDataLoader ld = new BibTeXDataLoader("src/test/resources/java.bib", fields);
// Path: bte-core/src/main/java/gr/ekt/bte/core/DataLoader.java
// public interface DataLoader {
//     /**
//      * Loads all the records from the data source and returns them as a
//      * {@link RecordSet}.
//      *
//      * @return A {@link RecordSet} containing all the data in the
//      * data source in the form of {@link Record}s.
//      *
//      * @throws EmptySourceException If the data source does not
//      * contain any data
//      */
//     public RecordSet getRecords() throws MalformedSourceException;
// 
//     /**
//      * Loads records from the data source based on criteria defined by
//      * the {@link DataLoadingSpec} given as argument.
//      * <br>
//      * <br>
//      * The idea is that it might be more efficient to perform some
//      * initial filtering of records at the source, than to define and
//      * run {@link AbstractFilter}s later, for the whole set of
//      * records, that could be big.
//      *
//      * @param spec The criteria on which the initial filtering is
//      * based
//      *
//      * @return A {@link RecordSet} containing data specified by the
//      * argument in the data source in the form of {@link Record}s.
//      *
//      * @throws EmptySourceException If the source does not contain any
//      * data
//      */
//     public RecordSet getRecords(DataLoadingSpec spec) throws MalformedSourceException;
// }
// 
// Path: bte-core/src/main/java/gr/ekt/bte/core/Record.java
// public interface Record {
//     /**
//        Given the name of a field returns the list of values.
// 
//        @param field The name of the field
//        @return      The list of values of the specified field
//     */
//     public List<Value> getValues(String field);
// 
//     /**
//        Converts this record into a {@link MutableRecord}.
// 
//        @return a {@link MutableRecord} containing the exact same
//        values
//      */
//     public MutableRecord makeMutable();
// 
//     /**
//        Tests whether the record is mutable or not.
// 
//        @return <code>true</code> if the record is mutable
//      */
//     public boolean isMutable();
// 
//     public boolean hasField(String field);
// 
//     public Set<String> getFields();
// }
// 
// Path: bte-core/src/main/java/gr/ekt/bte/core/RecordSet.java
// public class RecordSet implements Iterable<Record> {
//     private List<Record> records;
// 
//     public RecordSet() {
//         records = new ArrayList<Record>();
//     }
// 
//     public RecordSet(List<Record> records) {
//         records = new ArrayList<Record>(records);
//     }
// 
//     @Override
//     public Iterator<Record> iterator() {
//         return records.iterator();
//     }
// 
//     public void addRecord(Record rec) {
//         // After a talk with kstamatis we decided that records can be
//         // inserted multiple times, therefore there is no way for this
//         // method to fail.
//         records.add(rec);
//     }
// 
//     public List<Record> getRecords() {
//         return records;
//     }
// 
//     public void setRecords(List<Record> records) {
//         this.records = records;
//     }
// 
//     public int size() {
//         return records.size();
//     }
// 
//     public void addAll(RecordSet other_records) {
//         for (Record rec : other_records) {
//             records.add(rec);
//         }
//     }
// }
// 
// Path: bte-core/src/main/java/gr/ekt/bte/exceptions/MalformedSourceException.java
// public class MalformedSourceException extends Exception {
// 
//     public MalformedSourceException(String message) {
//         super(message);
//     }
// 
//     private static final long serialVersionUID = 1L;
// }


// Path: bte-io/src/test/java/gr/ekt/bteio/loaders/TestLoaders.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import gr.ekt.bte.core.DataLoader;
import gr.ekt.bte.core.Record;
import gr.ekt.bte.core.RecordSet;
import gr.ekt.bte.exceptions.MalformedSourceException;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;

        fields.put("day", "day");
        fields.put("dimensions", "dimensions");
        fields.put("fjournal", "fjournal");
        fields.put("howpublished", "howpublished");
        fields.put("ISBN", "ISBN");
        fields.put("ISBN-13", "ISBN-13");
        fields.put("ISSN", "ISSN");
        fields.put("ISSN-L", "ISSN-L");
        fields.put("journal", "journal");
        fields.put("keywords", "keywords");
        fields.put("LCCN", "LCCN");
        fields.put("month", "month");
        fields.put("note", "note");
        fields.put("number", "number");
        fields.put("pages", "pages");
        fields.put("paperback", "paperback");
        fields.put("price", "price");
        fields.put("pubcountry", "pubcountry");
        fields.put("publisher", "publisher");
        fields.put("school", "school");
        fields.put("thesaurus", "thesaurus");
        fields.put("title", "title");
        fields.put("treatment", "treatment");
        fields.put("type", "type");
        fields.put("URL", "URL");
        fields.put("volume", "volume");
        fields.put("year", "year");

        try {
            BibTeXDataLoader ld = new BibTeXDataLoader("src/test/resources/java.bib", fields);
            RecordSet recs = ld.getRecords();