|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.hyphen.HyphenationServer4a
public class HyphenationServer4a
This class is the main entry point to the hyphenation package.
Field Summary | |
---|---|
static String |
PATTERN_RESOURCE_PATH
The path to the hyphenation patterns. |
Constructor Summary | |
---|---|
HyphenationServer4a(org.apache.commons.logging.Log logger,
URL hyphenationDir,
URL naturalLanguageDir)
Constructor. |
Method Summary | |
---|---|
static String |
buildCountryKey(String languageCode,
org.axsl.common.i18n.Country rawCountryCode)
Concatenates a language code with a country code to create a country key suitable for naming country-specific items. |
URL |
getHyphenationDir()
Returns the hyphenation directory for this server. |
org.apache.commons.logging.Log |
getLogger()
Returns the logger. |
NaturalLanguage |
getNaturalLanguage(org.axsl.common.i18n.Language iso639)
Finds or creates the instance of this class that is suitable for a given language description. |
NaturalLanguage |
getNaturalLanguage(String languageCode)
Finds or creates the instance of this class that is suitable for a given language description. |
org.axsl.hyphen.Word |
hyphenate(CharSequence word,
int offset,
int length,
org.axsl.common.i18n.Orthography orthography)
|
org.axsl.hyphen.HyphenationConsumer |
makeConsumer()
|
NaturalLanguage |
makeNaturalLanguage(String languageCode)
Makes a new, empty instance of this class for a given language description. |
int |
wordSize(CharSequence characters,
int wordStart,
org.axsl.common.i18n.Orthography orthography)
|
int |
wordStarts(CharSequence characters,
int startIndex,
org.axsl.common.i18n.Orthography orthography)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PATTERN_RESOURCE_PATH
Constructor Detail |
---|
public HyphenationServer4a(org.apache.commons.logging.Log logger, URL hyphenationDir, URL naturalLanguageDir)
logger
- The Log instance for user messages. Null can safely be
passed here as a default logger will be created by the server.hyphenationDir
- The base URL for hyphenation patterns.naturalLanguageDir
- The base URL for natural language definitions.Method Detail |
---|
public org.axsl.hyphen.Word hyphenate(CharSequence word, int offset, int length, org.axsl.common.i18n.Orthography orthography) throws org.axsl.hyphen.HyphenationException
hyphenate
in interface org.axsl.hyphen.HyphenationServer
org.axsl.hyphen.HyphenationException
public org.apache.commons.logging.Log getLogger()
public int wordSize(CharSequence characters, int wordStart, org.axsl.common.i18n.Orthography orthography)
wordSize
in interface org.axsl.hyphen.HyphenationServer
public int wordStarts(CharSequence characters, int startIndex, org.axsl.common.i18n.Orthography orthography)
wordStarts
in interface org.axsl.hyphen.HyphenationServer
public static String buildCountryKey(String languageCode, org.axsl.common.i18n.Country rawCountryCode)
languageCode
- The language to be included in the country key.rawCountryCode
- The country to be included in the country key.
public URL getHyphenationDir()
public NaturalLanguage getNaturalLanguage(String languageCode)
languageCode
- The ISO-639 code for the language sought.
languageCode
.public NaturalLanguage getNaturalLanguage(org.axsl.common.i18n.Language iso639)
iso639
- The ISO-639 instance for the language sought.
iso639
.public NaturalLanguage makeNaturalLanguage(String languageCode)
languageCode
- The ISO-639 code for the new instance.
languageCode
, or null if an
instance already exists for it.public org.axsl.hyphen.HyphenationConsumer makeConsumer()
makeConsumer
in interface org.axsl.hyphen.HyphenationServer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |