package org.josast.SIDS;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Station {
	

	private String callsign="XtopheSwl";
	private String longitude="1.47E";
	private String latitude="43.56N";
	
	public Station(String callsign, String longitude, String latitude) {
		super();
		this.callsign = callsign;
		this.longitude = longitude;
		this.latitude = latitude;
	}
	
	public Station() {
		// TODO Auto-generated constructor stub
	}
	
	public String getCallsign() {
		return callsign;
	}
	public void setCallsign(String callsign) {
		this.callsign = callsign;
	}
	public String getLongitude() {
		return longitude;
	}
	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}
	public String getLatitude() {
		return latitude;
	}
	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}
	
	public boolean checkLatitude (String latitude)
	{
		
		Pattern p = Pattern.compile("[\\d]*\\.[\\d]*[N,S]") ;      
		Matcher m = p.matcher(latitude) ; 
		return  m.matches() ;
		
	}
	public boolean checkLongitude (String longitude)
	{
		
		Pattern p = Pattern.compile("[\\d]*\\.[\\d]*[E,W]") ;      
		Matcher m = p.matcher(longitude) ; 
		return  m.matches() ;
		
	}

	


}
