Class TypesetterFactory

  extended byde.dante.util.framework.AbstractFactory
      extended byde.dante.extex.typesetter.TypesetterFactory
All Implemented Interfaces:
Configurable, LogEnabled, RegistrarObserver

public class TypesetterFactory
extends AbstractFactory

This is the factory for instances of Typesetter. This factory inherits its properties from the AbstractFactory. Among them the support for configuration and logging.


Mainly the configuration needs to specify which class to use for the Typesetter. The configuration provides a mapping from a type name to the sub-configuration to be used. The name of the class is given as the argument class of the sub-configuration as shown below.

   <Typesetter default="TeX">
     <TeX class="de.dante.extex.typesetter.impl.TypesetterImpl"
       <PageBuilder class="de.dante.extex.typesetter.pageBuilder.impl.PageBuilderImpl"/>
       <ParagraphBuilder class="de.dante.extex.typesetter.paragraphBuilder.texImpl.TeXParagraphBuilder">
         <Hyphenator class="de.dante.extex.typesetter.paragraphBuilder.texImpl.TeXParagraphBuilder"/>
       <NodeFactory class="de.dante.extex.typesetter.type.node.factory.CachingNodeFactory"/>
     <develop class="de.dante.extex.typesetter.impl.TypesetterImpl"
       <PageBuilder class="de.dante.extex.typesetter.pageBuilder.impl.PageBuilderImpl"/>
       <ParagraphBuilder class="de.dante.extex.typesetter.paragraphBuilder.trivial.TrivialBuilder"/>
       <NodeFactory class="de.dante.extex.typesetter.type.node.factory.CachingUnicodeNodeFactory"/>

The named class need to implement the interface Typesetter. If this interface is not implemented an error is raised.

The configuration is passed down to the new instance if it implements the interface Configurable.

If the class implements the interface LogEnabled then a logger is passed to the new instance. For this purpose the factory itself is log enabled to receive the logger.

$Revision: 1.26 $
Gerd Neugebauer

Constructor Summary
          Creates a new object.
Method Summary
 Typesetter newInstance(java.lang.String type, Context context, BackendDriver backend)
          Get an instance of a typesetter.
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

Constructor Detail


public TypesetterFactory()
Creates a new object.

Method Detail


public Typesetter newInstance(java.lang.String type,
                              Context context,
                              BackendDriver backend)
                       throws TypesetterException,
Get an instance of a typesetter.

type - the symbolic name of the configuration to use
context - the interpreter context
backend - the back-end driver
a new typesetter
ConfigurationException - in case of an configuration error
TypesetterException - in case of another error