datamodel
Class DataSet

java.lang.Object
  extended by datamodel.DataSet

public class DataSet
extends java.lang.Object

This class implements a data set. A data set contains any number of documents. All defined operations perform changes on this data structure.

Author:
Kjell-Inge Skogstad and Trond Řivind Eriksen

Field Summary
static int LANGUAGE_ENGLISH
           
static int LANGUAGE_NORWEGIAN
           
 
Constructor Summary
DataSet(java.lang.String name, java.lang.String timeGranulity, int language)
          Constructor for the class.
 
Method Summary
 void addText(int tid, java.lang.String text)
          A method that adds a text cocument to the data set.
 int getLanguage()
          A method that gets the language of a document.
 java.lang.String getLanguageStr()
          Method for getting a string representation of the dataset language
 java.lang.String getName()
          A method that gets the name.
 int getNofTexts()
          A method that returns the number of texts in the data set.
 java.util.ArrayList getTexts()
          A method that returns all text documents in the data set.
 java.lang.String getTimeGranulity()
          Method that returns the time granulity used in the data set.
 boolean isCollocationPerformed()
           
 boolean isPartOfSpeechPerformed()
           
 boolean isWsdPerformed()
           
 void setCollocationPerformed(boolean collocation)
           
 void setPartOfSpeechPerformed(boolean partOfSpeech)
           
 void setWsdPerformed(boolean wsd)
           
 boolean termExtracted()
          Tests if terms have been extracted.
 java.lang.String toString()
          Method returning a string representation of the dataset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LANGUAGE_ENGLISH

public static final int LANGUAGE_ENGLISH
See Also:
Constant Field Values

LANGUAGE_NORWEGIAN

public static final int LANGUAGE_NORWEGIAN
See Also:
Constant Field Values
Constructor Detail

DataSet

public DataSet(java.lang.String name,
               java.lang.String timeGranulity,
               int language)
Constructor for the class. Creates a new data set.

Parameters:
name - The name
timeGranulity - The time granulity
Method Detail

isPartOfSpeechPerformed

public boolean isPartOfSpeechPerformed()

setPartOfSpeechPerformed

public void setPartOfSpeechPerformed(boolean partOfSpeech)

isCollocationPerformed

public boolean isCollocationPerformed()

setCollocationPerformed

public void setCollocationPerformed(boolean collocation)

isWsdPerformed

public boolean isWsdPerformed()

setWsdPerformed

public void setWsdPerformed(boolean wsd)

addText

public void addText(int tid,
                    java.lang.String text)
A method that adds a text cocument to the data set.

Parameters:
tid - The timestamp of the document
text - The text

getName

public java.lang.String getName()
A method that gets the name.

Returns:
name The name

getTimeGranulity

public java.lang.String getTimeGranulity()
Method that returns the time granulity used in the data set.

Returns:
The time granulity

getLanguage

public int getLanguage()
A method that gets the language of a document.

Returns:
language The language

getLanguageStr

public java.lang.String getLanguageStr()
Method for getting a string representation of the dataset language

Returns:
The dataset language

getTexts

public java.util.ArrayList getTexts()
A method that returns all text documents in the data set.

Returns:
texts The texts

termExtracted

public boolean termExtracted()
Tests if terms have been extracted.

Returns:
True if terms are extracted

getNofTexts

public int getNofTexts()
A method that returns the number of texts in the data set.

Returns:
nofTexts

toString

public java.lang.String toString()
Method returning a string representation of the dataset.

Overrides:
toString in class java.lang.Object
Returns:
string The string