|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.framework.AbstractFactory
org.extex.language.impl.BaseLanguageManager
org.extex.language.impl.LoadingLanguageManager
public class LoadingLanguageManager
This class manages the Languages. It is a container which can
be asked to provide an appropriate instance. This instance is either taken
from existing instances or a new instance is created. Since at the time of
creation it can not be decided whether a new one should be used or an
existing one should be loaded a future object is returned which enables us to
postpone the operation until the decision can be made.
The future object invokes one of the methods of
LanguageCreator. In this case we know whether to
create or load the language. Thus the appropriate operation is performed and
the resulting language is put into the map overwriting the future object.
TODO gene: documentation incomplete
AbstractFactory.
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Fields inherited from class org.extex.framework.AbstractFactory |
|---|
CLASS_ATTRIBUTE, DEFAULT_ATTRIBUTE, SELECT_ATTRIBUTE |
| Constructor Summary | |
|---|---|
LoadingLanguageManager()
Creates a new object. |
|
| Method Summary | |
|---|---|
protected Language |
createLanguage(java.lang.String name)
Create a new language and put it into the table. |
Language |
createLanguageInstance(java.lang.String name)
Create a new instance for the given index if required. |
Language |
loadLanguageInstance(java.lang.String name)
Load or create a new instance for the given index if required. |
protected java.lang.Object |
readResolve()
Restore the internal state when the instance is loaded from file. |
protected boolean |
saveTable(java.lang.String name,
Language value)
Try to save the hyphenation table by other means. |
void |
setOutputStreamFactory(OutputStreamFactory factory)
This method takes an output stream factory for further use. |
void |
setResourceFinder(ResourceFinder finder)
Setter for the resource finder. |
| Methods inherited from class org.extex.language.impl.BaseLanguageManager |
|---|
getLanguage, getLocalizer, getTables |
| Methods inherited from class org.extex.framework.AbstractFactory |
|---|
configure, configure, createInstance, createInstance, createInstance, createInstance, createInstanceForConfiguration, createInstanceForConfiguration, createInstanceForConfiguration, enableLogging, enableLogging, getConfiguration, getLogger, getResourceFinder, reconnect, selectConfiguration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final long serialVersionUID
| Constructor Detail |
|---|
public LoadingLanguageManager()
| Method Detail |
|---|
protected Language createLanguage(java.lang.String name)
createLanguage in class BaseLanguageManagername - the name of the language
BaseLanguageManager.createLanguage(
java.lang.String)
public Language createLanguageInstance(java.lang.String name)
throws HyphenationException
createLanguageInstance in interface LanguageCreatorname - the symbolic name of the language
HyphenationException - in case of an error
ConfigurationException - in case of an configuration errorLanguageCreator.createLanguageInstance(
java.lang.String)
public Language loadLanguageInstance(java.lang.String name)
throws HyphenationException
loadLanguageInstance in interface LanguageCreatorname - the symbolic name of the language
HyphenationException - in case of an errorLanguageCreator.loadLanguageInstance(
java.lang.String)
protected java.lang.Object readResolve()
throws java.io.ObjectStreamException
readResolve in class BaseLanguageManagerjava.io.ObjectStreamException - in case of an error
protected boolean saveTable(java.lang.String name,
Language value)
throws java.io.IOException,
DocumentWriterException
The table is not saved if the name is purely numeric. This guarantees the
backward compatibility with TeX, since
name - the name of the tablevalue - the table itself
true iff the table has been saved
java.io.IOException - in case of an IO error
DocumentWriterException - in case of an errorpublic void setOutputStreamFactory(OutputStreamFactory factory)
setOutputStreamFactory in interface OutputStreamConsumerfactory - the output stream factory to useOutputStreamConsumer.setOutputStreamFactory(
org.extex.backend.outputStream.OutputStreamFactory)public void setResourceFinder(ResourceFinder finder)
setResourceFinder in interface ResourceAwaresetResourceFinder in class AbstractFactoryfinder - the resource finderResourceAware.setResourceFinder(
org.extex.resource.ResourceFinder)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||