iglu.ir
Interface Document

All Known Implementing Classes:
AbstractDocument

public interface Document

An interface for a document in the Information Retrieval Library.

Since:
1.0
Version:
1.0
Author:
Travis Bauer

Field Summary
static int STYLE_BOLD
           
static int STYLE_DEEMPHASIZED
           
static int STYLE_EMPHSIZED
           
static int STYLE_ITALIC
           
 
Method Summary
 java.lang.String getFullContent()
          Returns the unmodified contents of this document.
 java.lang.String getIndexibleContent()
          Returns a string containing the content of this document which might be indexible.
 java.lang.String getStylizedText(int style)
          Allows the user to query the document about text which is highlighted in some way.
 int numOccurs(java.lang.String w)
          The number of times w occurs in the indexible content.
 int numUniqueWords()
          The number of unique words in the indexible content of the document.
 int numWords()
          The number of total words in the document.
 void setIndexibleContent(java.lang.String content)
          Changes the indexible content of the current document to content.
 

Field Detail

STYLE_ITALIC

public static final int STYLE_ITALIC
See Also:
Constant Field Values

STYLE_BOLD

public static final int STYLE_BOLD
See Also:
Constant Field Values

STYLE_EMPHSIZED

public static final int STYLE_EMPHSIZED
See Also:
Constant Field Values

STYLE_DEEMPHASIZED

public static final int STYLE_DEEMPHASIZED
See Also:
Constant Field Values
Method Detail

getFullContent

public java.lang.String getFullContent()
Returns the unmodified contents of this document.

Returns:
a String value

getIndexibleContent

public java.lang.String getIndexibleContent()
Returns a string containing the content of this document which might be indexible. Must do the following:

Returns:
a String value

setIndexibleContent

public void setIndexibleContent(java.lang.String content)
Changes the indexible content of the current document to content. Can be used by the DocumentFilters to change the content.


getStylizedText

public java.lang.String getStylizedText(int style)
Allows the user to query the document about text which is highlighted in some way. All classes implementing this interface must at lease respond to the basic types listed above. They may also implement thier own specific type.

Parameters:
style - an int value
Returns:
a String value

numOccurs

public int numOccurs(java.lang.String w)
The number of times w occurs in the indexible content.

Parameters:
w - a String value
Returns:
an int value

numWords

public int numWords()
The number of total words in the document.

Returns:
an int value

numUniqueWords

public int numUniqueWords()
The number of unique words in the indexible content of the document.

Returns:
an int value