package iitb.cfilt.cpost.dmstemmer;

import java.util.*;

import iitb.cfilt.cpost.lexicon.SuffixMorphsPair;

public class MorphOutput2 {
	StemmerResult stemmerResult;	
	Vector<MorphResult> morphAnalysis;
	Vector<SuffixMorphsPair> detailSuffixesAnalysis;
	
	public MorphOutput2() {		
		// TODO Auto-generated constructor stub
		this.stemmerResult = null;
		this.morphAnalysis = null;
		this.detailSuffixesAnalysis = null;
	}
	public MorphOutput2(StemmerResult stemmerResult, Vector<MorphResult> morphAnalysis, Vector<SuffixMorphsPair> detailSuffixesAnalysis) {		
		this.stemmerResult = stemmerResult;
		this.morphAnalysis = morphAnalysis;
		this.detailSuffixesAnalysis = detailSuffixesAnalysis;
	}
	public MorphOutput2(StemmerResult stemmerResult, MorphResult morph, Vector<SuffixMorphsPair> detailSuffixesAnalysis) {		
		this.stemmerResult = stemmerResult;
		this.morphAnalysis = new Vector<MorphResult>();
		morphAnalysis.add(morph);
		this.detailSuffixesAnalysis = detailSuffixesAnalysis;
	}
	public MorphOutput2(StemmerResult stemmerResult, MorphResult morph, SuffixMorphsPair detailSuffixAnalysis) {		
		this.stemmerResult = stemmerResult;
		this.morphAnalysis = new Vector<MorphResult>();
		morphAnalysis.add(morph);
		this.detailSuffixesAnalysis = new Vector<SuffixMorphsPair>();
		this.detailSuffixesAnalysis.add(detailSuffixAnalysis);
	}
	public MorphOutput2(StemmerResult stemmerResult, Vector<MorphResult> morphAnalysis, SuffixMorphsPair detailSuffixAnalysis) {		
		this.stemmerResult = stemmerResult;
		this.morphAnalysis = morphAnalysis;		
		this.detailSuffixesAnalysis = new Vector<SuffixMorphsPair>();
		this.detailSuffixesAnalysis.add(detailSuffixAnalysis);
	}
	
	public Vector<SuffixMorphsPair> getDetailSuffixesAnalysis() {
		return detailSuffixesAnalysis;
	}
	public void setDetailSuffixesAnalysis(
			Vector<SuffixMorphsPair> detailSuffixesAnalysis) {
		this.detailSuffixesAnalysis = detailSuffixesAnalysis;
	}
	public Vector<MorphResult> getMorphAnalysis() {
		return morphAnalysis;
	}
	public void setMorphAnalysis(Vector<MorphResult> morphAnalysis) {
		this.morphAnalysis = morphAnalysis;
	}
	public StemmerResult getStemmerResult() {
		return stemmerResult;
	}
	public void setStemmerResult(StemmerResult stemmerResult) {
		this.stemmerResult = stemmerResult;
	}
	public void print(){		
		stemmerResult.println();
		for(int mas=0; mas<morphAnalysis.size(); mas++){
			System.out.print("\t");
			morphAnalysis.get(mas).print();
		}
	}
	public void printDetail(){		
		stemmerResult.println();
		for(int mas=0; mas<morphAnalysis.size(); mas++){
			System.out.print("\t");
			morphAnalysis.get(mas).print();
			if(detailSuffixesAnalysis!=null && detailSuffixesAnalysis.size()>0){
				//System.out.print("\t\t");
				for(int n=0; n<detailSuffixesAnalysis.size(); n++){
					SuffixMorphsPair smp = detailSuffixesAnalysis.get(n);
					if(smp!=null){
						smp.print();
					}
				}
			}
		}		
	}
}
