package de.uni_koeln.phil_fak.info.icrawler.core.data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;

import weka.classifiers.Classifier;
import weka.core.Attribute;
import weka.core.Instances;

public class NaiveBayesClassifierInstance implements Serializable {
	
	/**
	 * The UID.
	 */
	private static final long serialVersionUID = -8432812479903467140L;

	private Classifier classifier;
	private Instances trainingSet;
	private TreeSet<Integer> docVector;
	private TreeSet<String> termVector;
	private HashMap<Integer, Map<String, Double>> docTermMatrix;
	private ArrayList<Attribute> listWekaAttributes;

	public NaiveBayesClassifierInstance(Classifier classifier, Instances trainingSet, 
			TreeSet<Integer> docVector, TreeSet<String> termVector, HashMap<Integer, 
			Map<String, Double>> docTermMatrix, ArrayList<Attribute> listWekaAttributes) {
		this.setTrainingSet(trainingSet);
		this.setClassifier(classifier);
		this.setDocVector(docVector);
		this.setTermVector(termVector);
		this.setDocTermMatrix(docTermMatrix);
		this.setListWekaAttributes(listWekaAttributes);
	}

	public Classifier getClassifier() {
		return classifier;
	}

	public void setClassifier(Classifier classifier) {
		this.classifier = classifier;
	}

	public Instances getTrainingSet() {
		return trainingSet;
	}

	public void setTrainingSet(Instances trainingSet) {
		this.trainingSet = trainingSet;
	}

	public TreeSet<Integer> getDocVector() {
		return docVector;
	}

	public void setDocVector(TreeSet<Integer> docVector) {
		this.docVector = docVector;
	}

	public TreeSet<String> getTermVector() {
		return termVector;
	}

	public void setTermVector(TreeSet<String> termVector) {
		this.termVector = termVector;
	}

	public HashMap<Integer, Map<String, Double>> getDocTermMatrix() {
		return docTermMatrix;
	}

	public void setDocTermMatrix(HashMap<Integer, Map<String, Double>> docTermMatrix) {
		this.docTermMatrix = docTermMatrix;
	}

	public ArrayList<Attribute> getListWekaAttributes() {
		return listWekaAttributes;
	}

	public void setListWekaAttributes(ArrayList<Attribute> listWekaAttributes) {
		this.listWekaAttributes = listWekaAttributes;
	}

}

@@ -501,16 +501,44 @@
 ingSet;%0A
+%09private Instances testSet;%0A
 %09private
@@ -558,32 +558,32 @@
 ger%3E docVector;%0A
-
 %09private TreeSet
@@ -714,16 +714,18 @@
 ributes;
+%0A%09
 %0A%0A%09publi
@@ -805,16 +805,35 @@
 et, %0A%09%09%09
+Instances testSet, 
 TreeSet%3C
@@ -976,24 +976,24 @@
 tributes) %7B%0A
-
 %09%09this.setTr
@@ -1016,16 +1016,44 @@
 ngSet);%0A
+%09%09this.setTestSet(testSet);%0A
 %09%09this.s
@@ -2298,10 +2298,140 @@
 es;%0A%09%7D%0A%0A
+%09public Instances getTestSet() %7B%0A%09%09return testSet;%0A%09%7D%0A%0A%09public void setTestSet(Instances testSet) %7B%0A%09%09this.testSet = testSet;%0A%09%7D%0A%0A
 %7D%0A

Declare the testSet as a class member