// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/chb/StopStore.java
// public class StopStore {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(StopStore.class);
// 
//     private static Map<String, String> store = new HashMap<>();
//     private static Set<String> missing = new HashSet<>();
// 
//     public static Optional<String> getQuayFromCode(String dataOwner, String stopCode) {
//         String key = dataOwner+"|"+stopCode;
//         if (store.containsKey(key)) {
//             return Optional.of(store.get(key));
//         }
//         missing.add(key);
//         return Optional.empty();
//     }
// 
//     public static boolean stopExists(String quayOrStopCode) {
//         return store.values().contains(quayOrStopCode);
//     }
// 
//     public static Map<String, String> getStore() {
//         return store;
//     }
// 
//     public static Set<String> getMissing() {
//         return missing;
//     }
// 
//     public static void setStore(Map<String, String> storeData) {
//         store = storeData;
//     }
// }
// 
// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/input/TimingPointProvider.java
// public class TimingPointProvider extends AbstractService {
// 
//     private static final Store.TimingPointStore points = new Store.TimingPointStore();
// 
//     public static void start() {
//         readFile("timing_points", Store.TimingPointStore.class).ifPresent(points::putAll);
//     }
// 
//     public static void stop() {
//         backup();
//     }
// 
//     public static void backup() {
//         writeFile("timing_points", points);
//     }
// 
//     public static void updateTimingPoints(Map<String, String> input) {
//        points.putAll(input);
//     }
// 
//     public static Optional<String> getStopFromTimingPoint(String dataOwnerCode, String timingPointCode) {
//         return Optional.ofNullable(points.getOrDefault(dataOwnerCode+"|"+timingPointCode, null));
//     }
// 
//     public static Store.TimingPointStore getAll() {
//         return points;
//     }
// }


import nl.crowndov.displaydirect.distribution.chb.StopStore;
import nl.crowndov.displaydirect.distribution.input.TimingPointProvider;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
package nl.crowndov.displaydirect.distribution.resources;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
@Path("/v1/stop")
public class StopResource {

    @GET
    public Response get() {
// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/chb/StopStore.java
// public class StopStore {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(StopStore.class);
// 
//     private static Map<String, String> store = new HashMap<>();
//     private static Set<String> missing = new HashSet<>();
// 
//     public static Optional<String> getQuayFromCode(String dataOwner, String stopCode) {
//         String key = dataOwner+"|"+stopCode;
//         if (store.containsKey(key)) {
//             return Optional.of(store.get(key));
//         }
//         missing.add(key);
//         return Optional.empty();
//     }
// 
//     public static boolean stopExists(String quayOrStopCode) {
//         return store.values().contains(quayOrStopCode);
//     }
// 
//     public static Map<String, String> getStore() {
//         return store;
//     }
// 
//     public static Set<String> getMissing() {
//         return missing;
//     }
// 
//     public static void setStore(Map<String, String> storeData) {
//         store = storeData;
//     }
// }
// 
// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/input/TimingPointProvider.java
// public class TimingPointProvider extends AbstractService {
// 
//     private static final Store.TimingPointStore points = new Store.TimingPointStore();
// 
//     public static void start() {
//         readFile("timing_points", Store.TimingPointStore.class).ifPresent(points::putAll);
//     }
// 
//     public static void stop() {
//         backup();
//     }
// 
//     public static void backup() {
//         writeFile("timing_points", points);
//     }
// 
//     public static void updateTimingPoints(Map<String, String> input) {
//        points.putAll(input);
//     }
// 
//     public static Optional<String> getStopFromTimingPoint(String dataOwnerCode, String timingPointCode) {
//         return Optional.ofNullable(points.getOrDefault(dataOwnerCode+"|"+timingPointCode, null));
//     }
// 
//     public static Store.TimingPointStore getAll() {
//         return points;
//     }
// }


// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/resources/StopResource.java
import nl.crowndov.displaydirect.distribution.chb.StopStore;
import nl.crowndov.displaydirect.distribution.input.TimingPointProvider;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;

package nl.crowndov.displaydirect.distribution.resources;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
@Path("/v1/stop")
public class StopResource {

    @GET
    public Response get() {
        return Response.ok(StopStore.getStore()).build();