You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/12/29 22:00:22 UTC
[maven-doxia] branch DOXIA-630 created (now 6c99b05)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch DOXIA-630
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git.
at 6c99b05 [DOXIA-630] Remove all deprecated modules
This branch includes the following new commits:
new 6c99b05 [DOXIA-630] Remove all deprecated modules
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-doxia] 01/01: [DOXIA-630] Remove all deprecated modules
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch DOXIA-630
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
commit 6c99b051e489a34c1a95f3f51fc7de15624e7cde
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Wed Dec 29 23:00:11 2021 +0100
[DOXIA-630] Remove all deprecated modules
---
doxia-core/pom.xml | 30 -
doxia-core/src/main/mdo/document.mdo | 1277 ----------
.../maven/doxia/document/DocumentModelTest.java | 356 ---
doxia-modules/doxia-module-confluence/pom.xml | 68 -
.../doxia/module/confluence/ConfluenceMarkup.java | 130 --
.../doxia/module/confluence/ConfluenceParser.java | 173 --
.../module/confluence/ConfluenceParserModule.java | 42 -
.../doxia/module/confluence/ConfluenceSink.java | 1399 -----------
.../module/confluence/ConfluenceSinkFactory.java | 45 -
.../confluence/parser/AbstractFatherBlock.java | 85 -
.../module/confluence/parser/AnchorBlock.java | 47 -
.../doxia/module/confluence/parser/Block.java | 35 -
.../module/confluence/parser/BlockParser.java | 48 -
.../doxia/module/confluence/parser/BoldBlock.java | 53 -
.../confluence/parser/ChildBlocksBuilder.java | 448 ----
.../confluence/parser/DefinitionListBlock.java | 65 -
.../parser/DefinitionListBlockParser.java | 91 -
.../module/confluence/parser/FigureBlock.java | 60 -
.../confluence/parser/FigureBlockParser.java | 104 -
.../confluence/parser/HorizontalRuleBlock.java | 35 -
.../parser/HorizontalRuleBlockParser.java | 43 -
.../module/confluence/parser/ItalicBlock.java | 48 -
.../module/confluence/parser/LinebreakBlock.java | 35 -
.../module/confluence/parser/LinethroughBlock.java | 52 -
.../doxia/module/confluence/parser/LinkBlock.java | 53 -
.../module/confluence/parser/MonospaceBlock.java | 47 -
.../module/confluence/parser/ParagraphBlock.java | 65 -
.../confluence/parser/ParagraphBlockParser.java | 137 --
.../module/confluence/parser/SectionBlock.java | 100 -
.../confluence/parser/SectionBlockParser.java | 74 -
.../doxia/module/confluence/parser/SubBlock.java | 52 -
.../doxia/module/confluence/parser/SupBlock.java | 52 -
.../doxia/module/confluence/parser/TextBlock.java | 49 -
.../module/confluence/parser/UnderlineBlock.java | 52 -
.../module/confluence/parser/VerbatimBlock.java | 49 -
.../confluence/parser/VerbatimBlockParser.java | 65 -
.../confluence/parser/list/BulletedListBlock.java | 51 -
.../module/confluence/parser/list/ListBlock.java | 39 -
.../confluence/parser/list/ListBlockParser.java | 147 --
.../confluence/parser/list/ListItemBlock.java | 69 -
.../confluence/parser/list/NumberedListBlock.java | 52 -
.../confluence/parser/list/TreeComponent.java | 126 -
.../confluence/parser/list/TreeListBuilder.java | 134 --
.../module/confluence/parser/table/TableBlock.java | 64 -
.../confluence/parser/table/TableBlockParser.java | 176 --
.../confluence/parser/table/TableCellBlock.java | 50 -
.../parser/table/TableCellHeaderBlock.java | 50 -
.../confluence/parser/table/TableRowBlock.java | 50 -
.../doxia-module-confluence/src/site/apt/index.apt | 27 -
.../doxia-module-confluence/src/site/site.xml | 43 -
.../module/confluence/ConfluenceParserTest.java | 682 ------
.../module/confluence/ConfluenceSinkTest.java | 428 ----
.../src/test/resources/anchor.confluence | 7 -
.../src/test/resources/code.confluence | 21 -
.../src/test/resources/escapes.confluence | 7 -
.../src/test/resources/figure.confluence | 18 -
.../src/test/resources/linebreak.confluence | 5 -
.../src/test/resources/link.confluence | 9 -
.../src/test/resources/nested-format.confluence | 8 -
.../resources/nested-list-heterogenous.confluence | 4 -
.../src/test/resources/nested-list.confluence | 8 -
.../src/test/resources/note-tip-info.confluence | 27 -
.../src/test/resources/paragraph-figure.confluence | 6 -
.../src/test/resources/paragraph-header.confluence | 6 -
.../src/test/resources/paragraph-list.confluence | 8 -
.../src/test/resources/section.confluence | 9 -
.../src/test/resources/simple-list.confluence | 15 -
.../src/test/resources/simple-paragraph.confluence | 8 -
.../src/test/resources/table-link.confluence | 4 -
.../src/test/resources/table.confluence | 28 -
.../src/test/resources/test.confluence | 98 -
.../src/test/resources/unknown-macro.confluence | 5 -
.../src/test/site/confluence/faq.confluence | 228 --
.../src/test/site/confluence/page.confluence | 98 -
doxia-modules/doxia-module-docbook-simple/pom.xml | 56 -
.../maven/doxia/module/docbook/DocBookParser.java | 1099 ---------
.../doxia/module/docbook/DocBookParserModule.java | 42 -
.../maven/doxia/module/docbook/DocBookSink.java | 1913 ---------------
.../maven/doxia/module/docbook/DocbookMarkup.java | 474 ----
.../doxia/module/docbook/DocbookSinkFactory.java | 50 -
.../maven/doxia/module/docbook/DocbookUtils.java | 191 --
.../module/docbook/SimplifiedDocbookMarkup.java | 1303 -----------
.../main/resources/META-INF/plexus/components.xml | 44 -
.../src/site/apt/index.apt.vm | 56 -
.../doxia-module-docbook-simple/src/site/site.xml | 43 -
.../doxia/module/docbook/DocBookIdentityTest.java | 46 -
.../doxia/module/docbook/DocBookParserTest.java | 404 ----
.../doxia/module/docbook/DocBookSinkTest.java | 360 ---
.../doxia/module/docbook/DocbookUtilsTest.java | 135 --
.../src/test/resources/book.xml | 134 --
.../src/test/resources/sdocbook_full.xml | 544 -----
.../src/test/resources/test.xml | 154 --
doxia-modules/doxia-module-fo/pom.xml | 153 --
.../maven/doxia/module/fo/FoAggregateSink.java | 1284 -----------
.../maven/doxia/module/fo/FoConfiguration.java | 207 --
.../org/apache/maven/doxia/module/fo/FoMarkup.java | 333 ---
.../org/apache/maven/doxia/module/fo/FoSink.java | 2052 -----------------
.../maven/doxia/module/fo/FoSinkFactory.java | 50 -
.../org/apache/maven/doxia/module/fo/FoUtils.java | 173 --
.../maven/doxia/module/fo/NumberedListItem.java | 182 --
.../src/main/resources/doxia-fo.properties | 19 -
.../src/main/resources/doxia-fo_en.properties | 23 -
.../src/main/resources/fo-styles.xslt | 510 ----
doxia-modules/doxia-module-fo/src/site/site.xml | 44 -
.../doxia-module-fo/src/site/xdoc/index.xml | 63 -
.../doxia-module-fo/src/site/xdoc/links.xml | 44 -
.../doxia-module-fo/src/site/xdoc/usage.xml | 214 --
.../maven/doxia/module/fo/FoAggregateSinkTest.java | 281 ---
.../maven/doxia/module/fo/FoConfigurationTest.java | 69 -
.../apache/maven/doxia/module/fo/FoSinkTest.java | 636 -----
.../doxia-module-fo/src/test/resources/figure.png | Bin 4545 -> 0 bytes
doxia-modules/doxia-module-itext/pom.xml | 82 -
.../apache/maven/doxia/module/itext/ITextFont.java | 387 ----
.../maven/doxia/module/itext/ITextHeader.java | 138 --
.../apache/maven/doxia/module/itext/ITextSink.java | 2036 ----------------
.../maven/doxia/module/itext/ITextSinkFactory.java | 74 -
.../apache/maven/doxia/module/itext/ITextUtil.java | 178 --
.../doxia/module/itext/SinkActionContext.java | 156 --
.../doxia-module-itext/src/site/apt/index.apt | 27 -
doxia-modules/doxia-module-itext/src/site/site.xml | 43 -
.../doxia/module/itext/ITextSinkTestCase.java | 154 --
.../maven/doxia/module/itext/ITextUtilTest.java | 95 -
.../src/test/resources/images/Context_Menu.png | Bin 22300 -> 0 bytes
.../src/test/resources/images/Generate_Site.png | Bin 36219 -> 0 bytes
.../src/test/resources/images/Open_Project.png | Bin 12405 -> 0 bytes
.../src/test/resources/images/Project_Opened.png | Bin 17655 -> 0 bytes
.../src/test/resources/images/Refresh_Project.png | Bin 29710 -> 0 bytes
.../resources/images/Refreshed_Context_Menu.png | Bin 22630 -> 0 bytes
.../resources/images/Run_Build_Main_Project.png | Bin 32784 -> 0 bytes
.../resources/images/Run_Clean_Main_Project.png | Bin 24235 -> 0 bytes
.../src/test/resources/images/Window_Files.png | Bin 16790 -> 0 bytes
.../src/test/resources/images/figure.png | Bin 17655 -> 0 bytes
.../src/test/resources/itext/itext.xml | 1937 ----------------
doxia-modules/doxia-module-latex/pom.xml | 56 -
.../apache/maven/doxia/module/latex/LatexSink.java | 1514 ------------
.../maven/doxia/module/latex/LatexSinkFactory.java | 46 -
.../maven/doxia/module/latex/default_preamble.tex | 31 -
.../doxia/module/latex/default_sink_commands.tex | 16 -
.../doxia-module-latex/src/site/apt/index.apt | 27 -
doxia-modules/doxia-module-latex/src/site/site.xml | 43 -
.../maven/doxia/module/latex/LatexSinkTest.java | 343 ---
doxia-modules/doxia-module-rtf/pom.xml | 53 -
.../maven/doxia/module/rtf/AlphaNumerals.java | 51 -
.../org/apache/maven/doxia/module/rtf/Font.java | 102 -
.../apache/maven/doxia/module/rtf/FontMetrics.java | 102 -
.../apache/maven/doxia/module/rtf/Monospace.java | 162 --
.../maven/doxia/module/rtf/MonospaceBold.java | 163 --
.../doxia/module/rtf/MonospaceBoldItalic.java | 162 --
.../maven/doxia/module/rtf/MonospaceItalic.java | 162 --
.../apache/maven/doxia/module/rtf/PBMReader.java | 310 ---
.../maven/doxia/module/rtf/RomanNumerals.java | 58 -
.../org/apache/maven/doxia/module/rtf/RtfSink.java | 2436 --------------------
.../maven/doxia/module/rtf/RtfSinkFactory.java | 46 -
.../apache/maven/doxia/module/rtf/SansSerif.java | 162 --
.../maven/doxia/module/rtf/SansSerifBold.java | 162 --
.../doxia/module/rtf/SansSerifBoldItalic.java | 162 --
.../maven/doxia/module/rtf/SansSerifItalic.java | 162 --
.../org/apache/maven/doxia/module/rtf/Serif.java | 162 --
.../apache/maven/doxia/module/rtf/SerifBold.java | 162 --
.../maven/doxia/module/rtf/SerifBoldItalic.java | 162 --
.../apache/maven/doxia/module/rtf/SerifItalic.java | 162 --
.../apache/maven/doxia/module/rtf/WMFWriter.java | 549 -----
.../doxia-module-rtf/src/site/apt/index.apt | 27 -
doxia-modules/doxia-module-rtf/src/site/site.xml | 43 -
.../apache/maven/doxia/module/rtf/RtfSinkTest.java | 89 -
.../doxia-module-rtf/src/test/resources/test.apt | 16 -
doxia-modules/doxia-module-twiki/pom.xml | 66 -
.../maven/doxia/module/twiki/TWikiMarkup.java | 139 --
.../maven/doxia/module/twiki/TWikiParser.java | 255 --
.../doxia/module/twiki/TWikiParserModule.java | 42 -
.../apache/maven/doxia/module/twiki/TWikiSink.java | 1410 -----------
.../maven/doxia/module/twiki/TWikiSinkFactory.java | 45 -
.../module/twiki/parser/AbstractFatherBlock.java | 139 --
.../doxia/module/twiki/parser/AnchorBlock.java | 96 -
.../maven/doxia/module/twiki/parser/Block.java | 42 -
.../doxia/module/twiki/parser/BlockParser.java | 50 -
.../maven/doxia/module/twiki/parser/BoldBlock.java | 53 -
.../module/twiki/parser/FormatedTextParser.java | 309 ---
.../twiki/parser/GenericListBlockParser.java | 537 -----
.../module/twiki/parser/HRuleBlockParser.java | 78 -
.../module/twiki/parser/HorizontalRuleBlock.java | 53 -
.../doxia/module/twiki/parser/ImageBlock.java | 90 -
.../doxia/module/twiki/parser/ItalicBlock.java | 53 -
.../maven/doxia/module/twiki/parser/LinkBlock.java | 109 -
.../maven/doxia/module/twiki/parser/ListBlock.java | 44 -
.../doxia/module/twiki/parser/ListItemBlock.java | 125 -
.../doxia/module/twiki/parser/MonospaceBlock.java | 53 -
.../maven/doxia/module/twiki/parser/NopBlock.java | 53 -
.../module/twiki/parser/NumeratedListBlock.java | 89 -
.../doxia/module/twiki/parser/ParagraphBlock.java | 46 -
.../module/twiki/parser/ParagraphBlockParser.java | 264 ---
.../doxia/module/twiki/parser/SectionBlock.java | 177 --
.../module/twiki/parser/SectionBlockParser.java | 162 --
.../doxia/module/twiki/parser/TableBlock.java | 66 -
.../module/twiki/parser/TableBlockParser.java | 112 -
.../doxia/module/twiki/parser/TableCellBlock.java | 53 -
.../module/twiki/parser/TableCellHeaderBlock.java | 53 -
.../doxia/module/twiki/parser/TableRowBlock.java | 53 -
.../maven/doxia/module/twiki/parser/TextBlock.java | 106 -
.../doxia/module/twiki/parser/TextParser.java | 418 ----
.../module/twiki/parser/UnorderedListBlock.java | 59 -
.../doxia/module/twiki/parser/VerbatimBlock.java | 54 -
.../module/twiki/parser/VerbatimBlockParser.java | 80 -
.../doxia/module/twiki/parser/WikiWordBlock.java | 128 -
.../module/twiki/parser/WikiWordLinkResolver.java | 36 -
.../doxia/module/twiki/parser/XHTMLBlock.java | 88 -
.../twiki/parser/XHTMLWikiWordLinkResolver.java | 42 -
.../doxia-module-twiki/src/site/apt/index.apt | 27 -
doxia-modules/doxia-module-twiki/src/site/site.xml | 43 -
.../maven/doxia/module/twiki/TWikiSinkTest.java | 383 ---
.../module/twiki/parser/AbstractBlockTestCase.java | 105 -
.../maven/doxia/module/twiki/parser/BlockTest.java | 126 -
.../module/twiki/parser/FormatedTextTest.java | 222 --
.../maven/doxia/module/twiki/parser/ListTest.java | 126 -
.../doxia/module/twiki/parser/ParagraphTest.java | 162 --
.../doxia/module/twiki/parser/SectionTest.java | 170 --
.../maven/doxia/module/twiki/parser/TableTest.java | 88 -
.../maven/doxia/module/twiki/parser/TitleTest.java | 127 -
.../doxia/module/twiki/parser/TwikiParserTest.java | 93 -
.../doxia/module/twiki/parser/VerbatimTest.java | 116 -
.../maven/doxia/module/twiki/parser/WordsTest.java | 315 ---
.../src/test/resources/test.twiki | 109 -
doxia-modules/pom.xml | 7 -
.../resources/doxia-site/xdoc/references/index.xml | 60 -
pom.xml | 36 +-
src/site/resources/images/doxia-deps.png | Bin 47116 -> 22303 bytes
src/site/xdoc/doxia-deps.odg | Bin 13937 -> 12923 bytes
src/site/xdoc/index.xml | 33 +-
228 files changed, 16 insertions(+), 43233 deletions(-)
diff --git a/doxia-core/pom.xml b/doxia-core/pom.xml
index 4b12fac..d6185b4 100644
--- a/doxia-core/pom.xml
+++ b/doxia-core/pom.xml
@@ -109,36 +109,6 @@ under the License.
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>descriptor</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>java</goal>
- <goal>xpp3-reader</goal>
- <goal>xpp3-writer</goal>
- <goal>xsd</goal>
- </goals>
- </execution>
- <execution>
- <id>docs</id>
- <phase>pre-site</phase>
- <goals>
- <goal>xdoc</goal>
- <goal>xsd</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <version>1.0.1</version>
- <models>
- <model>src/main/mdo/document.mdo</model>
- </models>
- </configuration>
- </plugin>
</plugins>
</build>
</project>
diff --git a/doxia-core/src/main/mdo/document.mdo b/doxia-core/src/main/mdo/document.mdo
deleted file mode 100644
index 8f524c7..0000000
--- a/doxia-core/src/main/mdo/document.mdo
+++ /dev/null
@@ -1,1277 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<model xmlns="https://codehaus-plexus.github.io/MODELLO/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="https://codehaus-plexus.github.io/MODELLO/1.8.0 https://codehaus-plexus.github.io/modello/xsd/https://codehaus-plexus.github.io/modello/xsd/modello-1.8.0.xsd"
- xml.namespace="http://maven.apache.org/DOCUMENT/${version}"
- xml.schemaLocation="https://maven.apache.org/xsd/document-${version}.xsd">
- <id>document</id>
- <name>Document</name>
- <description><![CDATA[
- <p>This is a reference for the Document descriptor model used in Doxia, also known as <code>pdf.xml</code>.</p>
- <p>It is composed of 3 parts:</p>
- <ol>
- <li>document metadata, mostly inspired by the
- <a href="http://docs.oasis-open.org/office/v1.1/">Open Document Format Specification v. 1.1</a></li>
- <li>table of content,</li>
- <li>cover description.</li>
- </ol>
- <p>An XSD is available at:</p>
- <ul>
- <li><a href="https://maven.apache.org/xsd/document-1.0.1.xsd">https://maven.apache.org/xsd/document-1.0.1.xsd</a>.</li>
- </ul>
- ]]></description>
- <defaults>
- <default>
- <key>package</key>
- <value>org.apache.maven.doxia.document</value>
- </default>
- </defaults>
-
- <classes>
- <class rootElement="true" xml.tagName="document">
- <name>DocumentModel</name>
- <description>Describes the overall document model.</description>
- <version>1.0.0+</version>
- <fields>
- <field xml.attribute="true">
- <name>outputName</name>
- <description><![CDATA[
- The name of the generated document, without extension.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>meta</name>
- <description><![CDATA[
- The Meta information properties.
- ]]></description>
- <version>1.0.0+</version>
- <association>
- <type>DocumentMeta</type>
- </association>
- <identifier>true</identifier>
- </field>
- <field xdoc.separator="blank">
- <name>toc</name>
- <description><![CDATA[
- The TOC (Table of Contents) information properties.
- ]]></description>
- <version>1.0.0+</version>
- <association>
- <type>DocumentTOC</type>
- </association>
- <identifier>true</identifier>
- </field>
- <field xdoc.separator="blank">
- <name>cover</name>
- <description><![CDATA[
- The meta data to construct a cover page for the document.
- ]]></description>
- <version>1.0.0+</version>
- <association>
- <type>DocumentCover</type>
- </association>
- <identifier>true</identifier>
- </field>
- </fields>
- </class>
-
- <class>
- <name>DocumentMeta</name>
- <description><![CDATA[
- <p>
- Metadata is general information about a document.
- </p>
-
- <p>
- The metadata elements used here were mostly inspired by the
- <a href="http://docs.oasis-open.org/office/v1.1/">Open Document Format Specification v. 1.1</a>,
- which in turn borrows heavily upon the metadata standards developed by the
- <a href="http://www.dublincore.org">Dublin Core Metadata Initiative</a>.
- </p>
- ]]></description>
- <version>1.0.0+</version>
- <fields>
- <field>
- <name>title</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The title of the document.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>author</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The unique author of the document, usually as a String of "firstName lastName". For
- more authors, you could use the <authors/> tag.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>authors</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The authors of the document. The names of the entities that
- are primarily responsible for the content of the document.
- ]]></description>
- <association xml.itemsStyle="wrapped" xml.tagName="author">
- <type>DocumentAuthor</type>
- <multiplicity>*</multiplicity>
- </association>
- <identifier>true</identifier>
- </field>
- <field>
- <name>subject</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The subject of the document.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>keywords</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The keywords for the document, usually as a String of comma separated keywords.
- @deprecated use the <keyWords/> tag instead of.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>keyWords</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- A keyword pertaining to the document. The metadata can contain any
- number of keyword elements, each element specifying one keyword.
- ]]></description>
- <association xml.itemsStyle="wrapped" xml.tagName="keyWord">
- <type>String</type>
- <multiplicity>*</multiplicity>
- </association>
- <identifier>true</identifier>
- </field>
- <field>
- <name>pageSize</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The pagesize of the document.
- At least "US", "USLetter" and "A4" should be supported.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>generator</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- A string that identifies the application or tool that was
- used to create or last modify the document.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>description</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- A brief description of the document.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>initialCreator</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The name of the person who created the document initially.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>creator</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The name of the person who last modified the document.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>printedBy</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The name of the person who last printed the document.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>creationDate</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The date and time when the document was created initially.
- Use the ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
- ]]></description>
- <type>Date</type>
- <identifier>true</identifier>
- </field>
- <field java.getter="false">
- <name>creationdate</name>
- <version>1.0.1+</version>
- <description><![CDATA[
- The date as String (recommended format is ISO 8601) when the document was created initially.
- Only used if <code>creationDate</code> is not set.
- @since 1.1.1
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>date</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The date and time when the document was last modified.
- Use the ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
- ]]></description>
- <type>Date</type>
- <identifier>true</identifier>
- </field>
- <field java.getter="false">
- <name>modifydate</name>
- <version>1.0.1+</version>
- <description><![CDATA[
- The date as String (recommended format is ISO 8601) when the document was last modified.
- Only used if <code>date</code> is not set.
- @since 1.1.1
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>printDate</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The date and time when the document was last printed.
- Use the ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
- ]]></description>
- <type>Date</type>
- <identifier>true</identifier>
- </field>
- <field java.getter="false">
- <name>printdate</name>
- <version>1.0.1+</version>
- <description><![CDATA[
- The date as String (recommended format is ISO 8601) when the document was last printed.
- Only used if <code>printDate</code> is not set.
- @since 1.1.1
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>template</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- A template that was used to create the document.
- ]]></description>
- <association>
- <type>DocumentTemplate</type>
- </association>
- <identifier>true</identifier>
- </field>
- <!--
- <field>
- <name>autoReload</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The auto-reload element specifies whether a document is reloaded
- or replaced by another document after a certain period of time
- has elapsed.
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- -->
- <field>
- <name>hyperlinkBehaviour</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The hyperlink-behaviour element specifies the default behavior
- for hyperlinks in the document.
- ]]></description>
- <association>
- <type>DocumentHyperlinkBehaviour</type>
- </association>
- <identifier>true</identifier>
- </field>
- <field>
- <name>language</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The default language of the document. The language is represented by
- a two or three letter Language Code taken from the ISO 639 standard,
- optionally followed by a hyphen (-) and a two-letter Country Code
- taken from the ISO 3166 standard.
- ]]></description>
- <type>String</type>
- <defaultValue>en-US</defaultValue>
- <identifier>true</identifier>
- </field>
- <field>
- <name>editingCycles</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The number of editing cycles the document has been through.
- ]]></description>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>editingDuration</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The total time spent editing the document.
- ]]></description>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>documentStatistic</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- The statistics of the document, for example, the page count,
- word count, etc.
- ]]></description>
- <association>
- <type>DocumentStatistic</type>
- </association>
- <identifier>true</identifier>
- </field>
- <field>
- <name>confidential</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- whether the content of the document is in some sense confidential.
- ]]></description>
- <type>boolean</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>draft</name>
- <version>1.0.0+</version>
- <description><![CDATA[
- whether the content of the document is in some sense preliminary.
- ]]></description>
- <type>boolean</type>
- <identifier>true</identifier>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <code>
- <![CDATA[
- /**
- * @return a comma separated String of all defined keyWords.
- * @see #getKeywords()
- * @see #getKeyWords()
- * @since 1.1.1
- */
- public String getAllKeyWords()
- {
- StringBuffer sb = new StringBuffer();
- boolean hasKeywords = false;
- if ( getKeywords() != null && getKeywords().trim().length() > 0 )
- {
- java.util.StringTokenizer st = new java.util.StringTokenizer( getKeywords().trim(), "," );
- while ( st.hasMoreTokens() )
- {
- String s = st.nextToken();
-
- sb.append( s.trim() );
-
- if ( st.hasMoreTokens() )
- {
- sb.append( ", " );
- }
-
- hasKeywords = true;
- }
- }
- if ( getKeyWords() != null )
- {
- for ( java.util.Iterator it = getKeyWords().iterator(); it.hasNext(); )
- {
- String keyword = (String) it.next();
-
- if ( hasKeywords )
- {
- sb.append( ", " );
- hasKeywords = false;
- }
-
- if ( keyword.trim().length() > 0 )
- {
- sb.append( keyword.trim() );
-
- if ( it.hasNext() )
- {
- sb.append( ", " );
- }
- }
- }
- }
-
- String ret = sb.toString().trim();
- if ( ret.endsWith( "," ) )
- {
- return ret.substring( 0, ret.length() - 1 );
- }
-
- return ret;
- }
-
- /**
- * @return {@link #getAuthor()} if the unique author name is defined. Otherwise, return all authors full names
- * comma separated.
- * @see #getAuthor()
- * @see #getAuthors()
- * @since 1.1.1
- */
- public String getAllAuthorNames()
- {
- StringBuffer sb = new StringBuffer();
- if ( getAuthor() != null && getAuthor().trim().length() > 0 )
- {
- return getAuthor().trim();
- }
-
- if ( getAuthors() != null )
- {
- for ( java.util.Iterator it = getAuthors().iterator(); it.hasNext(); )
- {
- DocumentAuthor author = (DocumentAuthor) it.next();
-
- sb.append( author.getFullName().trim() );
-
- if ( it.hasNext() )
- {
- sb.append( ", " );
- }
- }
- }
-
- return sb.toString();
- }
-
- /** ISO 8601 date format, i.e. <code>yyyy-MM-dd</code> **/
- private static final java.text.DateFormat ISO_8601_FORMAT = new java.text.SimpleDateFormat( "yyyy-MM-dd", java.util.Locale.ENGLISH );
-
- /**
- * Get the date and time when the document was created initially.
- *
- * @return the <code>getCreationDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
- * the <code>creationdate</code>.
- * @since 1.1.1
- * @see #getCreationDate()
- */
- public String getCreationdate()
- {
- if ( getCreationDate() != null )
- {
- return ISO_8601_FORMAT.format( getCreationDate() );
- }
-
- return this.creationdate;
- }
-
- /**
- * Get the date and time when the document was last modified.
- *
- * @return the <code>getDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
- * the <code>modifydate</code>.
- * @since 1.1.1
- * @see #getDate()
- */
- public String getModifydate()
- {
- if ( getDate() != null )
- {
- return ISO_8601_FORMAT.format( getDate() );
- }
-
- return this.modifydate;
- }
-
- /**
- * Get the date and time when the document was last printed.
- *
- * @return the <code>getPrintDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
- * the <code>printdate</code>.
- * @since 1.1.1
- * @see #getPrintDate()
- */
- public String getPrintdate()
- {
- if ( getPrintDate() != null )
- {
- return ISO_8601_FORMAT.format( getPrintDate() );
- }
-
- return this.printdate;
- }
- ]]>
- </code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class>
- <name>DocumentAuthor</name>
- <description>An author of the document.</description>
- <version>1.0.0+</version>
- <fields>
- <field>
- <name>firstName</name>
- <description><![CDATA[
- The first name of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>lastName</name>
- <description><![CDATA[
- The last name of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>name</name>
- <description><![CDATA[
- The full name of the author, usually as a String of "firstName lastName".
- @since 1.1.1
- ]]></description>
- <version>1.0.1+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>initials</name>
- <description><![CDATA[
- The initials of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>title</name>
- <description><![CDATA[
- The title of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>position</name>
- <description><![CDATA[
- The position of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>email</name>
- <description><![CDATA[
- The email address of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>phoneNumber</name>
- <description><![CDATA[
- The telephone number of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>faxNumber</name>
- <description><![CDATA[
- The fax number of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>companyName</name>
- <description><![CDATA[
- The name of the company that employs the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>street</name>
- <description><![CDATA[
- The street name of the address of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>city</name>
- <description><![CDATA[
- The city name of the address of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>postalCode</name>
- <description><![CDATA[
- The postal code of the address of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>country</name>
- <description><![CDATA[
- The country of the address of the author.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>state</name>
- <description><![CDATA[
- The state or province of the address of the author, if applicable.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <code>
- <![CDATA[
- /**
- * Get the full name of the author.
- *
- * @return <code>name</code> if defined, <code>firsName lastName</code> otherwise.
- * @see #getName()
- * @see #getFirstName()
- * @see #getLastName()
- * @since 1.1.1
- */
- public String getFullName()
- {
- if ( getName() != null && getName().trim().length() > 0 )
- {
- return getName().trim();
- }
-
- return ( getFirstName() != null ? getFirstName().trim() : "null" ) + " "
- + ( getLastName() != null ? getLastName().trim() : "null" );
- }
- ]]>
- </code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class>
- <name>DocumentTemplate</name>
- <description>A template that was used to create the document.</description>
- <version>1.0.0+</version>
- <fields>
- <field xml.attribute="true">
- <name>href</name>
- <description><![CDATA[
- The location of the document template.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>title</name>
- <description><![CDATA[
- The name of the document template.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>date</name>
- <description><![CDATA[
- The date and time when the template was last modified, prior
- to being used to create the current document.
- Use the ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
- ]]></description>
- <version>1.0.0+</version>
- <type>Date</type>
- <identifier>true</identifier>
- </field>
- <field java.getter="false" xml.attribute="true">
- <name>modifydate</name>
- <version>1.0.1+</version>
- <description><![CDATA[
- The date as String (recommended format is ISO 8601) when the template was last modified.
- Only used if <code>date</code> is not set.
- @since 1.1.1
- ]]></description>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <code>
- <![CDATA[
- /** ISO 8601 date format, i.e. <code>yyyy-MM-dd</code> **/
- private static final java.text.DateFormat ISO_8601_FORMAT = new java.text.SimpleDateFormat( "yyyy-MM-dd", java.util.Locale.ENGLISH );
-
- /**
- * Get the date and time when the template was last modified.
- *
- * @return the <code>getDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
- * the <code>modifydate</code>.
- * @since 1.1.1
- * @see #getDate()
- */
- public String getModifydate()
- {
- if ( getDate() != null )
- {
- return ISO_8601_FORMAT.format( getDate() );
- }
-
- return this.modifydate;
- }
- ]]>
- </code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class>
- <name>DocumentHyperlinkBehaviour</name>
- <description>Specifies the default behavior for hyperlinks in the document.</description>
- <version>1.0.0+</version>
- <fields>
- <field xml.attribute="true">
- <name>targetFrame</name>
- <description><![CDATA[
- The name of the default target frame.
- <p>
- Specifies the name of the default target frame in which to display
- a document referenced by a hyperlink.
- </p>
-
- <p>
- This attribute can have one of the following values:
- </p>
-
- <dl>
- <dd>_self</dd>
- <dt>
- The referenced document replaces the content
- of the current frame.
- </dt>
-
- <dd>_blank</dd>
- <dt>
- The referenced document is displayed in a new frame.
- </dt>
-
- <dd>_parent</dd>
- <dt>
- The referenced document is displayed in the parent frame
- of the current frame.
- </dt>
-
- <dd>_top</dd>
- <dt>
- The referenced document is displayed in the topmost frame,
- that is the frame that contains the current frame as a child
- or descendent but is not contained within another frame.
- </dt>
-
- <dd>A frame name</dd>
- <dt>
- The referenced document is displayed in the named frame.
- If the named frame does not exist, a new frame with that
- name is created.
- </dt>
- </dl>
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <defaultValue>_self</defaultValue>
- <identifier>true</identifier>
- </field>
- </fields>
- </class>
-
- <class>
- <name>DocumentStatistic</name>
- <description>Statistical attributes of the document.</description>
- <version>1.0.0+</version>
- <fields>
- <field xml.attribute="true">
- <name>pageCount</name>
- <description><![CDATA[
- The number of pages in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>tableCount</name>
- <description><![CDATA[
- The number of tabels in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>drawCount</name>
- <description><![CDATA[
- The number of drawings in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>imageCount</name>
- <description><![CDATA[
- The number of images in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>objectCount</name>
- <description><![CDATA[
- The number of objects in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>oleObjectCount</name>
- <description><![CDATA[
- The number of ole-objects in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>paragraphCount</name>
- <description><![CDATA[
- The number of paragraphs in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>wordCount</name>
- <description><![CDATA[
- The number of words in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>characterCount</name>
- <description><![CDATA[
- The number of characters in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>rowCount</name>
- <description><![CDATA[
- The number of rows in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>frameCount</name>
- <description><![CDATA[
- The number of frames in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>sentenceCount</name>
- <description><![CDATA[
- The number of sentences in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>syllableCount</name>
- <description><![CDATA[
- The number of syllables in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>nonWhitespaceCharacterCount</name>
- <description><![CDATA[
- The number of non-whitespace-characters in the document.
- ]]></description>
- <version>1.0.0+</version>
- <type>long</type>
- <identifier>true</identifier>
- </field>
- </fields>
- </class>
-
- <class>
- <name>DocumentCover</name>
- <description>Contains meta-data information for the document cover page.</description>
- <version>1.0.0+</version>
- <fields>
- <field>
- <name>coverTitle</name>
- <description><![CDATA[
- The title to appear on the cover.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>coverSubTitle</name>
- <description><![CDATA[
- a sub-title to appear on the cover.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>coverVersion</name>
- <description><![CDATA[
- The version of the project that appears on the cover page.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>coverType</name>
- <description><![CDATA[
- The type of the document. This might be used on the cover page to
- specify the type of information contained in the document
- (eg 'User Guide', 'Manual', etc.).
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>coverDate</name>
- <description><![CDATA[
- The date to appear on the cover.
- Use the ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
- ]]></description>
- <version>1.0.0+</version>
- <type>Date</type>
- <identifier>true</identifier>
- </field>
- <field java.getter="false">
- <name>coverdate</name>
- <description><![CDATA[
- The date as String (recommended format is ISO 8601) to appear on the cover.
- Only used if <code>coverDate</code> is not set.
- @since 1.1.1
- ]]></description>
- <version>1.0.1+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>authors</name>
- <description><![CDATA[
- The authors that appear on the cover page.
- Only used if author is not given.
- ]]></description>
- <version>1.0.0+</version>
- <association xml.itemsStyle="wrapped" xml.tagName="author">
- <type>DocumentAuthor</type>
- <multiplicity>*</multiplicity>
- </association>
- <identifier>true</identifier>
- </field>
- <field>
- <name>author</name>
- <description><![CDATA[
- A shortcut for the unique author that appears on the cover page.
- For more authors, you could use the <authors/> tag.
- @since 1.1.1
- ]]></description>
- <version>1.0.1+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>projectName</name>
- <description><![CDATA[
- The name of the project.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>projectLogo</name>
- <description><![CDATA[
- The location of an image file that represents the project logo.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>companyName</name>
- <description><![CDATA[
- The name of the entity that is responsible for the content of the
- document, or a copyright holder.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>companyLogo</name>
- <description><![CDATA[
- The location of an image file that represents the company logo.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- </fields>
- <codeSegments>
- <codeSegment>
- <code>
- <![CDATA[
- /**
- * @return {@link #getAuthor()} if the unique author name is defined. Otherwise, return all authors full names
- * comma separated.
- * @see #getAuthor()
- * @see #getAuthors()
- * @since 1.1.1
- */
- public String getAllAuthorNames()
- {
- StringBuffer sb = new StringBuffer();
- if ( getAuthor() != null && getAuthor().trim().length() > 0 )
- {
- return getAuthor().trim();
- }
-
- if ( getAuthors() != null )
- {
- for ( java.util.Iterator it = getAuthors().iterator(); it.hasNext(); )
- {
- DocumentAuthor author = (DocumentAuthor) it.next();
-
- sb.append( author.getFullName().trim() );
-
- if ( it.hasNext() )
- {
- sb.append( ", " );
- }
- }
- }
-
- return sb.toString();
- }
-
- /** ISO 8601 date format, i.e. <code>yyyy-MM-dd</code> **/
- private static final java.text.DateFormat ISO_8601_FORMAT = new java.text.SimpleDateFormat( "yyyy-MM-dd", java.util.Locale.ENGLISH );
-
- /**
- * Get the date to appear on the cover.
- *
- * @return the <code>getCoverDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
- * the <code>coverdate</code>.
- * @since 1.1.1
- * @see #getCoverDate()
- */
- public String getCoverdate()
- {
- if ( getCoverDate() != null )
- {
- return ISO_8601_FORMAT.format( getCoverDate() );
- }
-
- return this.coverdate;
- }
- ]]>
- </code>
- </codeSegment>
- </codeSegments>
- </class>
-
- <class xsd.compositor="sequence">
- <name>DocumentTOC</name>
- <description>A Table Of Content for the document.</description>
- <version>1.0.0+</version>
- <fields>
- <field xml.attribute="true">
- <name>name</name>
- <description><![CDATA[
- The name to use for the Table of Contents.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>depth</name>
- <description><![CDATA[
- The level up to which toc items are included by default.
- Defaults to 0 which means only top-level element entries are included.
- A depth of 1 includes one level of sub-items (sub-sections), etc.
- This may be overridden for individual entries by using the collapse
- attribute of the corresponding toc item.
- ]]></description>
- <version>1.0.0+</version>
- <type>int</type>
- <identifier>true</identifier>
- <defaultValue>0</defaultValue>
- </field>
- <field>
- <name>items</name>
- <description><![CDATA[
- TOC item.
- ]]></description>
- <version>1.0.0+</version>
- <association xml.itemsStyle="flat">
- <type>DocumentTOCItem</type>
- <multiplicity>*</multiplicity>
- </association>
- <identifier>true</identifier>
- </field>
- </fields>
- </class>
-
- <class xsd.compositor="sequence">
- <name>DocumentTOCItem</name>
- <description>A menu item.</description>
- <version>1.0.0+</version>
- <fields>
- <field xml.attribute="true">
- <name>name</name>
- <description><![CDATA[
- The name to use for the toc.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>ref</name>
- <description><![CDATA[
- The ref to use for the item.
- ]]></description>
- <version>1.0.0+</version>
- <type>String</type>
- <identifier>true</identifier>
- </field>
- <field xml.attribute="true">
- <name>collapse</name>
- <description><![CDATA[
- Whether to show any child elements of a TOCItem, overriding
- the depth given in DocumentTOC. By default, all children
- are expanded up to the depth given in DocumentTOC.
- ]]></description>
- <version>1.0.0+</version>
- <type>boolean</type>
- <identifier>true</identifier>
- </field>
- <field>
- <name>items</name>
- <description><![CDATA[
- A table of content item containing sub-items.
- ]]></description>
- <version>1.0.0+</version>
- <association xml.itemsStyle="flat">
- <type>DocumentTOCItem</type>
- <multiplicity>*</multiplicity>
- </association>
- <identifier>true</identifier>
- </field>
- </fields>
- </class>
- </classes>
-</model>
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
deleted file mode 100644
index fd44f87..0000000
--- a/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
+++ /dev/null
@@ -1,356 +0,0 @@
-package org.apache.maven.doxia.document;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.document.io.xpp3.DocumentXpp3Reader;
-import org.apache.maven.doxia.document.io.xpp3.DocumentXpp3Writer;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.WriterFactory;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Test DocumentModel.
- *
- * @author ltheussl
- */
-public class DocumentModelTest
- extends PlexusTestCase
-{
- /** ISO 8601 date format, i.e. <code>yyyy-MM-dd</code> **/
- private static final java.text.DateFormat ISO_8601_FORMAT =
- new java.text.SimpleDateFormat( "yyyy-MM-dd", java.util.Locale.ENGLISH );
-
- /**
- * Test DocumentModel.
- *
- * @throws Exception if any.
- */
- public void testDocumentModel()
- throws Exception
- {
- DocumentModel model = getModel();
- verifyModel( model );
-
- DocumentModel copy = writeAndRecover( model );
- verifyModel( copy );
- assertEquals( copy, model );
- }
-
- private DocumentModel getModel()
- {
- DocumentModel model = new DocumentModel();
-
- model.setOutputName( "outputName" );
- model.setModelEncoding( "ISO-8859-1" );
- model.setCover( getDocumentCover() );
- model.setToc( getDocumentToc() );
- model.setMeta( getDocumentMeta() );
-
- return model ;
- }
-
- private void verifyModel( DocumentModel model )
- {
- assertNotNull( model );
- //noinspection EqualsWithItself
- assertEquals( model, model );
- assertTrue ( model.hashCode() != 0 );
- assertTrue( model.toString().length() > 0 );
-
- assertEquals( "outputName", model.getOutputName() );
- assertEquals( "ISO-8859-1", model.getModelEncoding() );
- verifyDocumentCover( model.getCover() );
- verifyDocumentTOC( model.getToc() );
- verifyDocumentMeta( model.getMeta() );
- }
-
- private DocumentAuthor getAuthor( int i )
- {
- DocumentAuthor author = new DocumentAuthor();
-
- author.setCity( "city" + i );
- author.setCompanyName( "companyName" + i );
- author.setCountry( "country" + i );
- author.setEmail( "email" + i );
- author.setFaxNumber( "faxNumber" + i );
- author.setName( "name" + i );
- author.setFirstName( "firstName" + i );
- author.setInitials( "initials" + i );
- author.setLastName( "lastName" + i );
- author.setPhoneNumber( "phoneNumber" + i );
- author.setPosition( "position" + i );
- author.setPostalCode( "postalCode" + i );
- author.setState( "state" + i );
- author.setStreet( "street" + i );
- author.setTitle( "title" + i );
-
- return author;
- }
-
- private void verifyAuthor( DocumentAuthor documentAuthor, int i )
- {
- assertEquals( "city" + i, documentAuthor.getCity() );
- assertEquals( "companyName" + i, documentAuthor.getCompanyName() );
- assertEquals( "country" + i, documentAuthor.getCountry() );
- assertEquals( "email" + i, documentAuthor.getEmail() );
- assertEquals( "faxNumber" + i, documentAuthor.getFaxNumber() );
- assertEquals( "name" + i, documentAuthor.getName() );
- assertEquals( "firstName" + i, documentAuthor.getFirstName() );
- assertEquals( "initials" + i, documentAuthor.getInitials() );
- assertEquals( "lastName" + i, documentAuthor.getLastName() );
- assertEquals( "phoneNumber" + i, documentAuthor.getPhoneNumber() );
- assertEquals( "position" + i, documentAuthor.getPosition() );
- assertEquals( "postalCode" + i, documentAuthor.getPostalCode() );
- assertEquals( "state" + i, documentAuthor.getState() );
- assertEquals( "street" + i, documentAuthor.getStreet() );
- assertEquals( "title" + i, documentAuthor.getTitle() );
- }
-
- private DocumentCover getDocumentCover()
- {
- DocumentCover cover = new DocumentCover();
- cover.addAuthor( getAuthor( 1 ) );
- cover.setAuthor( "Author" );
- cover.setCompanyLogo( "companyLogo" );
- cover.setCompanyName( "companyName" );
- cover.setCoverDate( new Date( 0L ) );
- cover.setCoverSubTitle( "coverSubTitle" );
- cover.setCoverTitle( "coverTitle" );
- cover.setCoverType( "coverType" );
- cover.setCoverVersion( "coverVersion" );
- cover.setProjectLogo( "projectLogo" );
- cover.setProjectName( "projectName" );
-
- return cover;
- }
-
- private void verifyDocumentCover( DocumentCover cover )
- {
- List<DocumentAuthor> authors = cover.getAuthors();
- assertEquals( 1, authors.size() );
- verifyAuthor( authors.get( 0 ), 1 );
-
- assertEquals( "Author", cover.getAuthor() );
- assertEquals( "companyLogo", cover.getCompanyLogo() );
- assertEquals( "companyName", cover.getCompanyName() );
- assertEquals( 0L, cover.getCoverDate().getTime() );
- // the actual String depends on the timezone you're in
- assertEquals( ISO_8601_FORMAT.format( new Date( 0L ) ), cover.getCoverdate() );
- assertEquals( "coverSubTitle", cover.getCoverSubTitle() );
- assertEquals( "coverTitle", cover.getCoverTitle() );
- assertEquals( "coverType", cover.getCoverType() );
- assertEquals( "coverVersion", cover.getCoverVersion() );
- assertEquals( "projectLogo", cover.getProjectLogo() );
- assertEquals( "projectName", cover.getProjectName() );
- }
-
- private DocumentStatistic getDocumentStatistic()
- {
- DocumentStatistic statistic = new DocumentStatistic();
-
- statistic.setCharacterCount( 2L );
- statistic.setDrawCount( 3L );
- statistic.setFrameCount( 4L );
- statistic.setImageCount( 5L );
- statistic.setNonWhitespaceCharacterCount( 6L );
- statistic.setObjectCount( 1L );
- statistic.setOleObjectCount( 8L );
- statistic.setPageCount( 7L );
- statistic.setParagraphCount( 5L );
- statistic.setRowCount( 6L );
- statistic.setSentenceCount( 3L );
- statistic.setSyllableCount( 10L );
- statistic.setTableCount( 2L );
- statistic.setWordCount( 11L );
-
- return statistic;
- }
-
- private void verifyDocumentStatistic( DocumentStatistic documentStatistic )
- {
- assertEquals( 2L, documentStatistic.getCharacterCount() );
- assertEquals( 3L, documentStatistic.getDrawCount() );
- assertEquals( 4L, documentStatistic.getFrameCount() );
- assertEquals( 5L, documentStatistic.getImageCount() );
- assertEquals( 6L, documentStatistic.getNonWhitespaceCharacterCount() );
- assertEquals( 1L, documentStatistic.getObjectCount() );
- assertEquals( 8L, documentStatistic.getOleObjectCount() );
- assertEquals( 7L, documentStatistic.getPageCount() );
- assertEquals( 5L, documentStatistic.getParagraphCount() );
- assertEquals( 6L, documentStatistic.getRowCount() );
- assertEquals( 3L, documentStatistic.getSentenceCount() );
- assertEquals( 10L, documentStatistic.getSyllableCount() );
- assertEquals( 2L, documentStatistic.getTableCount() );
- assertEquals( 11L, documentStatistic.getWordCount() );
- }
-
- private DocumentHyperlinkBehaviour getDocumentHyperlinkBehaviour()
- {
- DocumentHyperlinkBehaviour hylink = new DocumentHyperlinkBehaviour();
-
- hylink.setTargetFrame( "targetFrame" );
-
- return hylink;
- }
-
- private void verifyDocumentHyperlinkBehaviour( DocumentHyperlinkBehaviour hyperlinkBehaviour )
- {
- assertEquals( "targetFrame", hyperlinkBehaviour.getTargetFrame() );
- }
-
- private DocumentMeta getDocumentMeta()
- {
- DocumentMeta meta = new DocumentMeta();
-
- meta.setAuthor( "author" );
- meta.addAuthor( getAuthor( 2 ) );
- meta.setConfidential( true );
- meta.setCreationDate( new Date( 1L ) );
- meta.setCreator( "creator" );
- meta.setDate( new Date( 2L ) );
- meta.setDescription( "description" );
- meta.setDocumentStatistic( getDocumentStatistic() );
- meta.setDraft( true );
- meta.setEditingCycles( 15L );
- meta.setEditingDuration( 3L );
- meta.setGenerator( "generator" );
- meta.setHyperlinkBehaviour( getDocumentHyperlinkBehaviour() );
- meta.setInitialCreator( "initialCreator" );
- meta.addKeyWord( "keyword1" );
- meta.addKeyWord( "keyword2" );
- meta.setLanguage( "language" );
- meta.setPageSize( "pageSize" );
- meta.setPrintDate( new Date( 4L ) );
- meta.setPrintedBy( "printedBy" );
- meta.setSubject( "subject" );
- meta.setTemplate( getDocumentTemplate() );
- meta.setTitle( "title" );
-
- return meta;
- }
-
- private void verifyDocumentMeta( DocumentMeta meta )
- {
- assertEquals( "author", meta.getAuthor() );
- List<DocumentAuthor> authors = meta.getAuthors();
- assertEquals( 1, authors.size() );
- verifyAuthor( authors.get( 0 ), 2 );
-
- assertTrue( meta.isConfidential() );
- assertEquals( 1L, meta.getCreationDate().getTime() );
- assertEquals( "creator", meta.getCreator() );
- assertEquals( 2L, meta.getDate().getTime() );
- assertEquals( "description", meta.getDescription() );
- verifyDocumentStatistic( meta.getDocumentStatistic() );
- assertTrue( meta.isDraft() );
- assertEquals( 15L, meta.getEditingCycles() );
- assertEquals( 3L, meta.getEditingDuration() );
- assertEquals( "generator", meta.getGenerator() );
- verifyDocumentHyperlinkBehaviour( meta.getHyperlinkBehaviour() );
- assertEquals( "initialCreator", meta.getInitialCreator() );
- assertEquals( "keyword1, keyword2", meta.getAllKeyWords() );
- assertEquals( "language", meta.getLanguage() );
- assertEquals( "pageSize", meta.getPageSize() );
- assertEquals( 4L, meta.getPrintDate().getTime() );
- assertEquals( "printedBy", meta.getPrintedBy() );
- assertEquals( "subject", meta.getSubject() );
- verifyDocumentTemplate( meta.getTemplate() );
- assertEquals( "title", meta.getTitle() );
- }
-
- private DocumentTemplate getDocumentTemplate()
- {
- DocumentTemplate template = new DocumentTemplate();
-
- template.setDate( new Date( 3L ) );
- template.setHref( "href" );
- template.setTitle( "title" );
-
- return template;
- }
-
- private void verifyDocumentTemplate( DocumentTemplate template )
- {
- assertEquals( 3L, template.getDate().getTime() );
- assertEquals( "href", template.getHref() );
- assertEquals( "title", template.getTitle() );
- }
-
- private DocumentTOC getDocumentToc()
- {
- DocumentTOCItem item1 = new DocumentTOCItem();
- item1.setName( "First document" );
- item1.setRef( "doc1.apt" );
-
- DocumentTOCItem item2 = new DocumentTOCItem();
- item2.setName( "Second document" );
- item2.setRef( "doc2.xml" );
-
- DocumentTOC toc = new DocumentTOC();
- toc.setName( "name" );
- toc.addItem( item1 );
- toc.addItem( item2 );
-
- return toc;
- }
-
- private void verifyDocumentTOC( DocumentTOC toc )
- {
- assertEquals( "name", toc.getName() );
- }
-
- private DocumentModel writeAndRecover( DocumentModel model )
- throws IOException
- {
- File dir = getTestFile( "target/test-output/xpp3/" );
-
- if ( !dir.exists() )
- {
- dir.mkdirs();
- }
-
- File testFile = getTestFile( dir.getAbsolutePath(), "testModel.xml" );
- try( Writer w = WriterFactory.newXmlWriter( testFile ) )
- {
- new DocumentXpp3Writer().write( w, model );
- }
-
- DocumentModel documentModel;
-
- try ( Reader reader = ReaderFactory.newXmlReader( testFile ) )
- {
- documentModel = new DocumentXpp3Reader().read( reader );
- }
- catch ( XmlPullParserException e )
- {
- throw new IOException( "Error parsing document descriptor", e );
- }
-
- return documentModel;
- }
-}
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/pom.xml b/doxia-modules/doxia-module-confluence/pom.xml
deleted file mode 100644
index b56768a..0000000
--- a/doxia-modules/doxia-module-confluence/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>doxia-modules</artifactId>
- <groupId>org.apache.maven.doxia</groupId>
- <version>2.0.0-M1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>doxia-module-confluence</artifactId>
-
- <name>Doxia :: Confluence Module</name>
- <description>
- A Doxia module for Confluence documents.
- Confluence format is supported both as source and target formats.
- </description>
-
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
- </dependencies>
-
- <developers>
- <developer>
- <name>Juan F. Codagnone</name>
- <email>juan *at* zauber dot. com dot. ar</email>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <name>Jason van Zyl</name>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>-5</timezone>
- </developer>
- </developers>
-
- <contributors>
- <contributor>
- <name>Mark Schenk</name>
- </contributor>
- </contributors>
-</project>
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceMarkup.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceMarkup.java
deleted file mode 100644
index 61ac735..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceMarkup.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.apache.maven.doxia.module.confluence;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.markup.TextMarkup;
-
-/**
- * This interface defines all markups and syntaxes used by the <b>Confluence</b> format.
- *
- * See <a href="http://confluence.atlassian.com/display/CONF25/Confluence+Notation+Guide+Overview">
- * Confluence Notation Guide Overview</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @since 1.0
- */
-@SuppressWarnings( "checkstyle:interfaceistype" )
-public interface ConfluenceMarkup
- extends TextMarkup
-{
- // ----------------------------------------------------------------------
- // Confluence markups
- // ----------------------------------------------------------------------
-
- /** Syntax for the anchor : "{anchor:" */
- String ANCHOR_START_MARKUP = "{anchor:";
-
- /** Syntax for the anchor : "}" */
- String ANCHOR_END_MARKUP = "}";
-
- /** Syntax for the bold markup: "*" */
- String BOLD_END_MARKUP = "*";
-
- /** Syntax for the bold markup: "*" */
- String BOLD_START_MARKUP = "*";
-
- /** Syntax for the citation markup: "??" */
- String CITATION_END_MARKUP = "??";
-
- /** Syntax for the citation markup: "??" */
- String CITATION_START_MARKUP = "??";
-
- /** Syntax for the figure markup: "!" */
- String FIGURE_END_MARKUP = "!";
-
- /** Syntax for the figure markup: "!" */
- String FIGURE_START_MARKUP = "!";
-
- /** Syntax for the italic markup: "_" */
- String ITALIC_END_MARKUP = "_";
-
- /** Syntax for the italic markup: "_" */
- String ITALIC_START_MARKUP = "_";
-
- /** Syntax for the line break markup: "\\\\" */
- String LINE_BREAK_MARKUP = "\\\\";
-
- /** Syntax for the link end markup: "]" */
- String LINK_END_MARKUP = "]";
-
- /** Syntax for the link middle markup: "|" */
- String LINK_MIDDLE_MARKUP = "|";
-
- /** Syntax for the link start markup: "[" */
- String LINK_START_MARKUP = "[";
-
- /** Syntax for the list item markup: <code>"* "</code> */
- String LIST_ITEM_MARKUP = "* ";
-
- /** Syntax for the mono-spaced style start: "{{" */
- String MONOSPACED_START_MARKUP = "{{";
-
- /** Syntax for the mono-spaced style end: "}}" */
- String MONOSPACED_END_MARKUP = "}}";
-
- /** Syntax for the numbering decimal markup char: "#" */
- String NUMBERING_MARKUP = "#";
-
- /** Syntax for the strikethrough markup start: "-" */
- String STRIKETHROUGH_START_MARKUP = "-";
-
- /** Syntax for the strikethrough markup end: "-" */
- String STRIKETHROUGH_END_MARKUP = "-";
-
- /** Syntax for the subscript markup start: "-" */
- String SUBSCRIPT_START_MARKUP = "~";
-
- /** Syntax for the subscript markup end: "-" */
- String SUBSCRIPT_END_MARKUP = "~";
-
- /** Syntax for the superscript markup start: "-" */
- String SUPERSCRIPT_START_MARKUP = "^";
-
- /** Syntax for the superscript markup end: "-" */
- String SUPERSCRIPT_END_MARKUP = "^";
-
- /** Syntax for the table cell header end markup: "|" */
- String TABLE_CELL_HEADER_END_MARKUP = "|";
-
- /** Syntax for the table cell header start markup: "|" */
- String TABLE_CELL_HEADER_START_MARKUP = "|";
-
- /** Syntax for the table cell markup: "|" */
- String TABLE_CELL_MARKUP = "|";
-
- /** Syntax for the table row markup: "|" */
- String TABLE_ROW_MARKUP = "|";
-
- /** Syntax for the underlined markup start: "-" */
- String UNDERLINED_START_MARKUP = "+";
-
- /** Syntax for the underlined markup end: "-" */
- String UNDERLINED_END_MARKUP = "+";
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
deleted file mode 100644
index 489a4f2..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package org.apache.maven.doxia.module.confluence;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.module.confluence.parser.BlockParser;
-import org.apache.maven.doxia.module.confluence.parser.DefinitionListBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.FigureBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.HorizontalRuleBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.ParagraphBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.SectionBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.VerbatimBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.list.ListBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.table.TableBlockParser;
-import org.apache.maven.doxia.parser.AbstractTextParser;
-import org.apache.maven.doxia.parser.ParseException;
-import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.util.ByLineReaderSource;
-import org.apache.maven.doxia.util.ByLineSource;
-import org.codehaus.plexus.component.annotations.Component;
-
-/**
- * Parse the <a href="http://www.atlassian.com/software/confluence/">Confluence</a>.
- * See <a href="http://confluence.atlassian.com/display/CONF25/Confluence+Notation+Guide+Overview">
- * Confluence Notation Guide Overview</a>
- *
- * @since 1.0
- */
-@Component( role = Parser.class, hint = "confluence" )
-public class ConfluenceParser
- extends AbstractTextParser
-{
- private BlockParser[] parsers;
-
- /**
- * <p>Constructor for ConfluenceParser.</p>
- */
- public ConfluenceParser()
- {
- init();
- }
-
- private List<Block> parse( ByLineSource source )
- throws ParseException
- {
- init();
-
- List<Block> blocks = new ArrayList<>();
-
- String line;
-
- while ( ( line = source.getNextLine() ) != null )
- {
- //boolean accepted = false;
-
- for ( BlockParser parser : parsers )
- {
- if ( line.trim().length() == 0 )
- {
- continue;
- }
-
- if ( parser.accept( line, source ) )
- {
- //accepted = true;
-
- blocks.add( parser.visit( line, source ) );
-
- break;
- }
- }
-
-/*
- if ( !accepted )
- {
- throw new ParseException( "don't know how to handle line: " + source.getLineNumber() + ": " + line );
- }
-*/
- }
-
- return blocks;
- }
-
- /** {@inheritDoc} */
- @Override
- public void parse( Reader source, Sink sink )
- throws ParseException
- {
- parse( source, sink, "" );
- }
-
- /** {@inheritDoc} */
- @Override
- public synchronized void parse( Reader source, Sink sink, String reference )
- throws ParseException
- {
- ByLineSource src = new ByLineReaderSource( source, reference );
-
- try
- {
- List<Block> blocks = parse( src );
-
- sink.head();
-
- sink.head_();
-
- sink.body();
-
- for ( Block block : blocks )
- {
- block.traverse( sink );
- }
-
- sink.body_();
- }
- catch ( Exception e )
- {
- // TODO handle column number
- throw new ParseException( e, src.getName(), src.getLineNumber(), -1 );
- }
- finally
- {
- setSecondParsing( false );
- init();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void init()
- {
- super.init();
-
- BlockParser headingParser = new SectionBlockParser();
- BlockParser figureParser = new FigureBlockParser();
- BlockParser verbatimParser = new VerbatimBlockParser();
- BlockParser definitionParser = new DefinitionListBlockParser();
- BlockParser horizontalRuleParser = new HorizontalRuleBlockParser();
- BlockParser listParser = new ListBlockParser();
- BlockParser tableParser = new TableBlockParser();
-
- BlockParser[] subparsers =
- new BlockParser[] { headingParser, figureParser, listParser, tableParser, verbatimParser };
- BlockParser paragraphParser = new ParagraphBlockParser( subparsers );
-
- this.parsers =
- new BlockParser[] { headingParser, figureParser, verbatimParser, definitionParser, horizontalRuleParser,
- listParser, tableParser, paragraphParser };
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParserModule.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParserModule.java
deleted file mode 100644
index 9e6b9fd..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParserModule.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.apache.maven.doxia.module.confluence;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.parser.module.AbstractParserModule;
-import org.apache.maven.doxia.parser.module.ParserModule;
-import org.codehaus.plexus.component.annotations.Component;
-
-/**
- * <p>ConfluenceParserModule class.</p>
- *
- * @since 1.6
- */
-@Component( role = ParserModule.class, hint = "confluence" )
-public class ConfluenceParserModule
- extends AbstractParserModule
-{
- /**
- * Default constructor.
- */
- public ConfluenceParserModule()
- {
- super( "confluence" );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java
deleted file mode 100644
index 02fae85..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java
+++ /dev/null
@@ -1,1399 +0,0 @@
-package org.apache.maven.doxia.module.confluence;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Stack;
-
-import javax.swing.text.html.HTML.Attribute;
-
-import org.apache.maven.doxia.sink.SinkEventAttributes;
-import org.apache.maven.doxia.sink.impl.AbstractTextSink;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-import org.apache.maven.doxia.util.HtmlTools;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * Confluence Sink implementation.
- * <br>
- * <b>Note</b>: The encoding used is UTF-8.
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @since 1.0
- */
-public class ConfluenceSink
- extends AbstractTextSink
- implements ConfluenceMarkup
-{
- /** The writer to use. */
- private final PrintWriter out;
-
- /** The writer to use. */
- private StringWriter writer;
-
- /** An indication on if we're in head mode. */
- private boolean headFlag;
-
- private int levelList = 0;
-
- /** listStyles. */
- private final Stack<String> listStyles;
-
- /** An indication on if we're in monospaced mode. */
- private boolean monospacedFlag;
-
- /** Keep track of the closing tags for inline events. */
- protected Stack<List<String>> inlineStack = new Stack<>();
-
- /** An indication on if we're in verbatim box mode. */
- private boolean verbatimBoxedFlag;
-
- /** An indication on if we're in table mode. */
- private boolean tableFlag;
-
- /** An indication on if we're in table header mode. */
- private boolean tableHeaderFlag;
-
- /** The link name. */
- private String linkName;
-
- /**
- * Constructor, initialize the Writer and the variables.
- *
- * @param writer not null writer to write the result. <b>Should</b> be an UTF-8 Writer.
- * You could use <code>newWriter</code> methods from {@link org.codehaus.plexus.util.WriterFactory}.
- */
- protected ConfluenceSink( Writer writer )
- {
- this.out = new PrintWriter( writer );
- this.listStyles = new Stack<>();
-
- init();
- }
-
- /** {@inheritDoc} */
- public void anchor( String name )
- {
- write( ANCHOR_START_MARKUP + name + ANCHOR_END_MARKUP );
- }
-
- /** {@inheritDoc} */
- public void anchor( String name, SinkEventAttributes attributes )
- {
- anchor( name );
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void anchor_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void author()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void author( SinkEventAttributes attributes )
- {
- author();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void author_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void body()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void body( SinkEventAttributes attributes )
- {
- body();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void body_()
- {
- // nop
- }
-
- /**
- * {@inheritDoc}
- */
- public void bold()
- {
- inline( SinkEventAttributeSet.Semantics.BOLD );
- }
-
- /**
- * {@inheritDoc}
- */
- public void bold_()
- {
- inline_();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void comment( String comment )
- {
- // nop
- }
-
- /**
- * {@inheritDoc}
- */
- public void close()
- {
- out.write( writer.toString() );
- out.close();
-
- init();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void date()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void date( SinkEventAttributes attributes )
- {
- date();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void date_()
- {
- // nop
- }
-
- /**
- * {@inheritDoc}
- */
- public void definedTerm()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void definedTerm( SinkEventAttributes attributes )
- {
- definedTerm();
- }
-
- /**
- * {@inheritDoc}
- */
- public void definedTerm_()
- {
- writeEOL( true );
- }
-
- /**
- * {@inheritDoc}
- */
- public void definition()
- {
- writer.write( CITATION_START_MARKUP );
- }
-
- /** {@inheritDoc} */
- public void definition( SinkEventAttributes attributes )
- {
- definition();
- }
-
- /**
- * {@inheritDoc}
- */
- public void definition_()
- {
- writer.write( CITATION_END_MARKUP );
- writeEOL( true );
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void definitionList()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void definitionList( SinkEventAttributes attributes )
- {
- // nop
- }
-
- /**
- * {@inheritDoc}
- */
- public void definitionList_()
- {
- writeEOL();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void definitionListItem()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void definitionListItem( SinkEventAttributes attributes )
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void definitionListItem_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void figure()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void figure( SinkEventAttributes attributes )
- {
- figure();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void figure_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void figureCaption()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void figureCaption( SinkEventAttributes attributes )
- {
- figureCaption();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void figureCaption_()
- {
- // nop;
- }
-
- /** {@inheritDoc} */
- public void figureGraphics( String name )
- {
- writeEOL();
- write( FIGURE_START_MARKUP + name + FIGURE_END_MARKUP );
- }
-
- /** {@inheritDoc} */
- public void figureGraphics( String src, SinkEventAttributes attributes )
- {
- figureGraphics( src );
- if ( attributes != null && attributes.getAttribute( Attribute.ALT.toString() ) != null )
- {
- write( attributes.getAttribute( Attribute.ALT.toString() ).toString() );
- writeEOL( true );
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void flush()
- {
- close();
- writer.flush();
- }
-
- /**
- * {@inheritDoc}
- */
- public void head()
- {
- init();
-
- headFlag = true;
- }
-
- /** {@inheritDoc} */
- public void head( SinkEventAttributes attributes )
- {
- head();
- }
-
- /**
- * {@inheritDoc}
- */
- public void head_()
- {
- headFlag = false;
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void horizontalRule()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void horizontalRule( SinkEventAttributes attributes )
- {
- horizontalRule();
- }
-
- /**
- * {@inheritDoc}
- */
- public void inline()
- {
- inline( null );
- }
-
- /** {@inheritDoc} */
- public void inline( SinkEventAttributes attributes )
- {
- if ( !headFlag )
- {
- List<String> tags = new ArrayList<>();
-
- if ( attributes != null )
- {
-
- if ( attributes.containsAttribute( SinkEventAttributes.SEMANTICS, "italic" ) )
- {
- write( ITALIC_START_MARKUP );
- tags.add( 0, ITALIC_END_MARKUP );
- }
-
- if ( attributes.containsAttribute( SinkEventAttributes.SEMANTICS, "bold" ) )
- {
- write( BOLD_START_MARKUP );
- tags.add( 0, BOLD_END_MARKUP );
- }
-
- if ( attributes.containsAttribute( SinkEventAttributes.SEMANTICS, "code" ) )
- {
- write( MONOSPACED_START_MARKUP );
- tags.add( 0, MONOSPACED_END_MARKUP );
- }
-
- }
-
- inlineStack.push( tags );
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void inline_()
- {
- if ( !headFlag )
- {
- for ( String tag: inlineStack.pop() )
- {
- write( tag );
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void italic()
- {
- inline( SinkEventAttributeSet.Semantics.ITALIC );
- }
-
- /**
- * {@inheritDoc}
- */
- public void italic_()
- {
- inline_();
- }
-
- /**
- * {@inheritDoc}
- */
- public void lineBreak()
- {
- write( LINE_BREAK_MARKUP );
- writeEOL();
- }
-
- /** {@inheritDoc} */
- public void lineBreak( SinkEventAttributes attributes )
- {
- lineBreak();
- }
-
- /** {@inheritDoc} */
- public void link( String name )
- {
- linkName = name;
- }
-
- /** {@inheritDoc} */
- public void link( String name, SinkEventAttributes attributes )
- {
- link( name );
- }
-
- /**
- * {@inheritDoc}
- */
- public void link_()
- {
- linkName = null;
- write( LINK_END_MARKUP );
- }
-
- /**
- * {@inheritDoc}
- */
- public void list()
- {
- if ( !writer.toString().endsWith( EOL + EOL ) )
- {
- writeEOL( true );
- }
-
- levelList++;
- }
-
- /** {@inheritDoc} */
- public void list( SinkEventAttributes attributes )
- {
- list();
- }
-
- /**
- * {@inheritDoc}
- */
- public void list_()
- {
- levelList--;
- if ( levelList == 0 )
- {
- writeEOL( true );
- writeEOL();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void listItem()
- {
- write( StringUtils.repeat( "*", levelList ) + " " );
- }
-
- /** {@inheritDoc} */
- public void listItem( SinkEventAttributes attributes )
- {
- listItem();
- }
-
- /**
- * {@inheritDoc}
- */
- public void listItem_()
- {
- writeEOL( true );
- }
-
- /**
- * {@inheritDoc}
- */
- public void monospaced()
- {
- monospacedFlag = true;
- inline( SinkEventAttributeSet.Semantics.CODE );
- }
-
- /**
- * {@inheritDoc}
- */
- public void monospaced_()
- {
- monospacedFlag = false;
- inline_();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void nonBreakingSpace()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void numberedList( int numbering )
- {
- if ( !writer.toString().endsWith( EOL + EOL ) )
- {
- writeEOL( true );
- }
- levelList++;
-
- String style;
- switch ( numbering )
- {
- case NUMBERING_UPPER_ALPHA:
- case NUMBERING_LOWER_ALPHA:
- case NUMBERING_UPPER_ROMAN:
- case NUMBERING_LOWER_ROMAN:
- case NUMBERING_DECIMAL:
- default:
- style = NUMBERING_MARKUP;
- }
-
- listStyles.push( style );
- }
-
- /** {@inheritDoc} */
- public void numberedList( int numbering, SinkEventAttributes attributes )
- {
- numberedList( numbering );
- }
-
- /**
- * {@inheritDoc}
- */
- public void numberedList_()
- {
- levelList--;
- if ( levelList == 0 )
- {
- writeEOL( true );
- writeEOL();
- }
- listStyles.pop();
- }
-
- /**
- * {@inheritDoc}
- */
- public void numberedListItem()
- {
- writeEOL( true );
- String style = listStyles.peek();
- // We currently only handle one type of numbering style for Confluence,
- // so we can just repeat the latest numbering markup for each level.
- // If we ever decide to handle multiple different numbering styles, we'd
- // need to traverse the entire listStyles stack and use the correct
- // numbering style for each level.
- write( StringUtils.repeat( style, levelList ) + SPACE );
- }
-
- /** {@inheritDoc} */
- public void numberedListItem( SinkEventAttributes attributes )
- {
- numberedListItem();
- }
-
- /**
- * {@inheritDoc}
- */
- public void numberedListItem_()
- {
- writeEOL( true );
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void pageBreak()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void paragraph()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void paragraph( SinkEventAttributes attributes )
- {
- paragraph();
- }
-
- /**
- * {@inheritDoc}
- */
- public void paragraph_()
- {
- writeEOL( true );
- writeEOL();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void rawText( String text )
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section( int level, SinkEventAttributes attributes )
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section1()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section1_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section2()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section2_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section3()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section3_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section4()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section4_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section5()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section5_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void section_( int level )
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void sectionTitle()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void sectionTitle( int level, SinkEventAttributes attributes )
- {
- if ( level > 0 && level < 6 )
- {
- write( "h" + level + ". " );
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle1()
- {
- sectionTitle( 1, null );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle1_()
- {
- sectionTitle_( 1 );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle2()
- {
- sectionTitle( 2, null );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle2_()
- {
- sectionTitle_( 2 );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle3()
- {
- sectionTitle( 3, null );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle3_()
- {
- sectionTitle_( 3 );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle4()
- {
- sectionTitle( 4, null );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle4_()
- {
- sectionTitle_( 4 );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle5()
- {
- sectionTitle( 5, null );
- }
-
- /**
- * {@inheritDoc}
- */
- public void sectionTitle5_()
- {
- sectionTitle_( 5 );
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void sectionTitle_()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void sectionTitle_( int level )
- {
- writeEOL( true );
- writeEOL();
- }
-
- /**
- * {@inheritDoc}
- */
- public void table()
- {
- // nop
- tableFlag = true;
- writeEOL( true );
- writeEOL();
- }
-
- /** {@inheritDoc} */
- public void table( SinkEventAttributes attributes )
- {
- table();
- }
-
- /**
- * {@inheritDoc}
- */
- public void table_()
- {
- tableFlag = false;
- writeEOL( true );
- writeEOL();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void tableCaption()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void tableCaption( SinkEventAttributes attributes )
- {
- tableCaption();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void tableCaption_()
- {
- // nop
- }
-
- /**
- * {@inheritDoc}
- */
- public void tableCell()
- {
- write( " " );
- }
-
- /** {@inheritDoc} */
- public void tableCell( SinkEventAttributes attributes )
- {
- tableCell();
- }
-
- /** {@inheritDoc} */
- public void tableCell( String width )
- {
- tableCell();
- }
-
- /**
- * {@inheritDoc}
- */
- public void tableCell_()
- {
- write( " " );
- write( TABLE_CELL_MARKUP );
- }
-
- /**
- * {@inheritDoc}
- */
- public void tableHeaderCell()
- {
- tableHeaderFlag = true;
- write( TABLE_CELL_HEADER_START_MARKUP );
- }
-
- /** {@inheritDoc} */
- public void tableHeaderCell( SinkEventAttributes attributes )
- {
- tableHeaderCell();
- }
-
- /** {@inheritDoc} */
- public void tableHeaderCell( String width )
- {
- tableHeaderCell();
- }
-
- /**
- * {@inheritDoc}
- */
- public void tableHeaderCell_()
- {
- write( TABLE_CELL_HEADER_END_MARKUP );
- }
-
- /**
- * {@inheritDoc}
- */
- public void tableRow()
- {
- write( TABLE_ROW_MARKUP );
- }
-
- /** {@inheritDoc} */
- public void tableRow( SinkEventAttributes attributes )
- {
- tableRow();
- }
-
- /**
- * {@inheritDoc}
- */
- public void tableRow_()
- {
- if ( tableHeaderFlag )
- {
- tableHeaderFlag = false;
- write( TABLE_ROW_MARKUP );
- }
- writeEOL( true );
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void tableRows( int[] justification, boolean grid )
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void tableRows_()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void text( String text )
- {
- if ( headFlag )
- {
- return;
- }
-
- if ( linkName != null )
- {
- write( LINK_START_MARKUP );
- }
-
- if ( tableFlag )
- {
- // Remove line breaks, because it interferes with the table syntax
- String strippedText = StringUtils.replace( text, "\n", "" );
- // Trim if only whitespace, to handle ignorable whitespace from xdoc documents
- if ( StringUtils.isWhitespace( strippedText ) )
- {
- strippedText = StringUtils.trim( strippedText );
- }
- content( strippedText );
- }
- else if ( monospacedFlag )
- {
- content( text, true );
- }
- else
- {
- content( text );
- }
-
- if ( linkName != null )
- {
- write( LINK_MIDDLE_MARKUP + linkName );
- }
- }
-
- /** {@inheritDoc} */
- public void text( String text, SinkEventAttributes attributes )
- {
- if ( attributes == null )
- {
- text( text );
- }
- else
- {
- if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "underline" ) )
- {
- write( UNDERLINED_START_MARKUP );
- }
- else if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "line-through" ) )
- {
- write( STRIKETHROUGH_START_MARKUP );
- }
- if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sub" ) )
- {
- write( SUBSCRIPT_START_MARKUP );
- }
- else if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sup" ) )
- {
- write( SUPERSCRIPT_START_MARKUP );
- }
-
- text( text );
-
- if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sup" ) )
- {
- write( SUPERSCRIPT_END_MARKUP );
- }
- else if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sub" ) )
- {
- write( SUBSCRIPT_END_MARKUP );
- }
- if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "line-through" ) )
- {
- write( STRIKETHROUGH_END_MARKUP );
- }
- else if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "underline" ) )
- {
- write( UNDERLINED_END_MARKUP );
- }
- }
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void title()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void title( SinkEventAttributes attributes )
- {
- title();
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void title_()
- {
- // nop
- }
-
- /**
- * Not used.
- * {@inheritDoc}
- */
- public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes )
- {
- // nop
- }
-
- /** {@inheritDoc} */
- public void verbatim( boolean boxed )
- {
- if ( boxed )
- {
- verbatimBoxedFlag = true;
- }
-
- if ( verbatimBoxedFlag )
- {
- write( "{code:borderStyle=solid}" );
- }
- else
- {
- write( "{noformat}" );
- }
- writeEOL( true );
- }
-
- /**
- * {@inheritDoc}
- */
- public void verbatim_()
- {
- if ( verbatimBoxedFlag )
- {
- write( "{code}" );
- }
- else
- {
- write( "{noformat}" );
- }
-
- writeEOL( true );
- writeEOL();
- }
-
- // ----------------------------------------------------------------------
- // Private methods
- // ----------------------------------------------------------------------
-
- private void write( String text )
- {
- writer.write( unifyEOLs( text ) );
- }
-
- /**
- * Writes a system EOL.
- */
- private void writeEOL()
- {
- write( EOL );
- }
-
- /**
- * Writes a system EOL, with or without trim.
- */
- private void writeEOL( boolean trim )
- {
- if ( !trim )
- {
- writeEOL();
- return;
- }
-
- String tmp = writer.toString().trim();
- writer = new StringWriter();
- writer.write( tmp );
- write( EOL );
- }
-
- /**
- * Write HTML escaped text to output.
- *
- * @param text The text to write.
- */
- protected void content( String text )
- {
- write( escapeHTML( text ) );
- }
-
- /**
- * Write HTML, and optionally Confluence, escaped text to output.
- *
- * @param text The text to write.
- * @param escapeConfluence a boolean.
- */
- protected void content( String text, boolean escapeConfluence )
- {
- if ( escapeConfluence )
- {
- write( escapeConfluence( escapeHTML( text ) ) );
- }
- else
- {
- content( text );
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void init()
- {
- super.init();
-
- this.writer = new StringWriter();
- this.monospacedFlag = false;
- this.headFlag = false;
- this.levelList = 0;
- this.listStyles.clear();
- this.verbatimBoxedFlag = false;
- this.tableHeaderFlag = false;
- this.linkName = null;
- }
-
- /**
- * Escape characters that have special meaning in Confluence.
- *
- * @param text the String to escape, may be null
- * @return the text escaped, "" if null String input
- */
- protected static String escapeConfluence( String text )
- {
- if ( text == null )
- {
- return "";
- }
- else
- {
- int length = text.length();
- StringBuilder buffer = new StringBuilder( length );
-
- for ( int i = 0; i < length; ++i )
- {
- char c = text.charAt( i );
- switch ( c )
- {
- case '{':
- buffer.append( "\\{" );
- break;
- case '}':
- buffer.append( "\\}" );
- break;
- default:
- buffer.append( c );
- }
- }
-
- return buffer.toString();
- }
- }
-
- /**
- * Forward to HtmlTools.escapeHTML( text ).
- *
- * @param text the String to escape, may be null
- * @return the text escaped, "" if null String input
- * @see org.apache.maven.doxia.util.HtmlTools#escapeHTML(String)
- */
- protected static String escapeHTML( String text )
- {
- return HtmlTools.escapeHTML( text );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkFactory.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkFactory.java
deleted file mode 100644
index 11146d3..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.apache.maven.doxia.module.confluence;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.Writer;
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkFactory;
-import org.apache.maven.doxia.sink.impl.AbstractTextSinkFactory;
-import org.codehaus.plexus.component.annotations.Component;
-
-/**
- * Confluence implementation of the Sink factory.
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @since 1.0
- */
-@Component( role = SinkFactory.class, hint = "confluence" )
-public class ConfluenceSinkFactory
- extends AbstractTextSinkFactory
-{
- /** {@inheritDoc} */
- protected Sink createSink( Writer writer, String encoding )
- {
- // encoding can safely be ignored since it isn't written into the generated Confluence source
- return new ConfluenceSink( writer );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java
deleted file mode 100644
index 1a1fe3f..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * <p>Abstract AbstractFatherBlock class.</p>
- */
-public abstract class AbstractFatherBlock
- implements Block
-{
- private List<Block> blocks;
-
- /**
- * <p>before.</p>
- *
- * @param sink the Sink to receive events.
- */
- public abstract void before( Sink sink );
-
- /**
- * <p>after.</p>
- *
- * @param sink the Sink to receive events.
- */
- public abstract void after( Sink sink );
-
- /**
- * <p>Constructor for AbstractFatherBlock.</p>
- *
- * @param childBlocks the child blocks.
- */
- public AbstractFatherBlock( List<Block> childBlocks )
- {
- if ( childBlocks == null )
- {
- throw new IllegalArgumentException( "argument can't be null" );
- }
-
- this.blocks = childBlocks;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- before( sink );
-
- for ( Block block : blocks )
- {
- block.traverse( sink );
- }
-
- after( sink );
- }
-
- /**
- * <p>Getter for the field <code>blocks</code>.</p>
- *
- * @return a {@link java.util.List} object.
- */
- public List<Block> getBlocks()
- {
- return blocks;
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AnchorBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AnchorBlock.java
deleted file mode 100644
index ebb7f02..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AnchorBlock.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * AnchorBlock
- */
-class AnchorBlock
- implements Block
-{
- private String name;
-
- AnchorBlock( String name )
- {
- if ( name == null )
- {
- throw new IllegalArgumentException( "argument can't be null" );
- }
- this.name = name;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.anchor( name );
- sink.anchor_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/Block.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/Block.java
deleted file mode 100644
index 77477d9..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/Block.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * <p>Block interface.</p>
- */
-public interface Block
-{
- /**
- * <p>traverse.</p>
- *
- * @param sink a {@link org.apache.maven.doxia.sink.Sink} object.
- */
- void traverse( Sink sink );
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BlockParser.java
deleted file mode 100644
index 2f6d839..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BlockParser.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.util.ByLineSource;
-import org.apache.maven.doxia.parser.ParseException;
-
-/**
- * <p>BlockParser interface.</p>
- */
-public interface BlockParser
-{
- /**
- * accept.
- *
- * @param line the line.
- * @param source the source.
- * @return boolean true if valid.
- */
- boolean accept( String line, ByLineSource source );
-
- /**
- * visit.
- *
- * @param line the line.
- * @param source the source.
- * @return boolean true if valid.
- * @throws org.apache.maven.doxia.parser.ParseException if any.
- */
- Block visit( String line, ByLineSource source ) throws ParseException;
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java
deleted file mode 100644
index f7021d4..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * <p>BoldBlock class.</p>
- */
-public class BoldBlock
- extends AbstractFatherBlock
-{
- /**
- * <p>Constructor for BoldBlock.</p>
- *
- * @param childBlocks the child blocks.
- */
- public BoldBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.bold();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.bold_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java
deleted file mode 100644
index 3b6fefc..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java
+++ /dev/null
@@ -1,448 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * Re-usable builder that can be used to generate paragraph and list item text from a string containing all the content
- * and wiki formatting. This class is intentionally stateful, but cheap to create, so create one as needed and keep it
- * on the stack to preserve stateless behaviour in the caller.
- *
- * @author Dave Syer
- * @since 1.1
- */
-public class ChildBlocksBuilder
-{
- private boolean insideBold = false;
-
- private boolean insideItalic = false;
-
- private boolean insideLink = false;
-
- private boolean insideLinethrough = false;
-
- private boolean insideUnderline = false;
-
- private boolean insideSub = false;
-
- private boolean insideSup = false;
-
- private List<Block> blocks = new ArrayList<>();
-
- private StringBuilder text = new StringBuilder();
-
- private String input;
-
- private boolean insideMonospaced;
-
- /**
- * <p>Constructor for ChildBlocksBuilder.</p>
- *
- * @param input the input.
- */
- public ChildBlocksBuilder( String input )
- {
- this.input = input;
- }
-
- /**
- * Utility method to convert marked up content into blocks for rendering.
- *
- * @return a list of Blocks that can be used to render it
- */
- public List<Block> getBlocks()
- {
- List<Block> specialBlocks = new ArrayList<>();
-
- for ( int i = 0; i < input.length(); i++ )
- {
- char c = input.charAt( i );
-
- switch ( c )
- {
- case '*':
- if ( insideBold )
- {
- insideBold = false;
- specialBlocks = getList( new BoldBlock( getChildren( text, specialBlocks ) ), specialBlocks );
- text = new StringBuilder();
- }
- else if ( insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- insideBold = true;
- }
-
- break;
- case '_':
- if ( insideItalic )
- {
- insideItalic = false;
- specialBlocks = getList( new ItalicBlock( getChildren( text, specialBlocks ) ), specialBlocks );
- text = new StringBuilder();
- }
- else if ( insideLink || insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- insideItalic = true;
- }
-
- break;
- case '-':
- if ( insideLinethrough )
- {
- insideLinethrough = false;
- blocks.add( new LinethroughBlock( text.toString() ) );
- text = new StringBuilder();
- }
- else if ( insideLink || insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- insideLinethrough = true;
- }
- break;
- case '+':
- if ( insideUnderline )
- {
- insideUnderline = false;
- blocks.add( new UnderlineBlock( text.toString() ) );
- text = new StringBuilder();
- }
- else if ( insideLink || insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- insideUnderline = true;
- }
- break;
- case '~':
- if ( insideSub )
- {
- insideSub = false;
- blocks.add( new SubBlock( text.toString() ) );
- text = new StringBuilder();
- }
- else if ( insideLink || insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- insideSub = true;
- }
- break;
- case '^':
- if ( insideSup )
- {
- insideSup = false;
- blocks.add( new SupBlock( text.toString() ) );
- text = new StringBuilder();
- }
- else if ( insideLink || insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- insideSup = true;
- }
- break;
- case '[':
- if ( insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- insideLink = true;
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- }
- break;
- case ']':
- if ( insideLink )
- {
- boolean addHTMLSuffix = false;
- String link = text.toString();
-
- if ( !link.endsWith( ".html" ) )
- {
- if ( !link.contains( "http" ) )
- {
- // relative path: see DOXIA-298
- addHTMLSuffix = true;
- }
- }
- if ( link.contains( "|" ) )
- {
- String[] pieces = StringUtils.split( text.toString(), "|" );
-
- if ( pieces[1].startsWith( "^" ) )
- {
- // use the "file attachment" ^ syntax to force verbatim link: needed to allow actually
- // linking to some non-html resources
- pieces[1] = pieces[1].substring( 1 ); // now just get rid of the lead ^
- addHTMLSuffix = false; // force verbatim link to support attaching files/resources (not
- // just .html files)
- }
-
- if ( addHTMLSuffix )
- {
- if ( !pieces[1].contains( "#" ) )
- {
- pieces[1] = pieces[1].concat( ".html" );
- }
- else
- {
- if ( !pieces[1].startsWith( "#" ) )
- {
- String[] temp = pieces[1].split( "#" );
- pieces[1] = temp[0] + ".html#" + temp[1];
- }
- }
- }
-
- blocks.add( new LinkBlock( pieces[1], pieces[0] ) );
- }
- else
- {
- String value = link;
-
- if ( link.startsWith( "#" ) )
- {
- value = link.substring( 1 );
- }
- else if ( link.startsWith( "^" ) )
- {
- link = link.substring( 1 ); // chop off the lead ^ from link and from value
- value = link;
- addHTMLSuffix = false; // force verbatim link to support attaching files/resources (not
- // just .html files)
- }
-
- if ( addHTMLSuffix )
- {
- if ( !link.contains( "#" ) )
- {
- link = link.concat( ".html" );
- }
- else
- {
- if ( !link.startsWith( "#" ) )
- {
- String[] temp = link.split( "#" );
- link = temp[0] + ".html#" + temp[1];
- }
- }
- }
-
- blocks.add( new LinkBlock( link, value ) );
- }
-
- text = new StringBuilder();
- insideLink = false;
- }
- else if ( insideMonospaced )
- {
- text.append( c );
- }
-
- break;
- case '{':
- if ( insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
-
- if ( nextChar( input, i ) == '{' ) // it's monospaced
- {
- i++;
- insideMonospaced = true;
- }
- }
- // else it's a confluence macro...
-
- break;
- case '}':
- if ( nextChar( input, i ) == '}' )
- {
- i++;
- insideMonospaced = false;
- specialBlocks = getList( new MonospaceBlock( getChildren( text, specialBlocks ) ),
- specialBlocks );
- text = new StringBuilder();
- }
- else if ( insideMonospaced )
- {
- text.append( c );
- }
- else
- {
- String name = text.toString();
- if ( name.startsWith( "anchor:" ) )
- {
- blocks.add( new AnchorBlock( name.substring( "anchor:".length() ) ) );
- }
- else
- {
- blocks.add( new TextBlock( "{" + name + "}" ) );
- }
- text = new StringBuilder();
- }
-
- break;
- case '\\':
- if ( insideMonospaced )
- {
- text.append( c );
- }
- else if ( nextChar( input, i ) == '\\' )
- {
- i++;
- text = addTextBlockIfNecessary( blocks, specialBlocks, text );
- blocks.add( new LinebreakBlock() );
- }
- else
- {
- // DOXIA-467 single trailing backward slash, double is considered linebreak
- if ( i == input.length() - 1 )
- {
- text.append( '\\' );
- }
- else
- {
- text.append( input.charAt( ++i ) );
- }
- }
-
- break;
- default:
- text.append( c );
- }
-
- if ( !specialBlocks.isEmpty() )
- {
- if ( !insideItalic && !insideBold && !insideMonospaced )
- {
- blocks.addAll( specialBlocks );
- specialBlocks.clear();
- }
- }
-
- }
-
- if ( text.length() > 0 )
- {
- blocks.add( new TextBlock( text.toString() ) );
- }
-
- return blocks;
- }
-
- private List<Block> getList( Block block, List<Block> currentBlocks )
- {
- List<Block> list = new ArrayList<>();
-
- if ( insideBold || insideItalic || insideMonospaced )
- {
- list.addAll( currentBlocks );
- }
-
- list.add( block );
-
- return list;
- }
-
- private List<Block> getChildren( StringBuilder buffer, List<Block> currentBlocks )
- {
- String txt = buffer.toString().trim();
-
- if ( currentBlocks.isEmpty() && StringUtils.isEmpty( txt ) )
- {
- return new ArrayList<>();
- }
-
- ArrayList<Block> list = new ArrayList<>();
-
- if ( !insideBold && !insideItalic && !insideMonospaced )
- {
- list.addAll( currentBlocks );
- }
-
- if ( StringUtils.isEmpty( txt ) )
- {
- return list;
- }
-
- list.add( new TextBlock( txt ) );
-
- return list;
- }
-
- private static char nextChar( String input, int i )
- {
- return input.length() > i + 1 ? input.charAt( i + 1 ) : '\0';
- }
-
- private StringBuilder addTextBlockIfNecessary( List<Block> blcks, List<Block> specialBlocks, StringBuilder txt )
- {
- if ( txt.length() == 0 )
- {
- return txt;
- }
-
- TextBlock textBlock = new TextBlock( txt.toString() );
-
- if ( !insideBold && !insideItalic && !insideMonospaced )
- {
- blcks.add( textBlock );
- }
- else
- {
- specialBlocks.add( textBlock );
- }
-
- return new StringBuilder();
- }
-
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java
deleted file mode 100644
index a9b5d2c..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-
-import org.apache.maven.doxia.sink.Sink;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * DefinitionListBlock
- */
-class DefinitionListBlock
- implements Block
-{
- private String title;
-
- private List<Block> text;
-
- DefinitionListBlock( String title, String text )
- {
- this.title = title;
- this.text = new ChildBlocksBuilder( text ).getBlocks();
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.definitionList();
-
- if ( !StringUtils.isEmpty( title ) )
- {
- sink.definedTerm();
- sink.text( title );
- sink.definedTerm_();
- }
-
- sink.definition();
-
- for ( Block block : text )
- {
- block.traverse( sink );
- }
-
- sink.definition_();
- sink.definitionList_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlockParser.java
deleted file mode 100644
index aa960be..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlockParser.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.parser.ParseException;
-import org.apache.maven.doxia.util.ByLineSource;
-
-/**
- * <p>DefinitionListBlockParser class.</p>
- *
- * @author Dave Syer
- * @since 1.1
- */
-public class DefinitionListBlockParser
- implements BlockParser
-{
- static final String LS = System.getProperty( "line.separator" );
-
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- return ( line.startsWith( "{note" ) || line.startsWith( "{tip" )
- || line.startsWith( "{info" ) || line.startsWith( "{quote" ) );
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
- StringBuilder text = new StringBuilder();
- StringBuilder title = new StringBuilder();
-
- int index = line.indexOf( "title=" );
-
- if ( index >= 0 )
- {
- line = line.substring( index + 6 );
-
- while ( !( line.contains( "}" ) ) && line != null )
- {
- append( title, line );
- line = source.getNextLine();
- }
-
- if ( line != null )
- {
- append( title, line.substring( 0, line.indexOf( "}" ) ) );
- }
- }
-
- while ( ( line = source.getNextLine() ) != null )
- {
- if ( line.startsWith( "{note" ) || line.startsWith( "{tip" )
- || line.startsWith( "{info" ) || line.startsWith( "{quote" ) )
- {
- break;
- }
-
- append( text, line );
- }
-
- return new DefinitionListBlock( title.toString(), text.toString() );
- }
-
- private void append( StringBuilder title, String line )
- {
- if ( title.length() > 0 )
- {
- title.append( " " );
- }
-
- title.append( line.trim() );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlock.java
deleted file mode 100644
index 93c486c..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlock.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * FigureBlock
- */
-class FigureBlock
- implements Block
-{
- private String location;
-
- private String caption;
-
- FigureBlock( String location )
- {
- this.location = location;
- }
-
- FigureBlock( String image, String caption )
- {
- this.location = image;
- this.caption = caption;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.figure();
- sink.figureGraphics( location );
-
- if ( caption != null && caption.length() > 0 )
- {
- sink.figureCaption();
- new TextBlock( caption ).traverse( sink );
- sink.figureCaption_();
- }
-
- sink.figure_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlockParser.java
deleted file mode 100644
index 76f2d00..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlockParser.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.parser.ParseException;
-import org.apache.maven.doxia.util.ByLineSource;
-
-/**
- * <p>FigureBlockParser class.</p>
- *
- * @since 1.1
- */
-public class FigureBlockParser
- implements BlockParser
-{
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- return line.startsWith( "!" ) && line.lastIndexOf( "!" ) > 1;
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
- String image = line.substring( 1, line.lastIndexOf( "!" ) );
- if ( image.contains( "|" ) )
- {
- // DOXIA-303: handle figure attributes
- image = image.substring( 0, image.indexOf( "|" ) );
- }
-
- line = line.substring( line.lastIndexOf( "!" ) + 1 ).trim();
-
- if ( line.startsWith( "\\\\" ) )
- {
- // ignore linebreak at start of caption
- line = line.substring( 2 );
- }
-
- String caption = line + appendUntilEmptyLine( source );
-
- if ( caption.trim().length() > 0 )
- {
- return new FigureBlock( image, caption );
- }
-
- return new FigureBlock( image );
- }
-
- /**
- * Slurp lines from the source starting with the given line appending them together into a StringBuilder until an
- * empty line is reached, and while the source contains more lines.
- *
- * @param source the source to read new lines from
- * @return a StringBuilder appended with lines
- * @throws ParseException
- */
- private String appendUntilEmptyLine( ByLineSource source )
- throws ParseException
- {
- StringBuilder text = new StringBuilder();
-
- String line;
-
- while ( ( line = source.getNextLine() ) != null )
- {
-
- if ( line.trim().length() == 0 )
- {
- break;
- }
-
- if ( text.length() == 0 )
- {
- text.append( line.trim() );
- }
- else
- {
- text.append( " " ).append( line.trim() );
- }
-
- }
-
- return text.toString();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlock.java
deleted file mode 100644
index 2b5c9c9..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlock.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * HorizontalRuleBlock
- */
-class HorizontalRuleBlock
- implements Block
-{
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.horizontalRule();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlockParser.java
deleted file mode 100644
index 7994fbe..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlockParser.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.util.ByLineSource;
-import org.apache.maven.doxia.parser.ParseException;
-
-/**
- * <p>HorizontalRuleBlockParser class.</p>
- */
-public class HorizontalRuleBlockParser
- implements BlockParser
-{
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- return line.startsWith( "----" );
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
- return new HorizontalRuleBlock();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java
deleted file mode 100644
index e988193..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * ItalicBlock
- */
-class ItalicBlock
- extends AbstractFatherBlock
-{
- ItalicBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.italic();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.italic_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinebreakBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinebreakBlock.java
deleted file mode 100644
index 76eef4f..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinebreakBlock.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @author Dave Syer
- */
-class LinebreakBlock
- implements Block
-{
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.lineBreak();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinethroughBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinethroughBlock.java
deleted file mode 100644
index 5652986..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinethroughBlock.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkEventAttributes;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-
-/**
- * <p>LinethroughBlock class.</p>
- *
- * @author Robert Scholte
- * @since 1.4
- */
-public class LinethroughBlock
- implements Block
-{
- private String text;
-
- /**
- * <p>Constructor for LinethroughBlock.</p>
- *
- * @param text a {@link java.lang.String} object.
- */
- public LinethroughBlock( String text )
- {
- this.text = text;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.DECORATION, "line-through" ) );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinkBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinkBlock.java
deleted file mode 100644
index 327eb10..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinkBlock.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * LinkBlock
- */
-class LinkBlock
- implements Block
-{
- private String reference;
-
- private String text;
-
- LinkBlock( String reference, String text )
- {
- if ( reference == null || text == null )
- {
- throw new IllegalArgumentException( "arguments can't be null" );
- }
- this.reference = reference;
- this.text = text;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.link( reference );
-
- sink.text( text );
-
- sink.link_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java
deleted file mode 100644
index f725ac8..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * MonospaceBlock
- */
-class MonospaceBlock extends AbstractFatherBlock
-{
- MonospaceBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.monospaced();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.monospaced_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java
deleted file mode 100644
index 004b10b..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * ParagraphBlock
- *
- * @author Juan F. Codagnone
- */
-class ParagraphBlock
- extends AbstractFatherBlock
-{
-
- private boolean generateParagraphTags = true;
-
- ParagraphBlock( List<Block> blocks )
- {
- super( blocks );
- }
-
- ParagraphBlock( List<Block> blocks, boolean generateParagraphTags )
- {
- super( blocks );
- this.generateParagraphTags = generateParagraphTags;
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- if ( this.generateParagraphTags )
- {
- sink.paragraph();
- }
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- if ( this.generateParagraphTags )
- {
- sink.paragraph_();
- }
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlockParser.java
deleted file mode 100644
index 45f9621..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlockParser.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.parser.ParseException;
-import org.apache.maven.doxia.util.ByLineSource;
-
-/**
- * <p>ParagraphBlockParser class.</p>
- */
-public class ParagraphBlockParser
- implements BlockParser
-{
- private BlockParser[] parsers;
-
- /**
- * <p>Constructor for ParagraphBlockParser.</p>
- *
- * @param parsers the parsers.
- */
- public ParagraphBlockParser( BlockParser[] parsers )
- {
- super();
- this.parsers = parsers;
- }
-
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- return true;
- }
-
- /**
- * Visit the Block.
- *
- * @param line the line to visit.
- * @param source the source.
- * @param generateParagraphTags whether to generate a paragraph.
- * @return the visited Block.
- * @throws org.apache.maven.doxia.parser.ParseException if any.
- */
- public Block visit( String line, ByLineSource source, boolean generateParagraphTags )
- throws ParseException
- {
- if ( generateParagraphTags )
- {
- return this.visit( line, source );
- }
- else
- {
- ChildBlocksBuilder builder = new ChildBlocksBuilder( line );
- return new ParagraphBlock( builder.getBlocks(), generateParagraphTags );
- }
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
-
- ChildBlocksBuilder builder = new ChildBlocksBuilder( appendUntilEmptyLine( line, source ) );
- return new ParagraphBlock( builder.getBlocks() );
- }
-
- /**
- * Slurp lines from the source starting with the given line appending them together into a StringBuilder until an
- * empty line is reached, and while the source contains more lines. The result can be passed to the
- * {@link #getBlocks(String)} method.
- *
- * @param line the first line
- * @param source the source to read new lines from
- * @return a StringBuilder appended with lines
- * @throws ParseException
- */
- private String appendUntilEmptyLine( String line, ByLineSource source )
- throws ParseException
- {
- StringBuilder text = new StringBuilder();
-
- do
- {
-
- if ( line.trim().length() == 0 )
- {
- break;
- }
-
- boolean accepted = false;
- for ( BlockParser parser : parsers )
- {
- if ( parser.accept( line, source ) )
- {
- accepted = true;
- break;
- }
- }
- if ( accepted )
- {
- // Slightly fragile - if any of the parsers need to do this in order to decide whether to accept a line,
- // then it will barf because of the contract of ByLineSource
- source.ungetLine();
- break;
- }
-
- if ( text.length() == 0 )
- {
- text.append( line.trim() );
- }
- else
- {
- text.append( " " ).append( line.trim() );
- }
-
- }
- while ( ( line = source.getNextLine() ) != null );
-
- return text.toString();
- }
-
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlock.java
deleted file mode 100644
index f902d63..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlock.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * SectionBlock
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-class SectionBlock
- implements Block
-{
- private Block text;
-
- private int level;
-
- SectionBlock( Block text, int level )
- {
- this.text = text;
- this.level = level;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- if ( level == Sink.SECTION_LEVEL_1 )
- {
- sink.section1();
- sink.sectionTitle1();
- }
- else if ( level == Sink.SECTION_LEVEL_2 )
- {
- sink.section2();
- sink.sectionTitle2();
- }
- else if ( level == Sink.SECTION_LEVEL_3 )
- {
- sink.section3();
- sink.sectionTitle3();
- }
- else if ( level == Sink.SECTION_LEVEL_4 )
- {
- sink.section4();
- sink.sectionTitle4();
- }
- else if ( level == Sink.SECTION_LEVEL_5 )
- {
- sink.section5();
- sink.sectionTitle5();
- }
-
- this.text.traverse( sink );
-
- if ( level == Sink.SECTION_LEVEL_1 )
- {
- sink.sectionTitle1_();
- sink.section1_();
- }
- else if ( level == Sink.SECTION_LEVEL_2 )
- {
- sink.sectionTitle2_();
- sink.section2_();
- }
- else if ( level == Sink.SECTION_LEVEL_3 )
- {
- sink.sectionTitle3_();
- sink.section3_();
-
- }
- else if ( level == Sink.SECTION_LEVEL_4 )
- {
- sink.sectionTitle4_();
- sink.section4_();
- }
- else if ( level == Sink.SECTION_LEVEL_5 )
- {
- sink.sectionTitle5_();
- sink.section5_();
- }
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlockParser.java
deleted file mode 100644
index 50cc9b6..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlockParser.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.util.ByLineSource;
-import org.apache.maven.doxia.parser.ParseException;
-
-/**
- * <p>SectionBlockParser class.</p>
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-public class SectionBlockParser
- implements BlockParser
-{
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- if ( line.startsWith( "h1." ) )
- {
- return true;
- }
- else if ( line.startsWith( "h2." ) )
- {
- return true;
- }
- else if ( line.startsWith( "h3." ) )
- {
- return true;
- }
- else if ( line.startsWith( "h4." ) )
- {
- return true;
- }
- else if ( line.startsWith( "h5." ) )
- {
- return true;
- }
-
- return false;
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
- int level = Integer.parseInt( Character.toString( line.charAt( 1 ) ) );
-
- String title = line.substring( 3 ).trim();
-
- BlockParser headingParser = new SectionBlockParser();
- BlockParser figureParser = new FigureBlockParser();
- BlockParser[] subparsers = new BlockParser[] { headingParser, figureParser };
-
- return new SectionBlock( new ParagraphBlockParser( subparsers ).visit( title, source, false ), level );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SubBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SubBlock.java
deleted file mode 100644
index edff17f..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SubBlock.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkEventAttributes;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-
-/**
- * <p>SubBlock class.</p>
- *
- * @author Robert Scholte
- * @since 1.4
- */
-public class SubBlock
- implements Block
-{
- private String text;
-
- /**
- * <p>Constructor for SubBlock.</p>
- *
- * @param text a {@link java.lang.String} object.
- */
- public SubBlock( String text )
- {
- this.text = text;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.VALIGN, "sub" ) );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SupBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SupBlock.java
deleted file mode 100644
index df0d14a..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SupBlock.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkEventAttributes;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-
-/**
- * <p>SupBlock class.</p>
- *
- * @author Robert Scholte
- * @since 1.4
- */
-public class SupBlock
- implements Block
-{
- private String text;
-
- /**
- * <p>Constructor for SupBlock.</p>
- *
- * @param text a {@link java.lang.String} object.
- */
- public SupBlock( String text )
- {
- this.text = text;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.VALIGN, "sup" ) );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/TextBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/TextBlock.java
deleted file mode 100644
index d9a0200..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/TextBlock.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * <p>TextBlock class.</p>
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-public class TextBlock
- implements Block
-{
- private String text;
-
- /**
- * <p>Constructor for TextBlock.</p>
- *
- * @param text the text.
- */
- public TextBlock( String text )
- {
- this.text = text;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.text( text );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/UnderlineBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/UnderlineBlock.java
deleted file mode 100644
index 0075e01..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/UnderlineBlock.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkEventAttributes;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-
-/**
- * <p>UnderlineBlock class.</p>
- *
- * @author Robert Scholte
- * @since 1.4
- */
-public class UnderlineBlock
- implements Block
-{
- private String text;
-
- /**
- * <p>Constructor for UnderlineBlock.</p>
- *
- * @param text a {@link java.lang.String} object.
- */
- public UnderlineBlock( String text )
- {
- this.text = text;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.DECORATION, "underline" ) );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.java
deleted file mode 100644
index c1e1a92..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-
-/**
- * VerbatimBlock
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-class VerbatimBlock
- implements Block
-{
- private String text;
-
- VerbatimBlock( String text )
- {
- this.text = text;
- }
-
- /** {@inheritDoc} */
- public void traverse( Sink sink )
- {
- sink.verbatim( SinkEventAttributeSet.BOXED );
-
- sink.text( text );
-
- sink.verbatim_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlockParser.java
deleted file mode 100644
index 691e721..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlockParser.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.util.ByLineSource;
-import org.apache.maven.doxia.parser.ParseException;
-
-/**
- * <p>VerbatimBlockParser class.</p>
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-public class VerbatimBlockParser
- implements BlockParser
-{
- static final String LS = System.getProperty( "line.separator" );
-
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- if ( line.startsWith( "{code" ) || line.startsWith( "{noformat}" ) )
- {
- return true;
- }
-
- return false;
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
- StringBuilder text = new StringBuilder();
-
- while ( ( line = source.getNextLine() ) != null )
- {
- if ( line.startsWith( "{code}" ) || line.startsWith( "{noformat}" ) )
- {
- break;
- }
-
- // TODO
- text.append( line ).append( LS );
- }
-
- return new VerbatimBlock( text.toString() );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java
deleted file mode 100644
index 95edc46..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.list;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * BulletedListBlock
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-class BulletedListBlock
- extends ListBlock
-{
- BulletedListBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.list();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.list_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java
deleted file mode 100644
index 6e6b93d..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.list;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-
-import java.util.List;
-
-/**
- * ListBlock
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-abstract class ListBlock
- extends AbstractFatherBlock
-{
- ListBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlockParser.java
deleted file mode 100644
index f16ef48..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlockParser.java
+++ /dev/null
@@ -1,147 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.list;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.util.ByLineSource;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.module.confluence.parser.BlockParser;
-import org.apache.maven.doxia.parser.ParseException;
-
-/**
- * <p>ListBlockParser class.</p>
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-public class ListBlockParser
- implements BlockParser
-{
- /** Constant <code>BULLETED_LIST=0</code> */
- public static final int BULLETED_LIST = 0;
-
- /** Constant <code>NUMBERED_LIST=1</code> */
- public static final int NUMBERED_LIST = 1;
-
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- if ( isList( line ) )
- {
- return true;
- }
-
- return false;
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
- TreeListBuilder treeListBuilder = new TreeListBuilder();
-
- StringBuilder text = new StringBuilder();
-
- do
- {
- if ( line.trim().length() == 0 )
- {
- break;
- }
-
- if ( text.length() > 0 && isList( line ) )
- {
- // We reached a new line with list prefix
- addItem( treeListBuilder, text );
- }
-
- if ( text.length() == 0 )
- {
- text.append( line.trim() );
- }
- else
- {
- text.append( " " ).append( line.trim() );
- }
-
- }
- while ( ( line = source.getNextLine() ) != null );
-
- if ( text.length() > 0 )
- {
- addItem( treeListBuilder, text );
- }
-
- return treeListBuilder.getBlock();
- }
-
- private void addItem( TreeListBuilder treeListBuilder, StringBuilder text )
- {
- String item = text.toString();
- int level = getLevel( item );
-
- if ( isBulletedList( item, level - 1 ) )
- {
- treeListBuilder.feedEntry( BULLETED_LIST, level, item.substring( level ) );
- }
- else
- {
- treeListBuilder.feedEntry( NUMBERED_LIST, level, item.substring( level ) );
- }
- text.setLength( 0 );
- }
-
- private int getLevel( String line )
- {
- int level = 0;
-
- while ( line.charAt( level ) == '*' || line.charAt( level ) == '-' || line.charAt( level ) == '#' )
- {
- level++;
- }
-
- return level;
- }
-
- private boolean isBulletedList( String line, int deph )
- {
- return ( line.charAt( deph ) == '*' || line.charAt( deph ) == '-' );
- }
-
- private boolean isList( String line )
- {
- line = line.trim();
-
- if ( line.startsWith( "*" ) || line.startsWith( "-" ) || line.startsWith( "#" ) )
- {
- String temp = line.substring( 1 );
- while ( temp.length() > 0
- && ( temp.charAt( 0 ) == '*' || temp.charAt( 0 ) == '-' || temp.charAt( 0 ) == '#' ) )
- {
- temp = temp.substring( 1 );
- }
-
- if ( temp.length() > 0 && temp.charAt( 0 ) == ' ' )
- {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java
deleted file mode 100644
index a579c77..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.list;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * ListItemBlock
- */
-class ListItemBlock
- extends AbstractFatherBlock
-{
- private ListBlock innerList;
-
- ListItemBlock( List<Block> blocks )
- {
- this( blocks, null );
- }
-
- ListItemBlock( List<Block> blocks, ListBlock innerList )
- {
- super( blocks );
-
- this.innerList = innerList;
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.listItem();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- if ( innerList != null )
- {
- innerList.traverse( sink );
- }
-
- sink.listItem_();
- }
-
- ListBlock getInnerList()
- {
- return innerList;
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java
deleted file mode 100644
index 5c65eed..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.list;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * <p>NumberedListBlock class.</p>
- */
-public class NumberedListBlock
- extends ListBlock
-{
- /**
- * @param childBlocks
- */
- NumberedListBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.numberedList( Sink.NUMBERING_DECIMAL );
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.numberedList_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java
deleted file mode 100644
index 8c7d00e..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.list;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * TreeComponent
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- */
-class TreeComponent
-{
- private static final String EOL = System.getProperty( "line.separator" );
-
- private List<TreeComponent> children = new ArrayList<>();
-
- private String text;
-
- private TreeComponent father;
-
- private int type;
-
- TreeComponent( TreeComponent father, String text, int type )
- {
- this.text = text;
- this.father = father;
- this.type = type;
- }
-
- List<TreeComponent> getChildren()
- {
- return children;
- }
-
- TreeComponent addChildren( String t, int ttype )
- {
- if ( t == null )
- {
- throw new IllegalArgumentException( "argument is null" );
- }
-
- TreeComponent ret = new TreeComponent( this, t, ttype );
-
- children.add( ret );
-
- return ret;
- }
-
- TreeComponent getFather()
- {
- return father;
- }
-
- int getDepth()
- {
- int ret = 0;
-
- TreeComponent c = this;
-
- while ( ( c = c.getFather() ) != null )
- {
- ret++;
- }
-
- return ret;
- }
-
- /**
- * {@inheritDoc}
- *
- * @return a {@link java.lang.String} object.
- */
- public String toString()
- {
- return toString( "" );
- }
-
- String toString( String indent )
- {
- StringBuilder sb = new StringBuilder();
-
- if ( father != null )
- {
- sb.append( indent );
- sb.append( "- " );
- sb.append( text );
- sb.append( EOL );
- }
-
- for ( TreeComponent lc : children )
- {
- sb.append( lc.toString( indent + " " ) );
- }
-
- return sb.toString();
- }
-
- String getText()
- {
- return text;
- }
-
- int getType()
- {
- return type;
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java
deleted file mode 100644
index 0afee22..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.list;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.module.confluence.parser.ChildBlocksBuilder;
-
-/**
- * <p>TreeListBuilder class.</p>
- */
-public class TreeListBuilder
-{
- private TreeComponent root;
-
- private TreeComponent current;
-
- TreeListBuilder()
- {
- root = new TreeComponent( null, "root", 0 );
-
- current = root;
- }
-
- void feedEntry( int type, int level, String text )
- {
- int currentDepth = current.getDepth();
-
- int incomingLevel = level - 1;
-
- if ( incomingLevel == currentDepth )
- {
- // nothing to move
- }
- else if ( incomingLevel > currentDepth )
- {
- // el actual ahora es el �ltimo que insert�
- List<TreeComponent> components = current.getChildren();
-
- if ( components.size() == 0 )
- {
- /* for example:
- * * item1
- * * item2
- */
- for ( int i = 0, n = incomingLevel - currentDepth; i < n; i++ )
- {
- current = current.addChildren( "", type );
- }
- }
- else
- {
- current = components.get( components.size() - 1 );
- }
- }
- else
- {
- for ( int i = 0, n = currentDepth - incomingLevel; i < n; i++ )
- {
- current = current.getFather();
-
- if ( current == null )
- {
- throw new IllegalStateException();
- }
- }
- }
- current.addChildren( text.trim(), type );
- }
-
- ListBlock getBlock()
- {
- return getList( root );
- }
-
- private ListBlock getList( TreeComponent treeComponent )
- {
- List<Block> list = getListItems( treeComponent );
-
- int type = treeComponent.getChildren().get( 0 ).getType();
-
- if ( type == ListBlockParser.BULLETED_LIST )
- {
- return new BulletedListBlock( list );
- }
-
- return new NumberedListBlock( list );
- }
-
- private List<Block> getListItems( TreeComponent tc )
- {
- List<Block> blocks = new ArrayList<>();
-
- for ( TreeComponent child : tc.getChildren() )
- {
- List<Block> childBlocks = new ArrayList<>();
-
- if ( child.getFather() != null )
- {
- childBlocks.addAll( new ChildBlocksBuilder( child.getText() ).getBlocks() );
- }
-
- if ( child.getChildren().size() != 0 )
- {
- blocks.add( new ListItemBlock( childBlocks, getList( child ) ) );
- }
- else
- {
- blocks.add( new ListItemBlock( childBlocks ) );
- }
- }
-
- return blocks;
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java
deleted file mode 100644
index 1b0bd37..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.table;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * TableBlock
- */
-class TableBlock
- extends AbstractFatherBlock
-{
- TableBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.table();
- sink.tableRows( getJustification(), false );
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.tableRows_();
- sink.table_();
- }
-
- private int[] getJustification()
- {
- final AbstractFatherBlock b = ( (AbstractFatherBlock) getBlocks().get( 0 ) );
- int[] justification = new int[b.getBlocks().size()];
- for ( int i = 0; i < justification.length; i++ )
- {
- justification[i] = Sink.JUSTIFY_CENTER;
- }
-
- return justification;
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java
deleted file mode 100644
index 5904c1f..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.table;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.maven.doxia.module.confluence.ConfluenceMarkup;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.module.confluence.parser.BlockParser;
-import org.apache.maven.doxia.module.confluence.parser.BoldBlock;
-import org.apache.maven.doxia.module.confluence.parser.FigureBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.ParagraphBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.SectionBlockParser;
-import org.apache.maven.doxia.module.confluence.parser.list.ListBlockParser;
-import org.apache.maven.doxia.parser.ParseException;
-import org.apache.maven.doxia.util.ByLineReaderSource;
-import org.apache.maven.doxia.util.ByLineSource;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * Parse tables
- *
- * @author Juan F. Codagnone
- */
-public class TableBlockParser
- implements BlockParser
-{
- private static final String EMPTY_STRING = "";
-
- private static final String ANY_CHARACTER = ".*";
-
- private static final String ESCAPE_CHARACTER = "\\";
-
- private BlockParser[] parsers;
-
- /**
- * Default constructor TableBlockParser.
- */
- public TableBlockParser()
- {
- BlockParser headingParser = new SectionBlockParser();
- BlockParser figureParser = new FigureBlockParser();
- BlockParser listParser = new ListBlockParser();
-
- BlockParser[] subparsers = new BlockParser[] { headingParser, figureParser, listParser };
- BlockParser paragraphParser = new ParagraphBlockParser( subparsers );
-
- this.parsers = new BlockParser[] { headingParser, figureParser, listParser, paragraphParser };
-
- }
-
- /** {@inheritDoc} */
- public boolean accept( String line, ByLineSource source )
- {
- return line.startsWith( "|" );
- }
-
- /** {@inheritDoc} */
- public Block visit( String line, ByLineSource source )
- throws ParseException
- {
- if ( !accept( line, source ) )
- {
- throw new IllegalAccessError( "call accept before this ;)" );
- }
-
- List<Block> rows = new ArrayList<>();
-
- String l = line;
-
- do
- {
- l = l.substring( 0, l.lastIndexOf( "|" ) );
-
- List<Block> cells = new ArrayList<>();
-
- if ( l.startsWith( "||" ) )
- {
- String[] text = StringUtils.split( l, "||" );
-
- for ( String s : text )
- {
- List<Block> textBlocks = new ArrayList<>();
-
- textBlocks.add( parseLine( s, new ByLineReaderSource( new StringReader( EMPTY_STRING ) ) ) );
-
- List<Block> blocks = new ArrayList<>();
-
- blocks.add( new BoldBlock( textBlocks ) );
-
- cells.add( new TableCellHeaderBlock( blocks ) );
- }
- }
- else
- {
- int it = 0;
- String[] text = StringUtils.split( l, "|" );
- List<String> texts = new LinkedList<>();
-
- while ( it < text.length )
- {
- if ( text[it].matches( ANY_CHARACTER + ESCAPE_CHARACTER + ConfluenceMarkup.LINK_START_MARKUP
- + ANY_CHARACTER )
- && !text[it].matches( ANY_CHARACTER + ESCAPE_CHARACTER + ConfluenceMarkup.LINK_END_MARKUP
- + ANY_CHARACTER ) )
- {
- texts.add( text[it] + ConfluenceMarkup.TABLE_CELL_MARKUP + text[it + 1] );
- it += 2;
- continue;
- }
- texts.add( text[it] );
- it++;
- }
-
- for ( String pText : texts )
- {
- List<Block> blocks = new ArrayList<>();
-
- blocks.add( parseLine( pText, new ByLineReaderSource( new StringReader( EMPTY_STRING ) ) ) );
-
- cells.add( new TableCellBlock( blocks ) );
- }
- }
-
- rows.add( new TableRowBlock( cells ) );
- }
- while ( ( l = source.getNextLine() ) != null && accept( l, source ) );
-
- assert rows.size() >= 1;
-
- return new TableBlock( rows );
- }
-
- private Block parseLine( String text, ByLineSource source )
- throws ParseException
- {
- if ( text.length() > 0 )
- {
- for ( BlockParser parser : parsers )
- {
- if ( parser.accept( text, source ) )
- {
- if ( parser instanceof ParagraphBlockParser )
- {
- return ( (ParagraphBlockParser) parser ).visit( text, source, false );
- }
- else
- {
- return parser.visit( text, source );
- }
- }
- }
- }
- return null;
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java
deleted file mode 100644
index 20b650e..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.table;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * TableCellBlock
- */
-class TableCellBlock
- extends AbstractFatherBlock
-{
- TableCellBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.tableCell();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.tableCell_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java
deleted file mode 100644
index 791f39a..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.table;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * TableCellHeaderBlock
- */
-class TableCellHeaderBlock
- extends AbstractFatherBlock
-{
- TableCellHeaderBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.tableHeaderCell();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.tableHeaderCell_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java b/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java
deleted file mode 100644
index f537dee..0000000
--- a/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.doxia.module.confluence.parser.table;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
-import org.apache.maven.doxia.module.confluence.parser.Block;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.util.List;
-
-/**
- * TableRowBlock
- */
-class TableRowBlock
- extends AbstractFatherBlock
-{
- TableRowBlock( List<Block> childBlocks )
- {
- super( childBlocks );
- }
-
- /** {@inheritDoc} */
- public void before( Sink sink )
- {
- sink.tableRow();
- }
-
- /** {@inheritDoc} */
- public void after( Sink sink )
- {
- sink.tableRow_();
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/site/apt/index.apt b/doxia-modules/doxia-module-confluence/src/site/apt/index.apt
deleted file mode 100644
index 3968f5f..0000000
--- a/doxia-modules/doxia-module-confluence/src/site/apt/index.apt
+++ /dev/null
@@ -1,27 +0,0 @@
- --------------
- Maven Doxia Confluence Module
- --------------
-
- ~~ Licensed to the Apache Software Foundation (ASF) under one
- ~~ or more contributor license agreements. See the NOTICE file
- ~~ distributed with this work for additional information
- ~~ regarding copyright ownership. The ASF licenses this file
- ~~ to you under the Apache License, Version 2.0 (the
- ~~ "License"); you may not use this file except in compliance
- ~~ with the License. You may obtain a copy of the License at
- ~~
- ~~ http://www.apache.org/licenses/LICENSE-2.0
- ~~
- ~~ Unless required by applicable law or agreed to in writing,
- ~~ software distributed under the License is distributed on an
- ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~~ KIND, either express or implied. See the License for the
- ~~ specific language governing permissions and limitations
- ~~ under the License.
-
- ~~ NOTE: For help with the syntax of this file, see:
- ~~ http://maven.apache.org/doxia/references/apt-format.html
-
-Deprecation Notice
-
- This Doxia module is deprecated and will be removed in version 2.0.0.
diff --git a/doxia-modules/doxia-module-confluence/src/site/site.xml b/doxia-modules/doxia-module-confluence/src/site/site.xml
deleted file mode 100644
index 47dc748..0000000
--- a/doxia-modules/doxia-module-confluence/src/site/site.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
- -->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 https://maven.apache.org/xsd/decoration-1.1.0.xsd"
- name="Confluence">
-
- <body>
-
- <menu ref="parent"/>
-
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <item name="JavaDocs" href="apidocs/index.html"/>
- <item name="Source Xref" href="xref/index.html"/>
- <!--item name="FAQ" href="faq.html"/-->
- </menu>
-
- <menu ref="reports"/>
-
- </body>
-
-</project>
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceParserTest.java b/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceParserTest.java
deleted file mode 100644
index ea2314e..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceParserTest.java
+++ /dev/null
@@ -1,682 +0,0 @@
-package org.apache.maven.doxia.module.confluence;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.Iterator;
-
-import org.apache.maven.doxia.parser.AbstractParserTest;
-import org.apache.maven.doxia.parser.ParseException;
-import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-import org.apache.maven.doxia.sink.impl.SinkEventElement;
-import org.apache.maven.doxia.sink.impl.SinkEventTestingSink;
-import org.apache.maven.doxia.sink.impl.TextSink;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * Test class for ConfluenceParser.
- */
-public class ConfluenceParserTest
- extends AbstractParserTest
-{
- private ConfluenceParser parser;
-
- private StringWriter output;
-
- private Reader reader;
-
- private Writer writer;
-
- /** {@inheritDoc} */
- protected void setUp()
- throws Exception
- {
- super.setUp();
-
- parser = (ConfluenceParser) lookup( Parser.class, "confluence" );
-
- output = null;
- reader = null;
- writer = null;
- }
-
- /** {@inheritDoc} */
- protected void tearDown()
- throws Exception
- {
- IOUtil.close( output );
- IOUtil.close( reader );
- IOUtil.close( writer );
-
- super.tearDown();
- }
-
- protected Parser createParser()
- {
- return parser;
- }
-
- protected String outputExtension()
- {
- return "confluence";
- }
-
- public void testMarkupTestPage()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "test" );
- assertContainsLines( result, "end:body" );
- }
-
- public void testParagraphWithSimpleFormatting()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "simple-paragraph" );
-
- assertContainsLines( result, "begin:bold\ntext: bold\n" );
- assertContainsLines( result, "begin:italic\ntext: italic\n" );
- assertContainsLines( result, "begin:monospaced\ntext: monospaced\n" );
- assertContainsLines( result, "begin:link, name: http://jira.codehaus.org\ntext: http://jira.codehaus.org" );
- assertContainsLines( result, "begin:link, name: http://jira.codehaus.org\ntext: JIRA\n" );
- // four paragraphs in the input...
- assertEquals( 5, result.split( "end:paragraph" ).length );
- }
-
- public void testLineBreak()
- throws Exception
- {
- String lineBreak = getLineBreakString();
-
- String result = locateAndParseTestSourceFile( "linebreak" );
-
- assertContainsLines( result, "Line\n" + lineBreak );
- assertContainsLines( result, "with 2\n" + lineBreak );
- assertContainsLines( result, "inline\n" + lineBreak );
- }
-
- public void testEscapes()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "escapes" );
-
- assertContainsLines( result, "asterisk *" );
- assertContainsLines( result, "underline _" );
- assertContainsLines( result, "asterisk *not bold*" );
- assertContainsLines( result, "underline _not italic_" );
- assertContainsLines( result, "normal character" );
- assertContainsLines( result, "trailing slash\\\n" );
- }
-
- public void testSectionTitles()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "section" );
-
- for ( int i = 1; i <= 5; i++ )
- {
- assertContainsLines( "Could not locate section " + i + " title", result,
- "sectionTitle" + i + "\ntext: Section" + i );
- }
-
- assertContainsLines( "Section title has leading space", result, "sectionTitle1\ntext: TitleWithLeadingSpace" );
- }
-
- public void testNestedBulletList()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "nested-list" );
-
- assertContainsLines( "Nested list not found", result,
- "begin:listItem\ntext: A top level list item\nbegin:list" );
- // two lists in the input...
- assertEquals( 3, result.split( "end:list\n" ).length );
- // ...and 4 list items
- assertEquals( 5, result.split( "end:listItem\n" ).length );
- }
-
- public void testNestedHeterogenousList()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "nested-list-heterogenous" );
-
- // test heterogenous list
- assertContainsLines( "Nested list not found", result, "begin:listItem\ntext: A top level list item\nbegin:numberedList" );
-
- // exactly one list and one numberedList
- assertEquals( 2, result.split( "begin:list\n" ).length );
- assertEquals( 2, result.split( "begin:numberedList" ).length );
-
- // ...and 4 list items
- assertEquals( 5, result.split( "end:listItem\n" ).length );
- }
-
- public void testListWithSimpleFormatting()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "simple-list" );
-
- assertContainsLines( result, "begin:bold\ntext: bold\n" );
- assertContainsLines( result, "begin:italic\ntext: italic\n" );
- assertContainsLines( result, "begin:monospaced\ntext: monospaced\n" );
- assertContainsLines( result, "begin:monospaced\ntext: some escaped monospaced \\\\unc\\path\n" );
- assertContainsLines( result, "begin:link, name: http://jira.codehaus.org\ntext: http://jira.codehaus.org\n" );
- assertContainsLines( result, "begin:link, name: http://jira.codehaus.org\ntext: JIRA\n" );
- assertContainsLines( result, "begin:listItem\ntext: Item with no formatting\nend:listItem\n" );
- assertContainsLines( result, "begin:listItem\ntext: One bullet\nend:listItem\n" );
- assertContainsLines( result, "begin:listItem\ntext: A list item with more than one line\nend:listItem\n" );
- // 3 lists in the input...
- assertEquals( 4, result.split( "end:list\n" ).length );
- // ...and 7 list items
- assertEquals( 9, result.split( "end:listItem\n" ).length );
- }
-
- public void testAnchor()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "anchor" );
-
- assertContainsLines( result, "begin:paragraph\nbegin:anchor, name: start\nend:anchor" );
- assertContainsLines( result, "begin:anchor, name: middle\nend:anchor" );
- assertContainsLines( result, "begin:paragraph\ntext: Simple paragraph\nbegin:anchor, name: end\nend:anchor" );
- // 3 anchors in the input...
- assertEquals( 4, result.split( "end:anchor\n" ).length );
- }
-
- public void testUnknownMacro()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "unknown-macro" );
-
- assertContainsLines( result, "begin:paragraph\ntext: {unknown:start}" );
- }
-
- public void testCodeMacro()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "code" );
-
- assertContainsLines( result, "begin:verbatim, boxed: true\ntext: public class Cat {" );
- // 5 paragraphs in the input...
- assertEquals( 5, result.split( "end:paragraph\n" ).length );
- // 3 verbatim in the input...
- assertEquals( 3, result.split( "end:verbatim\n" ).length );
- }
-
- public void testFigure()
- throws Exception
- {
- Reader result = getTestReader( "figure" );
-
- SinkEventTestingSink sink = new SinkEventTestingSink();
-
- parser.parse( result, sink );
-
- Iterator<SinkEventElement> it = sink.getEventList().iterator();
-
- assertStartsWith( it, "head", "head_", "body", "paragraph" );
- assertEquals( it.next(), "text", "Simple paragraph." );
- assertStartsWith( it, "paragraph_", "figure" );
- assertEquals( it.next(), "figureGraphics", "images/photo.jpg" );
- assertStartsWith( it, "figure_", "paragraph" );
- assertEquals( it.next(), "text", "Simple paragraph with attempted inline !image.jpg! (should fail)." );
- assertStartsWith( it, "paragraph_", "figure" );
- assertEquals( it.next(), "figureGraphics", "images/photo.jpg" );
- assertEquals( it.next().getName(), "figureCaption" );
- assertEquals( it.next(), "text", "With caption on same line" );
- assertStartsWith( it, "figureCaption_", "figure_", "figure" );
- assertEquals( it.next(), "figureGraphics", "images/linebreak.jpg" );
- assertEquals( it.next().getName(), "figureCaption" );
- assertEquals( it.next(), "text", "With caption underneath and linebreak" );
- assertStartsWith( it, "figureCaption_", "figure_", "figure" );
- assertEquals( it.next(), "figureGraphics", "images/nolinebreak.jpg" );
- assertEquals( it.next().getName(), "figureCaption" );
- assertEquals( it.next(), "text", "With caption underneath and no linebreak" );
- assertStartsWith( it, "figureCaption_", "figure_", "figure" );
- assertEquals( it.next(), "figureGraphics", "images/bold.jpg" );
- assertEquals( it.next().getName(), "figureCaption" );
- assertEquals( it.next(), "text", "With *bold* caption underneath" );
- assertStartsWith( it, "figureCaption_", "figure_", "figure" );
- assertEquals( it.next(), "figureGraphics", "image.gif" );
- assertEquals( it, "figure_", "body_" );
- }
-
- public void testLink()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "link" );
-
- assertContainsLines( result, "begin:link, name: middle.html\ntext: middle\nend:link" );
- assertContainsLines( result, "begin:link, name: end.html\ntext: end\nend:link" );
- assertContainsLines( result, "begin:link, name: link.html\ntext: alias\nend:link" );
- assertContainsLines( result, "begin:link, name: link.html#anchor\ntext: link#anchor\nend:link" );
- assertContainsLines( result, "begin:link, name: #simple\ntext: simple\nend:link" );
- assertContainsLines( result, "begin:link, name: resource.pdf\ntext: resource.pdf\nend:link" );
- assertContainsLines( result, "begin:link, name: resource.pdf\ntext: alias pdf\nend:link" );
- assertContainsLines( result, "begin:link, name: http://link.to/page_with_underscore-and-dash\ntext: underscore_-dash\nend:link" );
- // 5 paragraphs in the input...
- assertEquals( 6, result.split( "end:paragraph\n" ).length );
- // 8 links in the input...
- assertEquals( 9, result.split( "end:link\n" ).length );
- }
-
- public void testTable()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "table" );
-
- // DOXIA-537
- // |1|2|3|
- assertContainsLines( result, "begin:tableRow\nbegin:tableCell\ntext: 1\nend:tableCell\n\n\nbegin:tableCell\ntext: 2\nend:tableCell\n\n\nbegin:tableCell\ntext: 3\nend:tableCell\n" );
- // |1||3|
- assertContainsLines( result, "begin:tableRow\nbegin:tableCell\ntext: 1\nend:tableCell\n\n\nbegin:tableCell\ntext: 3\nend:tableCell\n" );
- // |1| |3|
- assertContainsLines( result, "begin:tableRow\nbegin:tableCell\ntext: 1\nend:tableCell\n\n\nbegin:tableCell\ntext: \nend:tableCell\n\n\nbegin:tableCell\ntext: 3\nend:tableCell\n" );
-
- }
-
- public void testTableWithLinks()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "table-link" );
-
- assertContainsLines( result, "begin:tableCell\nbegin:link, name: http://example.com/release.0.1.3/ex-win32-win32.x86.zip\ntext: Download\nend:link\n\n\nend:tableCell\n" );
- assertContainsLines( result, "begin:tableCell\nbegin:link, name: http://example.com/release.0.1.2/ex-win32-win32.x86.zip\ntext: http://example.com/release.0.1.2/ex-win32-win32.x86.zip\nend:link\n\n\nend:tableCell\n" );
-
- // 3 links in the input
- assertEquals( 4, result.split( "end:link\n" ).length );
- }
-
- public void testTableWithImages()
- throws Exception
- {
- // DOXIA-493
- StringReader reader =
- new StringReader( "Table containing image in cell:\n" + "\n" + "||Header 1||\n"
- + "|!images/test/Image.png!|" );
-
- SinkEventTestingSink sink = new SinkEventTestingSink();
-
- parser.parse( reader, sink );
-
- Iterator<SinkEventElement> it = sink.getEventList().iterator();
-
- assertStartsWith( it, "head", "head_", "body", "paragraph" );
- assertEquals( it.next(), "text", "Table containing image in cell:" );
- assertStartsWith( it, "paragraph_", "table", "tableRows", "tableRow", "tableHeaderCell", "bold" );
- assertEquals( it.next(), "text", "Header 1" );
- assertStartsWith( it, "bold_", "tableHeaderCell_", "tableRow_", "tableRow", "tableCell", "figure" );
- assertEquals( it.next(), "figureGraphics", "images/test/Image.png" );
- assertEquals( it, "figure_", "tableCell_", "tableRow_", "tableRows_", "table_", "body_" );
- }
-
- public void testParagraphWithList()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "paragraph-list" );
-
- assertContainsLines( result, "begin:paragraph\ntext: A paragraph\nend:paragraph\n" );
- assertContainsLines( result, "begin:listItem\ntext: A nested list item\nend:listItem\n" );
- assertContainsLines( result, "begin:listItem\ntext: Another nested list item with two lines\nend:listItem\n" );
- // 2 paragraphs in the input...
- assertEquals( 3, result.split( "end:paragraph\n" ).length );
- // 1 list in the input...
- assertEquals( 2, result.split( "end:list\n" ).length );
- }
-
- public void testParagraphWithFigure()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "paragraph-figure" );
-
- assertContainsLines( result, "begin:paragraph\ntext: A paragraph\nend:paragraph\n" );
- assertContainsLines( result, "begin:figure\nfigureGraphics, name: images/logo.png\nbegin:figureCaption\ntext: with a figure\nend:figureCaption" );
- // 2 paragraphs in the input...
- assertEquals( 3, result.split( "end:paragraph\n" ).length );
- // 1 figure in the input...
- assertEquals( 2, result.split( "end:figure\n" ).length );
- }
-
- public void testParagraphWithHeader()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "paragraph-header" );
-
- assertContainsLines( result, "begin:paragraph\ntext: A paragraph\nend:paragraph\n" );
- assertContainsLines( result, "begin:section2\nbegin:sectionTitle2\ntext: A header\nend:sectionTitle2" );
- // 3 paragraphs in the input...
- assertEquals( 4, result.split( "end:paragraph\n" ).length );
- // 1 header in the input...
- assertEquals( 2, result.split( "end:sectionTitle2\n" ).length );
- }
-
- public void testNestedFormats()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "nested-format" );
-
- assertContainsLines( result, "begin:bold\nbegin:italic\ntext: bold italic\nend:italic" );
- assertContainsLines( result, "begin:italic\nbegin:bold\ntext: italic bold\nend:bold" );
- assertContainsLines( result, "begin:bold\nbegin:monospaced\ntext: bold monospaced\nend:monospaced" );
- assertContainsLines( result, "text: A paragraph with \nbegin:bold\ntext: bold \nbegin:italic\ntext: italic\nend:italic" );
- assertContainsLines( result, "begin:italic\ntext: italic \nbegin:bold\ntext: bold\nend:bold" );
- assertContainsLines( result, "begin:bold\ntext: bold \nbegin:monospaced\ntext: monospaced\nend:monospaced" );
- assertContainsLines( result, "begin:monospaced\ntext: monospaced-with-dashes\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced_with_underscores\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced*with*stars\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced+with+plus\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced~with~tilde\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced^with^circumflex^accent\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced[with]brackets\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced{with}curly{brackets\nend:monospaced");
- assertContainsLines( result, "begin:monospaced\ntext: monospaced\\\\\\with\\\\backslashes\nend:monospaced");
-
- // 3 paragraphs in the input...
- assertEquals( 4, result.split( "end:paragraph\n" ).length );
- // 6 bolds in the input...
- assertEquals( 7, result.split( "end:bold\n" ).length );
- // 4 italics in the input...
- assertEquals( 5, result.split( "end:italic\n" ).length );
- // 11 monospaced in the input...
- assertEquals( 12, result.split( "end:monospaced\n" ).length );
- }
-
- public void testNoteInfoTipQuote()
- throws Exception
- {
- String result = locateAndParseTestSourceFile( "note-tip-info" );
-
- assertContainsLines( result, "begin:definedTerm\ntext: Be Careful\nend:definedTerm\n" );
- assertContainsLines( result, "begin:definition\ntext: The body of the note here..\nend:definition" );
- assertContainsLines( result, "begin:definedTerm\ntext: Guess What?\nend:definedTerm\n" );
- assertContainsLines( result, "begin:definition\ntext: The body of the tip here..\nend:definition" );
- assertContainsLines( result, "begin:definedTerm\ntext: Some Info\nend:definedTerm\n" );
- assertContainsLines( result, "begin:definition\ntext: The body of the info here..\nend:definition" );
- assertContainsLines( result, "begin:definedTerm\ntext: Simon Says\nend:definedTerm\n" );
- assertContainsLines( result, "begin:definition\ntext: The body of the \nbegin:bold\ntext: quote\nend:bold" );
-
- // 5 paragraphs in the input...
- assertEquals( 6, result.split( "end:paragraph\n" ).length );
- // 4 dinitionList in the input...
- assertEquals( 5, result.split( "end:definitionList\n" ).length );
- }
-
- /**
- * DOXIA-247
- *
- * @throws ParseException if something goes wrong.
- */
- public void testEndBracket()
- throws ParseException
- {
- String document = "Test"
- + "\n\n* list1"
- + "\n\n* list2"
- + "\n\n* list2"
- + "\n{pre}123{/pre}";
-
- output = new StringWriter();
- Sink sink = new TextSink( output );
-
- /* parsing with additional space at end works */
- createParser().parse( new StringReader( document + " " ), sink );
- assertTrue( "generated document should have a size > 0", output.toString().length() > 0 );
-
- /* parsing with document ending in } should not fail */
- try
- {
- createParser().parse( new StringReader( document ), sink );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- fail( "parsing with document ending in } should not fail" );
- }
-
- assertTrue( "generated document should have a size > 0", output.toString().length() > 0 );
- }
-
- /**
- * DOXIA-247
- */
- public void testEndBracketInList()
- throws ParseException
- {
- String document1 = "Test"
- + "\n\n* list1"
- + "\n\n* list2"
- + "\n\n* list2{pre}123{/pre} "
- + "\n123";
-
- String document2 = "Test"
- + "\n\n* list1"
- + "\n\n* list2"
- + "\n\n* list2{pre}123{/pre}"
- + "\n123";
-
- output = new StringWriter();
- Sink sink = new TextSink( output );
-
- /* parsing with additional space at end of list item works */
- createParser().parse( new StringReader( document1 ), sink );
- assertTrue( "generated document should have a size > 0", output.toString().length() > 0 );
-
- /* parsing with end of list item ending in } should not fail */
- try
- {
- createParser().parse( new StringReader( document2 ), sink );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- fail( "parsing with end of list item ending in } should not fail" );
- }
-
- assertTrue( "generated document should have a size > 0", output.toString().length() > 0 );
- }
-
- public void testDoxia382SinkCannotBeReused()
- throws ParseException
- {
- String document1 = "Test A"
- + "\n\n* list1"
- + "\n\n* list2"
- + "\n\n* list2{pre}123{/pre} "
- + "\n123";
-
- String document2 = "Test B"
- + "\n\n* list1"
- + "\n\n* list2"
- + "\n\n* list2{pre}123{/pre}"
- + "\n123";
-
- output = new StringWriter();
- Sink sink = new TextSink( new FilterWriter( output )
- {
- public void close() throws IOException
- {
- super.close();
- this.out = null;
- }
-
- public void write( String str, int off, int len )
- throws IOException
- {
- if ( out == null )
- {
- throw new IOException( "Writing to an already closed Writer" );
- }
- }
- });
-
- createParser().parse( new StringReader( document1 ), sink );
- createParser().parse( new StringReader( document2 ), sink );
- }
-
-
- /**
- * DOXIA-370
- */
- public void testSeparatorInParagraph()
- throws ParseException
- {
- String document = "Up\n---\nDown\n";
-
- output = new StringWriter();
- Sink sink = new TextSink( output );
-
- /* parsing with separator in middle of paragraph */
- createParser().parse( new StringReader( document ), sink );
- assertTrue( "generated document should have a size > 0", output.toString().length() > 0 );
- }
-
- public void testListFollowedByMacro() throws Exception
- {
- // @todo FIX
- // DOXIA-371
- String document = "- This is a little test. \r\n" +
- "\r\n" + // with extra linebreak it succeeds, without it should too
- "{code}\r\n" +
- " @Autowired\r\n" +
- " private DataSource dataSource;\r\n" +
- "{code}\r\n";
- output = new StringWriter();
- SinkEventTestingSink sink = new SinkEventTestingSink();
- createParser().parse( new StringReader( document ), sink );
-
- Iterator<SinkEventElement> it = sink.getEventList().iterator();
- assertEquals("head", it.next().getName() );
- assertEquals("head_", it.next().getName() );
- assertEquals("body", it.next().getName() );
- assertEquals("list", it.next().getName() );
- assertEquals("listItem", it.next().getName() );
- assertEquals( it.next(), "text", "This is a little test." );
- assertEquals("listItem_", it.next().getName() );
- assertEquals("list_", it.next().getName() );
- assertEquals("verbatim", it.next().getName() );
- assertEquals( it.next(), "text", " @Autowired\n private DataSource dataSource;\n" );
- assertEquals("verbatim_", it.next().getName() );
- assertEquals("body_", it.next().getName() );
- }
-
- public void testLinethrough() throws Exception {
- String document = "-Linethrough-";
- output = new StringWriter();
- SinkEventTestingSink sink = new SinkEventTestingSink();
- createParser().parse(new StringReader(document), sink);
-
- Iterator<SinkEventElement> it = sink.getEventList().iterator();
- assertStartsWith(it, "head", "head_", "body", "paragraph");
- assertEquals(it.next(), "text", "Linethrough",
- new SinkEventAttributeSet("decoration", "line-through"));
- assertEquals(it, "paragraph_", "body_");
- }
-
- public void testUnderline() throws Exception {
- String document = "+Underline+";
- output = new StringWriter();
- SinkEventTestingSink sink = new SinkEventTestingSink();
- createParser().parse(new StringReader(document), sink);
-
- Iterator<SinkEventElement> it = sink.getEventList().iterator();
- assertStartsWith(it, "head", "head_", "body", "paragraph");
- assertEquals(it.next(), "text", "Underline", new SinkEventAttributeSet(
- "decoration", "underline"));
- assertEquals(it, "paragraph_", "body_");
- }
-
- public void testSub() throws Exception {
- String document = "~Sub~";
- output = new StringWriter();
- SinkEventTestingSink sink = new SinkEventTestingSink();
- createParser().parse(new StringReader(document), sink);
-
- Iterator<SinkEventElement> it = sink.getEventList().iterator();
- assertStartsWith(it, "head", "head_", "body", "paragraph");
- assertEquals(it.next(), "text", "Sub", new SinkEventAttributeSet(
- "valign", "sub"));
- assertEquals(it, "paragraph_", "body_");
- }
-
- public void testSup() throws Exception {
- String document = "^Sup^";
- output = new StringWriter();
- SinkEventTestingSink sink = new SinkEventTestingSink();
- createParser().parse(new StringReader(document), sink);
-
- Iterator<SinkEventElement> it = sink.getEventList().iterator();
- assertStartsWith(it, "head", "head_", "body", "paragraph");
- assertEquals(it.next(), "text", "Sup", new SinkEventAttributeSet(
- "valign", "sup"));
- assertEquals(it, "paragraph_", "body_");
- }
-
- private void assertContainsLines( String message, String result, String lines )
- {
- lines = StringUtils.replace( lines, "\n", EOL );
- if ( message != null )
- {
- assertTrue( message, result.contains( lines ) );
- }
- else
- {
- assertTrue( result.contains( lines ) );
- }
- }
-
- private void assertContainsLines( String result, String lines )
- {
- this.assertContainsLines( null, result, lines );
- }
-
- private String getLineBreakString()
- {
- StringWriter sw = new StringWriter();
- Sink sink = new TextSink( sw );
- sink.lineBreak();
-
- return sw.toString();
- }
-
- private String locateAndParseTestSourceFile( String stem )
- throws IOException, ParseException
- {
- output = new StringWriter();
- reader = getTestReader( stem, outputExtension() );
- writer = getTestWriter( stem, "txt" );
-
- Sink sink = new TextSink( output );
- createParser().parse( reader, sink );
-
- // write to file
- String expected = output.toString();
- writer.write( expected );
- writer.flush();
- return expected;
- }
-
-}
diff --git a/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkTest.java b/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkTest.java
deleted file mode 100644
index 4231f9b..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkTest.java
+++ /dev/null
@@ -1,428 +0,0 @@
-package org.apache.maven.doxia.module.confluence;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.Writer;
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.impl.AbstractSinkTest;
-import org.apache.maven.doxia.util.HtmlTools;
-
-/**
- * Test the Confluence Sink
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @see ConfluenceSink
- */
-public class ConfluenceSinkTest
- extends AbstractSinkTest
-{
- /** {@inheritDoc} */
- protected Sink createSink( Writer writer )
- {
- return new ConfluenceSink( writer );
- }
-
- /** {@inheritDoc} */
- protected String getAnchorBlock( String anchor )
- {
- return ConfluenceMarkup.ANCHOR_START_MARKUP + anchor + ConfluenceMarkup.ANCHOR_END_MARKUP + anchor;
- }
-
- /** {@inheritDoc} */
- protected boolean isXmlSink()
- {
- return false;
- }
-
- /** {@inheritDoc} */
- protected String getAddressBlock( String text )
- {
- return text;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getArticleBlock()
- {
- return "";
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getAuthorBlock( String author )
- {
- return null;
- }
-
- /** {@inheritDoc} */
- protected String getBlockquoteBlock( String text )
- {
- return text;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getBodyBlock()
- {
- return null;
- }
-
- /** {@inheritDoc} */
- protected String getBoldBlock( String text )
- {
- return ConfluenceMarkup.BOLD_START_MARKUP + text + ConfluenceMarkup.BOLD_END_MARKUP;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getDataBlock( String value, String text )
- {
- return text;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getDateBlock( String date )
- {
- return null;
- }
-
- /** {@inheritDoc} */
- protected String getDefinitionListBlock( String definum, String definition )
- {
- return definum + EOL + ConfluenceMarkup.CITATION_START_MARKUP + definition + ConfluenceMarkup.CITATION_END_MARKUP + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getDivisionBlock( String text )
- {
- return text;
- }
-
- /** {@inheritDoc} */
- protected String getFigureBlock( String source, String caption )
- {
- String figureBlock = EOL + ConfluenceMarkup.FIGURE_START_MARKUP + source + ConfluenceMarkup.FIGURE_END_MARKUP;
- if ( caption != null )
- {
- figureBlock += caption;
- }
- return figureBlock;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getHeadBlock()
- {
- return null;
- }
-
- /** {@inheritDoc} */
- protected String getHorizontalRuleBlock()
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getInlineBlock( String text )
- {
- return text;
- }
-
- /** {@inheritDoc} */
- protected String getInlineBoldBlock( String text )
- {
- return ConfluenceMarkup.BOLD_START_MARKUP + text + ConfluenceMarkup.BOLD_END_MARKUP;
- }
-
- /** {@inheritDoc} */
- protected String getInlineCodeBlock( String text )
- {
- return ConfluenceMarkup.MONOSPACED_START_MARKUP + text + ConfluenceMarkup.MONOSPACED_END_MARKUP;
- }
-
- /** {@inheritDoc} */
- protected String getInlineItalicBlock( String text )
- {
- return ConfluenceMarkup.ITALIC_START_MARKUP + text + ConfluenceMarkup.ITALIC_END_MARKUP;
- }
-
- /** {@inheritDoc} */
- protected String getItalicBlock( String text )
- {
- return ConfluenceMarkup.ITALIC_START_MARKUP + text + ConfluenceMarkup.ITALIC_END_MARKUP;
- }
-
- /** {@inheritDoc} */
- protected String getLineBreakBlock()
- {
- return ConfluenceMarkup.LINE_BREAK_MARKUP + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getLineBreakOpportunityBlock()
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getLinkBlock( String link, String text )
- {
- return ConfluenceMarkup.LINK_START_MARKUP + text + ConfluenceMarkup.LINK_MIDDLE_MARKUP + link
- + ConfluenceMarkup.LINK_END_MARKUP;
- }
-
- /** {@inheritDoc} */
- protected String getListBlock( String item )
- {
- return ConfluenceMarkup.LIST_ITEM_MARKUP + item + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getMonospacedBlock( String text )
- {
- return ConfluenceMarkup.MONOSPACED_START_MARKUP + text + ConfluenceMarkup.MONOSPACED_END_MARKUP;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getNavigationBlock()
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getNonBreakingSpaceBlock()
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getNumberedListBlock( String item )
- {
- return ConfluenceMarkup.NUMBERING_MARKUP + " " + item + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getPageBreakBlock()
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getParagraphBlock( String text )
- {
- return text + EOL + EOL;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getSidebarBlock()
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getTimeBlock( String datetime, String text )
- {
- return text;
- }
-
- /** {@inheritDoc} */
- protected String getRawTextBlock( String text )
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getSection1Block( String title )
- {
- return "h1. " + title + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getSection2Block( String title )
- {
- return "h2. " + title + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getSection3Block( String title )
- {
- return "h3. " + title + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getSection4Block( String title )
- {
- return "h4. " + title + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getSection5Block( String title )
- {
- return "h5. " + title + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getSectionTitleBlock( String title )
- {
- return title;
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getHeaderBlock()
- {
- return "";
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getContentBlock()
- {
- return "";
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getFooterBlock()
- {
- return "";
- }
-
- /** {@inheritDoc} */
- protected String getTableBlock( String cell, String caption )
- {
- return "| " + cell + " |" + EOL + "Table_caption" + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String getTextBlock( String text )
- {
- return HtmlTools.escapeHTML( text );
- }
-
- /** Not used.
- * {@inheritDoc} */
- protected String getTitleBlock( String title )
- {
- return null;
- }
-
- /** {@inheritDoc} */
- protected String getVerbatimBlock( String text )
- {
- return "{code:borderStyle=solid}" + EOL + text + "{code}" + EOL + EOL;
- }
-
- /** {@inheritDoc} */
- protected String outputExtension()
- {
- return "twiki";
- }
-
- // ----------------------------------------------------------------------
- // Confluence specific
- // ----------------------------------------------------------------------
-
- public void testSuperScript()
- {
- verifyValignSup( "^ValignSup^" );
- }
-
- public void testSubScript()
- {
- verifyValignSub( "~ValignSub~" );
- }
-
- public void testStrikeStrough()
- {
- verifyDecorationLineThrough( "-DecorationLineThrough-" );
- }
-
- public void testUnderline()
- {
- verifyDecorationUnderline( "+DecorationUnderline+" );
- }
-
- // ----------------------------------------------------------------------
- // Override unused tests
- // ----------------------------------------------------------------------
-
- /** Not used.
- * {@inheritDoc} */
- public void testAuthor()
- {
- // nop
- }
-
- /** Not used.
- * {@inheritDoc} */
- public void testDate()
- {
- // nop
- }
-
- /** Not used.
- * {@inheritDoc} */
- public void testHead()
- {
- // nop
- }
-
- /** Not used.
- * {@inheritDoc} */
- public void testBody()
- {
- // nop
- }
-
- /** Not used.
- * {@inheritDoc} */
- public void testTitle()
- {
- // nop
- }
-
- /** Not used.
- * {@inheritDoc} */
- public void testDefinitionList()
- {
- // nop
- }
-
- /** {@inheritDoc} */
- protected String getCommentBlock( String text )
- {
- return "";
- }
-
- public void testEscapeConfluenceNull()
- {
- assertEquals( "Wrong Confluence escape!", "", ConfluenceSink.escapeConfluence( null ) );
- }
-
- public void testEscapeConfluenceCurlies()
- {
- assertEquals( "Wrong Confluence escape!", "$\\{finalName\\}", ConfluenceSink.escapeConfluence( "${finalName}" ) );
- }
-}
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/anchor.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/anchor.confluence
deleted file mode 100644
index 425dcba..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/anchor.confluence
+++ /dev/null
@@ -1,7 +0,0 @@
-h1. Section Title
-
-{anchor:start}Simple paragraph.
-
-Simple paragraph{anchor:end}
-
-Simple {anchor:middle} paragraph.
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/code.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/code.confluence
deleted file mode 100644
index d4f73d5..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/code.confluence
+++ /dev/null
@@ -1,21 +0,0 @@
-Simple paragraph.
-
-{code:title=Cat.java}
-public class Cat {
- public void sitOn(Mat mat) {
- // ... code here <angle brackets>
- }
-}
-{code}
-
-Another paragraph (the title of the code block is ignored).
-
-Simple paragraph with embedded code
-{code}
-public class Cat {
- public void sitOn(Mat mat) {
- // ... code here <angle brackets>
- }
-}
-{code}
-in the same paragraph (this didn't work until DOXIA-181). See also DOXIA-302.
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/escapes.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/escapes.confluence
deleted file mode 100644
index 5f6e8fc..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/escapes.confluence
+++ /dev/null
@@ -1,7 +0,0 @@
-Simple paragraph with asterisk \* and underline \_.
-
-Simple paragraph with asterisk \*not bold\* and underline \_not italic\_.
-
-Simple paragraph with normal \character escaped.
-
-With trailing slash\
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/figure.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/figure.confluence
deleted file mode 100644
index cb44247..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/figure.confluence
+++ /dev/null
@@ -1,18 +0,0 @@
-Simple paragraph.
-
-!images/photo.jpg!
-
-Simple paragraph with attempted inline !image.jpg! (should fail).
-
-!images/photo.jpg! With caption on same line
-
-!images/linebreak.jpg!\\
-With caption underneath and linebreak
-
-!images/nolinebreak.jpg!
-With caption underneath and no linebreak
-
-!images/bold.jpg!
-With *bold* caption underneath
-
-!image.gif|align=right, vspace=4!
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/linebreak.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/linebreak.confluence
deleted file mode 100644
index d076a6d..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/linebreak.confluence
+++ /dev/null
@@ -1,5 +0,0 @@
-Line\\
-break.
-
-Line\\with 2\\inline\\
-Breaks.
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/link.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/link.confluence
deleted file mode 100644
index df32050..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/link.confluence
+++ /dev/null
@@ -1,9 +0,0 @@
-Line with [middle] link
-
-Line with link at the [end]
-
-Line with [link#anchor] and [#simple] anchor and [alias|link]
-
-Line with [^resource.pdf] file and with [alias pdf|^resource.pdf]
-
-Line with [underscore_-dash|http://link.to/page_with_underscore-and-dash]
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/nested-format.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/nested-format.confluence
deleted file mode 100644
index fb04f6d..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/nested-format.confluence
+++ /dev/null
@@ -1,8 +0,0 @@
-
-A paragraph with *_bold italic_* _*italic bold*_ *{{bold monospaced}}*
-
-A paragraph with *bold _italic_* _italic *bold*_ *bold {{monospaced}}*
-
-A paragraph with {{monospaced-with-dashes}} {{monospaced_with_underscores}} {{monospaced*with*stars}} {{monospaced+with+plus}} {{monospaced~with~tilde}} {{monospaced^with^circumflex^accent}} {{monospaced[with]brackets}} {{monospaced{with}curly{brackets}} {{monospaced\\\with\\backslashes}}
-
-
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/nested-list-heterogenous.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/nested-list-heterogenous.confluence
deleted file mode 100644
index 3788418..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/nested-list-heterogenous.confluence
+++ /dev/null
@@ -1,4 +0,0 @@
-* A top level list item
-*# A nested list item
-*# Another nested list item
-* Back at the top level
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/nested-list.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/nested-list.confluence
deleted file mode 100644
index 2a4e719..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/nested-list.confluence
+++ /dev/null
@@ -1,8 +0,0 @@
-
-A paragraph
-
-* A top level list item
-** A nested list item
-** Another nested list item
-* Back at the top level
-
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/note-tip-info.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/note-tip-info.confluence
deleted file mode 100644
index 75e83a8..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/note-tip-info.confluence
+++ /dev/null
@@ -1,27 +0,0 @@
-Simple paragraph.
-
-{note:title=Be Careful}
-The body of the note here..
-{note}
-
-Tip
-
-{tip:title=Guess What?}
-The body of the tip here..
-{tip}
-
-Info
-
-{info:title=Some
-Info}
-The body of the info here..
-{info}
-
-Quote
-
-{quote:title=Simon Says}
-The body of the *quote* here..
-{quote}
-
-(In all cases there is no way to reverse the Doxia output
-back to confluence because they are all rendered as a defitionList.)
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-figure.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-figure.confluence
deleted file mode 100644
index 6d3b027..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-figure.confluence
+++ /dev/null
@@ -1,6 +0,0 @@
-
-A paragraph
-!images/logo.png!
-with a figure
-
-Another paragraph
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-header.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-header.confluence
deleted file mode 100644
index 5467b0b..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-header.confluence
+++ /dev/null
@@ -1,6 +0,0 @@
-
-A paragraph
-h2. A header
-with a header
-
-Another paragraph
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-list.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-list.confluence
deleted file mode 100644
index df0d9f8..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-list.confluence
+++ /dev/null
@@ -1,8 +0,0 @@
-
-A paragraph
-* A nested list item
-* Another nested list item
-with two lines
-
-Back at the top level
-
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/section.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/section.confluence
deleted file mode 100644
index d28fe4c..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/section.confluence
+++ /dev/null
@@ -1,9 +0,0 @@
-h1. Section1
-
-h2. Section2
-h3. Section3
-
-h4. Section4
-h5. Section5
-
-h1. TitleWithLeadingSpace
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/simple-list.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/simple-list.confluence
deleted file mode 100644
index fd18fe0..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/simple-list.confluence
+++ /dev/null
@@ -1,15 +0,0 @@
-* Simple paragraph with *bold* and _italic_ text.
-* Here is a link to [JIRA|http://jira.codehaus.org]
-* Here is a link with no text [http://jira.codehaus.org]
-* This is some {{monospaced}} text.
-* Item with no formatting
-* This is {{some escaped monospaced \\unc\path}}.
-
-Paragraph
-
-* One bullet
-
-* A list item with
-more than one line
-
-*bold text, not a list!*
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/simple-paragraph.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/simple-paragraph.confluence
deleted file mode 100644
index 00d15f2..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/simple-paragraph.confluence
+++ /dev/null
@@ -1,8 +0,0 @@
-Simple paragraph with *bold* and _italic_ text.
-
-Here is a link to [JIRA|http://jira.codehaus.org]
-
-Here is a link with no text [http://jira.codehaus.org]
-
-This is some {{monospaced}} text.
-
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/table-link.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/table-link.confluence
deleted file mode 100644
index cdab3a2..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/table-link.confluence
+++ /dev/null
@@ -1,4 +0,0 @@
-|| Version || Download || Format ||
-|0.1.1 |[Download|http://example.com/release.0.1.1/ex-win32-win32.x86.zip]| 12-12-2008 | zip |
-|0.1.2 |[http://example.com/release.0.1.2/ex-win32-win32.x86.zip]| 04-12-2008 | zip |
-|0.1.3 |[Download|http://example.com/release.0.1.3/ex-win32-win32.x86.zip]| 03-11-2008 | zip |
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/table.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/table.confluence
deleted file mode 100644
index c6fe22c..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/table.confluence
+++ /dev/null
@@ -1,28 +0,0 @@
-
-Simple table:
-
-||heading 1||heading 2||heading 3||
-|col A1|col A2|col A3|
-|col B1|col B2|col B3|
-
-Table with links (DOXIA-301):
-
-|| Version || Download || Date || Format ||
-|0.1.1 | [Download|http://example.com/release.0.1.1/ex-win32-win32.x86.zip] | 12-12-2008 | zip |
-|0.1.2 | [Download|http://example.com/release.0.1.2/ex-win32-win32.x86.zip] | 04-12-2008 | zip |
-|0.1.3 | [Download|http://example.com/release.0.1.3/ex-win32-win32.x86.zip] | 03-11-2008 | zip |
-
-Here is a 3 column table with headers, one row, and data in every column:
-
-||One||Two||Three||
-|1|2|3|
-
-Now there is no data in column Two
-
-||One||Two||Three||
-|1||3|
-
-Now there is a space in column Two
-
-||One||Two||Three||
-|1| |3|
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/test.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/test.confluence
deleted file mode 100644
index 3d5daea..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/test.confluence
+++ /dev/null
@@ -1,98 +0,0 @@
-This the way that we would like to *translate* sites that are primarily
-authored in confluence while at the same time having the site be rendered in
-a _standard way on a static website_.
-
-----
-
-Here is a link to [JIRA|http://jira.codehaus.org]
-
-Here is a link with no text [http://jira.codehaus.org]
-
-This is some {{monospaced}} text.
-
-* item one
-** foo
-** bar
-* item two
-* item three
-
-Some more text
-
-# number one
-# number two
-# number three
-
-||one||two||three||
-|foo|bar|baz|
-
-h1. I am h1
-
-this is how you would code a mojo!
-
-{code}
-public class MyMojo
- extends AbstractMojo
-{
- /**
- * @parameter expression="${plugin.artifacts}"
- * @required
- */
- private List pluginArtifacts;
-
- public void execute()
- throws MojoExecutionException
- {
- ...
- for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
- {
- Artifact pluginArtifact = (Artifact) i.next();
- }
- ...
- }
-}
-{code}
-
-h2. I am h2
-
-this is the way of the world
-
-{noformat}
-public class MyMojo
- extends AbstractMojo
-{
- /**
- * @parameter expression="${plugin.artifacts}"
- * @required
- */
- private List pluginArtifacts;
-
- public void execute()
- throws MojoExecutionException
- {
- ...
- for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
- {
- Artifact pluginArtifact = (Artifact) i.next();
- }
- ...
- }
-}
-{noformat}
-
-h3. I am h3
-
-this is the way of the world
-
-h4. I am h4
-
-this is the way of the world
-
-h5. I am h5
-
-this is the way of the world
-
-h1. Answered Questions
-
-h3. What can I do to get the Maven love?
-
-Well, you just have to be calm and the maven love will come your way.
diff --git a/doxia-modules/doxia-module-confluence/src/test/resources/unknown-macro.confluence b/doxia-modules/doxia-module-confluence/src/test/resources/unknown-macro.confluence
deleted file mode 100644
index 3b84a0c..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/resources/unknown-macro.confluence
+++ /dev/null
@@ -1,5 +0,0 @@
-{unknown:start}Simple paragraph.
-
-Simple paragraph{unknown:end}.
-
-Simple {unknown:middle} paragraph.
diff --git a/doxia-modules/doxia-module-confluence/src/test/site/confluence/faq.confluence b/doxia-modules/doxia-module-confluence/src/test/site/confluence/faq.confluence
deleted file mode 100644
index 4f426ef..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/site/confluence/faq.confluence
+++ /dev/null
@@ -1,228 +0,0 @@
-*NOTE:* _This page contains drafts of user contributed FAQ entries. The content you see here might not be fully fool-proof or might not comply with the best practices promoted by Maven. What is only guaranteed is that they have worked once for some members. It is best to treat these items as "works in progress" until they have been reviewed and promoted to the main Maven documentation site._
-
-Users may also list questions here that they would like answered. So this page can serve as a collection of questions that users would like answered. Please put unanswered questions at the bottom. Please follow the format that is being used because it will help in our automated exaction of material which can then be incorporated into the main site.
-
-h1. Answered Questions
-
-h3. Why am I getting a "<plugin name> does not exist or no valid version" error?
-
-This means that Maven is unable to access the required plugin from your local repository, and unable to access the official or 'central' Maven2 plugin repository.
-
-You may troubleshoot the problem by performing the following actions:
-# If you are behind a http proxy, please check the Maven2 [proxy settings guide|http://maven.apache.org/guides/mini/guide-proxies.html].
-# If the plugin you seek cannot be redistributed freely then you may [add it manually to your repository|http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html].
-
-If the problem still persists you may seek help from the Maven user list, browse [archived discussions|http://www.mail-archive.com/users@maven.apache.org/], or log a [ticket|http://jira.codehaus.org/browse/MNG] describing your problem if you think you have found a bug. Tickets could also be issued for feature enhancement requests, and other tasks.
-
-h3. How do I install a file in my local repository along with a generic Pom?
-
-This solution requires at least 2.0.1-SNAPSHOT or above version of Maven 2. You may do this by typing this command (please take note that this is a single line only).
-
-{code}
-mvn install:install-file
- -DgroupId=<group-id>
- -DartifactId=<artifact-id>
- -Dversion=<version>
- -Dfile=<path-to-file>
- -Dpackaging=<packaging> (i.e. jar)
- -DgeneratePom=true
-{code}
-
-This command installs the jar in your local repository with the generated generic pom.
-
-h3. How do I install a file in my local repository along with my customed Pom?
-
-The solution requires at least 2.0.1-SNAPSHOT or above version of Maven 2 and add the -DpomFile=<path-to-pom> parameter just like the sample below.
-
-{code}
-mvn install:install-file
- -DgroupId=<group-id>
- -DartifactId=<artifact-id>
- -Dversion=<version>
- -Dfile=<path-to-file>
- -Dpackaging=<packaging> (i.e. jar)
- -DpomFile=<path-to-pom>
-{code}
-
-This command will install the file in your local repository along with your customed pom.
-
-h3. Are there any ways of including/excluding the other modules in the navigation menu in the parent site?
-
-[http://jira.codehaus.org/browse/MNG-661], provides a simple patch which provides parent and module links using the project URLs which as you
-correctly point out only work when the site is deployed.
-
-h3. Where is the ______ plugin?
-
-If you cannot find a certain plugin, you may want to take a look on the following sites.
-
-# http://mojo.codehaus.org
-# https://svn.codehaus.org/mojo/trunk/mojo
-# https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox
-
-h3. Why are there no pre/post goals in Maven 2.x?
-
-In Maven 1.x, pre/postGoals were used to inject custom behavior to the build process. This caused a problem, since declaring your code to be a preGoal of some other goal meant that you depended on that specific goal, rather than the work it did. It also caused confusion when trying to inject other behavior into a build that already had pre/postGoals attached: Where would the new behavior be injected?.
-
-Pre- and post-goals in Maven 1.x were usually used to develop the concept of a workflow, or lifecycle, for the build, where *x* happened before *y*, which had to happen before the sources could be compiled. In Maven 2, we've incorporated this concept of a build lifecycle natively. The steps - or phases - in this lifecycle correspond to the types of actions that might occur in a build. Your plugin can declare which type of action it performs - or which phase it should bind to - and that w [...]
-
-For more information, see:
-
-* [Introduction to the Build Lifecycle|http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html]
-
-h3. How does Maven compare with Ivy?
-
-For a comparison of Maven's features vs Ivy's you can refer to our [feature comparison|http://docs.codehaus.org/display/MAVEN/Feature+Comparisons]
-
-h3. How do I get the dependencies of a plug-in from within a Mojo?
-
-{code}
-public class MyMojo
- extends AbstractMojo
-{
- /**
- * @parameter expression="${plugin.artifacts}"
- * @required
- */
- private List pluginArtifacts;
-
- public void execute()
- throws MojoExecutionException
- {
- ...
- for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
- {
- Artifact pluginArtifact = (Artifact) i.next();
- }
- ...
- }
-}
-{code}
-
-h3. How do I get the sources for a project within a Mojo?
-
-{code}
-public class MyMojo
- extends AbstractMojo
-{
- /**
- * @parameter expression="${project.compileSourceRoots}"
- * @required
- */
- private List sourceRoots;
-
- public void execute()
- throws MojoExecutionException
- {
- ...
- for ( Iterator i = sourceRoots.iterator(); i.hasNext(); )
- {
- String sourceRoot = (String) i.next();
-
- // Do what you want with these directories
- }
- }
-}
-{code}
-
-h3. How do I use SNAPSHOT versions of plug-ins?
-
-The POM is meant to be current state, not history. We actually only record the versions in the repository, and if the SCM tag is populated in the <scm> section of the POM for each released version you can reconstruct the information.
-
-There were other issues with putting history in the POM: forgetting to add it, getting the right level of information when you work on multiple branches, and similar things.
-
-h3. How do I create a report that does not require using Doxia's Sink interface?
-
-Make it a report and override the isExternalReport() method to return true. Then you don't need to use the Sink at all.
-
-h3. Is it possible to prevent warnings from a custom repository?
-
-Warnings from custom repositories (usually located within the organization's network, or even on the same workstation) are triggered when Maven tries to verify the integrity of the files in the repository. This verification is done via the SHA1 or MD5 sum of the file. If these sum files do not exist then a warning is shown.
-
-Support for downloading the the security sum files is not yet included in the Maven2 distribution. There are free command-line utilities on the Internet that generate these sums. Below is an example of a bash script (use [Cygwin|http://cygwin.com] if you are using a windows machine) that generates sha1sum for all jar, xml and pom files contained in the directory where it is executed:
-
-{code}
-#!/usr/bin/bash
-
-gensum(){
- shaname=$1.sha1
-
- sum=`sha1sum $1 | cut -f1 -d" "`
- echo $sum > $shaname
-}
-
-processFile(){
- while read oneline
- do
- gensum $oneline
-
- done < "$1"
-}
-
-tmpFile=$TMP/shagen.list
-
-echo "Generating sha1 sums for XML files"
-find . -name "*.xml" > "$tmpFile"
-
-processFile "$tmpFile"
-
-echo "Generating sha1 sums for POM files"
-find . -name "*.pom" > "$tmpFile"
-
-processFile "$tmpFile"
-
-echo "Generating sha1 sums for JAR files"
-find . -name "*.jar" > "$tmpFile"
-
-processFile "$tmpFile"
-
-rm "$tmpFile"
-{code}
-
-The script above has been tested on [Cygwin|http://cygwin.com] and is provided as is and with no guarantee.
-
-h3. Why am I getting the following error when I run the <plugin_name>: "ERROR: Cannot override read-only parameter: <parameter_name>"?
-
-This means that the parameter you are overriding in your pom.xml is readonly. Hence, it is not possible to override this parameter.
-
-h3. The sites of the plugins of Maven have a page with an overview of the goals and the parameters of the plugin. How is this generated?
-
-Include maven-plugin-plugin as a report.
-
-h3. how can I define the antrun plugin to be executed on demand like "mvn antrun:run"?
-
-This isn't actually possible with the plugin, unless perhaps you do this:
-- put everything in a top level configuration of the plugin
-- pass in a variable from the command line, eg -Dtarget=foo antrun:run
-- execute the appropriate target in the script based on the variable
-
-Ideally, you would write a plugin for these goals (Ant support for
-plugins will be available soon, currently you must write them in java
-or beanshell).
-
-h3. When I extend a mojo from another plugin, it's variables are not properly populated. Why?
-
-The field metadata when creating plugins is read from source files, so is not available when the original source is not. The metadata is available in the plugin in {{META-INF/maven/plugin.xml}}, but at this point there is no way to incorporate it when building a new plugin.
-
-We currently recommend building your plugins using composition instead of inheritence.
-
-h1. Unanswered Questions
-
-h3. Where can I find a listing of the available variable references that could be use during site generation?
-
-h3. How do I generate sources with the antrun plug-in?
-
-h3. Can I disable transitive dependencies?
-
-h3. How do I run a shell script from inside a Mojo?
-
-h3. Are resources inherited in the POM?
-
-h3. Why is there no <versions/> element in the v4.0.0 POMs?
-
-h3. How do I find the stale resources in a Mojo to avoid reprocessing them?
-
-h3. Will the release plug-in resolve all my SNAPSHOT dependencies?
-
-h3. How do I integrate static (x)html into my Maven site?
-
-h3. Where did the properties files go for plug-in configuration in Maven 1.x?
diff --git a/doxia-modules/doxia-module-confluence/src/test/site/confluence/page.confluence b/doxia-modules/doxia-module-confluence/src/test/site/confluence/page.confluence
deleted file mode 100644
index 3d5daea..0000000
--- a/doxia-modules/doxia-module-confluence/src/test/site/confluence/page.confluence
+++ /dev/null
@@ -1,98 +0,0 @@
-This the way that we would like to *translate* sites that are primarily
-authored in confluence while at the same time having the site be rendered in
-a _standard way on a static website_.
-
-----
-
-Here is a link to [JIRA|http://jira.codehaus.org]
-
-Here is a link with no text [http://jira.codehaus.org]
-
-This is some {{monospaced}} text.
-
-* item one
-** foo
-** bar
-* item two
-* item three
-
-Some more text
-
-# number one
-# number two
-# number three
-
-||one||two||three||
-|foo|bar|baz|
-
-h1. I am h1
-
-this is how you would code a mojo!
-
-{code}
-public class MyMojo
- extends AbstractMojo
-{
- /**
- * @parameter expression="${plugin.artifacts}"
- * @required
- */
- private List pluginArtifacts;
-
- public void execute()
- throws MojoExecutionException
- {
- ...
- for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
- {
- Artifact pluginArtifact = (Artifact) i.next();
- }
- ...
- }
-}
-{code}
-
-h2. I am h2
-
-this is the way of the world
-
-{noformat}
-public class MyMojo
- extends AbstractMojo
-{
- /**
- * @parameter expression="${plugin.artifacts}"
- * @required
- */
- private List pluginArtifacts;
-
- public void execute()
- throws MojoExecutionException
- {
- ...
- for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
- {
- Artifact pluginArtifact = (Artifact) i.next();
- }
- ...
- }
-}
-{noformat}
-
-h3. I am h3
-
-this is the way of the world
-
-h4. I am h4
-
-this is the way of the world
-
-h5. I am h5
-
-this is the way of the world
-
-h1. Answered Questions
-
-h3. What can I do to get the Maven love?
-
-Well, you just have to be calm and the maven love will come your way.
diff --git a/doxia-modules/doxia-module-docbook-simple/pom.xml b/doxia-modules/doxia-module-docbook-simple/pom.xml
deleted file mode 100644
index fe62794..0000000
--- a/doxia-modules/doxia-module-docbook-simple/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>doxia-modules</artifactId>
- <groupId>org.apache.maven.doxia</groupId>
- <version>2.0.0-M1-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>doxia-module-docbook-simple</artifactId>
-
- <name>Doxia :: Simplified DocBook Module</name>
- <description>
- A Doxia module for Simplified DocBook documents.
- DocBook format is supported both as source and target formats.
- </description>
-
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.xmlunit</groupId>
- <artifactId>xmlunit-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.xmlunit</groupId>
- <artifactId>xmlunit-matchers</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java b/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java
deleted file mode 100644
index b92b393..0000000
--- a/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java
+++ /dev/null
@@ -1,1099 +0,0 @@
-package org.apache.maven.doxia.module.docbook;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Stack;
-
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.markup.HtmlMarkup;
-import org.apache.maven.doxia.parser.AbstractXmlParser;
-import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.xml.pull.XmlPullParser;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
-/**
- * Parse a <a href="http://www.docbook.org/schemas/simplified"><code>Simplified DocBook</code></a> document
- * and emit events into the specified doxia Sink.
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @since 1.0
- */
-@Component( role = Parser.class, hint = "docbook" )
-public class DocBookParser
- extends AbstractXmlParser
- implements DocbookMarkup, SimplifiedDocbookMarkup
-{
- /**
- * Level counter for calculating the section level.
- */
- private int level;
-
- /**
- * Used to distinguish italic from bold.
- */
- private boolean isBold;
-
- private boolean inHead;
-
- private boolean ignore;
-
- private boolean simpleTag;
-
- private char trademark;
-
- /**
- * A selective stack of parent elements
- */
- private final Stack<String> parent = new Stack<>();
-
- /**
- * The list of DocBook elements that introduce a new level of hierarchy.
- */
- private static final Collection<String> HIER_ELEMENTS = new HashSet<>();
-
- /**
- * Simplified DocBook elements that are direct children of <article>
- * and that should be emitted into the Sink's head.
- */
- private static final Collection<String> META_ELEMENTS = new HashSet<>();
-
- /**
- * Simplified DocBook elements that occur within <articleinfo>
- * and that are currently recognized by the parser.
- */
- private static final Collection<String> ARTICLEINFO_ELEMENTS = new HashSet<>();
-
- /**
- * The list of DocBook elements that will be rendered verbatim
- */
- private static final Collection<String> VERBATIM_ELEMENTS = new HashSet<>();
-
- /**
- * The list of DocBook elements that will be rendered inline and bold
- */
- private static final Collection<String> BOLD_ELEMENTS = new HashSet<>();
-
- /**
- * The list of DocBook elements that will be rendered inline and italic
- */
- private static final Collection<String> ITALIC_ELEMENTS = new HashSet<>();
-
- /**
- * The list of DocBook elements that will be rendered inline and monospace
- */
- private static final Collection<String> MONOSPACE_ELEMENTS = new HashSet<>();
-
- /**
- * The list of DocBook elements that may be ignored, either because they don't
- * require any special processing or because they are not yet implemented.
- */
- private static final Collection<String> IGNORABLE_ELEMENTS = new HashSet<>();
- static
- {
- META_ELEMENTS.add( SimplifiedDocbookMarkup.ARTICLEINFO_TAG.toString() );
- META_ELEMENTS.add( SimplifiedDocbookMarkup.AUTHORBLURB_TAG.toString() );
- META_ELEMENTS.add( SimplifiedDocbookMarkup.SUBTITLE_TAG.toString() );
- META_ELEMENTS.add( SimplifiedDocbookMarkup.TITLE_TAG.toString() );
- META_ELEMENTS.add( SimplifiedDocbookMarkup.TITLEABBREV_TAG.toString() );
-
- ARTICLEINFO_ELEMENTS.add( SimplifiedDocbookMarkup.TITLE_TAG.toString() );
- ARTICLEINFO_ELEMENTS.add( SimplifiedDocbookMarkup.CORPAUTHOR_TAG.toString() );
- ARTICLEINFO_ELEMENTS.add( SimplifiedDocbookMarkup.DATE_TAG.toString() );
-
- HIER_ELEMENTS.add( SimplifiedDocbookMarkup.SECTION_TAG.toString() );
- HIER_ELEMENTS.add( SimplifiedDocbookMarkup.APPENDIX_TAG.toString() );
- HIER_ELEMENTS.add( SimplifiedDocbookMarkup.BIBLIOGRAPHY_TAG.toString() );
- HIER_ELEMENTS.add( SimplifiedDocbookMarkup.BIBLIODIV_TAG.toString() );
-
- VERBATIM_ELEMENTS.add( SimplifiedDocbookMarkup.PROGRAMLISTING_TAG.toString() );
- VERBATIM_ELEMENTS.add( SimplifiedDocbookMarkup.LITERALLAYOUT_TAG.toString() );
-
- BOLD_ELEMENTS.add( SimplifiedDocbookMarkup.COMMAND_TAG.toString() );
- BOLD_ELEMENTS.add( SimplifiedDocbookMarkup.USERINPUT_TAG.toString() );
-
- ITALIC_ELEMENTS.add( SimplifiedDocbookMarkup.REPLACEABLE_TAG.toString() );
- ITALIC_ELEMENTS.add( SimplifiedDocbookMarkup.SYSTEMITEM_TAG.toString() );
- ITALIC_ELEMENTS.add( SimplifiedDocbookMarkup.CITETITLE_TAG.toString() );
- ITALIC_ELEMENTS.add( SimplifiedDocbookMarkup.EMPHASIS_TAG.toString() );
- ITALIC_ELEMENTS.add( SimplifiedDocbookMarkup.ATTRIBUTION_TAG.toString() );
- ITALIC_ELEMENTS.add( SimplifiedDocbookMarkup.LINEANNOTATION_TAG.toString() );
-
- MONOSPACE_ELEMENTS.add( SimplifiedDocbookMarkup.COMPUTEROUTPUT_TAG.toString() );
- MONOSPACE_ELEMENTS.add( SimplifiedDocbookMarkup.REPLACEABLE_TAG.toString() );
- MONOSPACE_ELEMENTS.add( SimplifiedDocbookMarkup.LITERAL_TAG.toString() );
- MONOSPACE_ELEMENTS.add( SimplifiedDocbookMarkup.OPTION_TAG.toString() );
- MONOSPACE_ELEMENTS.add( SimplifiedDocbookMarkup.SYSTEMITEM_TAG.toString() );
- MONOSPACE_ELEMENTS.add( SimplifiedDocbookMarkup.USERINPUT_TAG.toString() );
- MONOSPACE_ELEMENTS.add( SimplifiedDocbookMarkup.FILENAME_TAG.toString() );
-
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.ABBREV_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.ABSTRACT_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.BIBLIOMIXED_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.BIBLIOMSET_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.COLSPEC_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.EPIGRAPH_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.EXAMPLE_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.FOOTNOTEREF_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.IMAGEOBJECT_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.INLINEMEDIAOBJECT_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.ISSUENUM_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.PHRASE_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.PUBDATE_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.PUBLISHERNAME_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.SPANSPEC_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.TEXTOBJECT_TAG.toString() );
- IGNORABLE_ELEMENTS.add( SimplifiedDocbookMarkup.VOLUMENUM_TAG.toString() );
- }
-
- /**
- * {@inheritDoc}
- */
- protected void init()
- {
- super.init();
-
- this.parent.clear();
- this.trademark = 0;
- this.level = 0;
- this.isBold = false;
- this.inHead = false;
- this.ignore = false;
- this.simpleTag = false;
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- /** {@inheritDoc} */
- protected void handleStartTag( XmlPullParser parser, Sink sink )
- throws XmlPullParserException, MacroExecutionException
- {
- if ( inHead && !META_ELEMENTS.contains( parser.getName() )
- && isParent( SimplifiedDocbookMarkup.ARTICLE_TAG.toString() ) )
- {
- sink.head_();
- inHead = false;
-
- // assume any element that is not meta starts the body
- sink.body();
- }
-
- final SinkEventAttributeSet attribs = getAttributesFromParser( parser );
- simpleTag = parser.isEmptyElementTag();
-
- if ( parser.getName().equals( SimplifiedDocbookMarkup.ARTICLE_TAG.toString() ) )
- {
- handleArticleStart( sink, attribs );
- }
- else if ( isParent( SimplifiedDocbookMarkup.ARTICLEINFO_TAG.toString() ) )
- {
- handleArticleInfoStartTags( parser.getName(), sink, attribs );
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.ARTICLEINFO_TAG.toString() ) )
- {
- parent.push( SimplifiedDocbookMarkup.ARTICLEINFO_TAG.toString() );
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.FOOTNOTE_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.SECTIONINFO_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.VIDEOOBJECT_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.AUDIOOBJECT_TAG.toString() ) )
- {
- parent.push( parser.getName() );
- ignore = true;
- }
- else if ( isParent( ( SimplifiedDocbookMarkup.FOOTNOTE_TAG.toString() ) )
- || isParent( SimplifiedDocbookMarkup.AUDIOOBJECT_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.VIDEOOBJECT_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.SECTIONINFO_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.ENTRYTBL_TAG.toString() ) )
- {
- return; // TODO: implement footnotes, entrytbl
- }
- else if ( HIER_ELEMENTS.contains( parser.getName() ) )
- {
- handleSectionElements( sink, parser.getName(), attribs );
- }
- else if ( listStartTags ( parser.getName(), sink, attribs ) )
- {
- return;
- }
- else if ( mediaStartTag( parser.getName(), sink, attribs ) )
- {
- return;
- }
- else if ( tableStartTags( parser.getName(), sink, attribs ) )
- {
- return;
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.PARA_TAG.toString() ) )
- {
- handleParaStart( sink, attribs );
- }
- else if ( styleStartTags( parser.getName(), sink, attribs ) )
- {
- return;
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TITLE_TAG.toString() ) )
- {
- handleTitleStart( sink, attribs );
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.EMAIL_TAG.toString() ) )
- {
- handleEmailStart( parser, sink, attribs );
- }
- else if ( linkStartTag( parser.getName(), sink, attribs ) )
- {
- return;
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.QUOTE_TAG.toString() ) )
- {
- sink.text( "\"", null );
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TRADEMARK_TAG.toString() ) )
- {
- trademark = '\u2122';
- final Object trade = attribs.getAttribute( "class" );
-
- if ( trade != null )
- {
- trademark = DocbookUtils.trademarkFromClass( trade.toString() );
- }
- }
- else
- {
- if ( !ignorable( parser.getName() ) )
- {
- if ( simpleTag )
- {
- handleUnknown( parser, sink, HtmlMarkup.TAG_TYPE_SIMPLE );
- }
- else
- {
- handleUnknown( parser, sink, HtmlMarkup.TAG_TYPE_START );
- }
- }
- }
- }
-
- /** {@inheritDoc} */
- protected void handleEndTag( XmlPullParser parser, Sink sink )
- throws XmlPullParserException, MacroExecutionException
- {
- if ( parser.getName().equals( SimplifiedDocbookMarkup.ARTICLE_TAG.toString() ) )
- {
- sink.body_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.ARTICLEINFO_TAG.toString() ) )
- {
- parent.pop();
- }
- else if ( isParent( SimplifiedDocbookMarkup.ARTICLEINFO_TAG.toString() ) )
- {
- handleArticleInfoEndTags( parser.getName(), sink );
- }
- else if ( HIER_ELEMENTS.contains( parser.getName() ) )
- {
- sink.section_( level );
-
- //decrease the nesting level
- level--;
- parent.pop();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.FOOTNOTE_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.AUDIOOBJECT_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.VIDEOOBJECT_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.SECTIONINFO_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.ENTRYTBL_TAG.toString() ) )
- {
- parent.pop();
- ignore = false;
- }
- else if ( isParent( ( SimplifiedDocbookMarkup.FOOTNOTE_TAG.toString() ) )
- || isParent( SimplifiedDocbookMarkup.AUDIOOBJECT_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.VIDEOOBJECT_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.SECTIONINFO_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.ENTRYTBL_TAG.toString() ) )
- {
- return;
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.ITEMIZEDLIST_TAG.toString() ) )
- {
- sink.list_();
- parent.pop();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.ORDEREDLIST_TAG.toString() ) )
- {
- sink.numberedList_();
- parent.pop();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.LISTITEM_TAG.toString() ) )
- {
- parent.pop();
-
- if ( isParent( SimplifiedDocbookMarkup.VARIABLELIST_TAG.toString() ) )
- {
- sink.definition_();
- }
- else if ( isParent( SimplifiedDocbookMarkup.ORDEREDLIST_TAG.toString() ) )
- {
- sink.numberedListItem_();
- }
- else
- {
- sink.listItem_();
- }
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.VARIABLELIST_TAG.toString() ) )
- {
- sink.definitionList_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.VARLISTENTRY_TAG.toString() ) )
- {
- sink.definitionListItem_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TERM_TAG.toString() ) )
- {
- sink.definedTerm_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG.toString() ) )
- {
- sink.figure_();
- parent.pop();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.IMAGEOBJECT_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.FIGURE_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.THEAD_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.TFOOT_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.TBODY_TAG.toString() ) )
- {
- parent.pop();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.CAPTION_TAG.toString() ) )
- {
- handleCaptionEnd( sink );
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TABLE_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.INFORMALTABLE_TAG.toString() ) )
- {
- sink.table_();
-
- parent.pop();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TR_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.ROW_TAG.toString() ) )
- {
- sink.tableRow_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TGROUP_TAG.toString() ) )
- {
- sink.tableRows_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.ENTRY_TAG.toString() )
- && isParent( SimplifiedDocbookMarkup.THEAD_TAG.toString() )
- || parser.getName().equals( TH_TAG.toString() ) )
- {
- sink.tableHeaderCell_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.ENTRY_TAG.toString() ) )
- {
- sink.tableCell_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.PARA_TAG.toString() ) )
- {
- handleParaEnd( sink );
- }
- else if ( VERBATIM_ELEMENTS.contains( parser.getName() ) )
- {
- sink.verbatim_();
- }
- else if ( BOLD_ELEMENTS.contains( parser.getName() )
- && MONOSPACE_ELEMENTS.contains( parser.getName() ) )
- {
- sink.monospaced_();
- sink.bold_();
- }
- else if ( ITALIC_ELEMENTS.contains( parser.getName() )
- && MONOSPACE_ELEMENTS.contains( parser.getName() ) )
- {
- sink.monospaced_();
- sink.italic_();
- }
- else if ( BOLD_ELEMENTS.contains( parser.getName() ) )
- {
- sink.bold_();
- }
- else if ( ITALIC_ELEMENTS.contains( parser.getName() ) )
- {
- if ( isBold )
- {
- sink.bold_();
-
- isBold = false;
- }
- else
- {
- sink.italic_();
- }
- }
- else if ( MONOSPACE_ELEMENTS.contains( parser.getName() ) )
- {
- sink.monospaced_();
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TITLE_TAG.toString() ) )
- {
- handleTitleEnd( sink );
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.ULINK_TAG.toString() )
- || parser.getName().equals( SimplifiedDocbookMarkup.LINK_TAG.toString() ) )
- {
- if ( isParent( parser.getName() ) )
- {
- parent.pop();
- sink.link_();
- }
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.QUOTE_TAG.toString() ) )
- {
- sink.text( "\"", null );
- }
- else if ( parser.getName().equals( SimplifiedDocbookMarkup.TRADEMARK_TAG.toString() ) )
- {
- sink.text( Character.toString( trademark ), null );
- }
- else if ( !simpleTag && !ignorable( parser.getName() ) )
- {
- handleUnknown( parser, sink, HtmlMarkup.TAG_TYPE_END );
- }
- }
-
- /** {@inheritDoc} */
- protected void handleComment( XmlPullParser parser, Sink sink )
- throws XmlPullParserException
- {
- final String text = parser.getText();
-
- switch ( text.trim() )
- {
- case "PB":
- sink.pageBreak();
- break;
- case "HR":
- sink.horizontalRule();
- break;
- case "LB":
- sink.lineBreak();
- break;
- case "anchor_end":
- sink.anchor_();
- break;
- default:
- if ( isEmitComments() )
- {
- sink.comment( text );
- }
- break;
- }
- }
-
- /** {@inheritDoc} */
- protected void handleCdsect( XmlPullParser parser, Sink sink )
- throws XmlPullParserException
- {
- if ( !ignore )
- {
- super.handleCdsect( parser, sink );
- }
- }
-
- /** {@inheritDoc} */
- protected void handleEntity( XmlPullParser parser, Sink sink )
- throws XmlPullParserException
- {
- if ( !ignore )
- {
- super.handleEntity( parser, sink );
- }
- }
-
- /** {@inheritDoc} */
- protected void handleText( XmlPullParser parser, Sink sink )
- throws XmlPullParserException
- {
- if ( !ignore )
- {
- super.handleText( parser, sink );
- }
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- private void handleArticleInfoStartTags( String name, Sink sink, SinkEventAttributeSet attribs )
- {
- if ( !ARTICLEINFO_ELEMENTS.contains( name ) )
- {
- ignore = true;
- return; // TODO: other meta data are ignored, implement!
- }
-
- if ( name.equals( SimplifiedDocbookMarkup.TITLE_TAG.toString() ) )
- {
- sink.title( attribs );
- }
- else if ( name.equals( SimplifiedDocbookMarkup.CORPAUTHOR_TAG.toString() ) )
- {
- sink.author( attribs );
- }
- else if ( name.equals( SimplifiedDocbookMarkup.DATE_TAG.toString() ) )
- {
- sink.date( attribs );
- }
- }
-
- private void handleArticleInfoEndTags( String name, Sink sink )
- {
- if ( !ARTICLEINFO_ELEMENTS.contains( name ) )
- {
- ignore = false;
- return; // TODO: other meta data are ignored, implement!
- }
-
- if ( name.equals( SimplifiedDocbookMarkup.TITLE_TAG.toString() ) )
- {
- sink.title_();
- }
- else if ( name.equals( SimplifiedDocbookMarkup.CORPAUTHOR_TAG.toString() ) )
- {
- sink.author_();
- }
- else if ( name.equals( SimplifiedDocbookMarkup.DATE_TAG.toString() ) )
- {
- sink.date_();
- }
- }
-
- private void handleCaptionStart( Sink sink, SinkEventAttributeSet attribs )
- {
- if ( isParent( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG.toString() ) )
- {
- sink.figureCaption( attribs );
- }
- else if ( isParent( SimplifiedDocbookMarkup.INFORMALTABLE_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.TABLE_TAG.toString() ) )
- {
- sink.tableCaption( attribs );
- }
-
- parent.push( SimplifiedDocbookMarkup.CAPTION_TAG.toString() );
- }
-
- private void handleCaptionEnd( Sink sink )
- {
- parent.pop();
-
- if ( isParent( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG.toString() ) )
- {
- sink.figureCaption_();
- }
- else if ( isParent( SimplifiedDocbookMarkup.INFORMALTABLE_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.TABLE_TAG.toString() ) )
- {
- sink.tableCaption_();
- }
- }
-
- private void handleEmailStart( XmlPullParser parser, Sink sink, SinkEventAttributeSet attribs )
- throws XmlPullParserException
- {
- try
- {
- final String mailto = parser.nextText();
- sink.link( "mailto:" + mailto, attribs );
- sink.monospaced();
- sink.text( mailto, null );
- sink.monospaced_();
- sink.link_();
- }
- catch ( IOException e )
- {
- throw new XmlPullParserException( "IOException: " + e.getMessage(), parser, e );
- }
- }
-
- private void handleFigureStart( Sink sink, SinkEventAttributeSet attribs )
- {
- sink.figure( attribs );
- parent.push( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG.toString() );
- }
-
- private void handleArticleStart( Sink sink, SinkEventAttributeSet attribs )
- {
- sink.head( attribs );
- inHead = true;
-
- parent.push( SimplifiedDocbookMarkup.ARTICLE_TAG.toString() );
- }
-
- //If the element introduces a new level of hierarchy, raise the stack
- private void handleSectionElements( Sink sink, String name, SinkEventAttributeSet attribs )
- {
- //increase the nesting level
- level++;
-
- sink.section( level, attribs );
-
- parent.push( name );
- }
-
- private void handleAnchorStart( Sink sink, SinkEventAttributeSet attribs )
- {
- final Object id = attribs.getAttribute( SimplifiedDocbookMarkup.ID_ATTRIBUTE );
-
- if ( id != null )
- {
- sink.anchor( id.toString(), attribs );
- }
- }
-
- private void handleImageDataStart( Sink sink, SinkEventAttributeSet attribs )
- throws XmlPullParserException
- {
- final Object fileref = attribs.getAttribute( SimplifiedDocbookMarkup.FILEREF_ATTRIBUTE );
-
- if ( fileref == null )
- {
- throw new XmlPullParserException( "Missing fileref attribute in imagedata!" );
- }
-
- sink.figureGraphics( fileref.toString(), attribs );
- }
-
- private void handleItemizedListStart( Sink sink, SinkEventAttributeSet attribs )
- {
- sink.list( attribs );
- //for itemizedlists in variablelists
- parent.push( SimplifiedDocbookMarkup.ITEMIZEDLIST_TAG.toString() );
- }
-
- private void handleLinkStart( Sink sink, SinkEventAttributeSet attribs )
- throws XmlPullParserException
- {
- final Object linkend = attribs.getAttribute( SimplifiedDocbookMarkup.LINKEND_ATTRIBUTE );
-
- if ( linkend == null )
- {
- throw new XmlPullParserException( "Missing linkend attribute in link!" );
- }
-
- parent.push( SimplifiedDocbookMarkup.LINK_TAG.toString() );
- sink.link( "#" + linkend.toString(), attribs );
- }
-
- private void handleListItemStart( Sink sink, SinkEventAttributeSet attribs )
- {
- if ( isParent( SimplifiedDocbookMarkup.VARIABLELIST_TAG.toString() ) )
- {
- sink.definition( attribs );
- }
- else if ( isParent( SimplifiedDocbookMarkup.ORDEREDLIST_TAG.toString() ) )
- {
- sink.numberedListItem( attribs );
- }
- else
- {
- sink.listItem( attribs );
- }
-
- parent.push( SimplifiedDocbookMarkup.LISTITEM_TAG.toString() );
- }
-
- private void handleOrderedListStart( Sink sink, SinkEventAttributeSet attribs )
- {
- //default enumeration style is decimal
- int numeration = Sink.NUMBERING_DECIMAL;
-
- final Object num = attribs.getAttribute( SimplifiedDocbookMarkup.NUMERATION_ATTRIBUTE );
-
- if ( num != null )
- {
- numeration = DocbookUtils.doxiaListNumbering( num.toString() );
- }
-
- sink.numberedList( numeration, attribs );
- parent.push( SimplifiedDocbookMarkup.ORDEREDLIST_TAG.toString() );
- }
-
- private void handleParaEnd( Sink sink )
- {
- if ( !isParent( SimplifiedDocbookMarkup.CAPTION_TAG.toString() )
- && ! isParent( SimplifiedDocbookMarkup.LISTITEM_TAG.toString() ) )
- {
- sink.paragraph_();
- }
- }
-
- private void handleParaStart( Sink sink, SinkEventAttributeSet attribs )
- {
- if ( !isParent( SimplifiedDocbookMarkup.CAPTION_TAG.toString() )
- && ! isParent( SimplifiedDocbookMarkup.LISTITEM_TAG.toString() ) )
- {
- sink.paragraph( attribs );
- }
- }
-
- private void handleTableStart( Sink sink, SinkEventAttributeSet attribs )
- {
- final Object frame = attribs.getAttribute( SimplifiedDocbookMarkup.FRAME_ATTRIBUTE );
- if ( frame != null )
- {
- attribs.addAttribute( SimplifiedDocbookMarkup.FRAME_ATTRIBUTE,
- DocbookUtils.doxiaTableFrameAttribute( frame.toString() ) );
- }
-
- sink.table( attribs );
-
- parent.push( SimplifiedDocbookMarkup.TABLE_TAG.toString() );
- }
-
- private void handleTitleStart( Sink sink, SinkEventAttributeSet attribs )
- {
- if ( isParent( SimplifiedDocbookMarkup.TABLE_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.INFORMALTABLE_TAG.toString() ) )
- {
- sink.tableCaption( attribs );
- }
- else if ( isParent( SimplifiedDocbookMarkup.ARTICLE_TAG.toString() ) )
- {
- sink.title( attribs );
- }
- else if ( isParent( SimplifiedDocbookMarkup.SECTION_TAG.toString() ) )
- {
- sink.sectionTitle( level, attribs );
- }
- else
- {
- sink.bold();
- }
- }
-
- private void handleTitleEnd( Sink sink )
- {
- if ( isParent( SimplifiedDocbookMarkup.TABLE_TAG.toString() )
- || isParent( SimplifiedDocbookMarkup.INFORMALTABLE_TAG.toString() ) )
- {
- sink.tableCaption_();
- }
- else if ( isParent( SimplifiedDocbookMarkup.SECTION_TAG.toString() ) )
- {
- sink.sectionTitle_( level );
- }
- else if ( isParent( SimplifiedDocbookMarkup.ARTICLE_TAG.toString() ) )
- {
- sink.title_();
- }
- else
- {
- sink.bold_();
- }
- }
-
- private void handleUlinkStart( Sink sink, SinkEventAttributeSet attribs )
- throws XmlPullParserException
- {
- final Object url = attribs.getAttribute( SimplifiedDocbookMarkup.URL_ATTRIBUTE );
-
- if ( url == null )
- {
- throw new XmlPullParserException( "Missing url attribute in ulink!" );
- }
-
- parent.push( SimplifiedDocbookMarkup.ULINK_TAG.toString() );
- sink.link( url.toString(), attribs );
- }
-
- private void handleVariableListStart( Sink sink, SinkEventAttributeSet attribs )
- {
- sink.definitionList( attribs );
- parent.push( SimplifiedDocbookMarkup.VARIABLELIST_TAG.toString() );
- }
-
- private void handleXrefStart( Sink sink, SinkEventAttributeSet attribs )
- throws XmlPullParserException
- {
- final Object linkend = attribs.getAttribute( SimplifiedDocbookMarkup.LINKEND_ATTRIBUTE );
-
- if ( linkend == null )
- {
- throw new XmlPullParserException( "Missing linkend attribute in xref!" );
- }
-
- sink.link( "#" + linkend.toString(), attribs );
- sink.text( "Link" ); //TODO: determine text of link target
- sink.link_();
- }
-
... 34905 lines suppressed ...