package iitb.cfilt.cpost.dmstemmer;
import java.io.*;
import java.util.*;

public class StemmedToken {
	String token;
	Vector<StemmedResult> stemmedResults;
	public StemmedToken(String token){
		this.token = token;
		stemmedResults = new Vector<StemmedResult>();
	}
	
	public void setToken(String token){
		this.token = token;
	}
	
	/*public void sortResults(){
		Collections.sort(stemmedOutputs);
	}*/
	
	public String getToken(){
		return token;
	}
	
	public boolean addStemmerOutput(StemmedResult srresult){
		return stemmedResults.add(srresult);
	}
	
	public boolean addAllStemmerOutputs(Vector<StemmedResult> srresult){
		return stemmedResults.addAll(srresult);
	}
	
	public Vector<StemmedResult> getStemmedResults(){
		return stemmedResults;
	}
	
	public void resetStemmedOutputs(){
		this.stemmedResults = new Vector<StemmedResult>();
	}

	public void clearOutputs() {
		stemmedResults.clear();
	}
	
	public void print(){
		System.out.println("Token : " + token + "\tTotal stems : " + stemmedResults.size());
		for(int i =0; i<stemmedResults.size(); i++){
			stemmedResults.get(i).print();
		}
		System.out.println("");
	}
	
}
