// Path: src/main/java/org/asdfjkl/jerryfx/gui/PgnDatabaseEntry.java
// public class PgnDatabaseEntry {
// 
//     private long offset = 0;
//     private long index = 0;
//     private String event = "";
//     private String site = "";
//     private String date = "";
//     private String round = "";
//     private String white = "";
//     private String black = "";
//     private String result = "";
//     private String eco = "";
//     private boolean modifiedFlag = false;
//     Game modifiedGame = null;
// 
//     private boolean foundAtLeast1Tag = false;
// 
//     public long getOffset() { return offset; }
// 
//     public void setOffset(long offset) { this.offset = offset; }
// 
//     public long getIndex() { return index; }
//     public void setIndex(long index) { this.index = index; }
// 
//     public String getEvent() { return event; }
//     public void setEvent(String event) { this.event = event; }
// 
//     public String getSite() { return site; }
//     public void setSite(String site) { this.site = site; }
// 
//     public String getDate() { return date; }
//     public void setDate(String date) { this.date = date; }
// 
//     public String getRound() { return round; }
//     public void setRound(String round ) { this.round = round; }
// 
//     public String getWhite() { return white; }
//     public void setWhite(String white) { this.white = white; }
// 
//     public String getBlack() { return black; }
//     public void setBlack(String black) { this.black = black; }
// 
//     public String getResult() { return result; }
//     public void setResult(String result) { this.result = result; }
// 
//     public String getEco() { return eco; }
//     public void setEco(String eco) { this.eco = eco; }
// 
//     public void markValid() {
//         foundAtLeast1Tag = true;
//     }
// 
//     public void markAsModified() { modifiedFlag = true; }
//     public boolean wasModified() { return modifiedFlag; }
//     public void markAsUnmodified() {
//         modifiedFlag = false;
//         modifiedGame = null;
//     }
// 
//     public void setModifiedGame(Game game) { modifiedGame = game; }
//     public Game getModifiedGame() { return modifiedGame; }
// 
//     public boolean isValid() {
//         return foundAtLeast1Tag;
//     }
// 
// }


import org.asdfjkl.jerryfx.gui.PgnDatabaseEntry;
import java.io.*;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
                    System.out.println("START"+line+"STOP");
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } finally {
                if(raf != null) {
                    try {
                        raf.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }
    }

    public void pgnScanSTRTest() {

        System.out.println("TEST: scanning PGN for game STR offsets");
        String kingbase = "C:/Users/user/MyFiles/workspace/test_databases/KingBaseLite2016-03-E60-E99.pgn";
        String millbase = "C:/Users/user/MyFiles/workspace/test_databases/millionbase-2.22.pgn";
        String middleg = "C:/Users/user/MyFiles/workspace/test_databases/middleg.pgn";
        PgnReader reader = new PgnReader();
        if(reader.isIsoLatin1(millbase)) {
            reader.setEncodingIsoLatin1();
        }

        long startTime = System.currentTimeMillis();
// Path: src/main/java/org/asdfjkl/jerryfx/gui/PgnDatabaseEntry.java
// public class PgnDatabaseEntry {
// 
//     private long offset = 0;
//     private long index = 0;
//     private String event = "";
//     private String site = "";
//     private String date = "";
//     private String round = "";
//     private String white = "";
//     private String black = "";
//     private String result = "";
//     private String eco = "";
//     private boolean modifiedFlag = false;
//     Game modifiedGame = null;
// 
//     private boolean foundAtLeast1Tag = false;
// 
//     public long getOffset() { return offset; }
// 
//     public void setOffset(long offset) { this.offset = offset; }
// 
//     public long getIndex() { return index; }
//     public void setIndex(long index) { this.index = index; }
// 
//     public String getEvent() { return event; }
//     public void setEvent(String event) { this.event = event; }
// 
//     public String getSite() { return site; }
//     public void setSite(String site) { this.site = site; }
// 
//     public String getDate() { return date; }
//     public void setDate(String date) { this.date = date; }
// 
//     public String getRound() { return round; }
//     public void setRound(String round ) { this.round = round; }
// 
//     public String getWhite() { return white; }
//     public void setWhite(String white) { this.white = white; }
// 
//     public String getBlack() { return black; }
//     public void setBlack(String black) { this.black = black; }
// 
//     public String getResult() { return result; }
//     public void setResult(String result) { this.result = result; }
// 
//     public String getEco() { return eco; }
//     public void setEco(String eco) { this.eco = eco; }
// 
//     public void markValid() {
//         foundAtLeast1Tag = true;
//     }
// 
//     public void markAsModified() { modifiedFlag = true; }
//     public boolean wasModified() { return modifiedFlag; }
//     public void markAsUnmodified() {
//         modifiedFlag = false;
//         modifiedGame = null;
//     }
// 
//     public void setModifiedGame(Game game) { modifiedGame = game; }
//     public Game getModifiedGame() { return modifiedGame; }
// 
//     public boolean isValid() {
//         return foundAtLeast1Tag;
//     }
// 
// }


// Path: src/main/java/org/asdfjkl/jerryfx/lib/TestCases.java
import org.asdfjkl.jerryfx.gui.PgnDatabaseEntry;
import java.io.*;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;

                    System.out.println("START"+line+"STOP");
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } finally {
                if(raf != null) {
                    try {
                        raf.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }
    }

    public void pgnScanSTRTest() {

        System.out.println("TEST: scanning PGN for game STR offsets");
        String kingbase = "C:/Users/user/MyFiles/workspace/test_databases/KingBaseLite2016-03-E60-E99.pgn";
        String millbase = "C:/Users/user/MyFiles/workspace/test_databases/millionbase-2.22.pgn";
        String middleg = "C:/Users/user/MyFiles/workspace/test_databases/middleg.pgn";
        PgnReader reader = new PgnReader();
        if(reader.isIsoLatin1(millbase)) {
            reader.setEncodingIsoLatin1();
        }

        long startTime = System.currentTimeMillis();
        ArrayList<PgnDatabaseEntry> entries = reader.scanPgnGetSTR(millbase);