package leigh.astro.catalog;

import leigh.astro.unit.SphericalCoordinate;

/**
 * A stellar catalog object.
 *
 * @author Alex Leigh
 */
public class CatalogObject {
    private final String name;
    private final SphericalCoordinate coordinate;
    private final String type;
    private final int id;

    public String getName() {
        return name;
    }

    /**
     * Return the celestial coordinates for the catalog object in the J20000 epoch.
     *
     * @return The coordinate.
     */
    public SphericalCoordinate getJ2000Coordinate() {
        return coordinate;
    }

    public CatalogObject(String name, SphericalCoordinate coordinate, String type, int id) {
        this.name = name;
        this.coordinate = coordinate;
        this.type = type;
        this.id = id;
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        return "CatalogObject{" +
                "name='" + name + '\'' +
                ", coordinate=" + coordinate +
                ", type='" + type + '\'' +
                ", id=" + id +
                '}';
    }

    public SphericalCoordinate getCoordinate() {
        return coordinate;
    }

    public int getId() {
        return id;
    }

}
