public class FOUserAgent
extends java.lang.Object
Renderer specific extensions (that do not produce normal areas on
the output) will be done like so:
The extension will create an area, custom if necessary
this area will be added to the user agent with a key
the renderer will know keys for particular extensions
eg. bookmarks will be held in a special hierarchical area representing
the title and bookmark structure
These areas may contain resolvable areas that will be processed
with other resolvable areas
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
author
Author of the content of the document.
|
protected java.util.Date |
creationDate
Creation Date: Override of the date the document was created.
|
protected java.lang.String |
creator
Creator: Metadata element for the user that created the
document.
|
static float |
DEFAULT_TARGET_RESOLUTION
Defines the default target resolution (72dpi) for FOP
|
protected java.lang.String |
keywords
Set of keywords applicable to this document.
|
protected java.lang.String |
producer
Producer: Metadata element for the system/software that produces
the document.
|
protected java.lang.String |
subject
Subject of the document.
|
protected java.lang.String |
title
Title of the document.
|
Constructor and Description |
---|
FOUserAgent(FopFactory factory)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAuthor()
Returns the author of the document
|
java.lang.String |
getBaseURL()
Returns the base URL.
|
java.util.Date |
getCreationDate()
Returns the creation date of the document
|
java.lang.String |
getCreator()
Returns the creator of the document
|
IFDocumentHandler |
getDocumentHandlerOverride()
Returns the overriding
IFDocumentHandler instance, if any. |
EventBroadcaster |
getEventBroadcaster()
Returns the event broadcaster that control events sent inside a processing run.
|
FopFactory |
getFactory() |
FOEventHandler |
getFOEventHandlerOverride()
Returns the overriding FOEventHandler instance, if any.
|
java.lang.String |
getFontBaseURL()
Deprecated.
Use
FontManager.getFontBaseURL() instead.
This method is not used by FOP. |
org.apache.xmlgraphics.image.loader.ImageSessionContext |
getImageSessionContext()
Returns the image session context for the image package.
|
java.lang.String |
getKeywords()
Returns the keywords for the document
|
java.io.File |
getOutputFile()
Gets the output File.
|
java.lang.String |
getPageHeight()
Gets the default page-height to use as fallback,
in case page-height="auto"
|
java.lang.String |
getPageWidth()
Gets the default page-width to use as fallback,
in case page-width="auto"
|
java.lang.String |
getProducer()
Returns the producer of the document
|
RendererFactory |
getRendererFactory() |
java.util.Map |
getRendererOptions()
Returns the renderer options
|
Renderer |
getRendererOverride()
Returns the overriding Renderer instance, if any.
|
float |
getSourcePixelUnitToMillimeter()
Returns the conversion factor from pixel units to millimeters.
|
float |
getSourceResolution() |
StructureTreeEventHandler |
getStructureTreeEventHandler()
Returns the document's structure tree event handler, for use by
accessible output formats.
|
java.lang.String |
getSubject()
Returns the subject of the document
|
float |
getTargetPixelUnitToMillimeter()
Returns the conversion factor from pixel units to millimeters.
|
float |
getTargetResolution() |
java.lang.String |
getTitle()
Returns the title of the document
|
javax.xml.transform.URIResolver |
getURIResolver()
Returns the URI Resolver.
|
XMLHandlerRegistry |
getXMLHandlerRegistry() |
boolean |
isAccessibilityEnabled()
Check if accessibility is enabled.
|
boolean |
isBreakIndentInheritanceOnReferenceAreaBoundary() |
boolean |
isComplexScriptFeaturesEnabled()
Check whether complex script features are enabled.
|
boolean |
isConserveMemoryPolicyEnabled()
Check whether memory-conservation is enabled.
|
boolean |
isLocatorEnabled()
Checks if the use of Locators is enabled
|
javax.xml.transform.Source |
resolveURI(java.lang.String uri)
Attempts to resolve the given URI.
|
javax.xml.transform.Source |
resolveURI(java.lang.String href,
java.lang.String base)
Attempts to resolve the given URI.
|
void |
setAccessibility(boolean accessibility)
Activates accessibility (for output formats that support it).
|
void |
setAuthor(java.lang.String author)
Sets the author of the document.
|
void |
setBaseURL(java.lang.String baseUrl)
Sets the base URL.
|
void |
setComplexScriptFeaturesEnabled(boolean useComplexScriptFeatures)
Control whether complex script features should be enabled
|
void |
setConserveMemoryPolicy(boolean conserveMemoryPolicy)
Control whether memory-conservation should be enabled
|
void |
setCreationDate(java.util.Date creationDate)
Sets the creation date of the document.
|
void |
setCreator(java.lang.String creator)
Sets the creator of the document.
|
void |
setDocumentHandlerOverride(IFDocumentHandler documentHandler)
Sets an explicit document handler to use which overrides the one that would be
selected by default.
|
void |
setFOEventHandlerOverride(FOEventHandler handler)
Sets an explicit FOEventHandler instance which overrides the one
defined by the render type setting.
|
void |
setFontBaseURL(java.lang.String fontBaseUrl)
Deprecated.
Use
FontManager.setFontBaseURL(String) instead. |
void |
setKeywords(java.lang.String keywords)
Sets the keywords for the document.
|
void |
setLocatorEnabled(boolean enableLocator)
Controls the use of SAXLocators to provide location information in error
messages.
|
void |
setOutputFile(java.io.File f)
Sets the output File.
|
void |
setProducer(java.lang.String producer)
Sets the producer of the document.
|
void |
setRendererOverride(Renderer renderer)
Sets an explicit renderer to use which overrides the one defined by the
render type setting.
|
void |
setStructureTreeEventHandler(StructureTreeEventHandler structureTreeEventHandler)
Sets the document's structure tree event handler, for use by accessible
output formats.
|
void |
setSubject(java.lang.String subject)
Sets the subject of the document.
|
void |
setTargetResolution(float dpi)
Sets the target resolution in dpi.
|
void |
setTargetResolution(int dpi)
Sets the target resolution in dpi.
|
void |
setTitle(java.lang.String title)
Sets the title of the document.
|
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Sets the URI Resolver.
|
boolean |
validateStrictly()
Returns whether FOP is strictly validating input XSL
|
public static final float DEFAULT_TARGET_RESOLUTION
protected java.lang.String producer
protected java.lang.String creator
protected java.util.Date creationDate
protected java.lang.String author
protected java.lang.String title
protected java.lang.String subject
protected java.lang.String keywords
public FOUserAgent(FopFactory factory)
factory
- the factory that provides environment-level informationFopFactory
public FopFactory getFactory()
public void setDocumentHandlerOverride(IFDocumentHandler documentHandler)
documentHandler
- the document handler instance to usepublic IFDocumentHandler getDocumentHandlerOverride()
IFDocumentHandler
instance, if any.public void setRendererOverride(Renderer renderer)
renderer
- the Renderer instance to usepublic Renderer getRendererOverride()
public void setFOEventHandlerOverride(FOEventHandler handler)
handler
- the FOEventHandler instancepublic FOEventHandler getFOEventHandlerOverride()
public void setProducer(java.lang.String producer)
producer
- source of documentpublic java.lang.String getProducer()
public void setCreator(java.lang.String creator)
creator
- of documentpublic java.lang.String getCreator()
public void setCreationDate(java.util.Date creationDate)
creationDate
- date of documentpublic java.util.Date getCreationDate()
public void setAuthor(java.lang.String author)
author
- of documentpublic java.lang.String getAuthor()
public void setTitle(java.lang.String title)
title
- of documentpublic java.lang.String getTitle()
public void setSubject(java.lang.String subject)
subject
- of documentpublic java.lang.String getSubject()
public void setKeywords(java.lang.String keywords)
keywords
- for the documentpublic java.lang.String getKeywords()
public java.util.Map getRendererOptions()
public void setBaseURL(java.lang.String baseUrl)
baseUrl
- base URLpublic void setFontBaseURL(java.lang.String fontBaseUrl)
FontManager.setFontBaseURL(String)
instead.fontBaseUrl
- font base URLpublic java.lang.String getBaseURL()
public void setURIResolver(javax.xml.transform.URIResolver resolver)
resolver
- the new URI resolverpublic javax.xml.transform.URIResolver getURIResolver()
public javax.xml.transform.Source resolveURI(java.lang.String uri)
uri
- URI to accessSource
object, or null if the URI
cannot be resolved.FOURIResolver
public javax.xml.transform.Source resolveURI(java.lang.String href, java.lang.String base)
href
- URI to accessbase
- the base URI to resolve againstSource
object, or null if the URI
cannot be resolved.FOURIResolver
public void setOutputFile(java.io.File f)
f
- the output Filepublic java.io.File getOutputFile()
public float getTargetPixelUnitToMillimeter()
getTargetResolution()
public float getTargetResolution()
public void setTargetResolution(float dpi)
dpi
- resolution in dpipublic void setTargetResolution(int dpi)
dpi
- resolution in dpipublic org.apache.xmlgraphics.image.loader.ImageSessionContext getImageSessionContext()
public java.lang.String getFontBaseURL()
FontManager.getFontBaseURL()
instead.
This method is not used by FOP.public float getSourcePixelUnitToMillimeter()
getSourceResolution()
public float getSourceResolution()
public java.lang.String getPageHeight()
FopFactory.getPageHeight()
public java.lang.String getPageWidth()
FopFactory.getPageWidth()
public boolean validateStrictly()
FopFactory.validateStrictly()
public boolean isBreakIndentInheritanceOnReferenceAreaBoundary()
FopFactory.isBreakIndentInheritanceOnReferenceAreaBoundary()
public RendererFactory getRendererFactory()
public XMLHandlerRegistry getXMLHandlerRegistry()
public void setLocatorEnabled(boolean enableLocator)
enableLocator
- false
if SAX Locators should be disabledpublic boolean isLocatorEnabled()
public EventBroadcaster getEventBroadcaster()
public boolean isConserveMemoryPolicyEnabled()
public void setConserveMemoryPolicy(boolean conserveMemoryPolicy)
conserveMemoryPolicy
- the cachingEnabled to setpublic boolean isComplexScriptFeaturesEnabled()
public void setComplexScriptFeaturesEnabled(boolean useComplexScriptFeatures)
useComplexScriptFeatures
- true if FOP is to use complex script featurespublic void setAccessibility(boolean accessibility)
accessibility
- true
to enable accessibility supportpublic boolean isAccessibilityEnabled()
public void setStructureTreeEventHandler(StructureTreeEventHandler structureTreeEventHandler)
structureTreeEventHandler
- The structure tree event handler to setpublic StructureTreeEventHandler getStructureTreeEventHandler()
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.