public abstract class IndexerKit
extends java.lang.Object
implements java.lang.Cloneable
New kits are normally created by cloning a prototype kit.
Modifier and Type | Field and Description |
---|---|
protected IndexBuilder |
builder |
protected ConfigFile |
config |
protected java.lang.String |
file |
protected java.util.Locale |
locale |
Constructor and Description |
---|
IndexerKit() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
clone()
Creates a copy of the indexer kit.
|
protected abstract void |
endStoreDocument()
Ends the storing of the document.
|
abstract java.lang.String |
getContentType()
Gets the MIME type of the data that this
kit represents support for.
|
java.util.Locale |
getLocale()
Gets the Locale.
|
abstract void |
parse(java.io.Reader in,
java.lang.String file,
boolean ignoreCharset,
IndexBuilder builder,
ConfigFile config)
Parses content from the given stream.
|
abstract int |
parseIntoTokens(java.lang.String source,
int pos)
Parses a string into tokens and stores the tokens.
|
void |
setLocale(java.util.Locale locale)
Sets the locale for string tokenizing.
|
void |
setLocale(java.lang.String lang)
Convenience method for setting the locale from a lang string
Takes the lang string in the form of "language_country_variant".
|
protected abstract void |
startStoreDocument(java.lang.String file)
Starts the storing of the dcoument.
|
protected abstract void |
storeTitle(java.lang.String title)
Stores a title in the IndexBuilder.
|
protected abstract void |
storeToken(java.lang.String token,
int pos)
Stores a token in the IndexBuilder.
|
protected IndexBuilder builder
protected ConfigFile config
protected java.lang.String file
protected java.util.Locale locale
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public abstract java.lang.String getContentType()
public void setLocale(java.util.Locale locale)
public void setLocale(java.lang.String lang)
lang
- A string representation of a locale. If lang is null it is the
same as setting the locale to null.public java.util.Locale getLocale()
public abstract void parse(java.io.Reader in, java.lang.String file, boolean ignoreCharset, IndexBuilder builder, ConfigFile config) throws java.io.IOException
in
- The stream to read from.file
- The file name being parsed.builder
- The IndexBuilder for the full text insertion.config
- The indexer configuration information.java.io.IOException
- on any I/O error.public abstract int parseIntoTokens(java.lang.String source, int pos)
protected abstract void startStoreDocument(java.lang.String file) throws java.lang.Exception
java.lang.Exception
protected abstract void endStoreDocument() throws java.lang.Exception
java.lang.Exception
protected abstract void storeToken(java.lang.String token, int pos) throws java.lang.Exception
java.lang.Exception
protected abstract void storeTitle(java.lang.String title) throws java.lang.Exception
java.lang.Exception