textclassifier.ARCBC
Class Document

java.lang.Object
  extended by textclassifier.ARCBC.Document

public class Document
extends java.lang.Object

Class that represents one document with its attributes (or one row/object of the database)


Constructor Summary
Document()
          Constructor, which creates a noew instance of Document class
 
Method Summary
 void addAttribute(java.lang.String attName, double attValue)
          adds a new attribute of type double into the document
 void addAttribute(java.lang.String attName, float attValue)
          adds a new attribute of type float into the document
 void addAttribute(java.lang.String attName, int attValue)
          adds a new attribute of type integer into the document
 void addAttribute(java.lang.String attName, java.lang.String attValue)
          adds a new attribute of type String into the document
 java.util.ArrayList<fitem> getAtts()
          returns the set of attributes and their values
 java.lang.String getClas()
          returns the class of the document
 void setClas(java.lang.String c)
          sets a class of the document to a new value
 java.lang.String toString()
          converts all attributes of a document into a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Document

public Document()
Constructor, which creates a noew instance of Document class

Method Detail

addAttribute

public void addAttribute(java.lang.String attName,
                         java.lang.String attValue)
adds a new attribute of type String into the document

Parameters:
attName - string containing the name of the attribute
attValue - value of the attribute (string)

addAttribute

public void addAttribute(java.lang.String attName,
                         int attValue)
adds a new attribute of type integer into the document

Parameters:
attName - string containing the name of the attribute
attValue - value of the attribute (integer)

addAttribute

public void addAttribute(java.lang.String attName,
                         double attValue)
adds a new attribute of type double into the document

Parameters:
attName - string containing the name of the attribute
attValue - value of the attribute (double)

addAttribute

public void addAttribute(java.lang.String attName,
                         float attValue)
adds a new attribute of type float into the document

Parameters:
attName - string containing the name of the attribute
attValue - value of the attribute (float)

getAtts

public java.util.ArrayList<fitem> getAtts()
returns the set of attributes and their values

Returns:
a set of attributes

setClas

public void setClas(java.lang.String c)
sets a class of the document to a new value

Parameters:
c - the name of a new class

getClas

public java.lang.String getClas()
returns the class of the document

Returns:
the class

toString

public java.lang.String toString()
converts all attributes of a document into a string

Overrides:
toString in class java.lang.Object
Returns:
string containing all values of a document