Subversion Repositories display

Rev

Blame | Last modification | View Log | RSS feed

/*
 * Copyright (C) 2006 Steve Ratcliffe
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  published by the Free Software Foundation.
 *
 *  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.
 *
 *
 * Author: Steve Ratcliffe
 * Create date: 09-Dec-2006
 */

package test.elements;

import uk.me.parabola.imgfmt.app.lbl.POIRecord;
import uk.me.parabola.imgfmt.app.trergn.Subdivision;

/**
 * Represents a particular point object on a map.  A point has a type (town
 * restaurant etc) and a location as well as a name.
 *
 * A point belongs to a particular subdivision and cannot be interpreted without
 * it as all details are relative to the subdivision.
 *
 * @author Steve Ratcliffe
 */

public class Point extends MapObject {
        // Points can link to a POIRecord
        private POIRecord poi;

        public Point(Subdivision div) {
                setSubdiv(div);
        }

        public void setPOIRecord(POIRecord poirecord) {
                this.poi = poirecord;
        }

        public POIRecord getPOIRecord() {
                if (poi == null)
                        return new POIRecord();
                return poi;
        }
}