package iitb.cfilt.cpost.dmstemmer;

public class MorphResult {
	String gender;
	String number;
	String person;
	String cAse;
	String tense;
	String aspect;
	String mode;
	
	public MorphResult() {
		// TODO Auto-generated constructor stub
		this.gender = "";
		this.number = "";
		this.person = "";
		this.cAse = "";
		this.tense = "";
		this.aspect = "";
		this.mode = "";
	}

	public MorphResult(String gender, String number, String person, String ase, String tense, String aspect, String mode) {
		//super();
		this.gender = gender;
		this.number = number;
		this.person = person;
		cAse = ase;
		this.tense = tense;
		this.aspect = aspect;
		this.mode = mode;
	}
	
	MorphResult(MorphResult otherMR){
		this.gender = otherMR.gender;
		this.number = otherMR.number;
		this.person = otherMR.person;
		this.cAse = otherMR.cAse;
		this.tense = otherMR.tense;
		this.aspect = otherMR.aspect;
		this.mode = otherMR.mode;		
	}
	
	public void print(){
		System.out.println("[ Gender : " + this.gender + ", Number : " + this.number + ", Person : " + this.person + ", Case : " + this.cAse + ", Tense : " + this.tense + ", Aspect : " + this.aspect + ", Mood : " + this.mode + " ]");
	}

	public void printToAddAfter(){
		System.out.println(", Gender : " + this.gender + ", Number : " + this.number + ", Person : " + this.person + ", Case : " + this.cAse + ", Tense : " + this.tense + ", Aspect : " + this.aspect + ", Mood : " + this.mode + " ]");
	}
	
	
	public String getAspect() {
		return aspect;
	}

	public void setAspect(String aspect) {
		this.aspect = aspect;
	}

	public String getCAse() {
		return cAse;
	}

	public void setCAse(String ase) {
		cAse = ase;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getMode() {
		return mode;
	}

	public void setMode(String mode) {
		this.mode = mode;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getPerson() {
		return person;
	}

	public void setPerson(String person) {
		this.person = person;
	}

	public String getTense() {
		return tense;
	}

	public void setTense(String tense) {
		this.tense = tense;
	}
	public MorphResult getMergedResult(MorphResult mr){
		MorphResult newMr = new MorphResult(this);
		if(!mr.getAspect().equalsIgnoreCase("x")){
			newMr.aspect = mr.getAspect();
		}
		if(!mr.getCAse().equalsIgnoreCase("x")){
			newMr.cAse = mr.getCAse();			
		}
		if(!mr.getGender().equalsIgnoreCase("x")){
			newMr.gender = mr.getGender();
		}
		if(!mr.getMode().equalsIgnoreCase("x")){
			newMr.mode = mr.getMode();			
		}
		if(!mr.getNumber().equalsIgnoreCase("x")){
			newMr.number = mr.getNumber();
		}
		if(!mr.getPerson().equalsIgnoreCase("x")){
			newMr.person = mr.getPerson();			
		}
		if(!mr.getTense().equalsIgnoreCase("x")){
			newMr.tense = mr.getTense();			
		}
		return newMr;
	}
	
}
