iglu.ir
Class ASCIIDocument
java.lang.Object
|
+--iglu.ir.AbstractDocument
|
+--iglu.ir.ASCIIDocument
- All Implemented Interfaces:
- Document, java.io.Serializable
- public class ASCIIDocument
- extends AbstractDocument
- implements java.io.Serializable
Represents a simple ascii document with no highlighted text.
The full content (except single-character words) is considered indexible.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Travis Bauer, Ryan Scherle
- See Also:
AbstractDocument
,
Serialized Form
Method Summary |
java.lang.String |
getIndexibleContent()
Returns a string containing the content of this
document which might be indexible. |
java.lang.String |
getStylizedText(int style)
Returns text that is highlighted in some manner. |
static void |
main(java.lang.String[] args)
Runs a test on this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ASCIIDocument
public ASCIIDocument(java.lang.String s)
getIndexibleContent
public java.lang.String getIndexibleContent()
- Description copied from interface:
Document
- Returns a string containing the content of this
document which might be indexible. Must do the
following:
- Drop all irrelevant punctuation
- Words must be separated by at least one space
- all letters are in lower case
- Content which should not contribute to the index should
be dropped (like HTML tags).
- Specified by:
getIndexibleContent
in interface Document
- Overrides:
getIndexibleContent
in class AbstractDocument
- Returns:
- a
String
value
getStylizedText
public java.lang.String getStylizedText(int style)
- Returns text that is highlighted in some manner.
In a basic ascii document, no text is highlighted, so this procedure
only returns empty strings.
- Specified by:
getStylizedText
in interface Document
- Specified by:
getStylizedText
in class AbstractDocument
- Parameters:
style
- an int
value
- Returns:
- a
String
value
main
public static void main(java.lang.String[] args)
- Runs a test on this class.