
import java.io.File;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.input.SAXBuilder;
import org.xml.sax.helpers.DefaultHandler;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;


public class Main {

    public static String[] simulateArgs(String args){
        return args.split(" ");
    }
    public static void main(String[] args) {
        args=simulateArgs("-i ./imports/bme.xml");

        String filepath = args[1];

        SAXParserFactory factory = SAXParserFactory.newInstance();

        /*TagCounter h = new TagCounter();

        try {
            SAXParser p = factory.newSAXParser();
            p.parse(new java.io.File(filepath), h);
        } catch (Exception e) {e.printStackTrace();}

        h.printMap();*/

        BusStopParser b = new BusStopParser();
        try {
            SAXParser p = factory.newSAXParser();
            p.parse(new java.io.File(filepath), b);
        } catch (Exception e) {e.printStackTrace();}

        //b.printBusStops();
        b.printBusStopsByDistance(47.4786346,19.0555773);

    }
}