//=====================================================================
// Comment object
// represent a comment in the thread
//=====================================================================

function Geotag(keyword, longitude, latitude) {
	if(!keyword) { keyword = "";}
	if(!longitude) { longitude = "";}	
	if(!latitude) { latitude = "";}	
	this.keyword = keyword;
	this.streetAddress = "";
	this.city = "";
	this.state = "";
	this.zip = "";
	this.country = "";
	this.longitude = longitude;
	this.latitude = latitude;
}

//=====================================================================
// public methods
//=====================================================================

// get the keyword
Geotag.prototype.getKeyword = function() {
	return this.keyword;
}

// get the street address
Geotag.prototype.getStreetAddress = function() {
	return this.streetAddress;
}

// get the city
Geotag.prototype.getCity = function() {
	return this.city;
}

// get the state
Geotag.prototype.getState = function() {
	return this.state;
}

// get the zip
Geotag.prototype.getZip = function() {
	return this.zip;
}

// get the country
Geotag.prototype.getCountry = function() {
	return this.country;
}

// get the longitude
Geotag.prototype.getLongitude= function() {
	return this.longitude;
}

// get the latitude
Geotag.prototype.getLatitude= function() {
	return this.latitude;
}

// set the keyword
Geotag.prototype.setKeyword = function(keyword) {
	this.keyword = keyword;
}

// set the street address
Geotag.prototype.setStreetAddress = function(streetAddress) {
	this.streetAddress = streetAddress;
}

// set the city
Geotag.prototype.setCity = function(city) {
	this.city = city;
}

// set the state
Geotag.prototype.setState = function(state) {
	this.state = state;
}

// set the zip
Geotag.prototype.setZip = function(zip) {
	this.zip = zip;
}

// set the country
Geotag.prototype.setCountry = function(country) {
	this.country = country;
}

// set the longitude
Geotag.prototype.setLongitude = function(longitude) {
	this.longitude = longitude;
}

// set the latitude
Geotag.prototype.setLatitude = function(latitude) {
	this.latitude = latitude;
}
				
Geotag.prototype.serialize = function() {
	var serializedGeotag = "keyword=" + this.keyword +
					  "&street=" + this.streetAddress +
					  "&city=" + this.city +
					  "&state=" + this.state +
					  "&zip=" + this.zip +
					  "&country=" + this.country +
					  "&longitude=" + this.longitude +
					  "&latitude=" + this.latitude;
					  
	return serializedGeotag;
	
}

Geotag.prototype.clone = function() {
	var temp = new Geotag();
	
	for(myvar in this) {
		temp[myvar] = this[myvar];
	}
	
	return temp;
}


