|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dante.util.framework.AbstractFactory
de.dante.extex.language.impl.BaseLanguageManager
de.dante.extex.language.impl.LoadingLanguageManager
This class manages the Language
s. 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. |
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 de.dante.extex.language.impl.BaseLanguageManager |
getLanguage, getLocalizer, getTables |
Methods inherited from class de.dante.util.framework.AbstractFactory |
configure, configure, createInstance, createInstance, createInstance, createInstanceForConfiguration, createInstanceForConfiguration, createInstanceForConfiguration, enableLogging, enableLogging, getConfiguration, getLogger, 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)
BaseLanguageManager
createLanguage
in class BaseLanguageManager
name
- the name of the language
BaseLanguageManager.createLanguage(
java.lang.String)
public Language createLanguageInstance(java.lang.String name) throws HyphenationException
LanguageCreator
createLanguageInstance
in interface LanguageCreator
name
- the symbolic name of the language
HyphenationException
- in case of an errorLanguageCreator.createLanguageInstance(
java.lang.String)
public Language loadLanguageInstance(java.lang.String name) throws HyphenationException
LanguageCreator
loadLanguageInstance
in interface LanguageCreator
name
- 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 BaseLanguageManager
java.io.ObjectStreamException
- in case of an errorprotected 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)
OutputStreamConsumer
setOutputStreamFactory
in interface OutputStreamConsumer
factory
- the output stream factory to useOutputStreamConsumer.setOutputStreamFactory(
de.dante.extex.backend.outputStream.OutputStreamFactory)
public void setResourceFinder(ResourceFinder finder)
ResourceConsumer
setResourceFinder
in interface ResourceConsumer
finder
- the resource finderResourceConsumer.setResourceFinder(
de.dante.util.resource.ResourceFinder)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |