/**
* This file is part of eTracks.
*
* eTracks 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.
*
* eTracks 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 eTracks. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.etracks.domini;
import java.util.ArrayList;
import java.util.Date;
public class Route {
/**
* Route name.
*/
private String name;
/**
* Route type.
*/
private String type;
/**
* Route description.
*/
private String description;
/**
* Route date.
*/
private Date date;
/**
* Route distance.
*/
private double distance;
/**
* Route desnivell.
*/
private double desnivell;
/**
* Route points.
*/
private ArrayList<Punt> points;
/**
* Route photos.
*/
private ArrayList<Photo> photos;
/**
* Route placemarks.
*/
private ArrayList<Placemark> placemarks;
/**
* @return the photos
*/
public ArrayList<Photo> getPhotos() {
return photos;
}
/**
* Constructor of the class.
*/
public Route() {
date = new Date();
points = new ArrayList<Punt>();
distance = desnivell = 0;
}
/**
* Set the photos of the route.
*
* @param photos
* The photos of the route.
*/
public void setPhotos(ArrayList<Photo> photos) {
this.photos = photos;
}
/**
* Set the placemarks of the route.
*
* @param placemarks
* The placemarks to set
*/
public void setPlacemarks(ArrayList<Placemark> placemarks) {
this.placemarks = placemarks;
}
/**
* Set the points of the route.
*
* @param points
* The points of the route.
*/
public void setPoints(ArrayList<Punt> points) {
this.points = points;
}
/**
* Set the name of the route.
*
* @param name
* The name of the route.
*/
public void setName(String name) {
this.name = name;
}
/**
* Set the description of the route.
*
* @param description
* The description of the route.
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Set the date of the route.
*
* @param date
* The date of the route.
*/
public void setDate(Date date) {
this.date = date;
}
/**
* Set the type of the route.
*
* @param type
* The type of the route.
*/
public void setType(String type) {
this.type = type;
}
/**
* Set the distance of the route.
*
* @param dist
* The distance of the route.
*/
public void setDistance(double dist) {
distance = dist;
}
/**
* Set the desn of the route.
*
* @param desn
* The desn of the route.
*/
public void setDesnivell(double desn) {
desnivell = desn;
}
/**
* Add a new point to the route
*
* @param p
* Point to be added.
*/
public void addPoint(Punt p) {
points.add(p);
}
/**
* Get the name of the route.
*
* @return The name of the route.
*/
public String getName() {
return name;
}
/**
* Get the description of the route.
*
* @return The description of the route.
*/
public String getDescription() {
if (description != null)
return description;
else
return "";
}
/**
* Get the date of the route.
*
* @return The date of the route.
*/
public Date getDate() {
return date;
}
/**
* Get the punts of the route.
*
* @return The punts of the route.
*/
public ArrayList<Punt> getPunts() {
return points;
}
/**
* Get the placemarks of the route.
*
* @return The placemarks of the route.
*/
public ArrayList<Placemark> getPlacemarks() {
return placemarks;
}
/**
* Get the type of the route.
*
* @return The type of the route.
*/
public String getType() {
if (type == null)
return "";
else
return type;
}
/**
* Get the distance of the route.
*
* @return The distance of the route.
*/
public double getDistance() {
return distance;
}
/**
* Get the desn of the route.
*
* @return The desn of the route.
*/
public double getDesnivell() {
return desnivell;
}
}
|