﻿if ( !window.Entities )
    window.Entities = {};
    
Entities.Airport = function( def_line )
{
    var items = def_line.split( "	" );
    this.code = items[0].replace(/^\s|\s$/g,"");
    this.name = items[1].replace(/^\s|\s$/g,"");
    this.city = items[2].replace(/^\s|\s$/g,"");
    this.state = items[3].replace(/^\s|\s$/g,"");
    this.country = items[4].replace(/^\s|\s$/g,"");
}

Entities.Airport.prototype.code = null;
Entities.Airport.prototype.name = null;
Entities.Airport.prototype.city = null;
Entities.Airport.prototype.state = null;
Entities.Airport.prototype.country = null;

Entities.Airport.prototype.getCode = function() { return this.code; }
Entities.Airport.prototype.getName = function() { return this.name; }
Entities.Airport.prototype.getCity = function() { return this.city; }
Entities.Airport.prototype.getState = function() { return this.state; }
Entities.Airport.prototype.getCountry = function() { return this.country; }