fleXplorer.Types
Class DocumentIds

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

public class DocumentIds
extends java.lang.Object

Version:
1.1
Author:
Nikos Armenatzoglou

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

Constructor Detail

DocumentIds

public DocumentIds(int id,
                   float rank,
                   java.util.HashMap<java.lang.String,java.lang.Integer> 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 ids 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 java.lang.Integer getSubjectTerm(java.lang.String facetName)
Returns the id of the term from a specific facet that document is classified under.

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

setSubjectTerm

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

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

getSubjectTerms

public java.util.HashMap<java.lang.String,java.lang.Integer> getSubjectTerms()
Returns the ids 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 ids of the terms that document is classified under.

toString

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

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