|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
edu.northwestern.at.utils.servlets.XHttpServlet
edu.northwestern.at.morphadorner.servlets.BaseAdornerServlet
public abstract class BaseAdornerServlet
Base class for MorphAdorner example servlets.
Extends XHttpServlet with methods for MorphAdorner servlets. Also stores common objects used by multiple servlets.
| Field Summary | |
|---|---|
protected static SpellingMapper |
britishToUS
British to US spelling mapper. |
protected static java.lang.String |
dataDirectory
Data directory. |
protected static java.lang.String |
defaultDataDirectory
Default data directory. |
protected static Dictionary |
dictionary
Link grammar dictionary. |
protected static AdornerInfo |
emeAdornerInfo
Early modern English adorner information. |
protected static java.lang.String |
emeSpellingPairsFileName
Early modern English alternate to standard spelling pairs. |
protected static java.lang.String |
emeSuffixLexiconFileName
Early modern English suffix lexicon File name. |
protected static java.lang.String |
emeTransitionMatrixFileName
Early modern English transition matrix file name. |
protected static java.lang.String |
emeWordLexiconFileName
Early modern English word lexicon file name. |
protected static TaggedStrings |
extraWords
Extra words list. |
protected static java.lang.String |
extraWordsFileName
Extra words file name. |
protected static Inflector |
inflector
English inflector. |
protected static int |
INITDONE
|
protected static int |
INITFAILED
|
protected static int |
initializationStatus
Initialization complete. |
protected static int |
INITINPROGRESS
|
protected static int |
INITNOTSTARTED
Initialization states. |
protected static Stemmer |
lancasterStemmer
Lancaster stemmer. |
protected static LanguageRecognizer |
languageRecognizer
The language recognizer. |
protected static TaggedStrings |
latinWords
Latin words list. |
protected static java.lang.String |
latinWordsFileName
Latin words file name. |
protected static Lemmatizer |
lemmatizer
The lemmatizer. |
protected static java.lang.String |
lgParserDataDirectory
Link grammar parser data file directory. |
protected static Names |
names
Names. |
protected static AdornerInfo |
ncfAdornerInfo
19th century adorner information. |
protected static java.lang.String |
ncfSpellingPairsFileName
Alternate to standard spelling pairs for 19th century fiction. |
protected static java.lang.String |
ncfSuffixLexiconFileName
19th century fiction lexicon file name. |
protected static java.lang.String |
ncfTransitionMatrixFileName
19th century fiction transition matrix file name. |
protected static java.lang.String |
ncfWordLexiconFileName
19th century fiction lexicon file name. |
protected boolean |
outputFullHTML
True to Output full top and bottom page HTML. |
protected static ParseOptions |
parseOptions
Link grammar parser options. |
protected static Stemmer |
porterStemmer
Porter stemmer. |
protected static java.lang.String |
servletNotReadyMessage
Servlet not ready message. |
protected static java.lang.String |
servletNotReadyTitle
Servlet not ready title. |
protected static java.lang.String |
standardSpellingsFileName
Standard spellings file name. |
| Constructor Summary | |
|---|---|
BaseAdornerServlet()
|
|
| Method Summary | |
|---|---|
protected ServletResult |
doHandleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle request. |
protected static void |
doInitialization(javax.servlet.ServletConfig config)
Initialize common objects. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle servlet post requests. |
static AdornerInfo |
getAdornerInfo(java.lang.String adornerName)
Select adorner to use. |
static TaggedStrings |
getExtraWordsList()
Get extra words list. |
static int |
getIntValue(java.lang.String requestValue,
int defaultValue)
Gets integer parameter value. |
static TaggedStrings |
getLatinWordsList()
Get Latin words list. |
protected abstract ServletResult |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle request. |
protected static void |
initialize(javax.servlet.ServletConfig config)
Initialize common objects. |
static boolean |
isReady()
Check if servlet ready for use. |
void |
outputAdornerSelection(java.io.PrintWriter out,
java.lang.String label,
java.lang.String adornerName)
Output adorner selection form field. |
void |
outputFooter(java.io.PrintWriter out)
Output bottom of page. |
void |
outputHeader(java.io.PrintWriter out,
java.lang.String title)
Output top of page. |
ServletResult |
outputNotReady(java.lang.String notReadyMessage)
Output servlet not ready message. |
void |
outputResults(javax.servlet.http.HttpServletResponse response,
java.lang.String results,
java.lang.String title)
Return stored results. |
void |
outputSelect(java.io.PrintWriter out,
java.lang.String selectValue,
boolean selected)
Output a select clause. |
void |
outputSpacerRow(java.io.PrintWriter out,
int nColumns)
Output empty table row as spacer. |
java.lang.String |
unTag(java.lang.String text)
Remove HTML/XML tags from text. |
| Methods inherited from class edu.northwestern.at.utils.servlets.XHttpServlet |
|---|
createRedirectURL, doGet |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean outputFullHTML
protected static java.lang.String defaultDataDirectory
protected static java.lang.String dataDirectory
protected static AdornerInfo ncfAdornerInfo
protected static java.lang.String ncfWordLexiconFileName
protected static java.lang.String ncfSuffixLexiconFileName
protected static java.lang.String ncfSpellingPairsFileName
protected static java.lang.String ncfTransitionMatrixFileName
protected static AdornerInfo emeAdornerInfo
protected static java.lang.String emeWordLexiconFileName
protected static java.lang.String emeSuffixLexiconFileName
protected static java.lang.String emeTransitionMatrixFileName
protected static java.lang.String emeSpellingPairsFileName
protected static java.lang.String standardSpellingsFileName
protected static Lemmatizer lemmatizer
protected static Stemmer porterStemmer
protected static Stemmer lancasterStemmer
protected static Names names
protected static LanguageRecognizer languageRecognizer
protected static Inflector inflector
protected static SpellingMapper britishToUS
protected static java.lang.String extraWordsFileName
protected static java.lang.String latinWordsFileName
protected static TaggedStrings latinWords
protected static TaggedStrings extraWords
protected static Dictionary dictionary
protected static ParseOptions parseOptions
protected static java.lang.String lgParserDataDirectory
protected static final int INITNOTSTARTED
protected static final int INITINPROGRESS
protected static final int INITDONE
protected static final int INITFAILED
protected static int initializationStatus
protected static final java.lang.String servletNotReadyMessage
protected static final java.lang.String servletNotReadyTitle
| Constructor Detail |
|---|
public BaseAdornerServlet()
| Method Detail |
|---|
protected static void doInitialization(javax.servlet.ServletConfig config)
config - Servlet configuration.protected static void initialize(javax.servlet.ServletConfig config)
config - Servlet configuration.public static TaggedStrings getLatinWordsList()
public static TaggedStrings getExtraWordsList()
public static AdornerInfo getAdornerInfo(java.lang.String adornerName)
adornerName - Adorner name.
public static boolean isReady()
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletrequest - Servlet request.response - Servlet response.
javax.servlet.ServletException
java.io.IOException
public void outputHeader(java.io.PrintWriter out,
java.lang.String title)
out - PrintWriter for servlet output.title - The servlet title.public ServletResult outputNotReady(java.lang.String notReadyMessage)
notReadyMessage - Server not ready message.
public void outputSpacerRow(java.io.PrintWriter out,
int nColumns)
out - PrintWriter for servlet output.nColumns - Number of empty table columns to output.public void outputFooter(java.io.PrintWriter out)
out - PrintWriter for servlet output.
public void outputSelect(java.io.PrintWriter out,
java.lang.String selectValue,
boolean selected)
out - PrintWriter for servlet output.selectValue - The value.selected - True if selected.
public void outputAdornerSelection(java.io.PrintWriter out,
java.lang.String label,
java.lang.String adornerName)
out - PrintWriter for servlet output.label - Column label. May be empty.adornerName - Adorner name.
public void outputResults(javax.servlet.http.HttpServletResponse response,
java.lang.String results,
java.lang.String title)
throws java.io.IOException
response - Servlet response object.results - Result string to return to client for display.title - Title for output.
java.io.IOExceptionpublic java.lang.String unTag(java.lang.String text)
text - The text from which to remove tags.
protected ServletResult doHandleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
request - Servlet request.response - Servlet response.
javax.servlet.ServletException
java.io.IOException
public static int getIntValue(java.lang.String requestValue,
int defaultValue)
requestValue - Parameter value from request.defaultValue - Default parameter value if parameter null
or invalid.
protected abstract ServletResult handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
request - Servlet request.response - Servlet response.
javax.servlet.ServletException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||