/*
 * 
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 * Created on Apr 26, 2005
 *
 * Klasse ist entstanden als für jedes Dokument seine Länge einmalig berechnet werden sollte
 * Soo auch zur Speicherung von Termfrequenzen zur Berchnung von IDF dienen
 */
package vkc.clusterer;

import java.util.HashSet;
import vkc.analyse.SummaryEntry;

public class ClusteringDocument {
    private boolean 		isClustered;				// Document schon mal geclustert

    private double			docVectorlength;			// sqrt(x[0]^2 + x[1]^2 + ...)
    
    private Integer			documentId; 				// VKC DocumentId 
    private Integer 		clusterID;					//ID des Clusters dem sie zugeordnet sind 

    private HashSet 		termEntries = new HashSet();

    private String			documentTitel;				// VKC Document Title

    private SummaryEntry[] 	vDocTerms; 
    
    public ClusteringDocument() {
    }

    /**
     * @return Returns the docVectorlength.
     */
    public double getDocVectorlength() {
        return docVectorlength;
    }
    
    /**
     * @param docVectorlength The docVectorlength to set.
     */
    public void setDocVectorlength(double docVectorlength) {
        this.docVectorlength = docVectorlength;
    }
    
    /**
     * @param docTerrms The vDocTerrms to set.
     */
    public void setVDocTerrms(SummaryEntry[] docTerrms) {
        vDocTerms = docTerrms;
    }
    
    /**
     * @return Returns the vKCDocumentID.
     */
    public Integer  getDocumentId() {
        return documentId;
    }
    
    /**
     * @param integer The vKCDocumentID to set.
     */
    public void setDocumentId(Integer documentId) {
        this.documentId = documentId;
    }

    /**
     * @return Returns the vKCCaregoryID.
     */
    public Integer getClusterID() {
        return clusterID;
    }
    
    /**
     * @param caregoryID The vKCCaregoryID to set.
     */
    public void setClusterID(Integer caregoryID) {
        clusterID = caregoryID;
    }
    
    /**
     * @return Returns the isClustered.
     */
    public boolean isClustered() {
        return isClustered;
    }
    
    /**
     * @param isClustered The isClustered to set.
     */
    public void setClustered(boolean isClustered) {
        this.isClustered = isClustered;
    }
    
    /**
     * @return Returns the vKCDocumentTitel.
     */
    public String getDocumentTitel() {
        return documentTitel;
    }
    
    /**
     * @param documentTitel The vKCDocumentTitel to set.
     */
    public void setDocumentTitel(String documentTitel) {
        this.documentTitel = documentTitel;
    }
    
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof ClusteringDocument)) {
            return false;
        }
        
        ClusteringDocument d = (ClusteringDocument)obj;
        
        return getDocumentId().equals(d.getDocumentId());
    }
    
    /**
     * @return Returns the termEntries.
     */
    public HashSet getTermEntries() {
        return termEntries;
    }

    /**
     * @return Returns the vDocTerms.
     */
    public SummaryEntry[] getVDocTerms() {
        return vDocTerms;
    }
}