org.foray.app
Class FOraySpecific

java.lang.Object
  extended by org.foray.app.FOraySpecific

public final class FOraySpecific
extends Object

Utility class that creates FOray-specific implementations of the high-level objects for each module. The purpose of the methods in this class is to simplify the task of getting FOray started up in a standard manner without diminishing the flexibility of its pluggable nature.


Method Summary
static AreaTreeFactory4a makeAreaTreeFactory(org.apache.commons.logging.Log logger)
          Make a standard AreaTreeFactory instance for use in FOray.
static org.axsl.font.FontServer makeFontServer(org.apache.commons.logging.Log logger, SessionConfig configuration)
          Make a standard FontServer instance for use in FOray.
static FOraySession makeFOraySession(SessionConfig sessionConfig)
          Creates a new FOraySession instance configured with default servers and factories.
static org.axsl.fo.FoTreeFactory makeFOTreeFactory(org.apache.commons.logging.Log logger, SessionConfig configuration, org.axsl.font.FontServer fontServer, org.axsl.graphic.GraphicServer graphicServer, org.axsl.text.TextServer textServer, org.axsl.hyphen.HyphenationServer hyphenationServer)
          Make a standard FOTreeFactory instance for use in FOray.
static org.axsl.graphic.GraphicServer makeGraphicServer(org.apache.commons.logging.Log logger)
          Make a standard GraphicServer instance for use in FOray.
static org.axsl.hyphen.HyphenationServer makeHyphenationServer(org.apache.commons.logging.Log logger, SessionConfig configuration)
          Make a standard HyphenationServer instance for use in FOray.
static PioneerFactory makeLayoutFactory(org.apache.commons.logging.Log logger)
          Make a standard LayoutFactory instance for use in FOray.
static org.apache.commons.logging.Log makeLogger(SessionConfig configuration)
          Make a standard logger for use in FOray.
static org.axsl.ps.PsServer makePsServer()
          Make a standard PsServer instance for use in FOray.
static org.axsl.speech.SpeechServer makeSpeechServer()
          Make a standard SpeechServer instance for use in FOray.
static org.axsl.text.TextServer makeTextServer(org.apache.commons.logging.Log logger, org.axsl.hyphen.HyphenationServer hyphenServer)
          Make a standard TextServer instance for use in FOray.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeFOraySession

public static FOraySession makeFOraySession(SessionConfig sessionConfig)
                                     throws FOrayException
Creates a new FOraySession instance configured with default servers and factories.

Parameters:
sessionConfig - The session configuration.
Returns:
The newly-created FOraySession.
Throws:
FOrayException - For errors in creating the server and factories, or in instantiating the FOraySession.

makeLogger

public static org.apache.commons.logging.Log makeLogger(SessionConfig configuration)
Make a standard logger for use in FOray.

Parameters:
configuration - The session configuration.
Returns:
The newly-created logger.

makeFontServer

public static org.axsl.font.FontServer makeFontServer(org.apache.commons.logging.Log logger,
                                                      SessionConfig configuration)
                                               throws FOrayException
Make a standard FontServer instance for use in FOray.

Parameters:
logger - The logger.
configuration - The session configuration.
Returns:
The newly-created FontServer instance.
Throws:
FOrayException - For errors creating the server.

makeTextServer

public static org.axsl.text.TextServer makeTextServer(org.apache.commons.logging.Log logger,
                                                      org.axsl.hyphen.HyphenationServer hyphenServer)
                                               throws FOrayException
Make a standard TextServer instance for use in FOray.

Parameters:
logger - The logger.
hyphenServer - The hyphenation server to be used in line-breaking decisions.
Returns:
The newly-created TextServer instance.
Throws:
FOrayException - For errors creating the server.

makeHyphenationServer

public static org.axsl.hyphen.HyphenationServer makeHyphenationServer(org.apache.commons.logging.Log logger,
                                                                      SessionConfig configuration)
Make a standard HyphenationServer instance for use in FOray.

Parameters:
logger - The logger.
configuration - The session configuration.
Returns:
The newly-created HyphenationServer instance.

makeGraphicServer

public static org.axsl.graphic.GraphicServer makeGraphicServer(org.apache.commons.logging.Log logger)
                                                        throws FOrayException
Make a standard GraphicServer instance for use in FOray.

Parameters:
logger - The logger.
Returns:
The newly-created GraphicServer instance.
Throws:
FOrayException - For errors creating the server.

makeFOTreeFactory

public static org.axsl.fo.FoTreeFactory makeFOTreeFactory(org.apache.commons.logging.Log logger,
                                                          SessionConfig configuration,
                                                          org.axsl.font.FontServer fontServer,
                                                          org.axsl.graphic.GraphicServer graphicServer,
                                                          org.axsl.text.TextServer textServer,
                                                          org.axsl.hyphen.HyphenationServer hyphenationServer)
                                                   throws FOrayException
Make a standard FOTreeFactory instance for use in FOray.

Parameters:
logger - The logger.
configuration - The session configuration.
fontServer - The FontServer instance to use.
graphicServer - The GraphicServer instance to use.
textServer - The TextServer to use.
hyphenationServer - The hyphenation server.
Returns:
The newly-created FOTreeFactory instance.
Throws:
FOrayException - For errors creating the server.

makeAreaTreeFactory

public static AreaTreeFactory4a makeAreaTreeFactory(org.apache.commons.logging.Log logger)
                                             throws FOrayException
Make a standard AreaTreeFactory instance for use in FOray.

Parameters:
logger - The logger.
Returns:
The newly-created AreaTreeFactory instance.
Throws:
FOrayException - For errors creating the server.

makeLayoutFactory

public static PioneerFactory makeLayoutFactory(org.apache.commons.logging.Log logger)
                                        throws FOrayException
Make a standard LayoutFactory instance for use in FOray.

Parameters:
logger - The logger.
Returns:
The newly-created LayoutFactory instance.
Throws:
FOrayException - For errors creating the server.

makeSpeechServer

public static org.axsl.speech.SpeechServer makeSpeechServer()
                                                     throws FOrayException
Make a standard SpeechServer instance for use in FOray.

Returns:
The newly-created SpeechServer instance.
Throws:
FOrayException - For errors creating the server.

makePsServer

public static org.axsl.ps.PsServer makePsServer()
Make a standard PsServer instance for use in FOray.

Returns:
The newly-created PsServer instance.


Copyright © 2017. All rights reserved.