com.sun.labs.minion
Class IndexableString

java.lang.Object
  extended by com.sun.labs.minion.IndexableString

public class IndexableString
extends java.lang.Object

A class that holds a string along with some information about any markup used in the string.


Nested Class Summary
static class IndexableString.Type
           
 
Field Summary
protected  CustomAnalyzer canalyzer
          The custom analyzer to use if this object is markup type CUSTOM
protected  IndexableString.Type markupType
          The type of markup used in the string.
protected  java.lang.String value
          The string to index.
 
Constructor Summary
IndexableString(java.lang.String value)
          Create a new IndexableString from the parameter
IndexableString(java.lang.String value, CustomAnalyzer canalyzer)
          Creates a new IndexableString from an existing string with a specified markup type and a specified analyzer.
IndexableString(java.lang.String value, IndexableString.Type markupType)
          Create a new IndexableString from an existing string with a specified markup type
 
Method Summary
 CustomAnalyzer getCustomAnalyzer()
          Gets the CustomAnalyzer to use with this string
 IndexableString.Type getMarkupType()
          Gets the markupType value.
 java.lang.String getValue()
          Gets the value of the indexable string
 void setCustomAnalyzer(CustomAnalyzer canalyzer)
          Sets the CustomAnalyzer to use with this string
 void setMarkupType(IndexableString.Type markupType)
          Sets the markupType value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected java.lang.String value
The string to index.


markupType

protected IndexableString.Type markupType
The type of markup used in the string.


canalyzer

protected CustomAnalyzer canalyzer
The custom analyzer to use if this object is markup type CUSTOM

Constructor Detail

IndexableString

public IndexableString(java.lang.String value)
Create a new IndexableString from the parameter

Parameters:
value - a string that forms the basis for a new indexablestring

IndexableString

public IndexableString(java.lang.String value,
                       IndexableString.Type markupType)
Create a new IndexableString from an existing string with a specified markup type

Parameters:
value - a string that forms the basis for a new IndexableString
markupType - The markup type for the new IndexableString. Should be one of Type.PLAIN or Type.HTML

IndexableString

public IndexableString(java.lang.String value,
                       CustomAnalyzer canalyzer)
Creates a new IndexableString from an existing string with a specified markup type and a specified analyzer.

Parameters:
value - a string that forms the basis for a new IndexableString
canalyzer - the class that will analyze the custom markup type
Method Detail

getMarkupType

public IndexableString.Type getMarkupType()
Gets the markupType value.

Returns:
the markupType value.

setMarkupType

public void setMarkupType(IndexableString.Type markupType)
Sets the markupType value.

Parameters:
markupType - The new markupType value.

getValue

public java.lang.String getValue()
Gets the value of the indexable string

Returns:
the string to index

getCustomAnalyzer

public CustomAnalyzer getCustomAnalyzer()
Gets the CustomAnalyzer to use with this string

Returns:
the CustomAnalyzer

setCustomAnalyzer

public void setCustomAnalyzer(CustomAnalyzer canalyzer)
Sets the CustomAnalyzer to use with this string

Parameters:
canalyzer - the CustomAnalyzer