Package org.apache.fop.apps
Class FopConfParser
- java.lang.Object
-
- org.apache.fop.apps.FopConfParser
-
public class FopConfParser extends java.lang.Object
Parses the FOP configuration file and returns aFopFactoryBuilder
which builds aFopFactory
.
-
-
Field Summary
Fields Modifier and Type Field Description private FopFactoryBuilder
fopFactoryBuilder
private org.apache.commons.logging.Log
log
private static java.lang.String
PREFER_RENDERER
private static java.lang.String
TABLE_BORDER_OVERPAINT
-
Constructor Summary
Constructors Constructor Description FopConfParser(java.io.File fopConfFile)
Constructor that takes the FOP conf and uses the default URI resolver.FopConfParser(java.io.File fopConfFile, java.net.URI defaultBaseURI)
Constructor that takes the FOP conf and a default base URI and uses the default URI resolver.FopConfParser(java.io.File fopConfFile, org.apache.xmlgraphics.io.ResourceResolver resourceResolver)
Constructor that parses the FOP conf and uses the URI resolver given.FopConfParser(java.io.InputStream fopConfStream, java.net.URI defaultBaseURI)
Constructor that takes the FOP conf in the form of anInputStream
.FopConfParser(java.io.InputStream fopConfStream, java.net.URI baseURI, EnvironmentProfile enviro)
FopConfParser(java.io.InputStream fopConfStream, java.net.URI defaultBaseURI, org.apache.xmlgraphics.io.ResourceResolver resourceResolver)
Constructor that takes the FOP conf in the form of anInputStream
.FopConfParser(java.io.InputStream fopConfStream, EnvironmentProfile enviro)
Constructor that takes the FOP conf in the form of anInputStream
.FopConfParser(Configuration cfg, FopFactoryBuilder fopFactoryBuilder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
addError(java.lang.String message, java.lang.StringBuffer error)
private void
configure(java.net.URI baseURI, org.apache.xmlgraphics.io.ResourceResolver resourceResolver, Configuration cfg)
private void
configureImageLoading(Configuration parent, boolean strict)
FopFactoryBuilder
getFopFactoryBuilder()
Returns theFopFactoryBuilder
.private void
setHyphenationBase(Configuration cfg, org.apache.xmlgraphics.io.ResourceResolver resourceResolver, java.net.URI baseURI, FopFactoryBuilder fopFactoryBuilder)
private void
setHyphPatNames(Configuration cfg, FopFactoryBuilder builder, boolean strict)
-
-
-
Field Detail
-
PREFER_RENDERER
private static final java.lang.String PREFER_RENDERER
- See Also:
- Constant Field Values
-
TABLE_BORDER_OVERPAINT
private static final java.lang.String TABLE_BORDER_OVERPAINT
- See Also:
- Constant Field Values
-
log
private final org.apache.commons.logging.Log log
-
fopFactoryBuilder
private final FopFactoryBuilder fopFactoryBuilder
-
-
Constructor Detail
-
FopConfParser
public FopConfParser(java.io.InputStream fopConfStream, EnvironmentProfile enviro) throws org.xml.sax.SAXException, java.io.IOException
Constructor that takes the FOP conf in the form of anInputStream
. A default base URI must be given as a fall-back mechanism for URI resolution.- Parameters:
fopConfStream
- the fop conf input streamenviro
- the profile of the FOP deployment environment- Throws:
org.xml.sax.SAXException
- if a SAX error was thrown parsing the FOP confjava.io.IOException
- if an I/O error is thrown while parsing the FOP conf
-
FopConfParser
public FopConfParser(java.io.InputStream fopConfStream, java.net.URI defaultBaseURI, org.apache.xmlgraphics.io.ResourceResolver resourceResolver) throws org.xml.sax.SAXException, java.io.IOException
Constructor that takes the FOP conf in the form of anInputStream
. A default base URI must be given as a fall-back mechanism for URI resolution.- Parameters:
fopConfStream
- the fop conf input streamdefaultBaseURI
- the default base URIresourceResolver
- the URI resolver- Throws:
org.xml.sax.SAXException
- if a SAX error was thrown parsing the FOP confjava.io.IOException
- if an I/O error is thrown while parsing the FOP conf
-
FopConfParser
public FopConfParser(java.io.InputStream fopConfStream, java.net.URI defaultBaseURI) throws org.xml.sax.SAXException, java.io.IOException
Constructor that takes the FOP conf in the form of anInputStream
. A default base URI must be given as a fall-back mechanism for URI resolution. The default URI resolvers is used.- Parameters:
fopConfStream
- the fop conf input streamdefaultBaseURI
- the default base URI- Throws:
org.xml.sax.SAXException
- if a SAX error was thrown parsing the FOP confjava.io.IOException
- if an I/O error is thrown while parsing the FOP conf
-
FopConfParser
public FopConfParser(java.io.File fopConfFile) throws org.xml.sax.SAXException, java.io.IOException
Constructor that takes the FOP conf and uses the default URI resolver.- Parameters:
fopConfFile
- the FOP conf file- Throws:
org.xml.sax.SAXException
- if a SAX error was thrown parsing the FOP confjava.io.IOException
- if an I/O error is thrown while parsing the FOP conf
-
FopConfParser
public FopConfParser(java.io.File fopConfFile, java.net.URI defaultBaseURI) throws org.xml.sax.SAXException, java.io.IOException
Constructor that takes the FOP conf and a default base URI and uses the default URI resolver.- Parameters:
fopConfFile
- the FOP conf filedefaultBaseURI
- the default base URI- Throws:
org.xml.sax.SAXException
- if a SAX error was thrown parsing the FOP confjava.io.IOException
- if an I/O error is thrown while parsing the FOP conf
-
FopConfParser
public FopConfParser(java.io.File fopConfFile, org.apache.xmlgraphics.io.ResourceResolver resourceResolver) throws org.xml.sax.SAXException, java.io.IOException
Constructor that parses the FOP conf and uses the URI resolver given.- Parameters:
fopConfFile
- the FOP conf fileresourceResolver
- the URI resolver- Throws:
org.xml.sax.SAXException
- if a SAX error was thrown parsing the FOP confjava.io.IOException
- if an I/O error is thrown while parsing the FOP conf
-
FopConfParser
public FopConfParser(java.io.InputStream fopConfStream, java.net.URI baseURI, EnvironmentProfile enviro) throws org.xml.sax.SAXException, java.io.IOException
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
FopConfParser
public FopConfParser(Configuration cfg, FopFactoryBuilder fopFactoryBuilder) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
-
Method Detail
-
configure
private void configure(java.net.URI baseURI, org.apache.xmlgraphics.io.ResourceResolver resourceResolver, Configuration cfg) throws FOPException
- Throws:
FOPException
-
setHyphenationBase
private void setHyphenationBase(Configuration cfg, org.apache.xmlgraphics.io.ResourceResolver resourceResolver, java.net.URI baseURI, FopFactoryBuilder fopFactoryBuilder) throws FOPException
- Throws:
FOPException
-
setHyphPatNames
private void setHyphPatNames(Configuration cfg, FopFactoryBuilder builder, boolean strict) throws FOPException
- Throws:
FOPException
-
addError
private static void addError(java.lang.String message, java.lang.StringBuffer error)
-
configureImageLoading
private void configureImageLoading(Configuration parent, boolean strict) throws FOPException
- Throws:
FOPException
-
getFopFactoryBuilder
public FopFactoryBuilder getFopFactoryBuilder()
Returns theFopFactoryBuilder
.- Returns:
- the object for configuring the
FopFactory
-
-