package service.json;

import service.control.JSONParserControl;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by spronghi on 06/07/16.
 */
class JSONParserRegister extends JSONParserControl {
    private static Map<String, JSONParser<?>> container;
    static {
        container = new HashMap<>();
        container.put(ANNOUNCEMENT, new AnnouncementJSONParser());
        container.put(CONSUMER, new ConsumerJSONParser());
        container.put(PLACE, new PlaceJSONParser());
        container.put(TRANSACTION, new TransactionJSONParser());
    }
    static JSONParser<?> getExporter(String key){
        return container.get(key);
    }
}
