// Path: app/src/main/java/de/codecentric/dao/LocationDao.java
// public interface LocationDao {
// 
//     List<Location> getLocations();
// 
//     Location getLocation(String shortName);
// 
// }
// 
// Path: app/src/main/java/de/codecentric/domain/Location.java
// public class Location {
// 
//     private String shortName;
//     private String description;
// 
//     @JsonCreator
//     public Location(@JsonProperty("shortName") String shortName, @JsonProperty("description") String description) {
//         this.shortName = shortName;
//         this.description = description;
//     }
// 
//     public String getShortName() {
//         return shortName;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// }


import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import org.apache.log4j.Logger;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;
import de.codecentric.dao.LocationDao;
import de.codecentric.domain.Location;
package de.codecentric.dao.impl;




@Repository
public class JsonLocationDao implements LocationDao {

    private static final Logger LOGGER = Logger.getLogger(JsonLocationDao.class);

    @Autowired
    private ObjectMapper jsonMapper;

// Path: app/src/main/java/de/codecentric/dao/LocationDao.java
// public interface LocationDao {
// 
//     List<Location> getLocations();
// 
//     Location getLocation(String shortName);
// 
// }
// 
// Path: app/src/main/java/de/codecentric/domain/Location.java
// public class Location {
// 
//     private String shortName;
//     private String description;
// 
//     @JsonCreator
//     public Location(@JsonProperty("shortName") String shortName, @JsonProperty("description") String description) {
//         this.shortName = shortName;
//         this.description = description;
//     }
// 
//     public String getShortName() {
//         return shortName;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// }


// Path: app/src/main/java/de/codecentric/dao/impl/JsonLocationDao.java
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import org.apache.log4j.Logger;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;
import de.codecentric.dao.LocationDao;
import de.codecentric.domain.Location;

package de.codecentric.dao.impl;




@Repository
public class JsonLocationDao implements LocationDao {

    private static final Logger LOGGER = Logger.getLogger(JsonLocationDao.class);

    @Autowired
    private ObjectMapper jsonMapper;

    private static List<Location> locations;