git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1364541 13f79535-47bb-0310-9956-ffa450edef68tags/fop-2_0
* requires an output stream and you want to configure this very rendering run, | * requires an output stream and you want to configure this very rendering run, | ||||
* i.e. if you want to set some metadata like the title and author of the document | * i.e. if you want to set some metadata like the title and author of the document | ||||
* you want to render. In that case, create a new {@link FOUserAgent} instance | * you want to render. In that case, create a new {@link FOUserAgent} instance | ||||
* using {@link #newFOUserAgent()}. | |||||
* using {@link org.apache.fop.apps.FopFactory#newFOUserAgent() newFOUserAgent()}. | |||||
* <p> | * <p> | ||||
* MIME types are used to select the output format (ex. "application/pdf" for PDF). You can | * MIME types are used to select the output format (ex. "application/pdf" for PDF). You can | ||||
* use the constants defined in {@link MimeConstants}. | * use the constants defined in {@link MimeConstants}. | ||||
* Returns a new {@link Fop} instance. Use this factory method if you want to configure this | * Returns a new {@link Fop} instance. Use this factory method if you want to configure this | ||||
* very rendering run, i.e. if you want to set some metadata like the title and author of the | * very rendering run, i.e. if you want to set some metadata like the title and author of the | ||||
* document you want to render. In that case, create a new {@link FOUserAgent} | * document you want to render. In that case, create a new {@link FOUserAgent} | ||||
* instance using {@link #newFOUserAgent()}. | |||||
* instance using {@link org.apache.fop.apps.FopFactory#newFOUserAgent() newFOUserAgent()}. | |||||
* <p> | * <p> | ||||
* MIME types are used to select the output format (ex. "application/pdf" for PDF). You can | * MIME types are used to select the output format (ex. "application/pdf" for PDF). You can | ||||
* use the constants defined in {@link MimeConstants}. | * use the constants defined in {@link MimeConstants}. | ||||
return factory.getColorSpaceCache(); | return factory.getColorSpaceCache(); | ||||
} | } | ||||
/** @see {@link FopFactory#getHyphenationPatternNames()} */ | |||||
/** @see FopFactory#getHyphenationPatternNames() */ | |||||
public Map<String, String> getHyphenationPatternNames() { | public Map<String, String> getHyphenationPatternNames() { | ||||
return factory.getHyphenationPatternNames(); | return factory.getHyphenationPatternNames(); | ||||
} | } | ||||
} | } | ||||
private OutputStream stream = null; | private OutputStream stream = null; | ||||
// FOUserAgent object to set processing options | // FOUserAgent object to set processing options | ||||
private FOUserAgent foUserAgent = null; | |||||
private final FOUserAgent foUserAgent; | |||||
// FOTreeBuilder object to maintain reference for access to results | // FOTreeBuilder object to maintain reference for access to results | ||||
private FOTreeBuilder foTreeBuilder = null; | private FOTreeBuilder foTreeBuilder = null; | ||||
/** | /** | ||||
* Get the FOUserAgent instance associated with the rendering run represented by this instance. | * Get the FOUserAgent instance associated with the rendering run represented by this instance. | ||||
* @return the user agent | * @return the user agent | ||||
* | |||||
* @deprecated this getter doesn't need to exist. By virtue of the fact that the client has | |||||
* an instance of this object, it means they also have the {@link FOUserAgent} since this's | |||||
* constructor is only used in {@link FOUserAgent} | |||||
*/ | */ | ||||
public FOUserAgent getUserAgent() { | public FOUserAgent getUserAgent() { | ||||
return foUserAgent; | return foUserAgent; |
return config.isAccessibilityEnabled(); | return config.isAccessibilityEnabled(); | ||||
} | } | ||||
/** | |||||
* Returns the image manager. | |||||
* @return the image manager | |||||
*/ | |||||
/** @see FopFactoryConfig#getImageManager() */ | |||||
public ImageManager getImageManager() { | public ImageManager getImageManager() { | ||||
return config.getImageManager(); | return config.getImageManager(); | ||||
} | } | ||||
/** | |||||
* Returns the overriding LayoutManagerMaker instance, if any. | |||||
* @return the overriding LayoutManagerMaker or null | |||||
*/ | |||||
/** @see FopFactoryConfig#getLayoutManagerMakerOverride() */ | |||||
public LayoutManagerMaker getLayoutManagerMakerOverride() { | public LayoutManagerMaker getLayoutManagerMakerOverride() { | ||||
return config.getLayoutManagerMakerOverride(); | return config.getLayoutManagerMakerOverride(); | ||||
} | } | ||||
/** @return the hyphenation pattern names */ | |||||
/** @see FopFactoryConfig#getHyphenationPatternNames() */ | |||||
public Map<String, String> getHyphenationPatternNames() { | public Map<String, String> getHyphenationPatternNames() { | ||||
return config.getHyphenationPatternNames(); | return config.getHyphenationPatternNames(); | ||||
} | } | ||||
/** | |||||
* Returns whether FOP is strictly validating input XSL | |||||
* @return true of strict validation turned on, false otherwise | |||||
*/ | |||||
/** @see FopFactoryConfig#validateStrictly() */ | |||||
public boolean validateStrictly() { | public boolean validateStrictly() { | ||||
return config.validateStrictly(); | return config.validateStrictly(); | ||||
} | } | ||||
/** | |||||
* @return true if the indent inheritance should be broken when crossing reference area | |||||
* boundaries (for more info, see the javadoc for the relative member variable) | |||||
*/ | |||||
/** @see FopFactoryConfig#isBreakIndentInheritanceOnReferenceAreaBoundary() */ | |||||
public boolean isBreakIndentInheritanceOnReferenceAreaBoundary() { | public boolean isBreakIndentInheritanceOnReferenceAreaBoundary() { | ||||
return config.isBreakIndentInheritanceOnReferenceAreaBoundary(); | return config.isBreakIndentInheritanceOnReferenceAreaBoundary(); | ||||
} | } | ||||
/** @return the resolution for resolution-dependent input */ | |||||
/** @see FopFactoryConfig#getSourceResolution() */ | |||||
public float getSourceResolution() { | public float getSourceResolution() { | ||||
return config.getSourceResolution(); | return config.getSourceResolution(); | ||||
} | } | ||||
/** @see FopFactoryConfig#getTargetResolution() */ | |||||
public float getTargetResolution() { | |||||
return config.getTargetResolution(); | |||||
} | |||||
/** | /** | ||||
* Returns the conversion factor from pixel units to millimeters. This | * Returns the conversion factor from pixel units to millimeters. This | ||||
* depends on the desired source resolution. | * depends on the desired source resolution. | ||||
return UnitConv.IN2MM / getSourceResolution(); | return UnitConv.IN2MM / getSourceResolution(); | ||||
} | } | ||||
/** @return the resolution for resolution-dependant output */ | |||||
public float getTargetResolution() { | |||||
return config.getTargetResolution(); | |||||
} | |||||
/** | /** | ||||
* Returns the conversion factor from pixel units to millimeters. This | * Returns the conversion factor from pixel units to millimeters. This | ||||
* depends on the desired target resolution. | * depends on the desired target resolution. | ||||
return 25.4f / getTargetResolution(); | return 25.4f / getTargetResolution(); | ||||
} | } | ||||
/** | |||||
* Gets the default page-height to use as fallback, | |||||
* in case page-height="auto" | |||||
* | |||||
* @return the page-height, as a String | |||||
*/ | |||||
/** @see FopFactoryConfig#getPageHeight() */ | |||||
public String getPageHeight() { | public String getPageHeight() { | ||||
return config.getPageHeight(); | return config.getPageHeight(); | ||||
} | } | ||||
/** | |||||
* Gets the default page-width to use as fallback, | |||||
* in case page-width="auto" | |||||
* | |||||
* @return the page-width, as a String | |||||
*/ | |||||
/** @see FopFactoryConfig#getPageWidth() */ | |||||
public String getPageWidth() { | public String getPageWidth() { | ||||
return config.getPageWidth(); | return config.getPageWidth(); | ||||
} | } | ||||
/** | |||||
* Indicates whether a namespace URI is on the ignored list. | |||||
* @param namespaceURI the namespace URI | |||||
* @return true if the namespace is ignored by FOP | |||||
*/ | |||||
/** @see FopFactoryConfig#isNamespaceIgnored(String) */ | |||||
public boolean isNamespaceIgnored(String namespaceURI) { | public boolean isNamespaceIgnored(String namespaceURI) { | ||||
return config.isNamespaceIgnored(namespaceURI); | return config.isNamespaceIgnored(namespaceURI); | ||||
} | } | ||||
/** @return the set of namespaces that are ignored by FOP */ | |||||
/** @see FopFactoryConfig#getIgnoredNamespaces() */ | |||||
public Set<String> getIgnoredNamespace() { | public Set<String> getIgnoredNamespace() { | ||||
return config.getIgnoredNamespaces(); | return config.getIgnoredNamespaces(); | ||||
} | } | ||||
//------------------------------------------- Configuration stuff | |||||
/** | /** | ||||
* Get the user configuration. | * Get the user configuration. | ||||
* @return the user configuration | * @return the user configuration | ||||
return config.getUserConfig(); | return config.getUserConfig(); | ||||
} | } | ||||
/** | |||||
* Is the user configuration to be validated? | |||||
* @return if the user configuration should be validated | |||||
*/ | |||||
/** @see FopFactoryConfig#validateUserConfigStrictly() */ | |||||
public boolean validateUserConfigStrictly() { | public boolean validateUserConfigStrictly() { | ||||
return config.validateUserConfigStrictly(); | return config.validateUserConfigStrictly(); | ||||
} | } | ||||
//------------------------------------------- Font related stuff | |||||
/** | |||||
* Returns the font manager. | |||||
* @return the font manager | |||||
*/ | |||||
/** @see FopFactoryConfig#getFontManager() */ | |||||
public FontManager getFontManager() { | public FontManager getFontManager() { | ||||
return config.getFontManager(); | return config.getFontManager(); | ||||
} | } |
*/ | */ | ||||
boolean isAccessibilityEnabled(); | boolean isAccessibilityEnabled(); | ||||
/** @see {@link FopFactory#getLayoutManagerMakerOverride()} */ | |||||
/** | |||||
* Returns the overriding LayoutManagerMaker instance, if any. | |||||
* @return the overriding LayoutManagerMaker or null | |||||
*/ | |||||
LayoutManagerMaker getLayoutManagerMakerOverride(); | LayoutManagerMaker getLayoutManagerMakerOverride(); | ||||
/** | /** | ||||
*/ | */ | ||||
URI getBaseURI(); | URI getBaseURI(); | ||||
/** @see {@link FopFactory#validateStrictly()} */ | |||||
/** | |||||
* Returns whether FOP is strictly validating input XSL | |||||
* @return true of strict validation turned on, false otherwise | |||||
*/ | |||||
boolean validateStrictly(); | boolean validateStrictly(); | ||||
/** @see {@link FopFactory#validateUserConfigStrictly()} */ | |||||
/** | |||||
* Is the user configuration to be validated? | |||||
* @return if the user configuration should be validated | |||||
*/ | |||||
boolean validateUserConfigStrictly(); | boolean validateUserConfigStrictly(); | ||||
/** @see {@link FopFactory#isBreakIndentInheritanceOnReferenceAreaBoundary()} */ | |||||
/** | |||||
* @return true if the indent inheritance should be broken when crossing reference area | |||||
* boundaries (for more info, see the javadoc for the relative member variable) | |||||
*/ | |||||
boolean isBreakIndentInheritanceOnReferenceAreaBoundary(); | boolean isBreakIndentInheritanceOnReferenceAreaBoundary(); | ||||
/** @see {@link FopFactory#getSourceResolution()} */ | |||||
/** @return the resolution for resolution-dependent input */ | |||||
float getSourceResolution(); | float getSourceResolution(); | ||||
/** @see {@link FopFactory#getTargetResolution()} */ | |||||
/** @return the resolution for resolution-dependent output */ | |||||
float getTargetResolution(); | float getTargetResolution(); | ||||
/** @see {@link FopFactory#getPageHeight()} */ | |||||
/** | |||||
* Gets the default page-height to use as fallback, | |||||
* in case page-height="auto" | |||||
* | |||||
* @return the page-height, as a String | |||||
*/ | |||||
String getPageHeight(); | String getPageHeight(); | ||||
/** @see {@link FopFactory#getPageWidth()} */ | |||||
/** | |||||
* Gets the default page-width to use as fallback, | |||||
* in case page-width="auto" | |||||
* | |||||
* @return the page-width, as a String | |||||
*/ | |||||
String getPageWidth(); | String getPageWidth(); | ||||
/** @see {@link FopFactory#getIgnoredNamespace()} */ | |||||
/** @return the set of namespaces that are ignored by FOP */ | |||||
Set<String> getIgnoredNamespaces(); | Set<String> getIgnoredNamespaces(); | ||||
/** @see {@link FopFactory#isNamespaceIgnored(String)} */ | |||||
/** | |||||
* Indicates whether a namespace URI is on the ignored list. | |||||
* @param namespace the namespace URI | |||||
* @return true if the namespace is ignored by FOP | |||||
*/ | |||||
boolean isNamespaceIgnored(String namespace); | boolean isNamespaceIgnored(String namespace); | ||||
/** | /** | ||||
*/ | */ | ||||
Configuration getUserConfig(); | Configuration getUserConfig(); | ||||
/** @see {@link org.apache.fop.render.RendererFactory#isRendererPreferred()} */ | |||||
/** @see org.apache.fop.render.RendererFactory#isRendererPreferred() */ | |||||
boolean preferRenderer(); | boolean preferRenderer(); | ||||
/** @see {@link FopFactory#getFontManager()} */ | |||||
/** | |||||
* Returns the font manager. | |||||
* @return the font manager | |||||
*/ | |||||
FontManager getFontManager(); | FontManager getFontManager(); | ||||
/** @see {@link FopFactory#getImageManager()} */ | |||||
/** | |||||
* Returns the image manager. | |||||
* @return the image manager | |||||
*/ | |||||
ImageManager getImageManager(); | ImageManager getImageManager(); | ||||
boolean isComplexScriptFeaturesEnabled(); | boolean isComplexScriptFeaturesEnabled(); | ||||
/** @see {@link FopFactory#getHyphenationPatternNames()} */ | |||||
/** @return the hyphenation pattern names */ | |||||
Map<String, String> getHyphenationPatternNames(); | Map<String, String> getHyphenationPatternNames(); | ||||
} | } |
* @return the resource | * @return the resource | ||||
* @throws IOException if an I/O error occured during resource acquisition | * @throws IOException if an I/O error occured during resource acquisition | ||||
*/ | */ | ||||
Resource getResource(String id) throws IOException; | |||||
Resource getResource(String uri) throws IOException; | |||||
/** | /** | ||||
* Gets an temporary-output stream of a given URI. | * Gets an temporary-output stream of a given URI. | ||||
* @return the output stream | * @return the output stream | ||||
* @throws IOException if an I/O error occured while creating an output stream | * @throws IOException if an I/O error occured while creating an output stream | ||||
*/ | */ | ||||
OutputStream getOutputStream(String id) throws IOException; | |||||
OutputStream getOutputStream(String uri) throws IOException; | |||||
} | } |