nz.ac.waikato.mcennis.rat.graph.page
Class BasicCartesianPage

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.page.BasicCartesianPage
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, Page

public class BasicCartesianPage
extends java.lang.Object
implements Page

Class representing a bag-of-words representation of a page.

See Also:
Serialized Form

Constructor Summary
BasicCartesianPage(java.lang.String ID)
          Creates a new instance of BasicCartesianPage
 
Method Summary
 double compare(BasicCartesianPage p)
          Implements an internal compare.
 double compare(Page p)
          Only does comparisons of other objects of identical class.
 int compareTo(java.lang.Object o)
          FIXME: Not implemented yet
 java.util.HashMap<java.lang.String,java.lang.Double> getHistogram()
          Retrieve the histogram describing this document.
 java.lang.String getID()
          get the unique id identifying this page
 void load(java.util.HashMap<java.lang.String,java.lang.Double> histogram)
          Create a page given the bag-of-words description.
 void load(java.lang.String content)
          Create a page document fromthe given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCartesianPage

public BasicCartesianPage(java.lang.String ID)
Creates a new instance of BasicCartesianPage

Parameters:
ID -
Method Detail

getID

public java.lang.String getID()
Description copied from interface: Page
get the unique id identifying this page

Specified by:
getID in interface Page
Returns:
unique id

getHistogram

public java.util.HashMap<java.lang.String,java.lang.Double> getHistogram()
Description copied from interface: Page
Retrieve the histogram describing this document.

Specified by:
getHistogram in interface Page
Returns:

compare

public double compare(Page p)
Only does comparisons of other objects of identical class.

Specified by:
compare in interface Page
Parameters:
p - page to compare to
Returns:
similarity

compare

public double compare(BasicCartesianPage p)
Implements an internal compare.

Parameters:
p -
Returns:

load

public void load(java.lang.String content)
Description copied from interface: Page
Create a page document fromthe given string.

Specified by:
load in interface Page
Parameters:
content - contents of the text document

load

public void load(java.util.HashMap<java.lang.String,java.lang.Double> histogram)
Description copied from interface: Page
Create a page given the bag-of-words description.

Specified by:
load in interface Page
Parameters:
histogram - bag-of-words description of a text document

compareTo

public int compareTo(java.lang.Object o)
FIXME: Not implemented yet

Specified by:
compareTo in interface java.lang.Comparable