// Path: src/main/java/in/drifted/planisphere/model/ConstellationName.java
// public final class ConstellationName {
// 
//     private final String id;
//     private final String abbreviation;
//     private final String latin;
//     private final Coord coord;
// 
//     public ConstellationName(String abbreviation, String latin, Coord coord) {
//         this.abbreviation = abbreviation;
//         this.latin = latin;
//         this.id = generateId(latin);
//         this.coord = coord;
//     }
// 
//     private String generateId(String name) {
//         String[] fragments = name.split(" ");
//         StringBuilder strId = new StringBuilder();
//         for (int i = 0; i < fragments.length; i++) {
//             String candidate = fragments[i].toLowerCase();
//             if (i > 0) {
//                 candidate = candidate.substring(0, 1).toUpperCase() + candidate.substring(1);
//             }
//             strId.append(candidate);
//         }
//         return strId.toString();
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getAbbreviation() {
//         return this.abbreviation;
//     }
// 
//     public Coord getCoord() {
//         return this.coord;
//     }
// 
//     public String getLatin() {
//         return this.latin;
//     }
// }
// 
// Path: src/main/java/in/drifted/planisphere/model/Coord.java
// public final class Coord {
// 
//     private Double x;
//     private Double y;
// 
//     public Coord() {
//     }
// 
//     public Coord(Double x, Double y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public void setLocation(Double x, Double y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public Double getX() {
//         return x;
//     }
// 
//     public Double getY() {
//         return y;
//     }
// }


import in.drifted.planisphere.model.ConstellationName;
import in.drifted.planisphere.model.Coord;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/* 
 * Copyright (c) 2012-present Jan Tošovský <jan.tosovsky.cz@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package in.drifted.planisphere.resources.loader;


public final class ConstellationNameListLoader {

    public static List<ConstellationName> getConstellationNameList(String filePath) throws IOException {

        List<ConstellationName> constellationNameList = new ArrayList<>();

        try (
                InputStream inputStream = ConstellationNameListLoader.class.getResourceAsStream(filePath);
                BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"))) {

            String strLine;
            while ((strLine = reader.readLine()) != null) {
// Path: src/main/java/in/drifted/planisphere/model/ConstellationName.java
// public final class ConstellationName {
// 
//     private final String id;
//     private final String abbreviation;
//     private final String latin;
//     private final Coord coord;
// 
//     public ConstellationName(String abbreviation, String latin, Coord coord) {
//         this.abbreviation = abbreviation;
//         this.latin = latin;
//         this.id = generateId(latin);
//         this.coord = coord;
//     }
// 
//     private String generateId(String name) {
//         String[] fragments = name.split(" ");
//         StringBuilder strId = new StringBuilder();
//         for (int i = 0; i < fragments.length; i++) {
//             String candidate = fragments[i].toLowerCase();
//             if (i > 0) {
//                 candidate = candidate.substring(0, 1).toUpperCase() + candidate.substring(1);
//             }
//             strId.append(candidate);
//         }
//         return strId.toString();
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getAbbreviation() {
//         return this.abbreviation;
//     }
// 
//     public Coord getCoord() {
//         return this.coord;
//     }
// 
//     public String getLatin() {
//         return this.latin;
//     }
// }
// 
// Path: src/main/java/in/drifted/planisphere/model/Coord.java
// public final class Coord {
// 
//     private Double x;
//     private Double y;
// 
//     public Coord() {
//     }
// 
//     public Coord(Double x, Double y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public void setLocation(Double x, Double y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public Double getX() {
//         return x;
//     }
// 
//     public Double getY() {
//         return y;
//     }
// }


// Path: src/main/java/in/drifted/planisphere/resources/loader/ConstellationNameListLoader.java
import in.drifted.planisphere.model.ConstellationName;
import in.drifted.planisphere.model.Coord;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/* 
 * Copyright (c) 2012-present Jan Tošovský <jan.tosovsky.cz@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package in.drifted.planisphere.resources.loader;


public final class ConstellationNameListLoader {

    public static List<ConstellationName> getConstellationNameList(String filePath) throws IOException {

        List<ConstellationName> constellationNameList = new ArrayList<>();

        try (
                InputStream inputStream = ConstellationNameListLoader.class.getResourceAsStream(filePath);
                BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"))) {

            String strLine;
            while ((strLine = reader.readLine()) != null) {
                if (!strLine.isEmpty() && !strLine.startsWith("#")) {