}
}
- /** the external resource group file path */
private URI extUri = null;
- private ResourceType resourceType;
+ private final ResourceType resourceType;
/**
* Sets the resource placement level within the AFP output
/**
* Main constructor
*
- * @param level the resource level
+ * @param resourceType the resource type
*/
public AFPResourceLevel(ResourceType resourceType) {
this.resourceType = resourceType;
/**
* Sets the URI of the external resource group.
*
- * @param filePath the URI of the external resource group
+ * @param uri the URI of the external resource group
*/
public void setExternalUri(URI uri) {
this.extUri = uri;
}
/**
- * Sets the default resource group file path
+ * Sets the default resource group URI.
*
- * @param filePath the default resource group file path
+ * @param uri the default resource group URI
*/
public void setDefaultResourceGroupUri(URI uri) {
}
/**
- * Sets the default resource group file path
+ * Sets the default resource group URI.
*
- * @param filePath the default resource group file path
+ * @param uri the default resource group URI
*/
public void setDefaultResourceGroupUri(URI uri) {
this.defaultResourceGroupUri = uri;
/**
* Constructor for resource to be accessed via the {@link org.apache.fop.apps.FOUserAgent}. This
* contructor takes a base URI for resolving font resource URIs. So, if fonts need to be
- * accessed, you can set the {@link FontManager}'s base URI instead of the one on the
- * {@link org.apache.fop.apps.FopFactory}.
+ * accessed, you can set the {@link org.apache.fop.fonts.FontManager}'s base URI instead of the
+ * one on the {@link org.apache.fop.apps.FopFactory}.
*
- * @param InternalResourceResolver resource resolver
+ * @param resourceResolver the resolver of resources
* @param baseURI the custom base URI to resolve relative URIs against (may be null)
*/
public AFPResourceAccessor(InternalResourceResolver resourceResolver, String baseURI) {
/**
* Constructor for resource to be accessed via the {@link org.apache.fop.apps.FOUserAgent}.
*
- * @param InternalResourceResolver resource resolver
+ * @param resourceResolver the resolver of resources
*/
public AFPResourceAccessor(InternalResourceResolver resourceResolver) {
this(resourceResolver, null);
}
}
- /** {@inheritDoc} */
+ /**
+ * Creates an {@link InputStream} given a URI.
+ *
+ * @param uri the URI of the InputStream
+ * @return an InputStream
+ * @throws IOException if an I/O error occurs while creating the InputStream.
+ */
public InputStream createInputStream(URI uri) throws IOException {
return resourceResolver.getResource(getResourceURI(uri));
}
/**
* A builder class for {@link FopFactory} which can be used for setting configuration. This is
* a helper constructor that uses the default URI resolver implementation that FOP packages
- * provide ({@link DefaultResourceResolver}).
+ * provide ({@link org.apache.fop.apps.io.ResourceResolverFactory.DefaultResourceResolver}).
*
* @param defaultBaseURI the default base URI for resolving URIs against
*/
/**
* Sets the {@link LayoutManagerMaker} so that users can configure how FOP creates
- * {@link LayoutManager}s.
+ * {@link org.apache.fop.layoutmgr.LayoutManager}s.
*
* @param lmMaker he layout manager maker
* @return <code>this</code>
*/
- public FopFactoryBuilder setLayoutManagerMakerOverride(
- LayoutManagerMaker lmMaker) {
+ public FopFactoryBuilder setLayoutManagerMakerOverride(LayoutManagerMaker lmMaker) {
fopFactoryConfigBuilder.setLayoutManagerMakerOverride(lmMaker);
return this;
}
}
/**
- * Sets whether to chose a {@link Renderer} in preference to an
+ * Sets whether to chose a {@link org.apache.fop.render.Renderer} in preference to an
* {@link org.apache.fop.render.intermediate.IFDocumentHandler}.
*
- * @see {@link RendererFactory}
- * @param preferRenderer true to prefer {@link Renderer}
+ * @param preferRenderer true to prefer {@link org.apache.fop.render.Renderer}
* @return <code>this</code>
*/
public FopFactoryBuilder setPreferRenderer(boolean preferRenderer) {
this.useStdIn = true;
} else {
fofile = new File(filename);
+ baseURI = fofile.toURI();
}
} else if (outputmode == null) {
outputmode = MimeConstants.MIME_PDF;