org.extex.language
Class LanguageManagerFactory

java.lang.Object
  extended by org.extex.framework.AbstractFactory
      extended by org.extex.language.LanguageManagerFactory
All Implemented Interfaces:
Configurable, LogEnabled, RegistrarObserver, ResourceAware

public class LanguageManagerFactory
extends AbstractFactory

This class provides a factory for a LanguageManager.

 <Language default="ExTeX">

   <TeX class="org.extex.language.impl.BaseLanguageManager"
        default="default">
     <default
       class="org.extex.language.hyphenation.liang.LiangsHyphenationTable">
       <LigatureBuilder
         class="org.extex.language.ligature.impl.LigatureBuilderImpl"/>
       <WordTokenizer
         class="org.extex.language.word.impl.TeXWords"/>
     </default>
   </TeX>

   <ExTeX class="org.extex.language.impl.LoadingLanguageManager"
          default="default">
     <default
       class="org.extex.language.hyphenation.liang.LiangsHyphenationTable">
       <LigatureBuilder
         class="org.extex.language.ligature.impl.LigatureBuilderImpl"/>
       <WordTokenizer
         class="org.extex.language.word.impl.ExTeXWords"/>
     </default>
   </ExTeX>

 </Language>
 

The class to be instantiated can implements one or more interfaces which trigger special actions:

Configurable
If this interface is implemented then a Configuration is passed in with the interface method.
LogEnabled
If this interface is implemented then a Logger is passed in with the interface method.
ResourceAware
If this interface is implemented then a ResourceFinder is passed in with the interface method.
OutputStreamConsumer
If this interface is implemented then a OutputStreamFactory is passed in with the interface method.

Version:
$Revision: 4737 $
Author:
Gerd Neugebauer
See Also:
AbstractFactory

Field Summary
 
Fields inherited from class org.extex.framework.AbstractFactory
CLASS_ATTRIBUTE, DEFAULT_ATTRIBUTE, SELECT_ATTRIBUTE
 
Constructor Summary
LanguageManagerFactory()
           
 
Method Summary
 LanguageManager newInstance(java.lang.String type, OutputStreamFactory outFactory, ResourceFinder finder)
          Get an instance of a LanguageManager.
 
Methods inherited from class org.extex.framework.AbstractFactory
configure, configure, createInstance, createInstance, createInstance, createInstance, createInstanceForConfiguration, createInstanceForConfiguration, createInstanceForConfiguration, enableLogging, enableLogging, getConfiguration, getLogger, getResourceFinder, reconnect, selectConfiguration, setResourceFinder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageManagerFactory

public LanguageManagerFactory()
Method Detail

newInstance

public LanguageManager newInstance(java.lang.String type,
                                   OutputStreamFactory outFactory,
                                   ResourceFinder finder)
                            throws ConfigurationException
Get an instance of a LanguageManager. This method selects one of the entries in the configuration. The selection is done with the help of a type String. If the type is null or the empty string then the default from the configuration is used.

Parameters:
type - the type to use
outFactory - the output stream factory to pass in
finder - the resource finder to pass in
Returns:
a new context
Throws:
ConfigurationException - in case of an configuration error