org.springframework.beandoc.output
Class ConsolidatedTransformer
java.lang.Object
org.springframework.beandoc.output.XslTransformer
org.springframework.beandoc.output.ConsolidatedTransformer
- All Implemented Interfaces:
- Transformer
public class ConsolidatedTransformer
- extends XslTransformer
Generates a consolidated Document from the array of individual Document
objects and allows subclasses to transform this instead. The generated DOM
simply aggregates multiple <beans> tags inside a <consolidated>
tag.
- Since:
- 1.0
- Author:
- Darren Davison, Marat Radchenko
Method Summary |
String |
getFilenameRoot()
|
protected String |
getOutputForDocument(String inputFileName)
Always ignore any parameter and return the consolidated file root input
with the default strategy |
protected void |
handleTransform(org.jdom.Document[] contextDocuments,
File outputDir)
Override default behaviour to provide a single transformation of the
consolidated DOM created. |
protected void |
initTransform(org.jdom.Document[] contextDocuments,
File outputDirectory)
Generates a single Document from the array of input
Document s and stores the reference for later use. |
void |
setFilenameRoot(String filenameRoot)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
consolidatedDocument
protected org.jdom.Document consolidatedDocument
ConsolidatedTransformer
public ConsolidatedTransformer()
ConsolidatedTransformer
public ConsolidatedTransformer(String templateName)
- Parameters:
templateName
-
initTransform
protected final void initTransform(org.jdom.Document[] contextDocuments,
File outputDirectory)
throws Exception
- Generates a single
Document
from the array of input
Document
s and stores the reference for later use.
- Overrides:
initTransform
in class XslTransformer
- Parameters:
contextDocuments
- the array of DOM trees about to be transformedoutputDirectory
- the file handle for the output directory
- Throws:
Exception
- See Also:
XslTransformer.initTransform(org.jdom.Document[], java.io.File)
handleTransform
protected void handleTransform(org.jdom.Document[] contextDocuments,
File outputDir)
- Override default behaviour to provide a single transformation of the
consolidated DOM created.
- Overrides:
handleTransform
in class XslTransformer
- Parameters:
contextDocuments
- the array of DOM trees about to be transformedoutputDir
- the file handle for the output directory- See Also:
XslTransformer.handleTransform(org.jdom.Document[], java.io.File)
getOutputForDocument
protected String getOutputForDocument(String inputFileName)
- Always ignore any parameter and return the consolidated file root input
with the default strategy
- Overrides:
getOutputForDocument
in class XslTransformer
- Parameters:
inputFileName
- the original file name (not including path) of the
context file
- Returns:
- the output file name to use
- See Also:
XslTransformer.getOutputForDocument(java.lang.String)
setFilenameRoot
public void setFilenameRoot(String filenameRoot)
- Parameters:
filenameRoot
- the filename that will represent the consolidated
output of the DOM transformation
getFilenameRoot
public String getFilenameRoot()
- Returns:
- the filename root for this transformer
Copyright © 2004-2011 Spring BeanDoc. All Rights Reserved.