public class MorphAdornerServerData
extends java.lang.Object
Also stores common objects used by multiple configurations.
Modifier and Type | Field and Description |
---|---|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.hyphenator.Hyphenator |
americanHyphenator
American rules hyphenator.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.hyphenator.Hyphenator |
britishHyphenator
British rules hyphenator.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.spellingmapper.SpellingMapper |
britishToUS
British to US spelling mapper.
|
protected static javax.servlet.ServletContext |
context
Servlet context.
|
protected static java.util.Map<java.lang.String,MorphAdornerServerInfo> |
corpusConfigs
Corpus configurations.
|
protected static java.lang.String |
dataDirectory
Data directory.
|
protected static java.lang.String |
defaultDataDirectory
Default data directory.
|
protected static net.sf.jlinkgrammar.Dictionary |
dictionary
Link grammar dictionary.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.inflector.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 edu.northwestern.at.morphadorner.corpuslinguistics.stemmer.Stemmer |
lancasterStemmer
Lancaster stemmer.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.languagerecognizer.LanguageRecognizer |
languageRecognizer
The language recognizer.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.lemmatizer.Lemmatizer |
lemmatizer
The lemmatizer.
|
protected static java.lang.String |
lgParserDataDirectory
Link grammar parser data file directory.
|
protected static int |
maxAdornedUploadFileSize
Maximum adorned upload file size.
|
protected static int |
maxUnadornedUploadFileSize
Maximum unadorned upload file size.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.namerecognizer.Names |
names
Names.
|
protected static net.sf.jlinkgrammar.ParseOptions |
parseOptions
Link grammar parser options.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.stemmer.Stemmer |
porterStemmer
Porter stemmer.
|
protected static MorphAdornerServerInfo |
refAdornerInfo
First corpus configuration for extraction version information.
|
protected static java.lang.String |
serverVersion
Server version.
|
protected static java.lang.String |
servletNotReadyMessage
Servlet not ready message.
|
protected static java.lang.String |
servletNotReadyTitle
Servlet not ready title.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.syllablecounter.SyllableCounter |
syllableCounter
Syllable counter.
|
protected static edu.northwestern.at.morphadorner.corpuslinguistics.thesaurus.Thesaurus |
thesaurus
WordNet thesaurus.
|
protected static java.lang.String |
wordnetDataDirectory
Wordnet data file directory.
|
Constructor and Description |
---|
MorphAdornerServerData() |
Modifier and Type | Method and Description |
---|---|
static int |
convertStringFileSize(java.lang.String sFileSize)
Convert string file size to integer value.
|
static MorphAdornerServerInfo |
getAdornerInfo(java.lang.String adornerName)
Select adorner to use.
|
static javax.servlet.ServletContext |
getContext()
Get the context.
|
static java.lang.String |
getDataDirectory()
Get the data directory.
|
static int |
getIntValue(java.lang.String requestValue,
int defaultValue)
Gets integer parameter value.
|
static int |
getMaxAdornedUploadFileSize()
Get the maximum adorned upload file size.
|
static int |
getMaxUnadornedUploadFileSize()
Get the maximum unadorned upload file size.
|
static java.lang.String |
getMorphAdornerVersion()
Get MorphAdorner program version.
|
static java.lang.String |
getServerVersion()
Get server version.
|
static void |
initialize()
Initialize common objects.
|
static boolean |
isReady()
Check if servlet ready for use.
|
static java.lang.String |
makeFileName(java.io.File directory,
java.lang.String fileName)
Make a file name from a parent directory and file name.
|
static java.lang.String |
makeFileName(java.lang.String directoryName,
java.lang.String fileName)
Make a file name from a parent directory and file name.
|
static void |
setContext(javax.servlet.ServletContext theContext)
Set the context.
|
static void |
setDataDirectory(java.lang.String dataDir)
Set the data directory.
|
static void |
setMaxAdornedUploadFileSize(java.lang.String maxFileSize)
Set the maximum adorned upload file size.
|
static void |
setMaxUnadornedUploadFileSize(java.lang.String maxFileSize)
Set the maximum unadorned upload file size.
|
protected static java.lang.String serverVersion
protected static java.lang.String defaultDataDirectory
protected static java.lang.String dataDirectory
protected static javax.servlet.ServletContext context
protected static int maxUnadornedUploadFileSize
protected static int maxAdornedUploadFileSize
protected static edu.northwestern.at.morphadorner.corpuslinguistics.lemmatizer.Lemmatizer lemmatizer
protected static edu.northwestern.at.morphadorner.corpuslinguistics.stemmer.Stemmer porterStemmer
protected static edu.northwestern.at.morphadorner.corpuslinguistics.stemmer.Stemmer lancasterStemmer
protected static edu.northwestern.at.morphadorner.corpuslinguistics.namerecognizer.Names names
protected static edu.northwestern.at.morphadorner.corpuslinguistics.languagerecognizer.LanguageRecognizer languageRecognizer
protected static edu.northwestern.at.morphadorner.corpuslinguistics.inflector.Inflector inflector
protected static edu.northwestern.at.morphadorner.corpuslinguistics.spellingmapper.SpellingMapper britishToUS
protected static net.sf.jlinkgrammar.Dictionary dictionary
protected static net.sf.jlinkgrammar.ParseOptions parseOptions
protected static java.lang.String lgParserDataDirectory
protected static java.lang.String wordnetDataDirectory
protected static edu.northwestern.at.morphadorner.corpuslinguistics.thesaurus.Thesaurus thesaurus
protected static edu.northwestern.at.morphadorner.corpuslinguistics.hyphenator.Hyphenator britishHyphenator
protected static edu.northwestern.at.morphadorner.corpuslinguistics.hyphenator.Hyphenator americanHyphenator
protected static edu.northwestern.at.morphadorner.corpuslinguistics.syllablecounter.SyllableCounter syllableCounter
protected static java.util.Map<java.lang.String,MorphAdornerServerInfo> corpusConfigs
protected static MorphAdornerServerInfo refAdornerInfo
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
public static void initialize()
public static java.lang.String makeFileName(java.lang.String directoryName, java.lang.String fileName) throws java.lang.SecurityException
directoryName
- Parent directory name.fileName
- File name.java.lang.SecurityException
public static java.lang.String makeFileName(java.io.File directory, java.lang.String fileName) throws java.lang.SecurityException
directory
- Parent directory.fileName
- File name.java.lang.SecurityException
public static MorphAdornerServerInfo getAdornerInfo(java.lang.String adornerName)
adornerName
- Adorner name.public static boolean isReady()
public static int getIntValue(java.lang.String requestValue, int defaultValue)
requestValue
- Parameter value from request.defaultValue
- Default parameter value if parameter null
or invalid.public static java.lang.String getMorphAdornerVersion()
public static java.lang.String getServerVersion()
public static java.lang.String getDataDirectory()
public static void setDataDirectory(java.lang.String dataDir)
dataDir
- The data directory.public static int convertStringFileSize(java.lang.String sFileSize)
sFileSize
- String file size. May have "k", "m", "g"
following integer value to specify
kilobytes, megabytes, or gigabytes,
respectively.public static void setMaxUnadornedUploadFileSize(java.lang.String maxFileSize)
maxFileSize
- Maximum unadorned upload file size.public static int getMaxUnadornedUploadFileSize()
public static void setMaxAdornedUploadFileSize(java.lang.String maxFileSize)
maxFileSize
- Maximum adorned upload file size.public static int getMaxAdornedUploadFileSize()
public static javax.servlet.ServletContext getContext()
public static void setContext(javax.servlet.ServletContext theContext)
theContext
- The context.