Author: ltheussl
Date: Fri Jun 6 03:56:41 2008
New Revision: 663887
URL: http://svn.apache.org/viewvc?rev=663887&view=rev
Log:
Javadocs, better parameter names, no code changes.
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java?rev=663887&r1=663886&r2=663887&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/AbstractDocumentRenderer.java
Fri Jun 6 03:56:41 2008
@@ -81,8 +81,8 @@
*
* @param documentModel the document model, containing all the metadata,
etc.
*
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
public abstract void render( Map filesToProcess, File outputDirectory,
DocumentModel documentModel )
throws DocumentRendererException, IOException;
@@ -114,8 +114,8 @@
*
* @param outputDirectory the output directory where the document should
be generated.
*
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
public void render( File baseDirectory, File outputDirectory )
throws DocumentRendererException, IOException
@@ -134,8 +134,8 @@
* @param documentDescriptor a file containing the document model.
* If this file does not exist or is null, some default
settings will be used.
*
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
public void render( File baseDirectory, File outputDirectory, File
documentDescriptor )
throws DocumentRendererException, IOException
@@ -159,7 +159,7 @@
* @param baseDirectory the directory containing the source files.
* This should follow the standard Maven convention, ie
containing all the site modules.
* @return a Map of files to process.
- * @throws IOException in case of a problem reading the files under
baseDirectory.
+ * @throws java.io.IOException in case of a problem reading the files
under baseDirectory.
*/
public Map getFilesToProcess( File baseDirectory )
throws IOException
@@ -294,8 +294,8 @@
* @param fullDocPath absolute path to the source document.
* @param parserId determines the parser to use.
* @param sink the sink to receive the events.
- * @throws DocumentRendererException in case of a parsing error.
- * @throws IOException if the source document cannot be opened.
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException in
case of a parsing error.
+ * @throws java.io.IOException if the source document cannot be opened.
*/
protected void parse( String fullDocPath, String parserId, Sink sink )
throws DocumentRendererException, IOException
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java?rev=663887&r1=663886&r2=663887&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocRenderer.java
Fri Jun 6 03:56:41 2008
@@ -31,6 +31,7 @@
*/
public interface DocRenderer
{
+ /** Plexus lookup. */
String ROLE = DocRenderer.class.getName();
/**
@@ -38,8 +39,8 @@
*
* @param siteDirectory the input directory contains files to be generated
* @param outputDirectory the output directory where files are generated
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
void render( File siteDirectory, File outputDirectory )
throws DocumentRendererException, IOException;
@@ -50,8 +51,8 @@
* @param siteDirectory the input directory contains files to be generated
* @param outputDirectory the output directory where file are generated
* @param documentDescriptor the document descriptor
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
void render( File siteDirectory, File outputDirectory, File
documentDescriptor )
throws DocumentRendererException, IOException;
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java?rev=663887&r1=663886&r2=663887&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRenderer.java
Fri Jun 6 03:56:41 2008
@@ -49,8 +49,8 @@
* If the model contains a TOC, only the files found in this
TOC are rendered,
* otherwise all files from the Collection of files will be
processed.
*
- * @throws DocumentRendererException if any.
- * @throws IOException if any.
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any.
+ * @throws java.io.IOException if any.
*/
void render( Collection files, File outputDirectory, DocumentModel
documentModel )
throws DocumentRendererException, IOException;
@@ -67,8 +67,8 @@
* If the model contains a TOC, only the files found in this
TOC are rendered,
* otherwise all files found under baseDirectory will be
processed.
*
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
void render( File baseDirectory, File outputDirectory, DocumentModel
documentModel )
throws DocumentRendererException, IOException;
@@ -80,8 +80,8 @@
*
* @return the document model, containing all the metadata, etc.
*
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
DocumentModel readDocumentModel( File documentDescriptor )
throws DocumentRendererException, IOException;
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java?rev=663887&r1=663886&r2=663887&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/DocumentRendererException.java
Fri Jun 6 03:56:41 2008
@@ -28,6 +28,9 @@
public class DocumentRendererException
extends Exception
{
+ /** serialVersionUID */
+ static final long serialVersionUID = 295967936746221567L;
+
/**
* Default constructor.
*
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java?rev=663887&r1=663886&r2=663887&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/itext/AbstractITextRender.java
Fri Jun 6 03:56:41 2008
@@ -260,8 +260,8 @@
*
* @param iTextFile
* @param iTextOutput
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
public abstract void generateOutput( File iTextFile, File iTextOutput )
throws DocumentRendererException, IOException;
@@ -272,8 +272,8 @@
* @param fullPathDoc
* @param module
* @param outputITextFile
- * @throws DocumentRendererException
- * @throws IOException
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException
+ * @throws java.io.IOException
*/
private void parse( String fullPathDoc, SiteModule module, File
outputITextFile )
throws DocumentRendererException, IOException
@@ -308,8 +308,8 @@
*
* @param iTextFiles
* @return a document
- * @throws DocumentRendererException if any
- * @throws IOException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
+ * @throws java.io.IOException if any
*/
private Document generateDocument( List iTextFiles )
throws DocumentRendererException, IOException
@@ -362,7 +362,7 @@
* Init the transformer object
*
* @return an instanced transformer object
- * @throws DocumentRendererException if any
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any
*/
private Transformer initTransformer()
throws DocumentRendererException
@@ -441,7 +441,7 @@
* @param documentModel
* @param document
* @param iTextFile
- * @throws DocumentRendererException
+ * @throws org.apache.maven.doxia.docrenderer.DocumentRendererException if
any.
*/
private void transform( DocumentModel documentModel, Document document,
File iTextFile )
throws DocumentRendererException
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java?rev=663887&r1=663886&r2=663887&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/fo/FoPdfRenderer.java
Fri Jun 6 03:56:41 2008
@@ -85,23 +85,23 @@
/** [EMAIL PROTECTED] */
- public void render( Map files, File outputDirectory, DocumentModel model )
+ public void render( Map filesToProcess, File outputDirectory,
DocumentModel documentModel )
throws DocumentRendererException, IOException
{
- String outputName = model.getOutputName();
+ String outputName = documentModel.getOutputName();
if ( outputName == null )
{
getLogger().info( "No outputName is defined in the document
descriptor. Using 'target.pdf'" );
- model.setOutputName( "target" );
+ documentModel.setOutputName( "target" );
}
else if ( outputName.lastIndexOf( "." ) != -1 )
{
- model.setOutputName( outputName.substring( 0,
outputName.lastIndexOf( "." ) ) );
+ documentModel.setOutputName( outputName.substring( 0,
outputName.lastIndexOf( "." ) ) );
}
- outputName = model.getOutputName();
+ outputName = documentModel.getOutputName();
File outputFOFile = new File( outputDirectory, outputName + ".fo" );
@@ -119,7 +119,7 @@
FoAggregateSink sink = new FoAggregateSink( new FileWriter(
outputFOFile ) );
- sink.setDocumentModel( model );
+ sink.setDocumentModel( documentModel );
sink.beginDocument();
@@ -127,15 +127,15 @@
sink.toc();
- if ( ( model.getToc() == null ) || ( model.getToc().getItems() == null
) )
+ if ( ( documentModel.getToc() == null ) || (
documentModel.getToc().getItems() == null ) )
{
getLogger().info( "No TOC is defined in the document descriptor.
Merging all documents." );
- for ( Iterator j = files.keySet().iterator(); j.hasNext(); )
+ for ( Iterator j = filesToProcess.keySet().iterator();
j.hasNext(); )
{
String key = (String) j.next();
- SiteModule module = (SiteModule) files.get( key );
+ SiteModule module = (SiteModule) filesToProcess.get( key );
sink.setDocumentName( key );
// TODO: sink.setDocumentTitle( "Title" ); ???
@@ -153,7 +153,7 @@
}
else
{
- for ( Iterator k = model.getToc().getItems().iterator();
k.hasNext(); )
+ for ( Iterator k = documentModel.getToc().getItems().iterator();
k.hasNext(); )
{
DocumentTOCItem tocItem = (DocumentTOCItem) k.next();
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java?rev=663887&r1=663886&r2=663887&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-doc-renderer/src/main/java/org/apache/maven/doxia/docrenderer/pdf/itext/ITextPdfRenderer.java
Fri Jun 6 03:56:41 2008
@@ -107,32 +107,32 @@
}
/** [EMAIL PROTECTED] */
- public void render( Map files, File outputDirectory, DocumentModel model )
+ public void render( Map filesToProcess, File outputDirectory,
DocumentModel documentModel )
throws DocumentRendererException, IOException
{
- String outputName = model.getOutputName();
+ String outputName = documentModel.getOutputName();
if ( outputName == null )
{
getLogger().info( "No outputName is defined in the document
descriptor. Using 'target.pdf'" );
- model.setOutputName( "target" );
+ documentModel.setOutputName( "target" );
}
else if ( outputName.lastIndexOf( "." ) != -1 )
{
- model.setOutputName( outputName.substring( 0,
outputName.lastIndexOf( "." ) ) );
+ documentModel.setOutputName( outputName.substring( 0,
outputName.lastIndexOf( "." ) ) );
}
// TODO: adjust from o.a.m.d.docrenderer.itext.AbstractITextRender
-// if ( ( model.getToc() == null ) || ( model.getToc().getItems() ==
null ) )
+// if ( ( documentModel.getToc() == null ) || (
documentModel.getToc().getItems() == null ) )
// {
// getLogger().info( "No TOC is defined in the document descriptor.
Generating all documents." );
- for ( Iterator j = files.keySet().iterator(); j.hasNext(); )
+ for ( Iterator j = filesToProcess.keySet().iterator();
j.hasNext(); )
{
String key = (String) j.next();
- SiteModule module = (SiteModule) files.get( key );
+ SiteModule module = (SiteModule) filesToProcess.get( key );
String fullDocPath = getBaseDir() + File.separator