// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/input/LineProvider.java
// public class LineProvider extends AbstractService {
// 
//     private static final Store.LineStore lines = new Store.LineStore();
// 
//     public static void start() {
//         readFile("lines", Store.LineStore.class).ifPresent(lines::putAll);
//     }
// 
//     public static void stop() {
//         backup();
//     }
// 
//     public static void backup() {
//         writeFile("lines", lines);
//     }
// 
//     public static void updateLines(List<Line> input) {
//         input.forEach(d -> lines.putIfAbsent(d.getCode(), d));
//     }
// 
//     public static Line get(String code) {
//         return lines.get(code);
//     }
// 
//     public static Line get(String dataowner, String linePlanningNumber) {
//         return get(dataowner+":"+linePlanningNumber);
//     }
// 
//     public static Map<String, Line> getAll() {
//         return lines;
//     }
// }


import nl.crowndov.displaydirect.distribution.input.LineProvider;
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/line")
public class LineResource {

    @GET
    public Response get() {
// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/input/LineProvider.java
// public class LineProvider extends AbstractService {
// 
//     private static final Store.LineStore lines = new Store.LineStore();
// 
//     public static void start() {
//         readFile("lines", Store.LineStore.class).ifPresent(lines::putAll);
//     }
// 
//     public static void stop() {
//         backup();
//     }
// 
//     public static void backup() {
//         writeFile("lines", lines);
//     }
// 
//     public static void updateLines(List<Line> input) {
//         input.forEach(d -> lines.putIfAbsent(d.getCode(), d));
//     }
// 
//     public static Line get(String code) {
//         return lines.get(code);
//     }
// 
//     public static Line get(String dataowner, String linePlanningNumber) {
//         return get(dataowner+":"+linePlanningNumber);
//     }
// 
//     public static Map<String, Line> getAll() {
//         return lines;
//     }
// }


// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/resources/LineResource.java
import nl.crowndov.displaydirect.distribution.input.LineProvider;
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/line")
public class LineResource {

    @GET
    public Response get() {
        return Response.ok(LineProvider.getAll()).build();