fleXplorer.Types
Class Document

java.lang.Object
  extended by fleXplorer.Types.Document

public class Document
extends java.lang.Object

Version:
1.1
Author:
Nikos Armenatzoglou

Constructor Summary
Document(int id, float rank, java.util.HashMap<java.lang.String,FacetsType> subjectTerms)
          Constructs a Document.
 
Method Summary
 int getId()
          Returns the id of the document.
 float getRank()
          Returns the rank of the document.
 FacetsType getSubjectTerm(java.lang.String facetName)
          Returns the value of the term from a specific facet that document is classified under.
 java.util.HashMap<java.lang.String,FacetsType> getSubjectTerms()
          Returns the values of the terms that document is classified under.
 void setSubjectTerm(java.lang.String facetName, StringType subjectTerm)
          Defines the value of the term of a specific facet that document is classified under.
 java.lang.String toString()
          Returns the string representation of Document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Document

public Document(int id,
                float rank,
                java.util.HashMap<java.lang.String,FacetsType> subjectTerms)
Constructs a Document.

Parameters:
id - the id of the document.
rank - the rank of the document (in case of integration with a WSE).
subjectTerms - the values of the terms from each facet that document is classified under.
Method Detail

getId

public int getId()
Returns the id of the document.

Returns:
the id of the document.

getRank

public float getRank()
Returns the rank of the document.

Returns:
the rank of the document.

getSubjectTerm

public FacetsType getSubjectTerm(java.lang.String facetName)
Returns the value of the term from a specific facet that document is classified under.

Parameters:
facetName - the name of the facet
Returns:
the value of the term of a specific facet that document is classified under.

setSubjectTerm

public void setSubjectTerm(java.lang.String facetName,
                           StringType subjectTerm)
Defines the value of the term of a specific facet that document is classified under.

Parameters:
facetName - the name of the facet
subjectTerm - the value of the term that document is classified under.

getSubjectTerms

public java.util.HashMap<java.lang.String,FacetsType> getSubjectTerms()
Returns the values of the terms that document is classified under. Returns a HashMap that contains as key the name of the facets and as value the values of the terms.

Returns:
the values of the terms that document is classified under.

toString

public java.lang.String toString()
Returns the string representation of Document.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of Document.