doxia-1.1.4/0000755000175000017500000000000011632765560012572 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/0000755000175000017500000000000011632765561015410 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/pom.xml0000644000175000017500000000277511470562366016736 0ustar twernertwerner 4.0.0 doxia org.apache.maven.doxia 1.1.4 ../pom.xml doxia-sink-api Doxia :: Sink API Doxia Sink API. org.apache.maven.doxia doxia-logging-api doxia-1.1.4/doxia-sink-api/src/0000755000175000017500000000000011632765561016177 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/site/0000755000175000017500000000000011632765561017143 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/site/apt/0000755000175000017500000000000011632765561017727 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/site/apt/index.apt0000644000175000017500000000363211371341737021543 0ustar twernertwerner ----- Doxia Sink API ----- Hervé Boutemy ----- 2010-05-08 ----- Doxia Sink API API to generate Doxia documents. * API Changes With every Doxia release, a new <<>> artifact has been released even if the API itself didn't change. Here is a summary of API changes: *--------------+--------------------------+ || <> || <> || *--------------+--------------------------+ | 1.0-alpha-6 | added <<>> interface which supercedes <<>> | *--------------+--------------------------+ | 1.0-alpha-9 | added <<>> interface | *--------------+--------------------------+ | 1.1 | added <<>> interface and a dependency on <<>> | *--------------+--------------------------+ Note that <<>> is equivalent to <<>>. * Maven dependency <<>> is included in every Maven 2 distribution. Decoupling has been done in Maven 3. *--------------------+------------------------------+ || <> || <> || *--------------------+------------------------------+ | 2.0.x | 1.0 | *--------------------+------------------------------+ | 2.1.x+ | 1.1 | *--------------------+------------------------------+ | 3.0+ | | *--------------------+------------------------------+ Maven 2.0.8 is the first Maven 2.0.x version including <<>>. To hide the difference between <<>> and <<<1.0>>> included in previous Maven 2.0.x versions, <<>> interface was copied into <<>>. doxia-1.1.4/doxia-sink-api/src/site/site.xml0000644000175000017500000000167211103330660020614 0ustar twernertwerner doxia-1.1.4/doxia-sink-api/src/main/0000755000175000017500000000000011632765561017123 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/javadoc/0000755000175000017500000000000011632765561020532 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/javadoc/org/0000755000175000017500000000000011632765561021321 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/javadoc/org/apache/0000755000175000017500000000000011632765561022542 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/javadoc/org/apache/maven/0000755000175000017500000000000011632765561023650 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/javadoc/org/apache/maven/doxia/0000755000175000017500000000000011632765561024754 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/javadoc/org/apache/maven/doxia/sink/0000755000175000017500000000000011632765561025720 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/javadoc/org/apache/maven/doxia/sink/package.html0000644000175000017500000001714111216135717030175 0ustar twernertwerner

Maven Doxia API.

The Doxia API is based on Sinks objects: each sink consumes Doxia events to produce a resultant output format (eg Docbook, PDF, XHTML...).

Using Maven Doxia API

The following snippet shows how to use a Doxia Sink:

  File userDir = new FileSystem.getProperty "user.dir" ) );
  File outputFile = new FileuserDir, "test.html" );

  SinkFactory sinkFactory = (SinkFactorylookupSinkFactory.ROLE, "html" )// Plexus lookup
  Sink sink = sinkFactory.createSinkoutputFile.getParentFile(), outputFile.getName() ) );

  // Sink head
  sink.head();

  sink.title();
  sink.text"Title" );
  sink.title_();

  sink.author();
  sink.text"Author" );
  sink.author_();

  sink.date();
  sink.text"Date" );
  sink.date_();

  sink.head_();
  // Sink head

  sink.body();

   sink.paragraph();
   sink.text"Paragraph 1, line 1. Paragraph 1, line 2." );
   sink.paragraph_();

   ...

  sink.body_();

  sink.flush();

  sink.close();

Resources

doxia-1.1.4/doxia-sink-api/src/main/java/0000755000175000017500000000000011632765560020043 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/0000755000175000017500000000000011632765561020633 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/apache/0000755000175000017500000000000011632765560022053 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/apache/maven/0000755000175000017500000000000011632765560023161 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765560024265 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/0000755000175000017500000000000011632765561025232 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/Sink.java0000644000175000017500000011775411331336337027007 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.logging.LogEnabled; /** * A Sink consumes Doxia events to produce a resultant output format * (eg Docbook, PDF, XHTML...). *

* Doxia allows you to transform any supported input document format (ie for which a Parser exists) * into any supported output document format (ie for which a Sink exists). *

*

* A parser is responsible for reading an input document and emitting a sequence of Doxia events * which can then be consumed by a Doxia Sink. Thus, you can parse any front- end format * (eg APT, FML, Xdoc, ...) and have them all contribute to a final XHTML version of a web site. * All documents being parsed result in a stream of Doxia events (eg paragraph, bold, italic, * text,...), which are then fed into a XHTML Sink to produce a set of XHTML pages. *

*

* A Sink is ultimately responsible for the final format and structure of the output document. * For example, you can take a collection of APT documents, let a Parser emit a series of Doxia * events and have that be fed into a Sink to produce a single PDF, a book, a site, or a * Word document. The Sink is fully responsible for the final output. *

*

* You can easily integrate any custom (XML, Wiki,...) format by creating a Doxia Parser which * reads your input document and produces a proper sequence of Doxia events. * Those can then be fed into an arbitrary Sink to produce any desired final output. *

*

* Note: All implemented sink should use UTF-8 as encoding. *

* * @since 1.0-alpha-6 * @author Jason van Zyl * @author Vincent Siveton * @author ltheussl * @version $Id: Sink.java 905077 2010-01-31 17:24:47Z hboutemy $ */ public interface Sink extends LogEnabled { /** The Plexus Sink Role. */ String ROLE = Sink.class.getName(); /** * A numbering to handle a number list. * @see #numberedList(int,SinkEventAttributes) */ int NUMBERING_DECIMAL = 0; /** * A numbering to handle a lower alpha list. * @see #numberedList(int,SinkEventAttributes) */ int NUMBERING_LOWER_ALPHA = 1; /** * A numbering to handle a upper alpha list. * @see #numberedList(int,SinkEventAttributes) */ int NUMBERING_UPPER_ALPHA = 2; /** * A numbering to handle a lower roman list. * @see #numberedList(int,SinkEventAttributes) */ int NUMBERING_LOWER_ROMAN = 3; /** * A numbering to handle a upper roman list. * @see #numberedList(int,SinkEventAttributes) */ int NUMBERING_UPPER_ROMAN = 4; /** * A level 1 section (section). * @see #section(int,SinkEventAttributes) */ int SECTION_LEVEL_1 = 1; /** * A level 2 section (subsection). * @see #section(int,SinkEventAttributes) */ int SECTION_LEVEL_2 = 2; /** * A level 3 section (sub-subsection). * @see #section(int,SinkEventAttributes) */ int SECTION_LEVEL_3 = 3; /** * A level 4 section (sub-sub-subsection). * @see #section(int,SinkEventAttributes) */ int SECTION_LEVEL_4 = 4; /** * A level 5 section (sub-sub-sub-subsection). * @see #section(int,SinkEventAttributes) */ int SECTION_LEVEL_5 = 5; /** * Center alignment for table cells. * @see #tableRows(int[], boolean) */ int JUSTIFY_CENTER = 0; /** * Left alignment for table cells. * @see #tableRows(int[], boolean) */ int JUSTIFY_LEFT = 1; /** * Right alignment for table cells. * @see #tableRows(int[], boolean) */ int JUSTIFY_RIGHT = 2; /** * Starts the head element. * * @see #head(SinkEventAttributes) */ void head(); /** * Starts the head element. * *

* This contains information about the current document, (eg its title) that is not * considered document content. The head element is optional but if it exists, it has to be * unique within a sequence of Sink events that produces one output document, and it has * to come before the {@link #body(SinkEventAttributes)} element. *

*

* The canonical sequence of events for the head element is: *

*
     *   sink.head();
     *
     *   sink.title();
     *   sink.text( "Title" );
     *   sink.title_();
     *
     *   sink.author();
     *   sink.text( "Author" );
     *   sink.author_();
     *
     *   sink.date();
     *   sink.text( "Date" );
     *   sink.date_();
     *
     *   sink.head_();
     * 
*

* but none of the enclosed events is required. However, if they exist they have to occur * in the order shown, and the title() and date() events have to be unique (author() events * may occur any number of times). *

*

* Supported attributes are: *

*
* {@link SinkEventAttributes#PROFILE PROFILE}, {@link SinkEventAttributes#LANG LANG}. *
* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void head( SinkEventAttributes attributes ); /** * Ends the head element. */ void head_(); /** * Starts the title element. * * @see #title(SinkEventAttributes) */ void title(); /** * Starts the title element. This is used to identify the document. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #head(SinkEventAttributes) */ void title( SinkEventAttributes attributes ); /** * Ends the title element. */ void title_(); /** * Starts an author element. * * @see #author(SinkEventAttributes) */ void author(); /** * Starts an author element. This is used to identify the author of the document. * *

* Supported attributes are: {@link SinkEventAttributes#EMAIL EMAIL}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #head(SinkEventAttributes) */ void author( SinkEventAttributes attributes ); /** * Ends an author element. */ void author_(); /** * Starts the date element. *
* The date is recommended (but it is not a requirement) to be align to the * ISO-8601 * standard, i.e.: *
     * YYYY-MM-DD
     * 
* where *
    *
  • YYYY is the year in the Gregorian calendar
  • *
  • MM is the month of the year between 01 (January) and 12 (December)
  • *
  • and DD is the day of the month between 01 and 31
  • *
* * @see #date(SinkEventAttributes) */ void date(); /** * Starts the date element. This is used to identify the date of the document. * *

* Supported attributes are: none. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #head(SinkEventAttributes) */ void date( SinkEventAttributes attributes ); /** * Ends the date element. */ void date_(); /** * Starts the body of a document. * * @see #body(SinkEventAttributes) */ void body(); /** * Starts the body of a document. This contains the document's content. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #head(SinkEventAttributes) */ void body( SinkEventAttributes attributes ); /** * Ends the body element. */ void body_(); /** * Starts a title heading element. */ void sectionTitle(); /** * Ends a title heading element. */ void sectionTitle_(); /** * Starts a first heading element which contains the topic of the section. * * @see #section(int,SinkEventAttributes) */ void section1(); /** * Ends a first heading element. */ void section1_(); /** * Starts a first title heading element. This element is optional, but if it exists, * it has to be contained, and be the first element, within a {@link #section1()} element. * * @see #sectionTitle(int,SinkEventAttributes) */ void sectionTitle1(); /** * Ends a first title heading element. */ void sectionTitle1_(); /** * Starts a second heading element which contains the topic of the section. * This has to be contained within a {@link #section1()} element. * * @see #section(int,SinkEventAttributes) */ void section2(); /** * Ends a second heading element. */ void section2_(); /** * Starts a second title heading element. This element is optional, but if it exists, * it has to be contained, and be the first element, within a {@link #section2()} element. * * @see #sectionTitle(int,SinkEventAttributes) */ void sectionTitle2(); /** * Ends a second title heading element. */ void sectionTitle2_(); /** * Starts a third heading element which contains the topic of the section. * This has to be contained within a {@link #section2()} element. * * @see #section(int,SinkEventAttributes) */ void section3(); /** * Ends a third heading element. */ void section3_(); /** * Starts a third title heading element. This element is optional, but if it exists, * it has to be contained, and be the first element, within a {@link #section3()} element. * * @see #sectionTitle(int,SinkEventAttributes) */ void sectionTitle3(); /** * Ends a third title heading element. */ void sectionTitle3_(); /** * Starts a 4th heading element which contains the topic of the section. * This has to be contained within a {@link #section3()} element. * * @see #section(int,SinkEventAttributes) */ void section4(); /** * Ends a 4th heading element. */ void section4_(); /** * Starts a 4th title heading element. This element is optional, but if it exists, * it has to be contained, and be the first element, within a {@link #section4()} element. * * @see #sectionTitle(int,SinkEventAttributes) */ void sectionTitle4(); /** * Ends a 4th title heading element. */ void sectionTitle4_(); /** * Starts a 5th heading element which contains the topic of the section. * This has to be contained within a {@link #section4()} element. * * @see #section(int,SinkEventAttributes) */ void section5(); /** * Ends a 5th heading element. */ void section5_(); /** * Starts a 5th title heading element. This element is optional, but if it exists, * it has to be contained, and be the first element, within a {@link #section5()} element. * * @see #sectionTitle(int,SinkEventAttributes) */ void sectionTitle5(); /** * Ends a 5th title heading element. */ void sectionTitle5_(); /** * Start a new section at the given level. * *

* Sections with higher level have to be entirely contained within sections of lower level. *

*

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param level the section level. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void section( int level, SinkEventAttributes attributes ); /** * Ends a section at the given level. * * @param level the section level. * @since 1.1 */ void section_( int level ); /** * Start a new section title at the given level. * *

* This element is optional, but if it exists, it has to be contained, and be the first * element, within a corresponding {@link #section(int,SinkEventAttributes) section} * element of the same level. *

*

* NOTE: It is strongly recommended not to make section titles implicit anchors. * Neither Parsers nor Sinks should insert any content that is not explicitly present * in the original source document, as this would lead to undefined behaviour for * multi-format processing chains. However, while Parsers must never emit anchors * for section titles, some specialized Sinks may implement such a feature if the resulting * output documents are not going to be further processed (and this is properly documented). *

*

* Supported attributes are the {@link SinkEventAttributes base attributes} plus * {@link SinkEventAttributes#ALIGN ALIGN}. *

* * @param level the section title level. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void sectionTitle( int level, SinkEventAttributes attributes ); /** * Ends a section title at the given level. * * @param level the section title level. * @since 1.1 */ void sectionTitle_( int level ); /** * Starts an unordered list element. * * @see #list(SinkEventAttributes) */ void list(); /** * Starts an unordered list. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void list( SinkEventAttributes attributes ); /** * Ends an unordered list element. */ void list_(); /** * Starts a list item element within an unordered list. * * @see #listItem(SinkEventAttributes) */ void listItem(); /** * Starts a list item element within an unordered list. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void listItem( SinkEventAttributes attributes ); /** * Ends a list item element within an unordered list. */ void listItem_(); /** * Starts an ordered list element. * * @param numbering the numbering style. * @see #numberedList(int,SinkEventAttributes) */ void numberedList( int numbering ); /** * Starts an ordered list element. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param numbering the numbering style. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #NUMBERING_DECIMAL * @see #NUMBERING_LOWER_ALPHA * @see #NUMBERING_LOWER_ROMAN * @see #NUMBERING_UPPER_ALPHA * @see #NUMBERING_UPPER_ROMAN */ void numberedList( int numbering, SinkEventAttributes attributes ); /** * Ends an ordered list element. */ void numberedList_(); /** * Starts a list item element within an ordered list. * * @see #numberedListItem(SinkEventAttributes) */ void numberedListItem(); /** * Starts a list item element within an ordered list. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void numberedListItem( SinkEventAttributes attributes ); /** * Ends a list item element within an ordered list. */ void numberedListItem_(); /** * Starts a definition list element. * * @see #definitionList(SinkEventAttributes) */ void definitionList(); /** * Starts a definition list. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void definitionList( SinkEventAttributes attributes ); /** * Ends a definition list element. */ void definitionList_(); /** * Starts a list item element within a definition list. * * @see #definitionListItem(SinkEventAttributes) */ void definitionListItem(); /** * Starts a list item element within a definition list. * *

* Every definitionListItem has to contain exactly one {@link #definedTerm(SinkEventAttributes)} * and one {@link #definition(SinkEventAttributes)}, in this order. *

*

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void definitionListItem( SinkEventAttributes attributes ); /** * Ends a list item element within a definition list. */ void definitionListItem_(); /** * Starts a definition element within a definition list. * * @see #definition(SinkEventAttributes) */ void definition(); /** * Starts a definition element within a definition list. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void definition( SinkEventAttributes attributes ); /** * Ends a definition element within a definition list. */ void definition_(); /** * Starts a definition term element within a definition list. * * @see #definedTerm(SinkEventAttributes) */ void definedTerm(); /** * Starts a definition term element within a definition list. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void definedTerm( SinkEventAttributes attributes ); /** * Starts a definition term element within a definition list. */ void definedTerm_(); /** * Starts a basic image embedding element. * * @see #figure(SinkEventAttributes) */ void figure(); /** * Starts a basic image embedding element. * *

* The canonical sequence of events for the figure element is: *

*
     *   sink.figure();
     *
     *   sink.figureGraphics( "figure.png" );
     *
     *   sink.figureCaption();
     *   sink.text( "Figure caption",);
     *   sink.figureCaption_();
     *
     *   sink.figure_();
     * 
*

* where the figureCaption element is optional. *

*

* However, NOTE that the order of figureCaption and * figureGraphics events is arbitrary, * ie a parser may emit the figureCaption before or after the figureGraphics. * Implementing sinks should be prepared to handle both possibilities. *

*

* NOTE also that the figureGraphics() event does not have to be embedded * inside figure(), in particular for in-line images the figureGraphics() should be used * stand-alone (in HTML language, figureGraphics() produces a <img> * tag, while figure() opens a paragraph- or <div>- like environment). *

*

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void figure( SinkEventAttributes attributes ); /** * Ends a basic image embedding element. */ void figure_(); /** * Starts a caption of an image element. * * @see #figureCaption(SinkEventAttributes) */ void figureCaption(); /** * Starts a figure caption. * *

* Supported attributes are the {@link SinkEventAttributes base attributes}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #figure(SinkEventAttributes) */ void figureCaption( SinkEventAttributes attributes ); /** * Ends a caption of an image. */ void figureCaption_(); /** * Adding a source of a graphic. * * @param name the source */ void figureGraphics( String name ); /** * Adds a graphic element. * *

* The src parameter should be a valid link, ie it can be an absolute * URL or a link relative to the current source document. *

*

* Supported attributes are the {@link SinkEventAttributes base attributes} plus: *

*
* {@link SinkEventAttributes#SRC SRC}, {@link SinkEventAttributes#ALT ALT}, * {@link SinkEventAttributes#WIDTH WIDTH}, {@link SinkEventAttributes#HEIGHT HEIGHT}, * {@link SinkEventAttributes#ALIGN ALIGN}, {@link SinkEventAttributes#BORDER BORDER}, * {@link SinkEventAttributes#HSPACE HSPACE}, {@link SinkEventAttributes#VSPACE VSPACE}, * {@link SinkEventAttributes#ISMAP ISMAP}, {@link SinkEventAttributes#USEMAP USEMAP}. *
*

* If the {@link SinkEventAttributes#SRC SRC} attribute is specified in SinkEventAttributes, * it will be overridden by the src parameter. *

* * @param src the image source, a valid URL. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #figure(SinkEventAttributes) */ void figureGraphics( String src, SinkEventAttributes attributes ); /** * Starts a table element for marking up tabular information in a document. * * @see #table(SinkEventAttributes) */ void table(); /** * Starts a table. * *

* The canonical sequence of events for the table element is: *

*
     *   sink.table();
     *
     *   sink.tableRows( justify, true );
     *
     *   sink.tableRow();
     *   sink.tableCell();
     *   sink.text( "cell 1,1" );
     *   sink.tableCell_();
     *   sink.tableCell();
     *   sink.text( "cell 1,2" );
     *   sink.tableCell_();
     *   sink.tableRow_();
     *
     *   sink.tableRows_();
     *
     *   sink.tableCaption();
     *   sink.text( "Table caption" );
     *   sink.tableCaption_();
     *
     *   sink.table_();
     *
     * 
*

* where the tableCaption element is optional. *

*

* However, NOTE that the order of tableCaption and * {@link #tableRows(int[],boolean)} events is arbitrary, * ie a parser may emit the tableCaption before or after the tableRows. * Implementing sinks should be prepared to handle both possibilities. *

*

* Supported attributes are the {@link SinkEventAttributes base attributes} plus: *

*
* {@link SinkEventAttributes#ALIGN ALIGN}, {@link SinkEventAttributes#BGCOLOR BGCOLOR}, * {@link SinkEventAttributes#BORDER BORDER}, {@link SinkEventAttributes#CELLPADDING CELLPADDING}, * {@link SinkEventAttributes#CELLSPACING CELLSPACING}, {@link SinkEventAttributes#FRAME FRAME}, * {@link SinkEventAttributes#RULES RULES}, {@link SinkEventAttributes#SUMMARY SUMMARY}, * {@link SinkEventAttributes#WIDTH WIDTH}. *
* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void table( SinkEventAttributes attributes ); /** * Ends a table element. */ void table_(); /** * Starts an element that contains rows of table data. * * @param justification the default justification of columns. * This can be overridden by individual table rows or table cells. * If null a left alignment is assumed by default. If this array * has less elements than there are columns in the table then the value of * the last array element will be taken as default for the remaining table cells. * @param grid true to provide a grid, false otherwise. * @see #table(SinkEventAttributes) * @see #JUSTIFY_CENTER * @see #JUSTIFY_LEFT * @see #JUSTIFY_RIGHT */ void tableRows( int[] justification, boolean grid ); /** * Ends an element that contains rows of table data. */ void tableRows_(); /** * Starts a row element which acts as a container for a row of table cells. * * @see #tableRow(SinkEventAttributes) */ void tableRow(); /** * Starts a table row. * *

* Supported attributes are the {@link SinkEventAttributes base attributes} plus: *

*
* {@link SinkEventAttributes#ALIGN ALIGN}, {@link SinkEventAttributes#BGCOLOR BGCOLOR}, * {@link SinkEventAttributes#VALIGN VALIGN}. *
* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void tableRow( SinkEventAttributes attributes ); /** * Ends a row element. */ void tableRow_(); /** * Starts a cell element which defines a cell that contains data. * * @see #tableCell(SinkEventAttributes) */ void tableCell(); /** * Starts a cell element which defines a cell that contains data. * * @param width the size of the cell. * @deprecated Use #tableCell(SinkEventAttributes) instead. */ void tableCell( String width ); /** * Starts a table cell. * *

* Supported attributes are the {@link SinkEventAttributes base attributes} plus: *

*
* {@link SinkEventAttributes#ABBRV ABBRV}, {@link SinkEventAttributes#ALIGN ALIGN}, * {@link SinkEventAttributes#AXIS AXIS}, {@link SinkEventAttributes#BGCOLOR BGCOLOR}, * {@link SinkEventAttributes#COLSPAN COLSPAN}, {@link SinkEventAttributes#HEADERS HEADERS}, * {@link SinkEventAttributes#HEIGHT HEIGHT}, {@link SinkEventAttributes#NOWRAP NOWRAP}, * {@link SinkEventAttributes#ROWSPAN ROWSPAN}, {@link SinkEventAttributes#SCOPE SCOPE}, * {@link SinkEventAttributes#VALIGN VALIGN}, {@link SinkEventAttributes#WIDTH WIDTH}. *
* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void tableCell( SinkEventAttributes attributes ); /** * Ends a cell element. */ void tableCell_(); /** * Starts a cell element which defines a cell that contains header information. * * @see #tableHeaderCell(SinkEventAttributes) */ void tableHeaderCell(); /** * Starts a cell element which defines a cell that contains header information. * * @param width the size of the header cell. * @deprecated Use #tableHeaderCell(SinkEventAttributes) instead. */ void tableHeaderCell( String width ); /** * Starts a table header cell. * *

* Supported attributes are the same as for {@link #tableCell(SinkEventAttributes) tableCell}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void tableHeaderCell( SinkEventAttributes attributes ); /** * Ends a cell header element. */ void tableHeaderCell_(); /** * Starts a caption element of a table. * * @see #tableCaption(SinkEventAttributes) */ void tableCaption(); /** * Starts a table caption. * *

* Note that the order of tableCaption and * {@link #tableRows(int[],boolean)} events is arbitrary, * ie a parser may emit the tableCaption before or after the tableRows. * Implementing sinks should be prepared to handle both possibilities. *

*

* Supported attributes are the {@link SinkEventAttributes base attributes} * plus {@link SinkEventAttributes#ALIGN ALIGN}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 * @see #table(SinkEventAttributes) */ void tableCaption( SinkEventAttributes attributes ); /** * Ends a caption element of a table. */ void tableCaption_(); /** * Starts an element which represents a paragraph. * * @see #paragraph(SinkEventAttributes) */ void paragraph(); /** * Starts a paragraph. * *

* Supported attributes are the {@link SinkEventAttributes base attributes} * plus {@link SinkEventAttributes#ALIGN ALIGN}. *

* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void paragraph( SinkEventAttributes attributes ); /** * Ends a paragraph element. */ void paragraph_(); /** * Starts an element which indicates that whitespace in the enclosed text has semantic relevance. * * @param boxed true to add a box, false otherwise * @deprecated Use #verbatim(SinkEventAttributes) instead. */ void verbatim( boolean boxed ); /** * Starts a verbatim block, ie a block where whitespace has semantic relevance. * *

* Text in a verbatim block must only be wrapped at the linebreaks in the source, * and spaces should not be collapsed. It should be displayed in a fixed-width font to * retain the formatting but the overall size may be chosen by the implementation. *

* *

* Most Sink events may be emitted within a verbatim block, the only elements explicitly * forbidden are font-changing events and figures. Also, verbatim blocks may not be nested. *

* *

* Supported attributes are the {@link SinkEventAttributes base attributes} plus: *

*
* {@link SinkEventAttributes#DECORATION DECORATION} (value: "boxed"), * {@link SinkEventAttributes#ALIGN ALIGN}, {@link SinkEventAttributes#WIDTH WIDTH}. *
* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void verbatim( SinkEventAttributes attributes ); /** * Ends a verbatim element. */ void verbatim_(); /** * Adding a separator of sections from a text to each other. * * @see #horizontalRule(SinkEventAttributes) */ void horizontalRule(); /** * Adds a horizontal separator rule. * *

* Supported attributes are the {@link SinkEventAttributes base attributes} plus: *

*
* {@link SinkEventAttributes#ALIGN ALIGN}, {@link SinkEventAttributes#NOSHADE NOSHADE}, * {@link SinkEventAttributes#SIZE SIZE}, {@link SinkEventAttributes#WIDTH WIDTH}. *
* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void horizontalRule( SinkEventAttributes attributes ); /** * Adding a new page separator. */ void pageBreak(); /** * Starts an element which defines an anchor. * * @param name the name of the anchor. * @see #anchor(String,SinkEventAttributes) */ void anchor( String name ); /** * Starts an element which defines an anchor. * *

* The name parameter has to be a valid SGML NAME token. * According to the * HTML 4.01 specification section 6.2 SGML basic types: *

*

* ID and NAME tokens must begin with a letter ([A-Za-z]) and may be * followed by any number of letters, digits ([0-9]), hyphens ("-"), * underscores ("_"), colons (":"), and periods ("."). *

*

* Supported attributes are the {@link SinkEventAttributes base attributes}. * If {@link SinkEventAttributes#NAME NAME} is specified in the SinkEventAttributes, * it will be overwritten by the name parameter. *

* * @param name the name of the anchor. This has to be a valid SGML NAME token. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void anchor( String name, SinkEventAttributes attributes ); /** * Ends an anchor element. */ void anchor_(); /** * Starts an element which defines a link. * * @param name the name of the link. * @see #link(String,SinkEventAttributes) */ void link( String name ); /** * Starts a link. * *

* The name parameter has to be a valid html href * parameter, ie for internal links (links to an anchor within the same source * document), name should start with the character "#". *

*

* Supported attributes are the {@link SinkEventAttributes base attributes} plus: *

*
* {@link SinkEventAttributes#CHARSET CHARSET}, {@link SinkEventAttributes#COORDS COORDS}, * {@link SinkEventAttributes#HREF HREF}, {@link SinkEventAttributes#HREFLANG HREFLANG}, * {@link SinkEventAttributes#REL REL}, {@link SinkEventAttributes#REV REV}, * {@link SinkEventAttributes#SHAPE SHAPE}, {@link SinkEventAttributes#TARGET TARGET}, * {@link SinkEventAttributes#TYPE TYPE}. *
*

* If {@link SinkEventAttributes#HREF HREF} is specified in the * SinkEventAttributes, it will be overwritten by the name parameter. *

* * @param name the name of the link. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void link( String name, SinkEventAttributes attributes ); /** * Ends a link element. */ void link_(); /** * Starts an italic element. * * Alternatively one may use {@link #text(String,SinkEventAttributes)} with * {@link SinkEventAttributes#STYLE STYLE} instead. */ void italic(); /** * Ends an italic element. * * Alternatively one may use {@link #text(String,SinkEventAttributes)} with * {@link SinkEventAttributes#STYLE STYLE} instead. */ void italic_(); /** * Starts a bold element. * * Alternatively one may use {@link #text(String,SinkEventAttributes)} with * {@link SinkEventAttributes#STYLE STYLE} instead. */ void bold(); /** * Ends a bold element. * * Alternatively one may use {@link #text(String,SinkEventAttributes)} with * {@link SinkEventAttributes#STYLE STYLE} instead. */ void bold_(); /** * Starts a monospaced element. * * Alternatively one may use {@link #text(String,SinkEventAttributes)} with * {@link SinkEventAttributes#STYLE STYLE} instead. */ void monospaced(); /** * Ends a monospaced element. * * Alternatively one may use {@link #text(String,SinkEventAttributes)} with * {@link SinkEventAttributes#STYLE STYLE} instead. */ void monospaced_(); /** * Adds a line break. * * @see #lineBreak(SinkEventAttributes) */ void lineBreak(); /** * Adds a line break. * *

* Supported attributes are: *

*
* {@link SinkEventAttributes#ID ID}, {@link SinkEventAttributes#CLASS CLASS}, * {@link SinkEventAttributes#TITLE TITLE}, {@link SinkEventAttributes#STYLE STYLE}. *
* * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void lineBreak( SinkEventAttributes attributes ); /** * Adding a non breaking space, ie a space without any special formatting operations. */ void nonBreakingSpace(); /** * Adding a text. * * @param text The text to write. * @see #text(String,SinkEventAttributes) */ void text( String text ); /** * Adds a text. * *

* The text parameter should contain only real content, ie any * ignorable/collapsable whitespace/EOLs or other pretty-printing should * be removed/normalized by a parser. *

*

* If text contains any variants of line terminators, they should * be normalized to the System EOL by an implementing Sink. *

*

* Supported attributes are the {@link SinkEventAttributes base attributes} plus *

*
* {@link SinkEventAttributes#VALIGN VALIGN} (values "sub", "sup"), * {@link SinkEventAttributes#DECORATION DECORATION} (values "underline", "overline", "line-through"), * {@link SinkEventAttributes#STYLE STYLE} (values "italic", "bold", "monospaced"). *
* * @param text The text to write. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void text( String text, SinkEventAttributes attributes ); /** * Adding a raw text, ie a text without any special formatting operations. * * @param text The text to write. */ void rawText( String text ); /** * Add a comment. * * @param comment The comment to write. * @since 1.1 */ void comment( String comment ); /** * Add an unknown event. This may be used by parsers to notify a general Sink about * an event that doesn't fit into any event defined by the Sink API. * Depending on the parameters, a Sink may decide whether or not to process the event, * emit it as raw text, as a comment, log it, etc. * * @param name The name of the event. * @param requiredParams An optional array of required parameters to the event. * May be null. * @param attributes A set of {@link SinkEventAttributes}, may be null. * @since 1.1 */ void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ); /** * Flush the writer or the stream, if needed. * Flushing a previously-flushed Sink has no effect. */ void flush(); /** * Close the writer or the stream, if needed. * Closing a previously-closed Sink has no effect. */ void close(); } doxia-1.1.4/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/SinkEventAttributes.java0000644000175000017500000002221611132225264032037 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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 javax.swing.text.MutableAttributeSet; /** * A set of attributes for a sink event. *

* All sink methods that produce some presentation-level output should have at least * one form that allows to pass in a Set of SinkEventAttributes. For instance in *

void text( String text, SinkEventAttributes attributes );
* the attributes parameter can be used to specify some text styling * options, or other optional parameters. *

*

* What kind of attributes are supported depends on the event and the sink * implementation. The sink API just specifies a list of suggested attribute * names, that sinks are expected to recognize, and parsers are expected to use * preferably when emitting events. *

*

* It is recommended that for simple attributes, both keys and values should be * lower-case Strings, but this is not mandatory. One example of an exception is * the {@link #STYLE} attribute, whose value may itself be an AttributeSet again. *

*

* The base attributes that are supported by almost all events are * {@link #CLASS}, {@link #ID}, {@link #LANG}, {@link #STYLE} and {@link #TITLE}. *

* * @author ltheussl * @version $Id: SinkEventAttributes.java 733395 2009-01-10 23:09:40Z ltheussl $ * @since 1.1 */ public interface SinkEventAttributes extends MutableAttributeSet { // base /** * The class of the event element. */ String CLASS = "class"; /** * A unique id for the event element. */ String ID = "id"; /** * The language code for the event element. */ String LANG = "lang"; /** * An inline style definition. * *

* Generally supported values are "italic", "bold", "monospaced" and AttributeSets. *

*

* If the value of this Attribute is itself an AttributeSet, it is interpreted as a * sequence of CSS properties. For instance, the HTML paragraph opening *

*
     *   <p style="color: red; margin-left: 20px">
     * 
*

* can be produced by an HTML Sink via the event * {@link Sink#paragraph(SinkEventAttributes)}, where the value of the * SinkEventAttribute is an AttributeSet with two Attributes ("color" and * "margin-left" with values "red" and "20px", * respectively). *

*/ String STYLE = "style"; /** * A text to display in a tool tip. */ String TITLE = "title"; // head /** * A space separated list of URL's that contains meta data information about the document. */ String PROFILE = "profile"; /** * An electronic mail address. */ String EMAIL = "email"; // img /** * Specifies the alignment of the event element within its parent element. * *

* Generally supported values are "left", "right", "center", "justify". *

*/ String ALIGN = "align"; /** * Defines a short description of the event element. */ String ALT = "alt"; /** * Defines a border around an event element. */ String BORDER = "border"; /** * Defines the height of an event element. */ String HEIGHT = "height"; /** * Defines white space on the left and right side of an event element. */ String HSPACE = "hspace"; /** * Defines an image as a server-side image map. Only used by the figureGraphics Sink event. */ String ISMAP = "ismap"; /** * The URL of an external resource, eg an image. */ String SRC = "src"; /** * Defines an image as a client-side image map. */ String USEMAP = "usemap"; /** * Defines white space on the top and bottom of the event element. */ String VSPACE = "vspace"; /** * Sets the width of an event element. */ String WIDTH = "width"; // hr /** * Used to indicate that an element comes with a shadow. */ String NOSHADE = "noshade"; /** * Specifies the size, or thickness, or height of an event element. */ String SIZE = "size"; // anchor /** * Specifies the name of an anchor. */ String NAME = "name"; // link /** * Specifies the character encoding of text associated with an event element. */ String CHARSET = "charset"; /** * May be used in conjunction with {@link #SHAPE}. * *

* Valid values are the same as for the corresponding HTML attributes. *

*/ String COORDS = "coords"; /** * The target URL of an event element, eg a link. */ String HREF = "href"; /** * Specifies the base language of the target URL. * *

* Used in conjunction with {@link #HREF}. *

*/ String HREFLANG = "hreflang"; /** * For references to external resourcs, specifies the relationship between * the current document and the target URL. * *

* Valid values are the same as for the corresponding HTML attribute. *

*/ String REL = "rel"; /** * For references to external resourcs, specifies the relationship between * the target URL and the current document. * *

* Valid values are the same as for the corresponding HTML attribute. *

*/ String REV = "rev"; /** * Defines the type of region to be defined for a mapping. * *

* Used with the {@link #COORDS} attribute. *

*/ String SHAPE = "shape"; /** * Where to open the target URL. * *

* Valid values are the same as for the corresponding HTML attribute. *

*/ String TARGET = "target"; /** * Specifies the MIME (Multipurpose Internet Mail Extensions) type of an * external resource URL, eg a link. */ String TYPE = "type"; // table /** * Specifies the background color of an event element. */ String BGCOLOR = "bgcolor"; /** * Specifies the space between cell walls and contents. */ String CELLPADDING = "cellpadding"; /** * Specifies the space between cells. */ String CELLSPACING = "cellspacing"; /** * Specifies which sides of a border surrounding an element should be visible. * *

* Valid values are the same as for the corresponding HTML attribute. *

*/ String FRAME = "frame"; /** * Specifies horizontal/vertical divider lines between certain elements, eg table cells. */ String RULES = "rules"; /** * Specifies a summary of an event attribute for speech-synthesizing/non-visual target output. */ String SUMMARY = "summary"; // table cell /** * Specifies an abbreviated version of the content in an element. */ String ABBRV = "abbrv"; /** * Defines a name for a cell. */ String AXIS = "axis"; /** * Indicates the number of columns a cell should span. Used in tables. */ String COLSPAN = "colspan"; /** * A space-separated list of cell IDs that supply header information for the cell. */ String HEADERS = "headers"; /** * Whether to disable or enable automatic text wrapping for an element. */ String NOWRAP = "nowrap"; /** * Indicates the number of rows a cell should span. Used in tables. */ String ROWSPAN = "rowspan"; /** * A general scope parameter. In Particular, for table cells this * specifies if the cell provides header information for the rest of the * row that contains it ("row"), or for the rest of the column ("col"), * or for the rest of the row group that contains it ("rowgroup"), * or for the rest of the column group that contains it ("colgroup"). */ String SCOPE = "scope"; /** * Specifies the vertical alignment of an element. * *

* Generally accepted values are "top", "baseline", "middle", "bottom", "sup", "sub". *

*/ String VALIGN = "valign"; // text /** * Specifies a decoration for an element. * *

* Generally accepted values are "underline", "overline", "line-through", "boxed". *

*/ String DECORATION = "decoration"; } doxia-1.1.4/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink/SinkFactory.java0000644000175000017500000000553611135346161030327 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.File; import java.io.IOException; import java.io.OutputStream; /** * A factory that creates a Sink object. * * @author Kenney Westerhof * @version $Id: SinkFactory.java 736010 2009-01-20 13:06:57Z vsiveton $ * @since 1.0-alpha-9 */ public interface SinkFactory { /** The Plexus SinkFactory Role. */ String ROLE = SinkFactory.class.getName(); /** * Create a Sink into a file. * * @param outputDir the not-null output dir. * @param outputName the not-null output name. * @return a Sink instance with a file as output. * @throws java.io.IOException if any */ Sink createSink( File outputDir, String outputName ) throws IOException; /** * Create a Sink into a file using a specified encoding. * * @param outputDir the not-null output dir. * @param outputName the not-null output name. * @param encoding the output encoding. * @return a Sink instance with a file as output and using specified encoding. * @throws java.io.IOException if any * @see #createSink(File, String) * @since 1.1 */ Sink createSink( File outputDir, String outputName, String encoding ) throws IOException; /** * Create a Sink into an OutputStream. * * @param out not null OutputStream to write the result. * @return a Sink instance. * @throws java.io.IOException if any * @since 1.1 */ Sink createSink( OutputStream out ) throws IOException; /** * Create a Sink into an OutputStream using a specified encoding. * * @param out not null OutputStream to write the result. * @param encoding the output encoding. * @return a Sink instance using specified encoding. * @throws java.io.IOException if any * @since 1.1 */ Sink createSink( OutputStream out, String encoding ) throws IOException; } doxia-1.1.4/doxia-sink-api/src/main/java/org/codehaus/0000755000175000017500000000000011632765561022426 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/codehaus/doxia/0000755000175000017500000000000011632765561023532 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/codehaus/doxia/sink/0000755000175000017500000000000011632765561024476 5ustar twernertwernerdoxia-1.1.4/doxia-sink-api/src/main/java/org/codehaus/doxia/sink/Sink.java0000644000175000017500000000215511105052714026230 0ustar twernertwernerpackage org.codehaus.doxia.sink; /* * 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. */ /** * Generic document processing interface. * * @deprecated use {@link org.apache.maven.doxia.sink.Sink} instead (since 1.0-alpha-6). * @version $Id: Sink.java 712143 2008-11-07 14:50:52Z hboutemy $ */ public interface Sink extends org.apache.maven.doxia.sink.Sink { // nop } doxia-1.1.4/doxia-logging-api/0000755000175000017500000000000011632765550016070 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/pom.xml0000644000175000017500000000300211470562366017400 0ustar twernertwerner 4.0.0 doxia org.apache.maven.doxia 1.1.4 ../pom.xml doxia-logging-api Doxia :: Logging API Doxia Logging API. org.codehaus.plexus plexus-container-default doxia-1.1.4/doxia-logging-api/src/0000755000175000017500000000000011632765550016657 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/site/0000755000175000017500000000000011632765550017623 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/site/site.xml0000644000175000017500000000167211103330660021276 0ustar twernertwerner doxia-1.1.4/doxia-logging-api/src/main/0000755000175000017500000000000011632765550017603 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/main/java/0000755000175000017500000000000011632765550020524 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/main/java/org/0000755000175000017500000000000011632765550021313 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/main/java/org/apache/0000755000175000017500000000000011632765550022534 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/main/java/org/apache/maven/0000755000175000017500000000000011632765550023642 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765550024746 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/main/java/org/apache/maven/doxia/logging/0000755000175000017500000000000011632765550026374 5ustar twernertwernerdoxia-1.1.4/doxia-logging-api/src/main/java/org/apache/maven/doxia/logging/LogEnabled.java0000644000175000017500000000250611132225264031222 0ustar twernertwernerpackage org.apache.maven.doxia.logging; /* * 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. */ /** * An interface for Doxia components (mainly Sink, Parser and Macro) that need the ability to log. *
* Based on org.codehaus.plexus.logging.LogEnabled. * * @author ltheussl * @version $Id: LogEnabled.java 733395 2009-01-10 23:09:40Z ltheussl $ * @since 1.1 */ public interface LogEnabled { /** * Enable a Doxia logger for this Doxia component. * * @param log a Log. */ void enableLogging( Log log ); } doxia-1.1.4/doxia-logging-api/src/main/java/org/apache/maven/doxia/logging/Log.java0000644000175000017500000001343111216135717027754 0ustar twernertwernerpackage org.apache.maven.doxia.logging; /* * 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. */ /** * This interface supplies the API for providing feedback to the user from * a Parser or Sink, using standard Doxia channels. *
* There should be no big surprises here, although you may notice that the methods accept * java.lang.CharSequence rather than java.lang.String. This is provided mainly as a * convenience, to enable developers to pass things like java.lang.StringBuffer directly into the logger, * rather than formatting first by calling toString(). *
* Based on org.apache.maven.plugin.logging.Log. * * @author jdcasey * @author ltheussl * @version $Id: Log.java 785531 2009-06-17 09:47:59Z ltheussl $ * @since 1.1 */ public interface Log { /** Typecode for debugging messages. */ int LEVEL_DEBUG = 0; /** Typecode for informational messages. */ int LEVEL_INFO = 1; /** Typecode for warning messages. */ int LEVEL_WARN = 2; /** Typecode for error messages. */ int LEVEL_ERROR = 3; /** Typecode for fatal error messages. */ int LEVEL_FATAL = 4; /** Typecode for disabled log levels. */ int LEVEL_DISABLED = 5; /** * Set the current log level. * * @param level the log level to set. */ void setLogLevel( int level ); /** *

isDebugEnabled.

* * @return true if the debug error level is enabled. */ boolean isDebugEnabled(); /** * Send a message to the user in the debug error level. * * @param content the message to log. */ void debug( CharSequence content ); /** * Send a message (and accompanying exception) to the user in the debug error level. *
* The error's stacktrace will be output when this error level is enabled. * * @param content the message to log. * @param error the error to log. */ void debug( CharSequence content, Throwable error ); /** * Send an exception to the user in the debug error level. *
* The stack trace for this exception will be output when this error level is enabled. * * @param error the error to log. */ void debug( Throwable error ); /** *

isInfoEnabled.

* * @return true if the info error level is enabled. */ boolean isInfoEnabled(); /** * Send a message to the user in the info error level. * * @param content the message to log. */ void info( CharSequence content ); /** * Send a message (and accompanying exception) to the user in the info error level. *
* The error's stacktrace will be output when this error level is enabled. * * @param content the message to log. * @param error the error to log. */ void info( CharSequence content, Throwable error ); /** * Send an exception to the user in the info error level. *
* The stack trace for this exception will be output when this error level is enabled. * * @param error the error to log. */ void info( Throwable error ); /** *

isWarnEnabled.

* * @return true if the warn error level is enabled. */ boolean isWarnEnabled(); /** * Send a message to the user in the warn error level. * * @param content the message to log. */ void warn( CharSequence content ); /** * Send a message (and accompanying exception) to the user in the warn error level. *
* The error's stacktrace will be output when this error level is enabled. * * @param content the message to log. * @param error the error to log. */ void warn( CharSequence content, Throwable error ); /** * Send an exception to the user in the warn error level. *
* The stack trace for this exception will be output when this error level is enabled. * * @param error the error to log. */ void warn( Throwable error ); /** *

isErrorEnabled.

* * @return true if the error error level is enabled. */ boolean isErrorEnabled(); /** * Send a message to the user in the error error level. * * @param content the message to log. */ void error( CharSequence content ); /** * Send a message (and accompanying exception) to the user in the error error level. *
* The error's stacktrace will be output when this error level is enabled. * * @param content the message to log. * @param error the error to log. */ void error( CharSequence content, Throwable error ); /** * Send an exception to the user in the error error level. *
* The stack trace for this exception will be output when this error level is enabled. * * @param error the error to log. */ void error( Throwable error ); } doxia-1.1.4/doxia-logging-api/src/main/java/org/apache/maven/doxia/logging/PlexusLoggerWrapper.java0000644000175000017500000001057211216135717033217 0ustar twernertwernerpackage org.apache.maven.doxia.logging; /* * 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.codehaus.plexus.logging.Logger; /** * Wrap a Plexus logger into a Doxia logger. * Based on org.apache.maven.plugin.logging.Log. * * @author Vincent Siveton * @version $Id: PlexusLoggerWrapper.java 785531 2009-06-17 09:47:59Z ltheussl $ * @since 1.1 */ public class PlexusLoggerWrapper implements Log { private final Logger logger; /** *

Constructor for PlexusLoggerWrapper.

* * @param logger the Plexus logger to wrap. */ public PlexusLoggerWrapper( Logger logger ) { this.logger = logger; } /** {@inheritDoc} */ public void setLogLevel( int level ) { if ( level <= LEVEL_DEBUG ) { logger.setThreshold( Logger.LEVEL_DEBUG ); } else if ( level <= LEVEL_INFO ) { logger.setThreshold( Logger.LEVEL_INFO ); } else if ( level <= LEVEL_WARN ) { logger.setThreshold( Logger.LEVEL_WARN ); } else if ( level <= LEVEL_ERROR ) { logger.setThreshold( Logger.LEVEL_ERROR ); } else { logger.setThreshold( Logger.LEVEL_DISABLED ); } } /** {@inheritDoc} */ public void debug( CharSequence content ) { logger.debug( toString( content ) ); } /** {@inheritDoc} */ public void debug( CharSequence content, Throwable error ) { logger.debug( toString( content ), error ); } /** {@inheritDoc} */ public void debug( Throwable error ) { logger.debug( "", error ); } /** {@inheritDoc} */ public void info( CharSequence content ) { logger.info( toString( content ) ); } /** {@inheritDoc} */ public void info( CharSequence content, Throwable error ) { logger.info( toString( content ), error ); } /** {@inheritDoc} */ public void info( Throwable error ) { logger.info( "", error ); } /** {@inheritDoc} */ public void warn( CharSequence content ) { logger.warn( toString( content ) ); } /** {@inheritDoc} */ public void warn( CharSequence content, Throwable error ) { logger.warn( toString( content ), error ); } /** {@inheritDoc} */ public void warn( Throwable error ) { logger.warn( "", error ); } /** {@inheritDoc} */ public void error( CharSequence content ) { logger.error( toString( content ) ); } /** {@inheritDoc} */ public void error( CharSequence content, Throwable error ) { logger.error( toString( content ), error ); } /** {@inheritDoc} */ public void error( Throwable error ) { logger.error( "", error ); } /** {@inheritDoc} */ public boolean isDebugEnabled() { return logger.isDebugEnabled(); } /** {@inheritDoc} */ public boolean isInfoEnabled() { return logger.isInfoEnabled(); } /** {@inheritDoc} */ public boolean isWarnEnabled() { return logger.isWarnEnabled(); } /** {@inheritDoc} */ public boolean isErrorEnabled() { return logger.isErrorEnabled(); } // ---------------------------------------------------------------------- // Private methods // ---------------------------------------------------------------------- private String toString( CharSequence content ) { if ( content == null ) { return ""; } return content.toString(); } } doxia-1.1.4/doxia-logging-api/src/main/java/org/apache/maven/doxia/logging/SystemStreamLog.java0000644000175000017500000001337711132225264032340 0ustar twernertwernerpackage org.apache.maven.doxia.logging; /* * 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; /** * Logger with "standard" output and error output stream. The log prefix is voluntarily in lower case. *
* Based on org.apache.maven.plugin.logging.SystemStreamLog. * * @author jdcasey * @author ltheussl * @version $Id: SystemStreamLog.java 733395 2009-01-10 23:09:40Z ltheussl $ * @since 1.1 */ public class SystemStreamLog implements Log { private static final String EOL = System.getProperty( "line.separator" ); private int currentLevel = LEVEL_INFO; /** {@inheritDoc} */ public void setLogLevel( int level ) { if ( level <= LEVEL_DEBUG ) { currentLevel = LEVEL_DEBUG; } else if ( level <= LEVEL_INFO ) { currentLevel = LEVEL_INFO; } else if ( level <= LEVEL_WARN ) { currentLevel = LEVEL_WARN; } else if ( level <= LEVEL_ERROR ) { currentLevel = LEVEL_ERROR; } else { currentLevel = LEVEL_DISABLED; } } /** {@inheritDoc} */ public void debug( CharSequence content ) { if ( isDebugEnabled() ) { print( "debug", content ); } } /** {@inheritDoc} */ public void debug( CharSequence content, Throwable error ) { if ( isDebugEnabled() ) { print( "debug", content, error ); } } /** {@inheritDoc} */ public void debug( Throwable error ) { if ( isDebugEnabled() ) { print( "debug", error ); } } /** {@inheritDoc} */ public void info( CharSequence content ) { if ( isInfoEnabled() ) { print( "info", content ); } } /** {@inheritDoc} */ public void info( CharSequence content, Throwable error ) { if ( isInfoEnabled() ) { print( "info", content, error ); } } /** {@inheritDoc} */ public void info( Throwable error ) { if ( isInfoEnabled() ) { print( "info", error ); } } /** {@inheritDoc} */ public void warn( CharSequence content ) { if ( isWarnEnabled() ) { print( "warn", content ); } } /** {@inheritDoc} */ public void warn( CharSequence content, Throwable error ) { if ( isWarnEnabled() ) { print( "warn", content, error ); } } /** {@inheritDoc} */ public void warn( Throwable error ) { if ( isWarnEnabled() ) { print( "warn", error ); } } /** {@inheritDoc} */ public void error( CharSequence content ) { if ( isErrorEnabled() ) { System.err.println( "[error] " + content.toString() ); } } /** {@inheritDoc} */ public void error( CharSequence content, Throwable error ) { if ( isErrorEnabled() ) { StringWriter sWriter = new StringWriter(); PrintWriter pWriter = new PrintWriter( sWriter ); error.printStackTrace( pWriter ); System.err.println( "[error] " + content.toString() + EOL + EOL + sWriter.toString() ); } } /** {@inheritDoc} */ public void error( Throwable error ) { if ( isErrorEnabled() ) { StringWriter sWriter = new StringWriter(); PrintWriter pWriter = new PrintWriter( sWriter ); error.printStackTrace( pWriter ); System.err.println( "[error] " + sWriter.toString() ); } } /** {@inheritDoc} */ public boolean isDebugEnabled() { return ( currentLevel <= LEVEL_DEBUG ); } /** {@inheritDoc} */ public boolean isInfoEnabled() { return ( currentLevel <= LEVEL_INFO ); } /** {@inheritDoc} */ public boolean isWarnEnabled() { return ( currentLevel <= LEVEL_WARN ); } /** {@inheritDoc} */ public boolean isErrorEnabled() { return ( currentLevel <= LEVEL_ERROR ); } // // private // private void print( String prefix, CharSequence content ) { System.out.println( "[" + prefix + "] " + content.toString() ); } private void print( String prefix, Throwable error ) { StringWriter sWriter = new StringWriter(); PrintWriter pWriter = new PrintWriter( sWriter ); error.printStackTrace( pWriter ); System.out.println( "[" + prefix + "] " + sWriter.toString() ); } private void print( String prefix, CharSequence content, Throwable error ) { StringWriter sWriter = new StringWriter(); PrintWriter pWriter = new PrintWriter( sWriter ); error.printStackTrace( pWriter ); System.out.println( "[" + prefix + "] " + content.toString() + EOL + EOL + sWriter.toString() ); } } doxia-1.1.4/doxia-modules/0000755000175000017500000000000011632765560015344 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/0000755000175000017500000000000011632765557020515 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/pom.xml0000644000175000017500000001231411470562366022024 0ustar twernertwerner 4.0.0 doxia-modules org.apache.maven.doxia 1.1.4 ../pom.xml doxia-module-fml Doxia :: FML Module A Doxia module for FML source documents. org.codehaus.plexus plexus-utils org.apache.maven.doxia doxia-test-docs test xerces xercesImpl 2.9.1 test org.codehaus.modello modello-maven-plugin descriptor generate-sources java src/main/mdo/fml.mdo 1.0.0 org.codehaus.plexus plexus-maven-plugin src/main/components/components.xml target/generated-resources/plexus/META-INF/plexus/components.xml merge-descriptors reporting org.apache.maven.plugins maven-antrun-plugin site run xsddoc xsddoc 1.0 ant ant org.apache.ant ant-apache-regexp 1.7.1 xalan xalan 2.7.1 doxia-1.1.4/doxia-modules/doxia-module-fml/src/0000755000175000017500000000000011632765557021304 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/0000755000175000017500000000000011632765557022263 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/resources/0000755000175000017500000000000011632765557024275 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/resources/simpleFaq.fml0000644000175000017500000000246511215421102026671 0ustar twernertwerner General What does Maven mean?

A maven (yi.=meyvn) is an experienced or knowledgeable person, such as an expert or freak.

doxia-1.1.4/doxia-modules/doxia-module-fml/src/test/resources/macro.fml0000644000175000017500000000323011215421102026040 0ustar twernertwerner Test the macro support Question

Answer with macro

Macro Question

Macro Answer

doxia-1.1.4/doxia-modules/doxia-module-fml/src/test/resources/test.fml0000644000175000017500000010357011215421102025726 0ustar twernertwerner General What does Maven mean?

A maven (yi.=meyvn) is an experienced or knowledgeable person, such as an expert or freak.

Where Can I Get Help? Where do I get help on Maven?

For help getting started, or basic use of Maven, refer to the documentation that can be found from the left navigation of this site.

If these documents, and the other questions in this FAQ don't help you with your problem, the Maven User List is a good source for help. Lots of problems have already been discussed there, so please search the mailing list archive before posting a question or a new idea. Most of the Maven developers are subscribed to the Maven User List, so there is no need to post to the Maven Developers list unless you want to discuss making a change to Maven itself.

Maven developers meet via IRC: irc.codehaus.org, channel #maven. But please don't ask for solutions to Maven problems there, as Maven user problems should be discussed at the mailing list for several good reasons (e.g. mail archive, more subscribers) and usually you get a quick answer on the mailing list. But feel free to drop in and say hi.

You should not mail developers directly for Maven related issues, for 2 reasons. The most important is that the project operates in the public, so all discussions should be kept on the list (for the same reasons as given above). Secondly, they are busy and in various timezones, so mailing to the list ensures you get the most prompt response from someone available and able to commit their time at the moment. Direct questions to developers will rarely be answered.

How do I find help on a specific goal?

All Maven goals are provided by plugins. For example, the goals jar and jar:install are provided by the jar plugin. You can find a list of plugins and there documentation here.

Where can I get help on Jelly?

Jelly is a reasonably active project of it's own, used beyond Maven. If you have any questions about it, including how to do certain Jelly things in a Maven build file, you should ask the question on the Jelly mailing lists.

While the Maven User List archive is a good place to search for answers, it is preferred that you only ask Jelly specific questions there if you were unable to find an answer on the Jelly lists.

Contributing I found a bug. How do I report it?

First, we'd appreciate if you search the Mailing List Archives to see if anyone else has encountered it and found a resolution or a workaround.

If you are not using the current release of Maven, it is also worth trying that, and specifically checking the release notes to see if that bug might have already been addressed.

If you are sure it is a bug, then it should go into JIRA, the issue tracking application for Maven. First, search the Maven project (or related plugin) to see if the bug has already been reported. If not, create a new issue. You must be registered and logged in to do so. This enables you to be contacted if the bug is fixed or more information is required.

The location of Maven's JIRA instance is listed on the Issue Tracking page.

Please be patient. While the issue will usually be reviewed immediately, bugs do not always get fixed as quickly. However, if you are able to submit your own fix, it will usually be applied for the next release. See Submitting Patches for more information.

I have such a cool new idea for a feature. Where do I suggest it?

Great! The process is very similar as for Filing a Bug Report.

Firstly - are you sure its a new idea? Try searching the Mailing List Archives for both the user and developer lists to see if a similar idea has already been discussed.

Likewise, you should also search JIRA to see if someone has proposed it as a feature request already.

If not, there are two ways to proceed. If you have a rough idea but think it needs some discussion with the developers, try posting to the developers mailing list. So that they know initially that you have already thought this through, briefly detail what you did or didn't find when searching the mail archives.

Once you are confident that the idea is solid and fits the current direction of the project, submit it to JIRA as a feature request.

Please be patient. While the issue will usually be reviewed immediately, features are usually not implemented until the start of the next major development cycle. However, if you are able to submit your own implementation, it will usually be applied for the next release. See Submitting Patches for more information.

How do I submit my own fix or new feature?

Bug fixes and features submitted by non-committers of the project take the form of a patch. Submitting your own patch will ensure that the bug or feature gets addressed sooner, and gives the submitter the warm fuzzy feeling from helping out!

Before working on a patch for a bug fix or new feature, it is essential that the steps above are followed to ensure that there isn't already a patch, or that a new feature has been previously decided against because it does not match the direction of the project. You don't want to waste time preparing a patch if it won't be used, so please take the time to consult the current developers list in advance.

When preparing the patch, make sure it is against the latest code in version control by doing a full update and testing it again. The easiest way to prepare the patch is then to run this in the base directory of your source control checkout:

maven scm:create-patch

This is basically equivalent to running svn diff. Attach the resulting patch file to a JIRA issue. Please rename it to the name of the JIRA issue so a developer can save it and still know what it is. Do not mail it directly to a particular developer, or to the developers mailing list as attachments are often stripped or the mails lost.

If you did not create the original JIRA issue, it is important that you select to "watch" the issue so that feedback on the patch can be given.

If you are fixing a bug, make sure you submit a test case that fails without the patch, but succeeds with the patch applied, proving that it works.

If you are submitting a new feature, it is important that you include test cases to verify the feature works, and documentation for users on how it works.

It is important that you don't submit whole replacement files instead of differences or differences where unrelated code is changed - such as changing formatting or spacing. Patches that violate these rules will often not be applied.

Finally, adhere to the coding standards of the project, respecting the settings of the code surrounding that of the change. This includes whitespace, and ensuring that spaces are used instead of tab characters.

If these rules are followed, you will usually find that developers will joyfully and quickly apply the patch, and be appreciative of the efforts put in to help out.

Using Maven What's the problem with entities in project.xml?

As of Maven 1.1, external entities will not be enabled by default in project.xml, and their use is discouraged in Maven 1.0.x as well. There will still be the ability to use them, but it will have to be enabled.

There are several reasons for this, but the main reason is that the content of project.xml needs to be completely self-contained and and able to be reproduced from a history at any point in time.

For this reason, using Jelly expressions other than ${pom.*} references is also not recommended and likely to be unsupported in future.

The most common use of this technique is to manage dependencies across multiple projects. You should strongly consider using inheritence for this purpose.

Note: special character entities will always be supported and should not have any current issues.

How do I stop my top level properties being inherited in subprojects? I only want to inherit the project.xml file.

This is a result of using the same project file at the top level of your multiple project structure as the master build (ie, where you run your multiproject goals from) and the root of your project inheritence tree.

We recommend that you separate these concerns by having both a master build project and a parent project for extension (see the maven-plugins CVS tree for an example). Ther master build should remain in the top level directory, but the shared project file should be in a subdirectory such as common-build.

How do I make my build complete even with broken tests?

See the Test Plugin Reference. Most notably, maven.test.skip and maven.test.failure.ignore. Heed the warnings!

Where does the output from my JUnit tests go?

If you are running test:test, the exceptions will usually be output to ./target/test-reports/some.package.SomeClassTest.txt. If you want to see the errors in the output, set the property maven.junit.usefile to false.

How do I disable a report on my site?

The preferred way is to specify your own <reports/> section in the POM. Reports are not inherited from parent projects, so only those included will be used. The default reports are:

maven-jdepend-plugin maven-checkstyle-plugin maven-changes-plugin maven-changelog-plugin maven-developer-activity-plugin maven-file-activity-plugin maven-license-plugin maven-javadoc-plugin maven-jxr-plugin maven-junit-report-plugin maven-linkcheck-plugin maven-tasklist-plugin ]]>

If there is one specific report you want to disable, you can do so with a post-goal. For example, to disable linkcheck whenever the maven.linkcheck.disable property is set, add this to your maven.xml file:

linkcheck is disabled. ]]>
How do I use Maven with XDoclet?

The XDoclet plugin is provided by the XDoclet developers. All questions about it should be directed to the XDoclet mailing lists.

Maven takes a long time to load. Is there anyway to speed things up?

You can use the Console Plugin to get an interactive shell that will let load Maven once and run as many goals as you want. On average machines it takes something like ten seconds to compile and run unit tests, so that you can build often and test your code often.

Do I need to specify all the dependencies in the POM?

The short answer is YES. Maven 2 will have a transitive dependency discovery mechanism that will avoid this.

How do I provide multiple source directories in my project.xml?

You can't. However, if you really need it, you can use a snippet in maven.xml:

]]>

Please think about the reason you need this, and carefully consider whether it is necessary. Usually this is used for writing plugins that handle source generation.

How can I customise the configuration for an entire installation?

Currently you can only configure settings at a project and per-user level. There are no site-wise configuration settings available.

How can I customise Maven's logging?

Maven uses Log4J to log all of its output.

If you would like to write certain information to a file and piping is not an option or you want greater control over what is controlled, you can override the log4j configuration. Refer to the log4j documentation for how to override this using system properties.

Why shouldn't I use the dependency classloader override property?

Because in most cases it isn't needed. root.maven is equivalent to the project classloader, so is never needed. While root is the Ant classloader and has some valid uses, you should not load tasks into it unless absolutely necessary as it will then force itself on the other plugins executed afterwards. In particular any jakarta-commons libraries should not be in the root classloader as these can clash with Jelly.

The correct way to use ant tasks in maven.xml or a plugin is something like:

]]>
How do I add a JAR from a non-Maven project to my local repository?

If it is a JAR that cannot be uploaded to Ibiblio because of a license, or it is private, you must manually copy it to your local repository. After picking a sensible group ID, and making sure the filename is in the format artifactId-version.jar, copy it to ${maven.repo.local}/groupId/jars/artifactId-version.jar.

I share a development machine. How can I share the local repository to save downloading?

It is recommended that you do not share your local repository. The reason for this is that as you build your projects, part of the process is usually to install your changes there for sharing with other projects you are working on that depend on it.

If you share this with multiple developers, you will have to communicate with them about when you will be developing a certain project to ensure your changes don't clash, and ensure each person is always completely up to date.

Usually, it is better to work with a shared remote repository that you run yourself. This means that dependencies are only downloaded once from the internet, and then downloaded to the local cache for each developer as they need it. Company artifacts can also be published there.

See Working with Repositories for more information.

If after this you really want to share a local repository, you can set the maven.repo.local property. This is a directory (not a URL). The directory pointed to must be readable by all of the users and may need to be writable if the users will be allowed to download dependencies or publish their changes. The file system mask must also be set correctly so that changes retain the correct permissions.

Please note that this solution will not be supported by the Maven Users Mailing List, however.

Ibiblio Why is the Maven repository on Ibiblio and not at Apache?

There are several reasons why the Maven Repository was setup at Ibiblio. Ibiblio is a massive archive of almost everything you could imagine but one of the stated goals of Ibiblio is to "Expand and improve the distribution of open source software". There is really no limit to how much we can stuff in the repository at Ibiblio and it will be archived indefinitely. They have a lot of bandwith, good redundancy and have a very secure setup. Another reason we placed the repository there was that it is Apache policy not to store any (L)GPL artifacts on our servers. We wanted Maven to work for as many Java developers as possible so we chose Ibiblio where there is no restriction on store (L)GPL artifacts. You can find out more about Ibiblio here.

How do I upload a resource to or update a resource on http://www.ibiblio.org/maven?

Read Uploading to Ibiblio Instructions.

Are there any mirrors for the Maven repository at ibiblio?

Yes, there are at least the following:

  • http://www.ibiblio.org/maven/
  • http://public.planetmirror.com/pub/maven/
  • http://mirrors.sunsite.dk/maven/
  • http://ftp.up.ac.za/pub/linux/maven/
  • http://download.au.kde.org/pub/maven/
Can I search the repositories?

There is a service available at http://maven.ozacc.com/ that provides a search service, though not affiliated with the Maven project.

Scripting How do I get or set plugin properties from Jelly?

Plugin properties can be used with the following tags: maven:get and maven:set. (These replace the deprecated versions of ${pom.getPluginContext(...).get/setVariable()} and maven:pluginVar.)

Example:

The WAR source directory is ${warSourceDir} ... ]]>
How do I spin off a background process in a goal?

For example, before starting unit tests you might need to start a DB server. The DB server blocks until it is terminated, so it needs to be started in the background. <ant:parallel/> does not seem to work in this case because it blocks the main execution thread, which is exactly what needs to be avoided.

The solution is given in this thread.

How do I get the XSLT tasks to work?

A common symptom is that the Jelly or Ant tag are output instead of being processed. See MAVEN-156.

The solution is to add the JAXP system property via the Jelly script.

]]>

Also make sure that Xalan is declared as dependencies in your project file, and added to the root classloader so that Ant can find it:

xalan xalan 2.3.1 http://xml.apache.org/xalan/ root ]]>
How do I share build code between projects?

Write your own Maven plugin. It's not as difficult as you may think it is, and it will probably save you much time when your code grows in size.

Please read the Developing Plugins documentation for instructions on how to do this.

It can also be helpful to refer to the source code for the existing Maven plugins which you already have installed.

How do I share my Maven plugin with others? Read Sharing Plugins.
Troubleshooting Maven How can I get Maven to give more verbose output?

If you received an exception at the end and want a full stack trace for more information, you can run the same maven command again with the -e switch, eg:

maven -e jar:jar

If you would like a full set of debugging information to trace what Maven is doing, you can run the same maven command again with the -X switch, eg:

maven -X jar:jar

Note that -X implies -e, so there is no need to use both.

Why do the unit tests fail under Java 1.4?

It is possible that the XML parser included with Maven is interfering with the XML parser included in Java 1.4. Please set the ${maven.junit.fork} property to yes.

Why does change log ask me to check out the source code?

When you run the cvs change log report in Maven, you may see an error occasionally, such as:

This is caused by the cvs log command finding a directory in it's repository that you don't have locally. Note: The directory may not appear on a checkout or update if it is empty in the repository. Please do a clean checkout of the code and retry the report.

I have problems generating the changelog report. Why?

When you run the cvs change log report in Maven, the report hangs or the final output is blank.

This is typically caused by the cvs command not running correctly. The first port of call is to check Maven's output, search the lines containing for "SCM".

Try running the command that you find in the log file manually. The results typically speak for themselves.

maven site fails with bizarre Jelly errors, what can I do? When I try to generate my site I get something like this: Invalid source argument. Must be a String, Reader, InputStream or URL. Was type; java.io.File with value: /home/jvanzyl/js/com.werken/drools/target/jdepend-raw-report.xml Total time: 12 seconds]]>

This problem has been observed when a version of Jelly used as a dependency is different than the one distributed with Maven. If you align your versions of Jelly you should be able to generate your site.

Ant What is the equivalent of ant -projecthelp in Maven?

To some extent, maven -u behaves the same way. For more information, please read the Quick Start guide.

I've heard Maven is much slower than Ant. Is there anything I can do to make it faster?

This has become a bit of an urban myth now, as Maven takes very little more than Ant to initialise (with the exception of the very first run when plugins must be unpacked and parsed).

Part of the misconception comes from claims that building the site or building 30 projects takes a lot of CPU and memory. Well, this would happen in Ant too if it were attempted! Some extensions to Ant that build a web site take considerably longer than Maven to do that task. This area is also a focus for future development so that generating these parts of the build are much faster.

When it comes down to your day to day development and edit-build-test cycle, you can speed up Maven's initialisation time by running the console, as shown in this FAQ answer. This console keeps Maven loaded and ready to do your bidding for a specific project, and makes Maven faster than Ant for performing equivalent, subsequent builds!

How can I filter properties into resource files as part of the build?

This can be done using resource filtering. In your POM, add the filtering property to your existing resources definition. Please refer to Resources for more information.

Building Maven How do I build Maven?

Please see the Building Maven from Source document.

How do I build Maven from behind a firewall?

You typically need to set your HTTP proxy host and port details so that Maven can tunnel through your HTTP Proxy. To do this you typically need to set the maven.proxy.host and maven.proxy.port properties.

See the Properties Reference for more details.
doxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/0000755000175000017500000000000011632765557023204 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/0000755000175000017500000000000011632765557023773 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/0000755000175000017500000000000011632765557025214 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/0000755000175000017500000000000011632765557026322 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765557027426 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765557030713 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/0000755000175000017500000000000011632765557031471 5ustar twernertwerner././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.javadoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParser0000644000175000017500000003237711215523277033307 0ustar twernertwernerpackage org.apache.maven.doxia.module.fml; /* * 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.File; import java.io.FileReader; import java.io.Reader; import java.io.Writer; import java.util.Iterator; import java.util.List; import org.apache.maven.doxia.parser.AbstractParserTest; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; import org.apache.maven.doxia.sink.XhtmlBaseSink; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; /** * @author Emmanuel Venisse * @version $Id: FmlParserTest.java 784948 2009-06-15 19:53:35Z ltheussl $ */ public class FmlParserTest extends AbstractParserTest { private FmlParser parser; /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); parser = (FmlParser) lookup( Parser.ROLE, "fml" ); // AbstractXmlParser.CachedFileEntityResolver downloads DTD/XSD files in ${java.io.tmpdir} // Be sure to delete them String tmpDir = System.getProperty( "java.io.tmpdir" ); String excludes = "fml-*.xsd, xml.xsd"; List tmpFiles = FileUtils.getFileNames( new File( tmpDir ), excludes, null, true ); for ( Iterator it = tmpFiles.iterator(); it.hasNext(); ) { File tmpFile = new File( it.next().toString() ); tmpFile.delete(); } } /** {@inheritDoc} */ protected Parser createParser() { return parser; } /** {@inheritDoc} */ protected String outputExtension() { return "fml"; } /** @throws Exception */ public void testFaqEventsList() throws Exception { SinkEventTestingSink sink = new SinkEventTestingSink(); Reader reader = null; try { reader = getTestReader( "simpleFaq" ); createParser().parse( reader, sink ); } finally { IOUtil.close( reader ); } Iterator it = sink.getEventList().iterator(); assertEquals( "comment", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "title", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedList", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedListItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedListItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedList_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionList", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionList_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testEntities() throws Exception { final String text = "]>" + "" + "" + "

<img>

" + "
"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.setValidate( false ); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "title", ( (SinkEventElement) it.next() ).getName() ); // head title TODO: should be two events assertTextEvent( (SinkEventElement) it.next(), "&Α" ); assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() ); // faq title TODO: should be two events assertTextEvent( (SinkEventElement) it.next(), "&Α" ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); // part title in TOC assertTextEvent( (SinkEventElement) it.next(), "<" ); assertTextEvent( (SinkEventElement) it.next(), "\u0391" ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedList", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedListItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); // question in TOC assertTextEvent( (SinkEventElement) it.next(), ">" ); assertTextEvent( (SinkEventElement) it.next(), "\u0391" ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedListItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedList_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); // part title assertTextEvent( (SinkEventElement) it.next(), "<" ); assertTextEvent( (SinkEventElement) it.next(), "\u0391" ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionList", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() ); // question assertTextEvent( (SinkEventElement) it.next(), ">" ); assertTextEvent( (SinkEventElement) it.next(), "\u0391" ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); // answer assertEquals( "monospaced", ( (SinkEventElement) it.next() ).getName() ); assertTextEvent( (SinkEventElement) it.next(), "<" ); assertTextEvent( (SinkEventElement) it.next(), "img" ); assertTextEvent( (SinkEventElement) it.next(), ">" ); assertEquals( "monospaced_", ( (SinkEventElement) it.next() ).getName() ); assertTextEvent( (SinkEventElement) it.next(), "\"" ); assertTextEvent( (SinkEventElement) it.next(), "\u0391" ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionList_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** * @throws Exception if any * @since 1.1.1 */ public void testFaqMacro() throws Exception { Writer output = null; Reader reader = null; try { output = getTestWriter( "macro" ); reader = getTestReader( "macro" ); Sink sink = new XhtmlBaseSink( output ); createParser().parse( reader, sink ); sink.close(); } finally { IOUtil.close( output ); IOUtil.close( reader ); } File f = getTestFile( getBasedir(), outputBaseDir() + getOutputDir() + "macro.fml" ); assertTrue( "The file " + f.getAbsolutePath() + " was not created", f.exists() ); String content; try { reader = new FileReader( f ); content = IOUtil.toString( reader ); } finally { IOUtil.close( reader ); } assertTrue( content.indexOf( "Macro Question" ) != -1 ); } private void assertTextEvent( SinkEventElement textEvt, String string ) { assertEquals( "text", textEvt.getName() ); assertEquals( string, textEvt.getArgs()[0] ); } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.javadoxia-1.1.4/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValida0000644000175000017500000000523211215421102033221 0ustar twernertwernerpackage org.apache.maven.doxia.module.fml; /* * 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.File; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.maven.doxia.markup.XmlMarkup; import org.apache.maven.doxia.xsd.AbstractXmlValidatorTest; import org.codehaus.plexus.util.StringUtils; /** * Test FML files with namespace. * * @author Vincent Siveton * @version $Id: FmlValidatorTest.java 784718 2009-06-15 10:28:18Z vsiveton $ * @since 1.0 */ public class FmlValidatorTest extends AbstractXmlValidatorTest { /** The xsd to use */ private static final File FML_XSD = new File( getBasedir(), "/src/main/resources/fml-1.0.1.xsd" ); /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); } /** {@inheritDoc} */ protected void tearDown() throws Exception { super.tearDown(); } /** {@inheritDoc} */ protected String[] getIncludes() { return new String[] { "**/*.fml" }; } /** {@inheritDoc} */ protected String addNamespaces( String content ) { Pattern pattern = Pattern.compile( ".*<([A-Za-z][A-Za-z0-9:_.-]*)([^>]*)>.*" ); Matcher matcher = pattern.matcher( content ); if ( matcher.find() ) { String root = matcher.group( 1 ); String value = matcher.group( 2 ); if ( value.indexOf( FML_XSD.getName() ) == -1 ) { String faqs = "<" + root + " xmlns=\"" + FmlMarkup.FML_NAMESPACE + "\"" + " xmlns:xsi=\"" + XmlMarkup.XML_NAMESPACE + "\"" + " xsi:schemaLocation=\"" + FmlMarkup.FML_NAMESPACE + " " + FML_XSD.toURI() + "\" "; return StringUtils.replace( content, "<" + root, faqs ); } } return content; } } doxia-1.1.4/doxia-modules/doxia-module-fml/src/site/0000755000175000017500000000000011632765557022250 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/site/apt/0000755000175000017500000000000011632765557023034 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/site/apt/using-fml-xsd.apt0000644000175000017500000000265511215434414026225 0ustar twernertwerner ----- Using Schema FML 1.0.1 ----- Vincent Siveton ------ 2009-06-15 ------ ~~ 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 Using Schema FML 1.0.1 The FML XSD is located {{{http://maven.apache.org/xsd/fml-1.0.1.xsd}here}}. Your favorite IDE probably supports XSD schema's for .fml files. You need to specify the following: +-----+ ... +-----+ doxia-1.1.4/doxia-modules/doxia-module-fml/src/site/site.xml0000644000175000017500000000257311215434414023723 0ustar twernertwerner doxia-1.1.4/doxia-modules/doxia-module-fml/src/main/0000755000175000017500000000000011632765557022230 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/resources/0000755000175000017500000000000011632765557024242 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/resources/fml-1.0.1.xsd0000644000175000017500000025600711215421102026151 0ustar twernertwerner Doxia FML (FAQ Markup Language) 1.0.1 XML Schema. This is based on: Extensible HTML version 1.0 Transitional XML Schema http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd For further information, see: http://maven.apache.org/doxia/references/fml-format.html ================ Character mnemonic entities ========================= XHTML entity sets are identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent" PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent" PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent" ================== Imported Names ==================================== media type, as per [RFC2045] comma-separated list of media types, as per [RFC2045] a character encoding, as per [RFC2045] a space separated list of character encodings, as per [RFC2045] a language code, as per [RFC3066] a single character, as per section 2.2 of [XML] one or more digits tabindex attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros. space-separated list of link types single or comma-separated list of media descriptors a Uniform Resource Identifier, see [RFC2396] a space separated list of Uniform Resource Identifiers date and time information. ISO date format script expression style sheet data used for titles etc. render in this frame nn for pixels or nn% for percentage length pixel, percentage, or relative integer representing length in pixels these are used for image maps comma separated list of lengths used for object, applet, img, input and iframe a color using sRGB: #RRGGBB as Hex values There are also 16 widely known color names with their sRGB values: Black = #000000 Green = #008000 Silver = #C0C0C0 Lime = #00FF00 Gray = #808080 Olive = #808000 White = #FFFFFF Yellow = #FFFF00 Maroon = #800000 Navy = #000080 Red = #FF0000 Blue = #0000FF Purple = #800080 Teal = #008080 Fuchsia= #FF00FF Aqua = #00FFFF =================== Generic Attributes =============================== core attributes common to most elements id document-wide unique id class space separated list of classes style associated style info title advisory title/amplification internationalization attributes lang language code (backwards compatible) xml:lang language code (as per XML 1.0 spec) dir direction for weak/neutral text attributes for common UI events onclick a pointer button was clicked ondblclick a pointer button was double clicked onmousedown a pointer button was pressed down onmouseup a pointer button was released onmousemove a pointer was moved onto the element onmouseout a pointer was moved away from the element onkeypress a key was pressed and released onkeydown a key was pressed down onkeyup a key was released attributes for elements that can get the focus accesskey accessibility key character tabindex position in tabbing order onfocus the element got the focus onblur the element lost the focus text alignment for p, div, h1-h6. The default is align="left" for ltr headings, "right" for rtl =================== Text Elements ==================================== these can only occur at block level these can only occur at block level "Inline" covers inline or "text-level" element ================== Block level elements ============================== "Flow" mixes block and inline and is used for list items etc. ================== Content models for exclusions ===================== a elements use "Inline" excluding a pre uses "Inline" excluding img, object, applet, big, small, font, or basefont form uses "Flow" excluding form button uses "Flow" but excludes a, form, form controls, iframe ================ Document Head ======================================= content model is "head.misc" combined with a single title and an optional base element in any order The title element is not considered part of the flow of text. It should be displayed, for example as the page header or window title. Exactly one title is required per document. document base URI generic metainformation Relationship values can be used in principle: a) for document specific toolbars/menus when used with the link element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel="stylesheet") c) to make a link to a script (rel="script") d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a PostScript or PDF version (rel="alternate" media="print") style info, which may include CDATA sections script statements, which may include CDATA sections alternate content container for non script-based rendering ======================= Frames ======================================= inline subwindow alternate content container for non frame-based rendering =================== Document Body ==================================== generic language/style container =================== Paragraphs ======================================= =================== Headings ========================================= There are six levels of headings from h1 (the most important) to h6 (the least important). =================== Lists ============================================ Unordered list bullet styles Unordered list Ordered list numbering style 1 arabic numbers 1, 2, 3, ... a lower alpha a, b, c, ... A upper alpha A, B, C, ... i lower roman i, ii, iii, ... I upper roman I, II, III, ... The style is applied to the sequence number which by default is reset to 1 for the first list item in an ordered list. Ordered (numbered) list single column list (DEPRECATED) multiple column list (DEPRECATED) LIStyle is constrained to: "(ULStyle|OLStyle)" list item definition lists - dt for term, dd for its definition =================== Address ========================================== information on author =================== Horizontal Rule ================================== =================== Preformatted Text ================================ content is "Inline" excluding "img|object|applet|big|small|sub|sup|font|basefont" =================== Block-like Quotes ================================ =================== Text alignment =================================== center content =================== Inserted/Deleted Text ============================ ins/del are allowed in block and inline content, but its inappropriate to include block content within an ins element occurring in inline content. ================== The Anchor Element ================================ content is "Inline" except that anchors shouldn't be nested ===================== Inline Elements ================================ generic language/style container I18N BiDi over-ride forced line break emphasis strong emphasis definitional program code sample something user would type variable citation abbreviation acronym inlined quote subscript superscript fixed pitch font italic font bold font bigger font smaller font underline strike-through strike-through base font size local change to font ==================== Object ====================================== object is used to embed objects as part of HTML pages. param elements should precede other content. Parameters can also be expressed as attribute/value pairs on the object element itself when brevity is desired. param is used to supply a named property value. In XML it would seem natural to follow RDF and support an abbreviated syntax where the param elements are replaced by attribute value pairs on the object start tag. =================== Java applet ================================== One of code or object attributes must be present. Place param elements before other content. =================== Images =========================================== To avoid accessibility problems for people who aren't able to see the image, you should provide a text description using the alt and longdesc attributes. In addition, avoid the use of server-side image maps. usemap points to a map element which may be in this document or an external document, although the latter is not widely supported ================== Client-side image maps ============================ These can be placed in the same document or grouped in a separate document although this isn't yet widely supported ================ Forms =============================================== Each label must not contain more than ONE field Label elements shouldn't be nested. form control the name attribute is required for all but submit & reset option selector option group selectable choice multi-line text field The fieldset element is used to group form fields. Only one legend element should occur in the content and if present should only be preceded by whitespace. NOTE: this content model is different from the XHTML 1.0 DTD, closer to the intended content model in HTML4 DTD fieldset label Content is "Flow" excluding a, form and form controls single-line text input control (DEPRECATED) ======================= Tables ======================================= Derived from IETF HTML table standard, see [RFC1942] The border attribute sets the thickness of the frame around the table. The default units are screen pixels. The frame attribute specifies which parts of the frame around the table should be rendered. The values are not the same as CALS to avoid a name clash with the valign attribute. The rules attribute defines which rules to draw between cells: If rules is absent then assume: "none" if border is absent or border="0" otherwise "all" horizontal placement of table relative to document horizontal alignment attributes for cell contents char alignment char, e.g. char=':' charoff offset for alignment char vertical alignment attributes for cell contents Use thead to duplicate headers when breaking table across page boundaries, or for static headers when tbody sections are rendered in scrolling panel. Use tfoot to duplicate footers when breaking table across page boundaries, or for static footers when tbody sections are rendered in scrolling panel. Use multiple tbody sections when rules are needed between groups of table rows. colgroup groups a set of col elements. It allows you to group several semantically related columns together. col elements define the alignment properties for cells in one or more columns. The width attribute specifies the width of the columns, e.g. width=64 width in screen pixels width=0.5* relative width of 0.5 The span attribute causes the attributes of one col element to apply to more than one column. Scope is simpler than headers attribute for common tables th is for headers, td for data and for cells acting as both ================== FML Specific ===================================== ================ Document Structure ================================== 1.0.0 The <faqs/> element is the root of the FML descriptor. 1.0.0 Required part element for this faqs element. 1.0.0 The identifier for this faqs element. 1.0.0 The title for this faqs element. 1.0.0 Boolean to generate optionally [top] links. 1.0 A part element of the faqs element. 1.0.0 Optional title for this part element. 1.0.0 Required faq element for this part element. 1.0.0 The identifier for this part element. 1.0.0 A faq element. 1.0.0 The question of this faq element. 1.0.0 The answer of this faq element. 1.0.0 The identifier of this faq element. 1.0.0 A faq question element. 1.0.0 A faq answer element. ================ Document Addons ===================================== See "special.extra" group. 1.0.0 A source element. 1.0.1 A macro element. doxia-1.1.4/doxia-modules/doxia-module-fml/src/main/mdo/0000755000175000017500000000000011632765557023007 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/mdo/fml.mdo0000644000175000017500000001147411137602162024253 0ustar twernertwerner fml Fml package org.apache.maven.doxia.module.fml.model Faqs <faqs> element is the root of the FML descriptor. The following table lists all of the possible child elements. ]]> 1.0.0 title 1.0.0 String FAQ true toplink 1.0.0 boolean true true parts 1.0.0 Part * true Part 1.0.0 id 1.0.0 String true title 1.0.0 String true faqs 1.0.0 Faq * true Faq 1.0.0 id 1.0.0 String true question 1.0.0 String true answer 1.0.0 String true doxia-1.1.4/doxia-modules/doxia-module-fml/src/main/components/0000755000175000017500000000000011632765557024415 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/components/components.xml0000644000175000017500000000260011215421102027266 0ustar twernertwerner org.apache.maven.doxia.parser.Parser fml org.apache.maven.doxia.module.fml.FmlParser Parse an xdoc model and emit events into the specified doxia Sink. org.apache.maven.doxia.macro.manager.MacroManager macroManager doxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/0000755000175000017500000000000011632765557023151 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/0000755000175000017500000000000011632765557023740 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/0000755000175000017500000000000011632765557025161 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/0000755000175000017500000000000011632765557026267 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765557027373 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765557030660 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/0000755000175000017500000000000011632765557031436 5ustar twernertwerner././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlSiteModule.javadoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlSiteMo0000644000175000017500000000255711212745470033213 0ustar twernertwernerpackage org.apache.maven.doxia.module.fml; /* * 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.site.AbstractSiteModule; /** *

FmlSiteModule class.

* * @author Emmanuel Venisse * @version $Id: FmlSiteModule.java 782392 2009-06-07 14:14:16Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="fml" */ public class FmlSiteModule extends AbstractSiteModule { /** * Default constructor. */ public FmlSiteModule() { super( "fml", "fml", "fml" ); } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.javadoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlConten0000644000175000017500000000730711244501034033226 0ustar twernertwernerpackage org.apache.maven.doxia.module.fml; /* * 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.macro.MacroExecutionException; import org.apache.maven.doxia.parser.XhtmlBaseParser; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Parse Fml questions and answers, these may contain arbitrary xdoc elements. * * @author ltheussl * @version $Id: FmlContentParser.java 807169 2009-08-24 12:05:48Z vsiveton $ * @since 1.0 */ public class FmlContentParser extends XhtmlBaseParser implements FmlMarkup { /** Empty elements don't write a closing tag. */ private boolean isEmptyElement; /** {@inheritDoc} */ protected void handleStartTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { isEmptyElement = parser.isEmptyElementTag(); if ( parser.getName().equals( QUESTION_TAG.toString() ) || parser.getName().equals( TITLE.toString() ) || parser.getName().equals( ANSWER_TAG.toString() ) ) { // ignore return; } else if ( parser.getName().equals( SOURCE_TAG.toString() ) ) { verbatim(); sink.verbatim( SinkEventAttributeSet.BOXED ); } else if ( !baseStartTag( parser, sink ) ) { if ( isEmptyElement ) { handleUnknown( parser, sink, TAG_TYPE_SIMPLE ); } else { handleUnknown( parser, sink, TAG_TYPE_START ); } if ( getLog().isDebugEnabled() ) { String position = "[" + parser.getLineNumber() + ":" + parser.getColumnNumber() + "]"; String tag = "<" + parser.getName() + ">"; getLog().debug( "Unrecognized fml tag: " + tag + " at " + position ); } } } /** {@inheritDoc} */ protected void handleEndTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { if ( parser.getName().equals( QUESTION_TAG.toString() ) || parser.getName().equals( TITLE.toString() ) || parser.getName().equals( ANSWER_TAG.toString() ) ) { // ignore return; } else if ( parser.getName().equals( SOURCE_TAG.toString() ) ) { verbatim_(); sink.verbatim_(); } else if ( !baseEndTag( parser, sink ) ) { if ( !isEmptyElement ) { handleUnknown( parser, sink, TAG_TYPE_END ); } } isEmptyElement = false; } /** {@inheritDoc} */ protected void init() { super.init(); this.isEmptyElement = false; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.javadoxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser0000644000175000017500000005726111244501034033240 0ustar twernertwernerpackage org.apache.maven.doxia.module.fml; /* * 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.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; import javax.swing.text.html.HTML.Attribute; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.macro.manager.MacroNotFoundException; import org.apache.maven.doxia.module.fml.model.Faq; import org.apache.maven.doxia.module.fml.model.Faqs; import org.apache.maven.doxia.module.fml.model.Part; import org.apache.maven.doxia.parser.AbstractXmlParser; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.XhtmlBaseSink; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Parse a fml model and emit events into the specified doxia Sink. * * @author Emmanuel Venisse * @author ltheussl * @version $Id: FmlParser.java 807169 2009-08-24 12:05:48Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="fml" */ public class FmlParser extends AbstractXmlParser implements FmlMarkup { /** Collect a faqs model. */ private Faqs faqs; /** Collect a part. */ private Part currentPart; /** Collect a single faq. */ private Faq currentFaq; /** Used to collect text events. */ private StringBuffer buffer; /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ private Map warnMessages; /** The source content of the input reader. Used to pass into macros. */ private String sourceContent; /** A macro name. */ private String macroName; /** The macro parameters. */ private Map macroParameters = new HashMap(); /** {@inheritDoc} */ public void parse( Reader source, Sink sink ) throws ParseException { this.faqs = null; this.sourceContent = null; init(); try { StringWriter contentWriter = new StringWriter(); IOUtil.copy( source, contentWriter ); sourceContent = contentWriter.toString(); } catch ( IOException ex ) { throw new ParseException( "Error reading the input source: " + ex.getMessage(), ex ); } finally { IOUtil.close( source ); } try { Reader tmp = new StringReader( sourceContent ); this.faqs = new Faqs(); // this populates faqs super.parse( tmp, sink ); writeFaqs( sink ); } finally { logWarnings(); this.faqs = null; this.sourceContent = null; setSecondParsing( false ); init(); } } /** {@inheritDoc} */ protected void handleStartTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { if ( parser.getName().equals( FAQS_TAG.toString() ) ) { String title = parser.getAttributeValue( null, "title" ); if ( title != null ) { faqs.setTitle( title ); } String toplink = parser.getAttributeValue( null, "toplink" ); if ( toplink != null ) { if ( toplink.equalsIgnoreCase( "true" ) ) { faqs.setToplink( true ); } else { faqs.setToplink( false ); } } } else if ( parser.getName().equals( PART_TAG.toString() ) ) { currentPart = new Part(); currentPart.setId( parser.getAttributeValue( null, Attribute.ID.toString() ) ); if ( currentPart.getId() == null ) { throw new XmlPullParserException( "id attribute required for at: (" + parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); } else if ( !DoxiaUtils.isValidId( currentPart.getId() ) ) { String linkAnchor = DoxiaUtils.encodeId( currentPart.getId(), true ); String msg = "Modified invalid link: '" + currentPart.getId() + "' to '" + linkAnchor + "'"; logMessage( "modifiedLink", msg ); currentPart.setId( linkAnchor ); } } else if ( parser.getName().equals( TITLE.toString() ) ) { buffer = new StringBuffer(); buffer.append( String.valueOf( LESS_THAN ) ).append( parser.getName() ) .append( String.valueOf( GREATER_THAN ) ); } else if ( parser.getName().equals( FAQ_TAG.toString() ) ) { currentFaq = new Faq(); currentFaq.setId( parser.getAttributeValue( null, Attribute.ID.toString() ) ); if ( currentFaq.getId() == null ) { throw new XmlPullParserException( "id attribute required for at: (" + parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); } else if ( !DoxiaUtils.isValidId( currentFaq.getId() ) ) { String linkAnchor = DoxiaUtils.encodeId( currentFaq.getId(), true ); String msg = "Modified invalid link: '" + currentFaq.getId() + "' to '" + linkAnchor + "'"; logMessage( "modifiedLink", msg ); currentFaq.setId( linkAnchor ); } } else if ( parser.getName().equals( QUESTION_TAG.toString() ) ) { buffer = new StringBuffer(); buffer.append( String.valueOf( LESS_THAN ) ).append( parser.getName() ) .append( String.valueOf( GREATER_THAN ) ); } else if ( parser.getName().equals( ANSWER_TAG.toString() ) ) { buffer = new StringBuffer(); buffer.append( String.valueOf( LESS_THAN ) ).append( parser.getName() ) .append( String.valueOf( GREATER_THAN ) ); } // ---------------------------------------------------------------------- // Macro // ---------------------------------------------------------------------- else if ( parser.getName().equals( MACRO_TAG.toString() ) ) { handleMacroStart( parser ); } else if ( parser.getName().equals( PARAM.toString() ) ) { handleParamStart( parser, sink ); } else if ( buffer != null ) { buffer.append( String.valueOf( LESS_THAN ) ).append( parser.getName() ); int count = parser.getAttributeCount(); for ( int i = 0; i < count; i++ ) { buffer.append( String.valueOf( SPACE ) ).append( parser.getAttributeName( i ) ); buffer.append( String.valueOf( EQUAL ) ).append( String.valueOf( QUOTE ) ); // TODO: why are attribute values HTML-encoded? buffer.append( HtmlTools.escapeHTML( parser.getAttributeValue( i ) ) ); buffer.append( String.valueOf( QUOTE ) ); } buffer.append( String.valueOf( GREATER_THAN ) ); } } /** {@inheritDoc} */ protected void handleEndTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { if ( parser.getName().equals( FAQS_TAG.toString() ) ) { // Do nothing return; } else if ( parser.getName().equals( PART_TAG.toString() ) ) { faqs.addPart( currentPart ); currentPart = null; } else if ( parser.getName().equals( FAQ_TAG.toString() ) ) { if ( currentPart == null ) { throw new XmlPullParserException( "Missing at: (" + parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); } currentPart.addFaq( currentFaq ); currentFaq = null; } else if ( parser.getName().equals( QUESTION_TAG.toString() ) ) { if ( currentFaq == null ) { throw new XmlPullParserException( "Missing at: (" + parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); } buffer.append( String.valueOf( LESS_THAN ) ).append( String.valueOf( SLASH ) ) .append( parser.getName() ).append( String.valueOf( GREATER_THAN ) ); currentFaq.setQuestion( buffer.toString() ); buffer = null; } else if ( parser.getName().equals( ANSWER_TAG.toString() ) ) { if ( currentFaq == null ) { throw new XmlPullParserException( "Missing at: (" + parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); } buffer.append( String.valueOf( LESS_THAN ) ).append( String.valueOf( SLASH ) ) .append( parser.getName() ).append( String.valueOf( GREATER_THAN ) ); currentFaq.setAnswer( buffer.toString() ); buffer = null; } else if ( parser.getName().equals( TITLE.toString() ) ) { if ( currentPart == null ) { throw new XmlPullParserException( "Missing at: (" + parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); } buffer.append( String.valueOf( LESS_THAN ) ).append( String.valueOf( SLASH ) ) .append( parser.getName() ).append( String.valueOf( GREATER_THAN ) ); currentPart.setTitle( buffer.toString() ); buffer = null; } // ---------------------------------------------------------------------- // Macro // ---------------------------------------------------------------------- else if ( parser.getName().equals( MACRO_TAG.toString() ) ) { handleMacroEnd( buffer ); } else if ( parser.getName().equals( PARAM.toString() ) ) { if ( !StringUtils.isNotEmpty( macroName ) ) { handleUnknown( parser, sink, TAG_TYPE_END ); } } else if ( buffer != null ) { if ( buffer.length() > 0 && buffer.charAt( buffer.length() - 1 ) == SPACE ) { buffer.deleteCharAt( buffer.length() - 1 ); } buffer.append( String.valueOf( LESS_THAN ) ).append( String.valueOf( SLASH ) ) .append( parser.getName() ).append( String.valueOf( GREATER_THAN ) ); } } /** {@inheritDoc} */ protected void handleText( XmlPullParser parser, Sink sink ) throws XmlPullParserException { if ( buffer != null ) { buffer.append( parser.getText() ); } // only significant text content in fml files is in , or } /** {@inheritDoc} */ protected void handleCdsect( XmlPullParser parser, Sink sink ) throws XmlPullParserException { String cdSection = parser.getText(); if ( buffer != null ) { buffer.append( LESS_THAN ).append( BANG ).append( LEFT_SQUARE_BRACKET ).append( CDATA ) .append( LEFT_SQUARE_BRACKET ).append( cdSection ).append( RIGHT_SQUARE_BRACKET ) .append( RIGHT_SQUARE_BRACKET ).append( GREATER_THAN ); } else { sink.text( cdSection ); } } /** {@inheritDoc} */ protected void handleComment( XmlPullParser parser, Sink sink ) throws XmlPullParserException { String comment = parser.getText(); if ( buffer != null ) { buffer.append( LESS_THAN ).append( BANG ).append( MINUS ).append( MINUS ) .append( comment ).append( MINUS ).append( MINUS ).append( GREATER_THAN ); } else { sink.comment( comment.trim() ); } } /** {@inheritDoc} */ protected void handleEntity( XmlPullParser parser, Sink sink ) throws XmlPullParserException { if ( buffer != null ) { if ( parser.getText() != null ) { String text = parser.getText(); // parser.getText() returns the entity replacement text // (< -> <), need to re-escape them if ( text.length() == 1 ) { text = HtmlTools.escapeHTML( text ); } buffer.append( text ); } } else { super.handleEntity( parser, sink ); } } /** {@inheritDoc} */ protected void init() { super.init(); this.currentFaq = null; this.currentPart = null; this.buffer = null; this.warnMessages = null; this.macroName = null; this.macroParameters = null; } /** * TODO import from XdocParser, probably need to be generic. * * @param parser not null * @throws MacroExecutionException if any */ private void handleMacroStart( XmlPullParser parser ) throws MacroExecutionException { if ( !isSecondParsing() ) { macroName = parser.getAttributeValue( null, Attribute.NAME.toString() ); if ( macroParameters == null ) { macroParameters = new HashMap(); } if ( StringUtils.isEmpty( macroName ) ) { throw new MacroExecutionException( "The '" + Attribute.NAME.toString() + "' attribute for the '" + MACRO_TAG.toString() + "' tag is required." ); } } } /** * TODO import from XdocParser, probably need to be generic. * * @param buffer not null * @throws MacroExecutionException if any */ private void handleMacroEnd( StringBuffer buffer ) throws MacroExecutionException { if ( !isSecondParsing() ) { if ( StringUtils.isNotEmpty( macroName ) ) { // TODO handles specific macro attributes macroParameters.put( "sourceContent", sourceContent ); FmlParser fmlParser = new FmlParser(); fmlParser.setSecondParsing( true ); macroParameters.put( "parser", fmlParser ); MacroRequest request = new MacroRequest( macroParameters, getBasedir() ); try { StringWriter sw = new StringWriter(); XhtmlBaseSink sink = new XhtmlBaseSink(sw); executeMacro( macroName, request, sink ); sink.close(); buffer.append( sw.toString() ); } catch ( MacroNotFoundException me ) { throw new MacroExecutionException( "Macro not found: " + macroName, me ); } } } // Reinit macro macroName = null; macroParameters = null; } /** * TODO import from XdocParser, probably need to be generic. * * @param parser not null * @param sink not null * @throws MacroExecutionException if any */ private void handleParamStart( XmlPullParser parser, Sink sink ) throws MacroExecutionException { if ( !isSecondParsing() ) { if ( StringUtils.isNotEmpty( macroName ) ) { String paramName = parser.getAttributeValue( null, Attribute.NAME.toString() ); String paramValue = parser.getAttributeValue( null, Attribute.VALUE.toString() ); if ( StringUtils.isEmpty( paramName ) || StringUtils.isEmpty( paramValue ) ) { throw new MacroExecutionException( "'" + Attribute.NAME.toString() + "' and '" + Attribute.VALUE.toString() + "' attributes for the '" + PARAM.toString() + "' tag are required inside the '" + MACRO_TAG.toString() + "' tag." ); } macroParameters.put( paramName, paramValue ); } else { // param tag from non-macro object, see MSITE-288 handleUnknown( parser, sink, TAG_TYPE_START ); } } } /** * Writes the faqs to the specified sink. * * @param faqs The faqs to emit. * @param sink The sink to consume the event. * @throws ParseException if something goes wrong. */ private void writeFaqs( Sink sink ) throws ParseException { FmlContentParser xdocParser = new FmlContentParser(); xdocParser.enableLogging( getLog() ); sink.head(); sink.title(); sink.text( faqs.getTitle() ); sink.title_(); sink.head_(); sink.body(); sink.section1(); sink.sectionTitle1(); sink.anchor( "top" ); sink.text( faqs.getTitle() ); sink.anchor_(); sink.sectionTitle1_(); // ---------------------------------------------------------------------- // Write summary // ---------------------------------------------------------------------- for ( Iterator partIterator = faqs.getParts().iterator(); partIterator.hasNext(); ) { Part part = (Part) partIterator.next(); if ( StringUtils.isNotEmpty( part.getTitle() ) ) { sink.paragraph(); sink.bold(); xdocParser.parse( part.getTitle(), sink ); sink.bold_(); sink.paragraph_(); } sink.numberedList( Sink.NUMBERING_DECIMAL ); for ( Iterator faqIterator = part.getFaqs().iterator(); faqIterator.hasNext(); ) { Faq faq = (Faq) faqIterator.next(); sink.numberedListItem(); sink.link( "#" + faq.getId() ); if ( StringUtils.isNotEmpty( faq.getQuestion() ) ) { xdocParser.parse( faq.getQuestion(), sink ); } else { throw new ParseException( "Missing <question> for FAQ '" + faq.getId() + "'" ); } sink.link_(); sink.numberedListItem_(); } sink.numberedList_(); } sink.section1_(); // ---------------------------------------------------------------------- // Write content // ---------------------------------------------------------------------- for ( Iterator partIterator = faqs.getParts().iterator(); partIterator.hasNext(); ) { Part part = (Part) partIterator.next(); if ( StringUtils.isNotEmpty( part.getTitle() ) ) { sink.section1(); sink.sectionTitle1(); xdocParser.parse( part.getTitle(), sink ); sink.sectionTitle1_(); } sink.definitionList(); for ( Iterator faqIterator = part.getFaqs().iterator(); faqIterator.hasNext(); ) { Faq faq = (Faq) faqIterator.next(); sink.definedTerm(); sink.anchor( faq.getId() ); if ( StringUtils.isNotEmpty( faq.getQuestion() ) ) { xdocParser.parse( faq.getQuestion(), sink ); } else { throw new ParseException( "Missing <question> for FAQ '" + faq.getId() + "'" ); } sink.anchor_(); sink.definedTerm_(); sink.definition(); if ( StringUtils.isNotEmpty( faq.getAnswer() ) ) { xdocParser.parse( faq.getAnswer(), sink ); } else { throw new ParseException( "Missing <answer> for FAQ '" + faq.getId() + "'" ); } if ( faqs.isToplink() ) { writeTopLink( sink ); } if ( faqIterator.hasNext() ) { sink.horizontalRule(); } sink.definition_(); } sink.definitionList_(); if ( StringUtils.isNotEmpty( part.getTitle() ) ) { sink.section1_(); } } sink.body_(); } /** * Writes a toplink element. * * @param sink The sink to consume the event. */ private void writeTopLink( Sink sink ) { SinkEventAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( SinkEventAttributeSet.ALIGN, "right" ); sink.paragraph( atts ); sink.link( "#top" ); sink.text( "[top]" ); sink.link_(); sink.paragraph_(); } /** * If debug mode is enabled, log the <code>msg</code> as is, otherwise add unique msg in <code>warnMessages</code>. * * @param key not null * @param msg not null * @see #parse(Reader, Sink) * @since 1.1.1 */ private void logMessage( String key, String msg ) { msg = "[FML Parser] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } /** * @since 1.1.1 */ private void logWarnings() { if ( getLog().isWarnEnabled() && this.warnMessages != null && !isSecondParsing() ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } this.warnMessages = null; } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000152�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup0000644�0001750�0001750�00000006125�11215421102�033227� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.fml; /* * 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 javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.HtmlMarkup; /** * List of <code>FML</code> markups. * <br/> * FML uses several {@link javax.swing.text.html.HTML.Tag} and {@link javax.swing.text.html.HTML.Attribute} * as markups and custom tags. * * @author ltheussl * @version $Id: FmlMarkup.java 784718 2009-06-15 10:28:18Z vsiveton $ * @since 1.0 */ public interface FmlMarkup extends HtmlMarkup { /** FML namespace: "http://maven.apache.org/FML/1.0.1" */ String FML_NAMESPACE = "http://maven.apache.org/FML/1.0.1"; /** FML system id: "http://maven.apache.org/xsd/fml-1.0.1.xsd" */ String FML_SYSTEM_ID = "http://maven.apache.org/xsd/fml-1.0.1.xsd"; // ---------------------------------------------------------------------- // Specific Fml tags // ---------------------------------------------------------------------- /** Fml tag for <code>faqs</code> */ Tag FAQS_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "faqs"; } }; /** Fml tag for <code>part</code> */ Tag PART_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "part"; } }; /** Fml tag for <code>faq</code> */ Tag FAQ_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "faq"; } }; /** Fml tag for <code>question</code> */ Tag QUESTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "question"; } }; /** Fml tag for <code>answer</code> */ Tag ANSWER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "answer"; } }; /** Fml tag for <code>source</code> */ Tag SOURCE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "source"; } }; /** * Fml tag for <code>macro</code> * @since 1.1.1 */ Tag MACRO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "macro"; } }; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/�������������������������������������������������������0000755�0001750�0001750�00000000000�11632765560�021060� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/pom.xml������������������������������������������������0000644�0001750�0001750�00000003431�11470562366�022375� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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 http://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>1.1.4</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>doxia-module-twiki</artifactId> <name>Doxia :: TWiki Module</name> <description>A Doxia module for Twiki source documents.</description> <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> </developers> <contributors> <contributor> <name>Christian Nardi</name> <roles> <role>Developer</role> </roles> </contributor> </contributors> </project> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/���������������������������������������������������0000755�0001750�0001750�00000000000�11632765560�021647� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/����������������������������������������������0000755�0001750�0001750�00000000000�11632765560�022626� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/resources/������������������������������������0000755�0001750�0001750�00000000000�11632765560�024640� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/resources/TWikiParserTest.twiki���������������0000644�0001750�0001750�00000004055�10524215463�030750� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������---+ Twiki Java Parser ---++ Features This parser of the [[http://www.twiki.org][TWiki]] text format supports most of http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules formatting commands. ---+++ General * Paragraps, * Wiki Words * WikiWord * Web.WikiWord#anchor, * escaped: !WikiWord * Forced Links: * [[wiki word]] * escaped ![[wiki word]] * Specific links: * [[http://www.zauber.com.ar][Zauber]], * prevention: ![[http://www.zauber.com.ar][Forced links]] * Anchors: [[#AnchorEnd][End]] * inline urls: * http://twiki.org/ * mailto link: * [[mailto:a@z.com Mail]] * [[mailto:?subject=Hi Hi]] ---+++ Text Format: * *bold* * _italic_ * __bold italic__ * =Fixedfont= * ==Bold fixed== And nested formats like: * *bold with _italic_ and some =fixed= and bold* Make sure there is no space between the text and the bold, italic, or other indicators (* _ __ = ==). ---+++ Lists * items * nested items * ordered list * arabic numerals 1. item 1. item 1. ... * uppercase letters A. item A. item A. ... * lowercase letters a. item a. item a. ... * uppercase roman numerals A. item A. item A. .... * Uppercase Roman Numerals I. item I. item I. ... * Lowercase Roman Numerals i. item i. item i. .... ---+++ Separators Up --------------------------- Down ---+++ Table | *A* | *B* | *C* | | Foo | bar | Foo | | Bar | Foo | bar | | Foo | bar | Foo | ---++ Missing things ---+++ Verbating Mode <verbatim> class CatAnimal { void purr() { <code here> } </verbatim> ---+++ Definition List (i don't use it) $ Sushi: Japan $ Dim Sum: S.F. $ Asado: Argentina ---+++ Diable Links <noautolink> RedHat & SuSE </noautolink> ---+++ Html * <pre>some text</pre> #EndAnchor �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/�����������������������������������������0000755�0001750�0001750�00000000000�11632765560�023547� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/�������������������������������������0000755�0001750�0001750�00000000000�11632765560�024336� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/������������������������������0000755�0001750�0001750�00000000000�11632765560�025557� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/������������������������0000755�0001750�0001750�00000000000�11632765560�026665� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/������������������0000755�0001750�0001750�00000000000�11632765560�027771� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/�����������0000755�0001750�0001750�00000000000�11632765560�031256� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/�����0000755�0001750�0001750�00000000000�11632765560�032405� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000162�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/TWikiSinkTest.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/TWiki0000644�0001750�0001750�00000015415�11207472163�033355� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki; /* * 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.AbstractSinkTest; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.StringUtils; /** * Test the TWiki Sink * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: TWikiSinkTest.java 779565 2009-05-28 11:24:35Z vsiveton $ * @see TWikiSink */ public class TWikiSinkTest extends AbstractSinkTest { /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new TWikiSink( writer ); } /** {@inheritDoc} */ protected boolean isXmlSink() { return false; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { return EOL + "#" + anchor + anchor; } /** Not used. * {@inheritDoc} */ protected String getAuthorBlock( String author ) { return null; } /** Not used. * {@inheritDoc} */ protected String getBodyBlock() { return null; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { return TWikiMarkup.BOLD_START_MARKUP + text + TWikiMarkup.BOLD_END_MARKUP; } /** Not used. * {@inheritDoc} */ protected String getDateBlock( String date ) { return null; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return TWikiMarkup.DEFINITION_LIST_ITEM_MARKUP + definum + TWikiMarkup.DEFINITION_LIST_DEFINITION_MARKUP + definition + EOL; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { return "<img src=\"" + source + "\" alt=\"" + caption + "\" />"; } /** Not used. * {@inheritDoc} */ protected String getHeadBlock() { return null; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return TWikiMarkup.HORIZONTAL_RULE_MARKUP + EOL; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { return TWikiMarkup.ITALIC_START_MARKUP + text + TWikiMarkup.ITALIC_END_MARKUP; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { return TWikiMarkup.LINK_START_MARKUP + link + TWikiMarkup.LINK_MIDDLE_MARKUP + text + TWikiMarkup.LINK_END_MARKUP; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return TWikiMarkup.LIST_ITEM_MARKUP + item + EOL; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return TWikiMarkup.MONOSPACED_START_MARKUP + text + TWikiMarkup.MONOSPACED_END_MARKUP; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return ""; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return TWikiMarkup.NUMBERING_LOWER_ROMAN_MARKUP + " " + item + EOL; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return text + EOL + EOL; } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { return ""; } /** {@inheritDoc} */ protected String getSection1Block( String title ) { return StringUtils.repeat( "-", 3 ) + StringUtils.repeat( "+", 1 ) + title + EOL + EOL; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return StringUtils.repeat( "-", 3 ) + StringUtils.repeat( "+", 2 ) + title + EOL + EOL; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { return StringUtils.repeat( "-", 3 ) + StringUtils.repeat( "+", 3 ) + title + EOL + EOL; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { return StringUtils.repeat( "-", 3 ) + StringUtils.repeat( "+", 4 ) + title + EOL + EOL; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { return StringUtils.repeat( "-", 3 ) + StringUtils.repeat( "+", 5 ) + title + EOL + EOL; } /** {@inheritDoc} */ protected String getSectionTitleBlock( String title ) { return title; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { return "| " + cell + " |" + EOL + "Table_caption"; } /** {@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 "<div class=\"source\">" + EOL + "<verbatim>" + text + "</verbatim>" + EOL + "</div>" + EOL; } /** {@inheritDoc} */ protected String outputExtension() { return "twiki"; } // ---------------------------------------------------------------------- // 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 } /** {@inheritDoc} */ protected String getCommentBlock( String text ) { return ""; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000147�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000755�0001750�0001750�00000000000�11632765560�033440� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/TitleTest.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000007177�11075462240�033444� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * 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. */ package org.apache.maven.doxia.module.twiki.parser; import java.io.StringReader; import org.apache.maven.doxia.module.twiki.TWikiParser; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.util.ByLineSource; /** * Tests for {@link TWikiParser#getTitle(java.util.List)} * * * @author Juan F. Codagnone * @since Nov 10, 2007 */ public class TitleTest extends AbstractBlockTestCase { public void testSectionTitle() throws Exception { final ByLineSource source = new ByLineReaderSource( new StringReader( "---++ Test\n hello world" ) ); final TWikiParser parser = new TWikiParser(); assertEquals( "Test", parser.getTitle( parser.parse( source ), source ) ); } public void testNoSectionTitle() throws Exception { final ByLineSource source = new NamedByLineSource( new ByLineReaderSource( new StringReader( "hello world" ) ), "testpage" ); final TWikiParser parser = new TWikiParser(); assertEquals( "testpage", parser.getTitle( parser.parse( source ), source ) ); } public void testNoSectionTwikiExtensionTitle() throws Exception { final ByLineSource source = new NamedByLineSource( new ByLineReaderSource( new StringReader( "hello world" ) ), "testpage.twiki" ); final TWikiParser parser = new TWikiParser(); assertEquals( "testpage", parser.getTitle( parser.parse( source ), source ) ); } } class NamedByLineSource implements ByLineSource { /** reader */ private final ByLineReaderSource reader; /** reader's name */ private final String name; public NamedByLineSource( final ByLineReaderSource reader, final String name ) { if ( reader == null || name == null ) { throw new IllegalArgumentException( "null arguments are not allowed" ); } this.reader = reader; this.name = name; } /** @see ByLineReaderSource#close() */ public final void close() { reader.close(); } /** @see ByLineReaderSource#getLineNumber() */ public final int getLineNumber() { return reader.getLineNumber(); } /** @see ByLineReaderSource#getName() */ public final String getName() { return name; } /** @see ByLineReaderSource#getNextLine() */ public final String getNextLine() throws ParseException { return reader.getNextLine(); } /** @see ByLineReaderSource#unget(java.lang.String) */ public final void unget( final String s ) throws IllegalStateException { reader.unget( s ); } /** @see ByLineReaderSource#ungetLine() */ public final void ungetLine() throws IllegalStateException { reader.ungetLine(); } }�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/BlockTest.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000012641�11123447331�033432� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.Arrays; import junit.framework.TestCase; /** * Generic unit tests for * {@link Block}s * * @author Juan F. Codagnone * @since Nov 2, 2005 */ public class BlockTest extends TestCase { /** * @see TextBlock#equals(Object) */ public final void testTextBlockEquals() { testEquals( new TextBlock( "bar" ), new TextBlock( "bar" ), new TextBlock( "foo" ) ); } /** * @see WikiWordBlock#equals(Object) */ public final void testWikiWordBlockEquals() { final WikiWordLinkResolver resolver = new XHTMLWikiWordLinkResolver(); testEquals( new WikiWordBlock( "bar", resolver ), new WikiWordBlock( "bar", resolver ), new WikiWordBlock( "foo", resolver ) ); testEquals( new WikiWordBlock( "bar", new TextBlock( "text" ), resolver ), new WikiWordBlock( "bar", new TextBlock( "text" ), resolver ), new WikiWordBlock( "bar", resolver ) ); testEquals( new WikiWordBlock( "bar", new TextBlock( "text" ), resolver ), new WikiWordBlock( "bar", new TextBlock( "text" ), resolver ), new WikiWordBlock( "text", new TextBlock( "bar" ), resolver ) ); } /** * @see LinkBlock#equals(Object) */ public final void testLinkBlockEquals() { testEquals( new LinkBlock( "foo", new TextBlock( "bar" ) ), new LinkBlock( "foo", new TextBlock( "bar" ) ), new LinkBlock( "bar", new TextBlock( "foo" ) ) ); } /** * @see ListItemBlock#equals(Object) */ public final void testListBlockEquals() { final Block[] blocks = new Block[] { new TextBlock( "hello" ) }; testEquals( new ListItemBlock( blocks ), new ListItemBlock( blocks ), new ListItemBlock( new Block[] {} ) ); } /** * @see ListItemBlock#equals(Object) */ public final void testNestedBlockEquals() { testEquals( new ParagraphBlock( new Block[] { new BoldBlock( new Block[] { new TextBlock( "foo" ) } ) } ), new ParagraphBlock( new Block[] { new BoldBlock( new Block[] { new TextBlock( "foo" ) } ) } ), new ParagraphBlock( new Block[] { new BoldBlock( new Block[] { new TextBlock( "bar" ) } ) } ) ); } /** * @see AbstractFatherBlock#equals(Object) */ public final void testAbstractFatherBlockEquals() { assertFalse( Arrays .equals( new Block[] { new TextBlock( "mary " ), new ItalicBlock( new Block[] { new MonospaceBlock( new Block[] { new TextBlock( "has" ) } ) } ) }, new Block[] { new TextBlock( "mary " ), new BoldBlock( new Block[] { new MonospaceBlock( new Block[] { new TextBlock( "has" ) } ) } ) } ) ); } /** * @see AnchorBlock#equals(Object) */ public final void testAnchorBlockEquals() { testEquals( new AnchorBlock( "anchor" ), new AnchorBlock( "anchor" ), new AnchorBlock( "anch" ) ); } /** * @see HorizontalRuleBlock#equals(Object) */ public final void testHorizontalEquals() { testEquals( new HorizontalRuleBlock(), new HorizontalRuleBlock(), "foo" ); } /** * @param a an object * @param b an object that is equals to a * @param c a diferent object */ public final void testEquals( final Object a, final Object b, final Object c ) { assertFalse( a.equals( null ) ); assertFalse( b.equals( null ) ); assertFalse( c.equals( null ) ); assertNotSame( a, b ); assertEquals( a, a ); assertEquals( b, b ); assertEquals( c, c ); assertEquals( a, b ); assertEquals( b, a ); assertFalse( a.equals( c ) ); assertEquals( a.hashCode(), b.hashCode() ); } } �����������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000164�00000000000�011566� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/ListTest.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000012223�11123447331�033426� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.io.StringReader; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.util.ByLineSource; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.sink.Sink; /** * Units tests for Lists * * @author Juan F. Codagnone * @since Nov 1, 2005 */ public class ListTest extends AbstractBlockTestCase { /** * unit test for recurrent enumeration * * @throws ParseException on error */ public final void testList() throws ParseException { final BlockParser parser = listParser; final String text = "" + " * item1.1 \n" + " * item2\n" + " * item2.1\n" + " * item3\n" + " * item3.1\n" + " * item3.2\n" + " * item3.2.1\n" + " * item3.2.2\n" + " * item3.2.3\n" + " * item3.3\n" + " * item3.3.1\n" + " * item4"; final ByLineSource source = new ByLineReaderSource( new StringReader( text ) ); final Block b = parser.visit( source.getNextLine(), source ); final Block[] firstLevelBlocks = ( (UnorderedListBlock) b ).getBlocks(); final int numberOfChild = 4; assertEquals( numberOfChild, firstLevelBlocks.length ); for ( int i = 0; i < firstLevelBlocks.length; i++ ) { Block block = firstLevelBlocks[i]; assertEquals( ListItemBlock.class, block.getClass() ); } ListBlock list; ListItemBlock item; Block[] blocks; item = (ListItemBlock) firstLevelBlocks[1]; blocks = item.getBlocks(); assertEquals( 1, blocks.length ); assertEquals( "item2", ( (TextBlock) blocks[0] ).getText() ); list = item.getInnerList(); assertNotNull( list ); blocks = list.getBlocks(); assertEquals( blocks.length, 1 ); item = (ListItemBlock) blocks[0]; assertEquals( 1, item.getBlocks().length ); assertEquals( "item2.1", ( (TextBlock) item.getBlocks()[0] ).getText() ); } /** * @throws ParseException on error */ public final void testNumeringDecimal() throws ParseException { final String text = "" + " 1. item1\n" + " 1. item2\n" + " 1. item3"; final ByLineSource source = new ByLineReaderSource( new StringReader( text ) ); Block blocks, expected; expected = new NumeratedListBlock( Sink.NUMBERING_DECIMAL, new ListItemBlock[] { new ListItemBlock( new Block[] { new TextBlock( "item1" ) } ), new ListItemBlock( new Block[] { new TextBlock( "item2" ) } ), new ListItemBlock( new Block[] { new TextBlock( "item3" ) } ) } ); blocks = listParser.visit( source.getNextLine(), source ); assertEquals( expected, blocks ); } /** * @throws ParseException on error */ public final void testHetero() throws ParseException { final String text = "" + " A. item1\n" + " * item1.1\n" + " * item1.2\n" + " B. item2\n" + " i. item2.1\n" + " i. item2.2\n" + " C. item3"; final ByLineSource source = new ByLineReaderSource( new StringReader( text ) ); Block blocks, expected; expected = new NumeratedListBlock( Sink.NUMBERING_UPPER_ALPHA, new ListItemBlock[] { new ListItemBlock( new Block[] { new TextBlock( "item1" ) }, new UnorderedListBlock( new ListItemBlock[] { new ListItemBlock( new Block[] { new TextBlock( "item1.1" ) } ), new ListItemBlock( new Block[] { new TextBlock( "item1.2" ) } ) } ) ), new ListItemBlock( new Block[] { new TextBlock( "item2" ) }, new NumeratedListBlock( Sink.NUMBERING_LOWER_ROMAN, new ListItemBlock[] { new ListItemBlock( new Block[] { new TextBlock( "item2.1" ) } ), new ListItemBlock( new Block[] { new TextBlock( "item2.2" ) } ) } ) ), new ListItemBlock( new Block[] { new TextBlock( "item3" ) } ) } ); blocks = listParser.visit( source.getNextLine(), source ); assertEquals( expected, blocks ); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000174�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextTest.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000017224�11123447331�033434� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.Arrays; /** * Tests the {@link org.apache.maven.doxia.module.twiki.parser.FormatedTextParser} * * @author Juan F. Codagnone * @since Nov 2, 2005 */ public class FormatedTextTest extends AbstractBlockTestCase { /** * test bold text */ public final void testBold() { String text; Block[] blocks; text = "*bold*"; blocks = formatTextParser.parse( text ); assertEquals( 1, blocks.length ); assertEquals( new BoldBlock( new Block[] { new TextBlock( "bold" ) } ), blocks[0] ); text = "foo *bold* bar"; blocks = formatTextParser.parse( text ); assertTrue( Arrays.equals( new Block[] { new TextBlock( "foo " ), new BoldBlock( new Block[] { new TextBlock( "bold" ) } ), new TextBlock( " bar" ) }, blocks ) ); text = "\t*bold* bar"; blocks = formatTextParser.parse( text ); assertTrue( Arrays.equals( new Block[] { new TextBlock( "\t" ), new BoldBlock( new Block[] { new TextBlock( "bold" ) } ), new TextBlock( " bar" ) }, blocks ) ); text = "*nice* foo *bold* bar"; blocks = formatTextParser.parse( text ); assertTrue( Arrays.equals( new Block[] { new BoldBlock( new Block[] { new TextBlock( "nice" ) } ), new TextBlock( " foo " ), new BoldBlock( new Block[] { new TextBlock( "bold" ) } ), new TextBlock( " bar" ) }, blocks ) ); } /** * test italic text */ public final void testItalic() { String text; Block[] blocks; text = "_italic_"; blocks = formatTextParser.parse( text ); assertEquals( 1, blocks.length ); assertEquals( new ItalicBlock( new Block[] { new TextBlock( "italic" ) } ), blocks[0] ); text = "foo _italic_ bar"; blocks = formatTextParser.parse( text ); assertTrue( Arrays.equals( new Block[] { new TextBlock( "foo " ), new ItalicBlock( new Block[] { new TextBlock( "italic" ) } ), new TextBlock( " bar" ) }, blocks ) ); text = "_nice_ foo _italic_ bar"; blocks = formatTextParser.parse( text ); assertTrue( Arrays.equals( new Block[] { new ItalicBlock( new Block[] { new TextBlock( "nice" ) } ), new TextBlock( " foo " ), new ItalicBlock( new Block[] { new TextBlock( "italic" ) } ), new TextBlock( " bar" ) }, blocks ) ); } /** * test monospaced text */ public final void testMonospaced() { String text; Block[] blocks; text = "mary =has= a =little= lamb He followed her (=to school one day=)"; blocks = formatTextParser.parse( text ); assertTrue( Arrays.equals( new Block[] { new TextBlock( "mary " ), new MonospaceBlock( new Block[] { new TextBlock( "has" ) } ), new TextBlock( " a " ), new MonospaceBlock( new Block[] { new TextBlock( "little" ) } ), new TextBlock( " lamb He followed her (" ), new MonospaceBlock( new Block[] { new TextBlock( "to school one day" ) } ), new TextBlock( ")" ) }, blocks ) ); } /** * test monospaced text */ public final void testBoldMonospaced() { String text; Block[] blocks; text = "mary ==has== a ==little== lamb"; blocks = formatTextParser.parse( text ); Block[] expected = new Block[] { new TextBlock( "mary " ), new BoldBlock( new Block[] { new MonospaceBlock( new Block[] { new TextBlock( "has" ) } ) } ), new TextBlock( " a " ), new BoldBlock( new Block[] { new MonospaceBlock( new Block[] { new TextBlock( "little" ) } ) } ), new TextBlock( " lamb" ) }; assertTrue( Arrays.equals( expected, blocks ) ); } /** * test monospaced text */ public final void testBoldItalic() { String text; Block[] blocks; text = "mary __has__ a __little__ lamb"; blocks = formatTextParser.parse( text ); assertTrue( Arrays.equals( new Block[] { new TextBlock( "mary " ), new BoldBlock( new Block[] { new ItalicBlock( new Block[] { new TextBlock( "has" ) } ) } ), new TextBlock( " a " ), new BoldBlock( new Block[] { new ItalicBlock( new Block[] { new TextBlock( "little" ) } ) } ), new TextBlock( " lamb" ) }, blocks ) ); } /** * test mixed formats side by side */ public final void testMultiFormatSideBySide() { String text; Block[] blocks; Block[] expected; text = "All *work and* =no play= _makes_ Juan a dull *boy*"; blocks = formatTextParser.parse( text ); expected = new Block[] { new TextBlock( "All " ), new BoldBlock( new Block[] { new TextBlock( "work and" ) } ), new TextBlock( " " ), new MonospaceBlock( new Block[] { new TextBlock( "no play" ) } ), new TextBlock( " " ), new ItalicBlock( new Block[] { new TextBlock( "makes" ) } ), new TextBlock( " Juan a dull " ), new BoldBlock( new Block[] { new TextBlock( "boy" ) } ) }; assertTrue( Arrays.equals( expected, blocks ) ); } /** * test mixed formats recursevily */ public final void testMultiFormatInside() { String text; Block[] blocks; Block[] expected; text = "All *work and =no play _makes_ Juan= a dull* boy"; blocks = formatTextParser.parse( text ); expected = new Block[] { new TextBlock( "All " ), new BoldBlock( new Block[] { new TextBlock( "work and " ), new MonospaceBlock( new Block[] { new TextBlock( "no play " ), new ItalicBlock( new Block[] { new TextBlock( "makes" ) } ), new TextBlock( " Juan" ) } ), new TextBlock( " a dull" ) } ), new TextBlock( " boy" ) }; assertTrue( Arrays.equals( expected, blocks ) ); } /** * test unbonded formats */ public final void testUnboundedFormat() { testHanging( "All *work and no play makes Juan a dull boy" ); testHanging( "All __work and no play makes Juan a dull boy" ); testHanging( "All __work and *no play makes _Juan a = dull boy" ); testHanging( "*" ); testHanging( "==" ); testHanging( "**" ); // hehe testHanging( "* hello *" ); testHanging( "* hello =*" ); testHanging( "*=_ hello _=*" ); } /** * @param text unbonded text */ public final void testHanging( final String text ) { assertTrue( Arrays.equals( new Block[] { new TextBlock( text ) }, formatTextParser.parse( text ) ) ); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/TableTest.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000006010�11123447331�033423� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.io.StringReader; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.util.ByLineSource; import org.apache.maven.doxia.parser.ParseException; /** * Tests the {@link org.apache.maven.doxia.module.twiki.parser.TableBlockParser} * * @author Juan F. Codagnone * @since Nov 9, 2005 */ public class TableTest extends AbstractBlockTestCase { /** * unit test the regex */ public final void testRegex() { assertTrue( tableParser.accept( " | cell1 | cell2| " ) ); assertFalse( tableParser.accept( " | cell1 | cell" ) ); } /** * @throws ParseException on error */ public final void testTable() throws ParseException { final StringReader sw = new StringReader( "" + " |cell1|cell2| \n" + "|cell3|cell4|\n" ); final ByLineSource source = new ByLineReaderSource( sw ); Block block, expected; expected = new TableBlock( new Block[] { new TableRowBlock( new Block[] { new TableCellBlock( new Block[] { new TextBlock( "cell1" ) } ), new TableCellBlock( new Block[] { new TextBlock( "cell2" ) } ) } ), new TableRowBlock( new Block[] { new TableCellBlock( new Block[] { new TextBlock( "cell3" ) } ), new TableCellBlock( new Block[] { new TextBlock( "cell4" ) } ) } ) } ); block = tableParser.visit( source.getNextLine(), source ); assertEquals( block, expected ); } /** * @throws ParseException on error */ public final void testTableHeader() throws ParseException { final StringReader sw = new StringReader( "|*cell1*|*cell2*|\n" ); final ByLineSource source = new ByLineReaderSource( sw ); Block block, expected; expected = new TableBlock( new Block[] { new TableRowBlock( new Block[] { new TableCellHeaderBlock( new Block[] { new TextBlock( "cell1" ) } ), new TableCellHeaderBlock( new Block[] { new TextBlock( "cell2" ) } ) } ) } ); block = tableParser.visit( source.getNextLine(), source ); assertEquals( block, expected ); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/WordsTest.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000030476�11123447331�033440� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.Arrays; /** * tests the WikiWord parsing (and things like that) * * @author Juan F. Codagnone * @since Nov 4, 2005 */ public class WordsTest extends AbstractBlockTestCase { /** * used to convert lists to arrays */ private static final Block[] TOARRAY = new Block[] {}; /** * Resolves links for wikiWords */ private final WikiWordLinkResolver resolver = new XHTMLWikiWordLinkResolver(); /** * ... */ public final void testText() { Block[] blocks, expected; expected = new Block[] { new TextBlock( " Some text " ) }; blocks = (Block[]) textParser.parse( " Some text " ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * ... */ public final void testWikiWords() { Block[] blocks, expected; expected = new Block[] { new WikiWordBlock( "WikiWord", resolver ) }; blocks = (Block[]) textParser.parse( "WikiWord" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); // this is not a wiki word expected = new Block[] { new TextBlock( "Wiki" ) }; blocks = (Block[]) textParser.parse( "Wiki" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "Web." ) }; blocks = (Block[]) textParser.parse( "Web." ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "fooWikiBar" ) }; blocks = (Block[]) textParser.parse( "fooWikiBar" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new WikiWordBlock( "WikiWord", resolver ), new TextBlock( "...." ) }; blocks = (Block[]) textParser.parse( "WikiWord...." ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * ... */ public final void testWebWikiWords() { Block[] blocks, expected; expected = new Block[] { new WikiWordBlock( "Web.WikiWord", resolver ) }; blocks = (Block[]) textParser.parse( "Web.WikiWord" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new WikiWordBlock( "My1Web.WikiWord", resolver ) }; blocks = (Block[]) textParser.parse( "My1Web.WikiWord" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * ... */ public final void testWebAnchorWikiWords() { Block[] blocks, expected; expected = new Block[] { new WikiWordBlock( "WikiWord#anchor", resolver ) }; blocks = (Block[]) textParser.parse( "WikiWord#anchor" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new WikiWordBlock( "MyWeb.WikiWord#anchor", resolver ) }; blocks = (Block[]) textParser.parse( "MyWeb.WikiWord#anchor" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * test Specific Links */ public final void testURLSpecificLinks() { Block[] blocks, expected; expected = new Block[] { new LinkBlock( "http://reference.com", new TextBlock( "text" ) ) }; blocks = (Block[]) textParser.parse( "[[http://reference.com][text]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "foo" ), new LinkBlock( "http://reference.com", new TextBlock( "text" ) ), new TextBlock( "bar" ) }; blocks = (Block[]) textParser.parse( "foo[[http://reference.com][text]]bar" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( " foo " ), new LinkBlock( "http://reference.com", new TextBlock( "text" ) ), new TextBlock( " bar " ) }; blocks = (Block[]) textParser.parse( " foo [[http://reference.com][text]] bar " ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new LinkBlock( "http://www.apache.org/licenses/LICENSE-2.0", new TextBlock( "Apache License, version 2.0" ) ), new TextBlock( ". You can download it " ), new WikiWordBlock( "DoxiaDownload", new TextBlock( "here" ), resolver ) }; blocks = (Block[]) textParser.parse( "[[http://www.apache.org/licenses/LICENSE-2.0]" + "[Apache License, version 2.0]]. You can download it " + "[[DoxiaDownload][here]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * test Specific Links with wikiWords */ public final void testWikiSpecificLinks() { Block[] blocks, expected; expected = new Block[] { new WikiWordBlock( "Reference", new TextBlock( "text" ), resolver ) }; blocks = (Block[]) textParser.parse( "[[reference][text]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "foo" ), new WikiWordBlock( "ReferenceLink", new TextBlock( "text" ), resolver ), new TextBlock( "bar" ) }; blocks = (Block[]) textParser.parse( "foo[[referenceLink][text]]bar" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( " foo " ), new WikiWordBlock( "ReferenceLink", new TextBlock( "text" ), resolver ), new TextBlock( " bar " ) }; blocks = (Block[]) textParser.parse( " foo [[reference link][text]] bar " ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * test Specific Links */ public final void testSpecificLinkPrevention() { Block[] blocks, expected; expected = new Block[] { new TextBlock( "[[reference][text]]" ) }; blocks = (Block[]) textParser.parse( "![[reference][text]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * ... */ public final void testPreventLinkingWikiWord() { Block[] blocks, expected; expected = new Block[] { new TextBlock( " " ), new TextBlock( "WikiWord" ), new TextBlock( " " ) }; blocks = (Block[]) textParser.parse( " !WikiWord " ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( " !!WikiWord " ) }; blocks = (Block[]) textParser.parse( " !!WikiWord " ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * ej [[Main.TWiki rules]] would be wikiword Main.TWikiRules */ public final void testForcedLinks() { Block[] blocks, expected; expected = new Block[] { new WikiWordBlock( "WikiSyntax", new TextBlock( "wiki syntax" ), resolver ) }; blocks = (Block[]) textParser.parse( "[[wiki syntax]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "[[wiki syntax]]" ) }; blocks = (Block[]) textParser.parse( "![[wiki syntax]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "foo" ), new WikiWordBlock( "WikiSyntax", new TextBlock( "wiki syntax" ), resolver ), new TextBlock( "bar" ) }; blocks = (Block[]) textParser.parse( "foo[[wiki syntax]]bar" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "foo" ), new LinkBlock( "http://twiki.com", new TextBlock( "http://twiki.com" ) ), new TextBlock( "bar" ) }; blocks = (Block[]) textParser.parse( "foo[[http://twiki.com]]bar" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * ... */ public final void testMailtoForcedLinks() { Block[] blocks, expected; expected = new Block[] { new LinkBlock( "mailto:a@z.com", new TextBlock( "Mail" ) ) }; blocks = (Block[]) textParser.parse( "[[mailto:a@z.com Mail]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * ... */ public final void testAnchors() { Block[] blocks, expected; expected = new Block[] { new TextBlock( "mary has #anchor a little lamb" ) }; blocks = (Block[]) textParser.parse( "mary has #anchor a little lamb" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "mary has " ), new AnchorBlock( "AnchorName" ), new TextBlock( " a little lamb" ) }; blocks = (Block[]) textParser.parse( "mary has #AnchorName a little lamb" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); expected = new Block[] { new TextBlock( "mary has #AnchorName1233 a little lamb" ) }; blocks = (Block[]) textParser.parse( "mary has #AnchorName1233 a little lamb" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * unit test */ public final void testAutomaticLink() { Block[] blocks, expected; expected = new Block[] { new TextBlock( "Go to " ), new LinkBlock( "http://twiki.com", new TextBlock( "http://twiki.com" ) ), new TextBlock( " and ..." ) }; blocks = (Block[]) textParser.parse( "Go to http://twiki.com and ..." ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** unit test */ public final void testAutomaticImage() { Block[] blocks, expected; expected = new Block[] { new LinkBlock( "http://twiki.org", new ImageBlock( "http://twiki.org/logo.png" ) ) }; blocks = (Block[]) textParser.parse( "[[http://twiki.org][http://twiki.org/logo.png]]" ).toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** unit test */ public final void testLinkImage() { Block[] blocks, expected; expected = new Block[] { new TextBlock( "Go to " ), new ImageBlock( "http://twiki.com/image.png" ), new TextBlock( " thisisnotanimage.png and ..." ) }; blocks = (Block[]) textParser.parse( "Go to http://twiki.com/image.png " + "thisisnotanimage.png and ..." ) .toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } /** * Test image inserted with a html img tag */ public final void testRelativeImage() { Block[] blocks, expected; expected = new Block[] { new TextBlock( "My summer house: " ), new ImageBlock( "images/summerhouse.png" ), new TextBlock( " isn't it great?!" ) }; blocks = (Block[]) textParser .parse( "My summer house: <img class=\"some_class\" src=\"images/summerhouse.png\"/> isn't it great?!" ) .toArray( TOARRAY ); assertTrue( Arrays.equals( expected, blocks ) ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000201�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/AbstractBlockTestCase.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000006474�11075462240�033443� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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 junit.framework.TestCase; import org.apache.maven.doxia.module.twiki.TWikiParser; /** * Common code to the Block unit tests * * @author Juan F. Codagnone * @since Nov 1, 2005 */ public abstract class AbstractBlockTestCase extends TestCase { /** * sectionParser to use in all the tests */ protected final SectionBlockParser sectionParser = new SectionBlockParser(); /** * ParagraphBlockParser to use in all the tests */ protected final ParagraphBlockParser paraParser = new ParagraphBlockParser(); /** * ListBlockParser used in all the tests */ protected final GenericListBlockParser listParser = new GenericListBlockParser(); /** * FormatedTextParser used in all the tests */ protected final FormatedTextParser formatTextParser = new FormatedTextParser(); /** * TextParser used in all the tests */ protected final TextParser textParser = new TextParser( new XHTMLWikiWordLinkResolver() ); /** * TextParser used in all the tests */ protected final HRuleBlockParser hruleParser = new HRuleBlockParser(); /** * TableBlockParser used in all the tests */ protected final TableBlockParser tableParser = new TableBlockParser(); /** * TWiki used in all the tests */ protected final TWikiParser twikiParser = new TWikiParser(); /** * Parser for verbatim blocks */ private final VerbatimBlockParser verbatimParser = new VerbatimBlockParser(); /** * Creates the AbstractBlockTestCase. */ public AbstractBlockTestCase() { sectionParser.setParaParser( paraParser ); sectionParser.setHrulerParser( hruleParser ); paraParser.setSectionParser( sectionParser ); paraParser.setListParser( listParser ); paraParser.setTextParser( formatTextParser ); paraParser.setHrulerParser( hruleParser ); paraParser.setTableBlockParser( tableParser ); paraParser.setVerbatimParser( verbatimParser ); sectionParser.setVerbatimBlockParser( new VerbatimBlockParser() ); listParser.setTextParser( formatTextParser ); formatTextParser.setTextParser( textParser ); tableParser.setTextParser( formatTextParser ); } /** * Returns the verbatimParser. * * @return <code>VerbatimBlockParser</code> with the verbatimParser. */ protected final VerbatimBlockParser getVerbatimParser() { return verbatimParser; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000167�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/SectionTest.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000014170�11123447331�033431� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.io.StringReader; import java.util.Arrays; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.parser.ParseException; /** * Tests the {@link org.apache.maven.doxia.module.twiki.parser.SectionBlockParser} * * @author Juan F. Codagnone * @since Nov 1, 2005 */ public class SectionTest extends AbstractBlockTestCase { /** * @see SectionBlock#SectionBlock(String, int, Block[]) */ public final void testSectionBlockWrongArgs() { final int maxLevel = 5; new SectionBlock( "hola", 1, new Block[] {} ); new SectionBlock( "hola", maxLevel, new Block[] {} ); try { new SectionBlock( "hola", maxLevel + 1, new Block[] {} ); fail(); } catch ( final Throwable e ) { // ok } try { new SectionBlock( "hola", 0, new Block[] {} ); fail(); } catch ( final Throwable e ) { // ok } try { new SectionBlock( null, 1, null ); fail(); } catch ( final Throwable e ) { // ok } new SectionBlock( "", 1, new Block[] {} ); } /** * @see SectionBlockParser#getLevel(String) */ public final void testSectionParserGetLevel() { assertEquals( 2, SectionBlockParser.getLevel( "++" ) ); try { SectionBlockParser.getLevel( "asdasd" ); fail( "expected exception was not thrown" ); } catch ( IllegalArgumentException e ) { // ok } } /** * @throws java.lang.Exception * @see SectionBlockParser */ public final void testSectionParser() throws Exception { final SectionBlockParser parser = sectionParser; assertTrue( parser.accept( "---+ Title1" ) ); assertTrue( parser.accept( "---++ Title2" ) ); assertFalse( parser.accept( " ---++ Title3" ) ); assertTrue( parser.accept( "---+++ Title4" ) ); assertTrue( parser.accept( "---++++ Title5" ) ); assertTrue( parser.accept( "---+++++ Title6" ) ); SectionBlock block; block = (SectionBlock) parser.visit( "---++++ Title4", new ByLineReaderSource( new StringReader( "" ) ) ); final int level = 4; assertEquals( "Title4", block.getTitle() ); assertEquals( level, block.getLevel() ); assertEquals( 0, block.getBlocks().length ); // ejemplo un poco m�s complejo block = (SectionBlock) parser.visit( "---+++ Title3", new ByLineReaderSource( new StringReader( "This is *a* parragraph of a section.\n" + "Some text.\n" + "---+++ Another Title" + "... and more text" ) ) ); final SectionBlock expected = new SectionBlock( "Title3", 3, new Block[] { new ParagraphBlock( new Block[] { new TextBlock( "This is " ), new BoldBlock( new Block[] { new TextBlock( "a" ) } ), new TextBlock( " parragraph of a section. Some text." ) } ) } ); assertEquals( expected, block ); } /** * Test section with several paragraphs (the paragraph are plain text) * * @throws Exception on error */ public final void testSectionWithParagraphs() throws Exception { final String text = "" + "---++ Title\n" + "\n" + "hey!\n" + "how are\n" + "you?\n" + " \n " + "Fine!! thanks"; final SectionBlockParser parser = sectionParser; parser.setVerbatimBlockParser( new VerbatimBlockParser() ); final ByLineReaderSource source = new ByLineReaderSource( new StringReader( text ) ); final SectionBlock block = (SectionBlock) parser.visit( source.getNextLine(), source ); assertEquals( 2, block.getBlocks().length ); assertEquals( "hey! how are you?", ( (TextBlock) ( (ParagraphBlock) block.getBlocks()[0] ).getBlocks()[0] ).getText() ); assertEquals( "Fine!! thanks", ( (TextBlock) ( (ParagraphBlock) block.getBlocks()[1] ).getBlocks()[0] ).getText() ); } /** * @throws ParseException on error */ public final void testSectionAndParaAndHrule() throws ParseException { Block[] blocks, expected; ByLineReaderSource source; source = new ByLineReaderSource( new StringReader( "" + "---++ Title\n" + "Some text\n" + "----------- More text\n" ) ); expected = new Block[] { new SectionBlock( "Title", 1, new Block[] { new ParagraphBlock( new Block[] { new TextBlock( "Some text" ) } ), new HorizontalRuleBlock(), new ParagraphBlock( new Block[] { new TextBlock( "More text" ) } ) } ) }; blocks = (Block[]) twikiParser.parse( source ).toArray( new Block[] {} ); assertTrue( Arrays.equals( expected, blocks ) ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000171�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/ParagraphTest.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000015321�11123447331�033430� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.io.StringReader; import java.util.Arrays; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.parser.ParseException; /** * Tests the {@link org.apache.maven.doxia.module.twiki.parser.ParagraphBlockParser} * * @author Juan F. Codagnone * @since Nov 1, 2005 */ public class ParagraphTest extends AbstractBlockTestCase { /** * @throws ParseException on error */ public final void testMultiLines() throws ParseException { final String text = "" + "\n\n\n" + "para1 -> text1\n" + "para1 -> text2\n" + "\n" + "para2 -> text1\n" + "para2 -> text2\n" + " \n \n " + "para2 -> text1\n" + "para2 -> text2\n"; final ByLineReaderSource source = new ByLineReaderSource( new StringReader( text ) ); final ParagraphBlockParser parser = paraParser; ParagraphBlock block; block = (ParagraphBlock) parser.visit( source.getNextLine(), source ); assertNotNull( block ); assertEquals( 1, block.getBlocks().length ); assertEquals( "para1 -> text1 para1 -> text2", ( (TextBlock) block.getBlocks()[0] ).getText() ); block = (ParagraphBlock) parser.visit( source.getNextLine(), source ); assertNotNull( block ); assertEquals( 1, block.getBlocks().length ); assertEquals( "para2 -> text1 para2 -> text2", ( (TextBlock) block.getBlocks()[0] ).getText() ); } /** * @throws ParseException on error */ public final void testParagraphWithList() throws ParseException { final String text = "" + "Description text:\n" + " * item1\n" + " * item2\n" + "This is more text in the same paragraph\n" + "\n" + "Another paragraph"; final ByLineReaderSource source = new ByLineReaderSource( new StringReader( text ) ); final ParagraphBlockParser parser = paraParser; ParagraphBlock block; block = (ParagraphBlock) parser.visit( source.getNextLine(), source ); assertNotNull( block ); final Block[] firstLevelChilds = block.getBlocks(); final int numberOfChilds = 3; assertEquals( numberOfChilds, firstLevelChilds.length ); assertEquals( TextBlock.class, firstLevelChilds[0].getClass() ); assertEquals( UnorderedListBlock.class, firstLevelChilds[1].getClass() ); assertEquals( TextBlock.class, firstLevelChilds[2].getClass() ); final Block[] listChilds = ( (UnorderedListBlock) firstLevelChilds[1] ).getBlocks(); assertEquals( 2, listChilds.length ); assertEquals( 1, ( (ListItemBlock) listChilds[0] ).getBlocks().length ); assertEquals( "item1", ( (TextBlock) ( (ListItemBlock) listChilds[0] ).getBlocks()[0] ).getText() ); assertEquals( "item2", ( (TextBlock) ( (ListItemBlock) listChilds[1] ).getBlocks()[0] ).getText() ); } /** * tests some valid weired lists * * @throws ParseException on error */ public final void testParagraphWithStartingList() throws ParseException { final String text = "" + " * item1\n" + " * item2\n" + "This is more text in the same paragraph\n" + "\n" + "Another paragraph"; final ByLineReaderSource source = new ByLineReaderSource( new StringReader( text ) ); final ParagraphBlockParser parser = paraParser; ParagraphBlock block; block = (ParagraphBlock) parser.visit( source.getNextLine(), source ); assertNotNull( block ); final Block[] firstLevelChilds = block.getBlocks(); assertEquals( 2, firstLevelChilds.length ); assertEquals( UnorderedListBlock.class, firstLevelChilds[0].getClass() ); assertEquals( TextBlock.class, firstLevelChilds[1].getClass() ); final Block[] listChilds = ( (UnorderedListBlock) firstLevelChilds[0] ).getBlocks(); assertEquals( 2, listChilds.length ); assertEquals( 1, ( (ListItemBlock) listChilds[0] ).getBlocks().length ); assertEquals( "item1", ( (TextBlock) ( (ListItemBlock) listChilds[0] ).getBlocks()[0] ).getText() ); assertEquals( "item2", ( (TextBlock) ( (ListItemBlock) listChilds[1] ).getBlocks()[0] ).getText() ); } /** * @throws ParseException on error */ public final void testHorizontalRule() throws ParseException { Block block, expected; ByLineReaderSource source; assertTrue( hruleParser.accept( "---" ) ); assertFalse( hruleParser.accept( "---+ asdas" ) ); source = new ByLineReaderSource( new StringReader( "" ) ); expected = new HorizontalRuleBlock(); block = hruleParser.visit( "---", source ); assertNull( source.getNextLine() ); assertEquals( expected, block ); source = new ByLineReaderSource( new StringReader( "" ) ); expected = new HorizontalRuleBlock(); block = hruleParser.visit( "--- Some text ---- And some more", source ); assertEquals( expected, block ); expected = new ParagraphBlock( new Block[] { new TextBlock( "Some text ---- And some more" ) } ); block = paraParser.visit( source.getNextLine(), source ); assertEquals( expected, block ); } /** * @throws ParseException on error */ public final void testHorizontalRuleAndParagraph() throws ParseException { Block[] blocks, expected; ByLineReaderSource source; source = new ByLineReaderSource( new StringReader( "" + "Some text\n" + "-----------\n" + "More text" ) ); expected = new Block[] { new ParagraphBlock( new Block[] { new TextBlock( "Some text" ) } ), new HorizontalRuleBlock(), new ParagraphBlock( new Block[] { new TextBlock( "More text" ) } ) }; blocks = (Block[]) twikiParser.parse( source ).toArray( new Block[] {} ); assertTrue( Arrays.equals( expected, blocks ) ); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000170�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/VerbatimTest.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000010135�11123447331�033426� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.parser; import java.io.StringReader; import java.util.Arrays; import java.util.List; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.util.ByLineSource; /* * 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. */ /** * Tests the {@link org.apache.maven.doxia.module.twiki.parser.VerbatimBlock} * * @author Christian Nardi * @since Nov 8, 2007 */ public class VerbatimTest extends AbstractBlockTestCase { /** * unit test the regex */ public final void testRegex() { assertTrue( getVerbatimParser().accept( "<verbatim>" ) ); assertTrue( getVerbatimParser().accept( " <verbatim>" ) ); assertTrue( getVerbatimParser().accept( "<verbatim> a word" ) ); assertTrue( getVerbatimParser().accept( "<verbatim> another Word" ) ); } /** * @throws ParseException if the parser does not accept the line * */ public void testVerbatim() throws ParseException { final StringReader sw = new StringReader( "" + " <verbatim> hello, \n" + " this is a verbatim text \n" + " which i would like to test \n" + " Thanks </verbatim>" ); final ByLineSource source = new ByLineReaderSource( sw ); Block block, expected; expected = new VerbatimBlock( new Block[] { new TextBlock( " hello, \n" ), new TextBlock( " this is a verbatim text \n" ), new TextBlock( " which i would like to test \n" ), new TextBlock( " Thanks \n" ) } ); block = getVerbatimParser().visit( source.getNextLine(), source ); assertEquals( block, expected ); } /** * @throws Exception . */ public void testTwiki() throws Exception { final StringReader sw = new StringReader( "hello this is a paragraph \n" + " <verbatim> hello, \n" + " this is a verbatim text \n" + " which i would like to test \n" + " Thanks </verbatim>" ); final ByLineSource source = new ByLineReaderSource( sw ); Block[] expected; expected = new Block[] { new ParagraphBlock( new Block[] { new TextBlock( "hello this is a paragraph" ) } ), new VerbatimBlock( new Block[] { new TextBlock( " hello, \n" ), new TextBlock( " this is a verbatim text \n" ), new TextBlock( " which i would like to test \n" ), new TextBlock( " Thanks \n" ) } ) }; List block = twikiParser.parse( source ); assertTrue( Arrays.equals( block.toArray(), expected ) ); } /** test * @throws org.apache.maven.doxia.parser.ParseException */ public void testVerbatimAfterSection() throws ParseException { final StringReader sw = new StringReader( "---++ fooo\n" + " <verbatim> hello, \n" + " Thanks </verbatim>" ); final ByLineSource source = new ByLineReaderSource( sw ); Block[] expected; expected = new Block[] { new SectionBlock( "foo", 2, new Block[] { new VerbatimBlock( new Block[] { new TextBlock( " hello, \n" ), new TextBlock( " Thanks \n" ) } ) } ) }; List block = twikiParser.parse( source ); assertTrue( Arrays.equals( block.toArray(), expected ) ); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/site/����������������������������������������������0000755�0001750�0001750�00000000000�11632765560�022613� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/site/site.xml��������������������������������������0000644�0001750�0001750�00000001672�11103330660�024265� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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> <body> <menu ref="parent"/> <menu ref="reports"/> </body> </project>����������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/����������������������������������������������0000755�0001750�0001750�00000000000�11632765560�022573� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/�����������������������������������������0000755�0001750�0001750�00000000000�11632765560�023514� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/�������������������������������������0000755�0001750�0001750�00000000000�11632765560�024303� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/������������������������������0000755�0001750�0001750�00000000000�11632765560�025524� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/������������������������0000755�0001750�0001750�00000000000�11632765560�026632� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/������������������0000755�0001750�0001750�00000000000�11632765560�027736� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/�����������0000755�0001750�0001750�00000000000�11632765560�031223� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/�����0000755�0001750�0001750�00000000000�11632765560�032352� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSinkFactory.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWiki0000644�0001750�0001750�00000003075�11105660512�033313� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki; /* * 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.AbstractTextSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * TWiki implementation of the Sink factory. * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: TWikiSinkFactory.java 712574 2008-11-09 22:16:42Z hboutemy $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="twiki" */ public class TWikiSinkFactory extends AbstractTextSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { // encoding can safely be ignored since it isn't written into the generated TWiki source return new TWikiSink( writer ); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000164�00000000000�011566� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSiteModule.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWiki0000644�0001750�0001750�00000002527�11212745470�033322� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki; /* * 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.site.AbstractSiteModule; /** * <p>TWikiSiteModule class.</p> * * @author Juan F. Codagnone * @version $Id: TWikiSiteModule.java 782392 2009-06-07 14:14:16Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="twiki" */ public class TWikiSiteModule extends AbstractSiteModule { /** * Default constructor. */ public TWikiSiteModule() { super( "twiki", "twiki", "twiki" ); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000156�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSink.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWiki0000644�0001750�0001750�00000062434�11244502706�033323� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki; /* * 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.Stack; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Attribute; import javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.sink.AbstractTextSink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.sink.SinkUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.StringUtils; /** * TWiki Sink implementation. * <br/> * <b>Note</b>: The encoding used is UTF-8. * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: TWikiSink.java 807179 2009-08-24 12:21:26Z vsiveton $ * @since 1.0 */ public class TWikiSink extends AbstractTextSink implements TWikiMarkup { /** The writer to use. */ private final PrintWriter out; /** The writer to use. */ private StringWriter writer; /** An indication on if we're in bold mode. */ private boolean boldFlag; /** An indication on if we're in bold italic or monospaced mode. */ private boolean boldItalicOrMonodpacedFlag; /** An indication on if we're in head mode. */ private boolean headFlag; private int levelList = 0; /** listStyles. */ private final Stack listStyles; /** * 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 TWikiSink( Writer writer ) { this.out = new PrintWriter( writer ); this.listStyles = new Stack(); init(); } /** {@inheritDoc} */ public void anchor( String name ) { write( EOL ); write( ANCHOR_MARKUP + name ); } /** {@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() { boldFlag = true; write( BOLD_START_MARKUP ); } /** {@inheritDoc} */ public void bold_() { boldFlag = false; if ( !boldItalicOrMonodpacedFlag ) { write( BOLD_END_MARKUP ); } boldItalicOrMonodpacedFlag = false; } /** * 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 } /** * Not used. * {@inheritDoc} */ public void definedTerm() { // nop } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { definedTerm(); } /** * Not used. * {@inheritDoc} */ public void definedTerm_() { // nop } /** {@inheritDoc} */ public void definition() { write( DEFINITION_LIST_DEFINITION_MARKUP ); } /** {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { definition(); } /** {@inheritDoc} */ public void definition_() { writeEOL(); } /** * Not used. * {@inheritDoc} */ public void definitionList() { // nop } /** {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { definitionList(); } /** * Not used. * {@inheritDoc} */ public void definitionList_() { // nop } /** {@inheritDoc} */ public void definitionListItem() { write( DEFINITION_LIST_ITEM_MARKUP ); } /** {@inheritDoc} */ public void definitionListItem( SinkEventAttributes attributes ) { definitionListItem(); } /** * Not used. * {@inheritDoc} */ public void definitionListItem_() { // nop } /** {@inheritDoc} */ public void figure() { write( String.valueOf( LESS_THAN ) + Tag.IMG.toString() + SPACE ); } /** {@inheritDoc} */ public void figure( SinkEventAttributes attributes ) { figure(); } /** * Not used. * {@inheritDoc} */ public void figure_() { write( SLASH + String.valueOf( GREATER_THAN ) ); } /** * Not used. * {@inheritDoc} */ public void figureCaption() { write( Attribute.ALT.toString() + EQUAL + QUOTE ); } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { figureCaption(); } /** * Not used. * {@inheritDoc} */ public void figureCaption_() { write( QUOTE + String.valueOf( SPACE ) ); } /** {@inheritDoc} */ public void figureGraphics( String name ) { write( Attribute.SRC.toString() + EQUAL + QUOTE + name + QUOTE + String.valueOf( SPACE ) ); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { figureGraphics( src ); } /** {@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; } /** {@inheritDoc} */ public void horizontalRule() { writeEOL( true ); write( HORIZONTAL_RULE_MARKUP ); writeEOL( true ); } /** {@inheritDoc} */ public void horizontalRule( SinkEventAttributes attributes ) { horizontalRule(); } /** {@inheritDoc} */ public void italic() { if ( boldFlag ) { boldItalicOrMonodpacedFlag = true; String tmp = writer.toString(); writer = new StringWriter(); writer.write( tmp.substring( 0, tmp.length() - 1 ) ); write( BOLD_ITALIC_START_MARKUP ); } else { write( ITALIC_START_MARKUP ); } } /** {@inheritDoc} */ public void italic_() { if ( boldFlag ) { write( BOLD_ITALIC_END_MARKUP ); } else { write( ITALIC_END_MARKUP ); } } /** * Not used. * {@inheritDoc} */ public void lineBreak() { // nop } /** {@inheritDoc} */ public void lineBreak( SinkEventAttributes attributes ) { lineBreak(); } /** {@inheritDoc} */ public void link( String name ) { write( LINK_START_MARKUP + name + LINK_MIDDLE_MARKUP ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { link( name ); } /** {@inheritDoc} */ public void link_() { 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--; } /** {@inheritDoc} */ public void listItem() { String indent = StringUtils.repeat( THREE_SPACES_MARKUP, levelList ); write( indent + LIST_ITEM_MARKUP ); } /** {@inheritDoc} */ public void listItem( SinkEventAttributes attributes ) { listItem(); } /** {@inheritDoc} */ public void listItem_() { writeEOL( true ); } /** {@inheritDoc} */ public void monospaced() { if ( boldFlag ) { boldItalicOrMonodpacedFlag = true; String tmp = writer.toString(); writer = new StringWriter(); writer.write( tmp.substring( 0, tmp.length() - 1 ) ); write( BOLD_MONOSPACED_START_MARKUP ); } else { write( MONOSPACED_START_MARKUP ); } } /** {@inheritDoc} */ public void monospaced_() { if ( boldFlag ) { write( BOLD_MONOSPACED_END_MARKUP ); } else { write( MONOSPACED_END_MARKUP ); } } /** * Not used. * {@inheritDoc} */ public void nonBreakingSpace() { // nop } /** {@inheritDoc} */ public void numberedList( int numbering ) { levelList++; String style; switch ( numbering ) { case NUMBERING_UPPER_ALPHA: style = NUMBERING_UPPER_ALPHA_MARKUP; break; case NUMBERING_LOWER_ALPHA: style = NUMBERING_LOWER_ALPHA_MARKUP; break; case NUMBERING_UPPER_ROMAN: style = NUMBERING_UPPER_ROMAN_MARKUP; break; case NUMBERING_LOWER_ROMAN: style = NUMBERING_LOWER_ROMAN_MARKUP; break; 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--; listStyles.pop(); } /** {@inheritDoc} */ public void numberedListItem() { writeEOL( true ); String style = (String) listStyles.peek(); String indent = StringUtils.repeat( THREE_SPACES_MARKUP, levelList ); write( indent + style + 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( StringUtils.repeat( "-", 3 ) + StringUtils.repeat( "+", 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(); } /** * Not used. * {@inheritDoc} */ public void table() { // nop } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { table(); } /** * Not used. * {@inheritDoc} */ public void table_() { // nop } /** * 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( TABLE_CELL_MARKUP ); } /** {@inheritDoc} */ public void tableHeaderCell() { 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_() { 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; } content( text ); } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { if ( attributes == null ) { text( text ); } else { if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "underline" ) ) { writeStartTag( Tag.U ); } if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "line-through" ) ) { writeStartTag( Tag.S ); } if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sub" ) ) { writeStartTag( Tag.SUB ); } if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sup" ) ) { writeStartTag( Tag.SUP ); } text( text ); if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sup" ) ) { writeEndTag( Tag.SUP ); } if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sub" ) ) { writeEndTag( Tag.SUB ); } if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "line-through" ) ) { writeEndTag( Tag.S ); } if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "underline" ) ) { writeEndTag( Tag.U ); } } } /** * 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 ) { SinkEventAttributeSet att = new SinkEventAttributeSet(); if ( boxed ) { att.addAttribute( SinkEventAttributes.DECORATION, "boxed" ); } verbatim( att ); } /** {@inheritDoc} */ public void verbatim( SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_VERBATIM_ATTRIBUTES ); if ( atts == null ) { atts = new SinkEventAttributeSet(); } boolean boxed = false; if ( atts.isDefined( SinkEventAttributes.DECORATION ) ) { boxed = "boxed".equals( atts.getAttribute( SinkEventAttributes.DECORATION ).toString() ); } if ( boxed ) { atts.addAttribute( Attribute.CLASS, "source" ); } atts.removeAttribute( SinkEventAttributes.DECORATION ); String width = (String) atts.getAttribute( Attribute.WIDTH.toString() ); atts.removeAttribute( Attribute.WIDTH.toString() ); writeStartTag( Tag.DIV, atts ); writeEOL( true ); if ( width != null ) { atts.addAttribute( Attribute.WIDTH.toString(), width ); } atts.removeAttribute( Attribute.ALIGN.toString() ); atts.removeAttribute( Attribute.CLASS.toString() ); writeStartTag( VERBATIM_TAG, atts ); } /** {@inheritDoc} */ public void verbatim_() { writeEndTag( VERBATIM_TAG ); writeEOL( true ); writeEndTag( Tag.DIV ); writeEOL( true ); } // ---------------------------------------------------------------------- // Private methods // ---------------------------------------------------------------------- private void write( String text ) { writer.write( unifyEOLs( text ) ); } /** * Starts a Tag. For instance: * <pre> * <tag> * </pre> * <br/> * <b>Note</b>: Copy from {@link AbstractXmlSink#writeStartTag(javax.swing.text.html.HTML.Tag)} * * @param t a non null tag * @see #writeStartTag(javax.swing.text.html.HTML.Tag) */ private void writeStartTag( Tag t ) { writeStartTag( t, null ); } /** * Starts a Tag with attributes. For instance: * <pre> * <tag attName="attValue"> * </pre> * <br/> * <b>Note</b>: Copy from {@link AbstractXmlSink#writeStartTag(javax.swing.text.html.HTML.Tag, * javax.swing.text.MutableAttributeSet)} * * @param t a non null tag * @param att a set of attributes * @see #writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, boolean) */ private void writeStartTag( Tag t, MutableAttributeSet att ) { writeStartTag( t, att, false ); } /** * Starts a Tag with attributes. For instance: * <pre> * <tag attName="attValue"> * </pre> * <br/> * <b>Note</b>: Copy from {@link AbstractXmlSink#writeStartTag(javax.swing.text.html.HTML.Tag, * javax.swing.text.MutableAttributeSet, boolean)} * * @param t a non null tag * @param att a set of attributes * @param isSimpleTag boolean to write as a simple tag */ private void writeStartTag( Tag t, MutableAttributeSet att, boolean isSimpleTag ) { if ( t == null ) { throw new IllegalArgumentException( "A tag is required" ); } StringBuffer sb = new StringBuffer(); sb.append( LESS_THAN ); sb.append( t.toString() ); sb.append( SinkUtils.getAttributeString( att ) ); if ( isSimpleTag ) { sb.append( SPACE ).append( SLASH ); } sb.append( GREATER_THAN ); write( sb.toString() ); } /** * 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 ); } /** * Ends a Tag without writing an EOL. For instance: <pre></tag></pre>. * <br/> * <b>Note</b>: Copy from {@link AbstractXmlSink#writeEndTag(javax.swing.text.html.HTML.Tag)} * * @param t a tag. */ private void writeEndTag( Tag t ) { StringBuffer sb = new StringBuffer(); sb.append( LESS_THAN ); sb.append( SLASH ); sb.append( t.toString() ); sb.append( GREATER_THAN ); write( sb.toString() ); } /** * Write HTML escaped text to output. * * @param text The text to write. */ protected void content( String text ) { write( escapeHTML( text ) ); } /** {@inheritDoc} */ protected void init() { super.init(); this.writer = new StringWriter(); this.headFlag = false; this.levelList = 0; this.listStyles.clear(); this.boldFlag = false; this.boldItalicOrMonodpacedFlag = false; } /** * 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 ); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000160�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWiki0000644�0001750�0001750�00000017402�11244502706�033316� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki; /* * 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.twiki.parser.Block; import org.apache.maven.doxia.module.twiki.parser.BlockParser; import org.apache.maven.doxia.module.twiki.parser.FormatedTextParser; import org.apache.maven.doxia.module.twiki.parser.GenericListBlockParser; import org.apache.maven.doxia.module.twiki.parser.HRuleBlockParser; import org.apache.maven.doxia.module.twiki.parser.ParagraphBlockParser; import org.apache.maven.doxia.module.twiki.parser.SectionBlock; import org.apache.maven.doxia.module.twiki.parser.SectionBlockParser; import org.apache.maven.doxia.module.twiki.parser.TableBlockParser; import org.apache.maven.doxia.module.twiki.parser.TextParser; import org.apache.maven.doxia.module.twiki.parser.VerbatimBlockParser; import org.apache.maven.doxia.module.twiki.parser.XHTMLWikiWordLinkResolver; import org.apache.maven.doxia.parser.AbstractTextParser; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.util.ByLineSource; import java.io.Reader; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * Parse the <a href="http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules"> * twiki file format</a> * * @author Juan F. Codagnone * @version $Id: TWikiParser.java 807179 2009-08-24 12:21:26Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="twiki" */ public class TWikiParser extends AbstractTextParser { private static final int EXTENSION_LENGTH = 6; /** paragraph parser. */ private final ParagraphBlockParser paraParser = new ParagraphBlockParser(); /** section parser. */ private final SectionBlockParser sectionParser = new SectionBlockParser(); /** enumeration parser. */ private final GenericListBlockParser listParser = new GenericListBlockParser(); /** Text parser. */ private final FormatedTextParser formatTextParser = new FormatedTextParser(); /** * text parser. * This only works for xhtml output, but there is no way * of transforming a wikiWord in another context. */ private final TextParser textParser = new TextParser( new XHTMLWikiWordLinkResolver() ); /** hruler parser. */ private final HRuleBlockParser hrulerParser = new HRuleBlockParser(); /** table parser. */ private final TableBlockParser tableParser = new TableBlockParser(); /** verbatim parser. */ private final VerbatimBlockParser verbatimParser = new VerbatimBlockParser(); /** list of parsers to try to apply to the toplevel */ private BlockParser[] parsers; /** * Creates the TWikiParser. */ public TWikiParser() { init(); } /** * <p>parse.</p> * * @param source source to parse. * @return the blocks that represent source. * @throws org.apache.maven.doxia.parser.ParseException on error. */ public final List parse( final ByLineSource source ) throws ParseException { final List ret = new ArrayList(); String line; while ( ( line = source.getNextLine() ) != null ) { boolean accepted = false; for ( int i = 0; i < parsers.length; i++ ) { final BlockParser parser = parsers[i]; if ( parser.accept( line ) ) { accepted = true; ret.add( parser.visit( line, source ) ); break; } } if ( !accepted ) { throw new ParseException( "Line number not handle : " + source.getLineNumber() + ": " + line ); } } return ret; } /** {@inheritDoc} */ public final synchronized void parse( final Reader source, final Sink sink ) throws ParseException { init(); List blocks; final ByLineSource src = new ByLineReaderSource( source ); try { blocks = parse( src ); } catch ( final Exception e ) { // TODO handle column number throw new ParseException( e, src.getName(), src.getLineNumber(), -1 ); } sink.head(); final String title = getTitle( blocks, src ); if ( title != null ) { sink.title(); sink.text( title ); sink.title_(); } sink.head_(); sink.body(); for ( Iterator it = blocks.iterator(); it.hasNext(); ) { final Block block = (Block) it.next(); block.traverse( sink ); } sink.body_(); sink.flush(); sink.close(); setSecondParsing( false ); init(); } /** * Guess a title for the page. It uses the first section that it finds. * If it doesn't find any section tries to get it from * {@link ByLineReaderSource#getName()} * * @param blocks blocks to parse * @param source source to parse * @return a title for a page * @since 1.1 */ public final String getTitle( final List blocks, final ByLineSource source ) { String title = null; for ( Iterator it = blocks.iterator(); title == null && it.hasNext(); ) { final Block block = (Block) it.next(); if ( block instanceof SectionBlock ) { final SectionBlock sectionBlock = (SectionBlock) block; title = sectionBlock.getTitle(); } } if ( title == null ) { String name = source.getName(); if ( name != null ) { name = name.trim(); if ( name.length() != 0 ) { if ( name.endsWith( ".twiki" ) ) { title = name.substring( 0, name.length() - EXTENSION_LENGTH ); } else { title = name; } } } } return title; } /** {@inheritDoc} */ protected void init() { super.init(); paraParser.setSectionParser( sectionParser ); paraParser.setListParser( listParser ); paraParser.setTextParser( formatTextParser ); paraParser.setHrulerParser( hrulerParser ); paraParser.setTableBlockParser( tableParser ); paraParser.setVerbatimParser( verbatimParser ); sectionParser.setParaParser( paraParser ); sectionParser.setHrulerParser( hrulerParser ); sectionParser.setVerbatimBlockParser( verbatimParser ); listParser.setTextParser( formatTextParser ); formatTextParser.setTextParser( textParser ); tableParser.setTextParser( formatTextParser ); this.parsers = new BlockParser[] { sectionParser, hrulerParser, verbatimParser, paraParser }; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000160�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiMarkup.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWiki0000644�0001750�0001750�00000011106�11150514042�033301� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki; /* * 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 javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.TextMarkup; /** * This interface defines all markups and syntaxes used by the <b>TWiki</b> format. * * @see <a href="http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules">http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules</a> * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: TWikiMarkup.java 746991 2009-02-23 12:35:46Z vsiveton $ * @since 1.0 */ public interface TWikiMarkup extends TextMarkup { // ---------------------------------------------------------------------- // Twiki markups // ---------------------------------------------------------------------- /** Syntax for the anchor : '#' */ char ANCHOR_MARKUP = '#'; /** Syntax for the start line separator: " " */ String THREE_SPACES_MARKUP = " "; /** Syntax for the bold markup: "*" */ String BOLD_END_MARKUP = "*"; /** Syntax for the bold markup: "*" */ String BOLD_START_MARKUP = "*"; /** Syntax for the bold italic markup: "__" */ String BOLD_ITALIC_END_MARKUP = "__"; /** Syntax for the bold italic markup: "__" */ String BOLD_ITALIC_START_MARKUP = "__"; /** Syntax for the bold monospaced markup: "==" */ String BOLD_MONOSPACED_END_MARKUP = "=="; /** Syntax for the bold monospaced markup: "==" */ String BOLD_MONOSPACED_START_MARKUP = "=="; /** Syntax for the definition list item: " $ " */ String DEFINITION_LIST_ITEM_MARKUP = THREE_SPACES_MARKUP + "$ "; /** Syntax for the definition list definition: ": " */ String DEFINITION_LIST_DEFINITION_MARKUP = ": "; /** Syntax for the horizontal rule markup: "---" */ String HORIZONTAL_RULE_MARKUP = "---"; /** Syntax for the italic markup: "_" */ String ITALIC_END_MARKUP = "_"; /** Syntax for the italic markup: "_" */ String ITALIC_START_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: "* */ String LIST_ITEM_MARKUP = "* "; /** Syntax for the mono-spaced style end: "=" */ String MONOSPACED_END_MARKUP = "="; /** Syntax for the mono-spaced style start: "=" */ String MONOSPACED_START_MARKUP = "="; /** Syntax for the numbering decimal markup char: "1." */ String NUMBERING_MARKUP = "1."; /** Syntax for the numbering lower alpha markup char: "a." */ String NUMBERING_LOWER_ALPHA_MARKUP = "a."; /** Syntax for the numbering lower roman markup char: "i." */ String NUMBERING_LOWER_ROMAN_MARKUP = "i."; /** Syntax for the numbering upper alpha markup char: "A." */ String NUMBERING_UPPER_ALPHA_MARKUP = "A."; /** Syntax for the numbering upper roman markup char: "I." */ String NUMBERING_UPPER_ROMAN_MARKUP = "I."; /** 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 = "|"; // ---------------------------------------------------------------------- // Specific Twiki tags // ---------------------------------------------------------------------- /** TWiki tag for <code>verbatim</code> */ Tag VERBATIM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "verbatim"; } }; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000147�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000755�0001750�0001750�00000000000�11632765560�033405� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000176�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/NumeratedListBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000004221�11167436114�033377� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * <pre> * 1. item1 * 2. item2 * - item2.1 * ... * </pre> * * @author Juan F. Codagnone * @version $Id: NumeratedListBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class NumeratedListBlock extends ListBlock { /** * order item type. one of Sink#NUMBERING_.... */ private final int type; /** * Creates the UnorderedListBlock. * * @param type order item type. one of Sink#NUMBERING_.... * @param blocks list of list items, not null. */ NumeratedListBlock( final int type, final ListItemBlock[] blocks ) { super( blocks ); this.type = type; } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.numberedList( type ); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.numberedList_(); } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { boolean ret = false; if ( super.equals( obj ) ) { ret = type == ( (NumeratedListBlock) obj ).type; } return ret; } /** {@inheritDoc} */ public final int hashCode() { final int magic = 17; return super.hashCode() + magic * type; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000205�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/XHTMLWikiWordLinkResolver.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002730�11150514042�033367� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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. */ /** * Transform WikiWord to HTML links * * @author Christian Nardi * @version $Id: XHTMLWikiWordLinkResolver.java 746991 2009-02-23 12:35:46Z vsiveton $ * @since 1.1 */ public class XHTMLWikiWordLinkResolver implements WikiWordLinkResolver { /** * {@inheritDoc} * * This only works for xhtml output, but there is no way * of transforming a wikiWord in another context. * @see org.apache.maven.doxia.module.twiki.parser.WikiWordLinkResolver#resolveLink(java.lang.String) */ public final String resolveLink( final String wikiWord ) { return "./" + wikiWord + ".html"; } } ����������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000172�00000000000�011565� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/MonospaceBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002770�11075462240�033403� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that represents the monospaced text format * * @author Juan F. Codagnone * @version $Id: MonospaceBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class MonospaceBlock extends AbstractFatherBlock { /** * Creates the MonospaceBlock. * * @param childBlocks child blocks */ MonospaceBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.monospaced(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.monospaced_(); } } ��������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000176�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextParser.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000022146�11102715517�033401� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.HashMap; import java.util.List; import java.util.Map; /** * Parse looking for formated text (bold, italic, ...) * * @author Juan F. Codagnone * @version $Id: FormatedTextParser.java 709605 2008-10-31 23:57:03Z hboutemy $ */ public class FormatedTextParser { /** * parser used to parse text... */ private TextParser textParser; /** * map used to create blocks dependening on the text format */ private static final Map FACTORY_MAP = new HashMap(); /** * creates bold blocks */ private static final FormatBlockFactory BOLD_FACTORY = new FormatBlockFactory() { /** {@inheritDoc} */ public Block createBlock( final Block[] childrens ) { return new BoldBlock( childrens ); } }; /** * creates italic blocks */ private static final FormatBlockFactory ITALIC_FACTORY = new FormatBlockFactory() { /** {@inheritDoc} */ public Block createBlock( final Block[] childrens ) { return new ItalicBlock( childrens ); } }; /** * creates monospaced blocks */ private static final FormatBlockFactory MONOSPACED_FACTORY = new FormatBlockFactory() { /** {@inheritDoc} */ public Block createBlock( final Block[] childrens ) { return new MonospaceBlock( childrens ); } }; /** * creates bold italic blocks */ private static final FormatBlockFactory BOLDITALIC_FACTORY = new FormatBlockFactory() { /** {@inheritDoc} */ public Block createBlock( final Block[] childrens ) { return new BoldBlock( new Block[] { new ItalicBlock( childrens ) } ); } }; /** * creates bold monospace blocks */ private static final FormatBlockFactory BOLDMONO_FACTORY = new FormatBlockFactory() { /** {@inheritDoc} */ public Block createBlock( final Block[] childrens ) { return new BoldBlock( new Block[] { new MonospaceBlock( childrens ) } ); } }; /** * format characters */ private static final String[] SPECIAL_CHAR = new String[] { "__", "==", "*", "_", "=" }; static { FACTORY_MAP.put( "*", BOLD_FACTORY ); FACTORY_MAP.put( "_", ITALIC_FACTORY ); FACTORY_MAP.put( "=", MONOSPACED_FACTORY ); FACTORY_MAP.put( "__", BOLDITALIC_FACTORY ); FACTORY_MAP.put( "==", BOLDMONO_FACTORY ); } /** * @param line line to parse * @return TextBlock, ItalicBlock, BoldBlock, MonospacedBlock, ... */ final Block[] parse( final String line ) { return (Block[]) parseFormat( line ).toArray( new Block[] {} ); } /** * @param c character to test * @return <code>true</code> if c is a space character */ static boolean isSpace( final char c ) { return c == ' ' || c == '\t'; } /** * @param c character to test * @return <code>true</code> if c is a character that limits the formats */ static boolean isSpecial( final char c ) { boolean ret = false; for ( int i = 0; !ret && i < SPECIAL_CHAR.length; i++ ) { if ( SPECIAL_CHAR[i].charAt( 0 ) == c ) { ret = true; } } return ret; } /** * Parse text format (bold, italic...) * <p/> * TODO too many lines!! * * @param line line to parse * @return list of blocks */ private List parseFormat( final String line ) { final List ret = new ArrayList(); final int[] lhOffsets = new int[SPECIAL_CHAR.length]; final int[] rhOffsets = new int[SPECIAL_CHAR.length]; // for each text format markers... for ( int i = 0; i < SPECIAL_CHAR.length; i++ ) { final int specialLen = SPECIAL_CHAR[i].length(); int t = 0; // search the nearset instance of this marker... while ( t != -1 && ( t = line.indexOf( SPECIAL_CHAR[i], t ) ) != -1 ) { // and check if it at the begining of a word. if ( t == 0 || isSpace( line.charAt( t - 1 ) ) || isParenthesis( line.charAt( t - 1 ) ) ) { // if it is, and if, check to avoid going beyond the string if ( t + specialLen < line.length() ) { // and if character after the format marker is another // marker, is an error, and should be ignored if ( isSpecial( line.charAt( t + specialLen ) ) ) { t += specialLen; } else { // else we find a starter! break; } } else { t = -1; } } else { t += specialLen; } } lhOffsets[i] = t; } // for each text format markers... for ( int i = 0; i < lhOffsets.length; i++ ) { final int specialLen = SPECIAL_CHAR[i].length(); // if we found a text format beginning if ( lhOffsets[i] != -1 ) { int t = lhOffsets[i] + specialLen; // search for a text format ending while ( ( t = line.indexOf( SPECIAL_CHAR[i], t ) ) != -1 ) { // must be side by side to a word final char c = line.charAt( t - 1 ); if ( t > 0 && !isSpace( c ) && !isSpecial( c ) ) { break; } else { t += specialLen; } } rhOffsets[i] = t; } } // find the nearest index int minIndex = -1; int charType = 0; for ( int i = 0; i < lhOffsets.length; i++ ) { if ( lhOffsets[i] != -1 && rhOffsets[i] != 1 ) { if ( minIndex == -1 || lhOffsets[i] < minIndex ) { if ( rhOffsets[i] > lhOffsets[i] ) { // ej: "mary *has a little lamb" minIndex = lhOffsets[i]; charType = i; } } } } if ( minIndex == -1 ) { ret.addAll( textParser.parse( line ) ); } else { int len = SPECIAL_CHAR[charType].length(); ret.addAll( parseFormat( line.substring( 0, minIndex ) ) ); ret.add( ( (FormatBlockFactory) FACTORY_MAP.get( SPECIAL_CHAR[charType] ) ) .createBlock( (Block[]) parseFormat( line.substring( minIndex + len, rhOffsets[charType] ) ) .toArray( new Block[] {} ) ) ); ret.addAll( parseFormat( line.substring( rhOffsets[charType] + len ) ) ); } // profit return ret; } /** * @param c character to test * @return <code>true</code> if c is a parenthesis */ private boolean isParenthesis( final char c ) { return c == '(' || c == ')'; } /** * Sets the formatTextParser. * * @param textParser text parser to use * <code>TextParser</code> with the formatTextParser. */ public final void setTextParser( final TextParser textParser ) { if ( textParser == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.textParser = textParser; } } /** * @author Juan F. Codagnone * @version $Id: FormatedTextParser.java 709605 2008-10-31 23:57:03Z hboutemy $ */ interface FormatBlockFactory { /** * factory method of format <code>Block</code> * * @param childrens children of the format block * @return a format block */ Block createBlock( final Block[] childrens ); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/HorizontalRuleBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000003003�11075462240�033371� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Represents an horizontal block * * @author Juan F. Codagnone * @version $Id: HorizontalRuleBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class HorizontalRuleBlock implements Block { /** {@inheritDoc} */ public final void traverse( final Sink sink ) { sink.horizontalRule(); } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { return obj == this || ( obj != null && getClass().equals( obj.getClass() ) ); } /** {@inheritDoc} */ public final int hashCode() { final int hashCode = 214905655; return hashCode; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000176�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/UnorderedListBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000003135�11167436114�033402� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * <pre> * - item1 * - item2 * - item2.1 * ... * </pre> * * @author Juan F. Codagnone * @version $Id: UnorderedListBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class UnorderedListBlock extends ListBlock { /** * Creates the UnorderedListBlock. * * @param blocks list of list items * @throws IllegalArgumentException if listItemBlocks is <code>null</code> */ UnorderedListBlock( final ListItemBlock[] blocks ) { super( blocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.list(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.list_(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000171�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/WikiWordBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000007173�11102715517�033404� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Represent a WikiWord * * @author Juan F. Codagnone * @version $Id: WikiWordBlock.java 709605 2008-10-31 23:57:03Z hboutemy $ */ class WikiWordBlock implements Block { /** * the wiki word */ private final String wikiword; /** * content to show in the wiki word link */ private final Block content; /** * Resolves WikiWord links */ private final WikiWordLinkResolver wikiWordLinkResolver; /** * @see #WikiWordBlock(String, String) * @param aWikiword the wikiWord * @param resolver responsible of resolving the link to the wikiWord */ WikiWordBlock( final String aWikiword, final WikiWordLinkResolver resolver ) { this( aWikiword, aWikiword, resolver ); } /** * Creates the WikiWordBlock. * * @param aWikiword the wiki word * @param aText text to show in the wiki link * @param resolver responsible of resolving the link to the wikiWord * @throws IllegalArgumentException if the wikiword is <code>null</code> * @deprecated */ WikiWordBlock( final String aWikiword, final String aText, final WikiWordLinkResolver resolver ) { this( aWikiword, new TextBlock( aText ), resolver ); } /** * Creates the WikiWordBlock. * * @param aWikiword the wiki word * @param content content to show in the wiki link * @param resolver responsible of resolving the link to the wikiWord * @throws IllegalArgumentException if the wikiword is <code>null</code> */ WikiWordBlock( final String aWikiword, final Block content, final WikiWordLinkResolver resolver ) { if ( aWikiword == null || content == null || resolver == null ) { throw new IllegalArgumentException( "arguments can't be null" ); } this.wikiword = aWikiword; this.content = content; this.wikiWordLinkResolver = resolver; } /** {@inheritDoc} */ public final void traverse( final Sink sink ) { sink.link( wikiWordLinkResolver.resolveLink( wikiword ) ); content.traverse( sink ); sink.link_(); } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj instanceof WikiWordBlock ) { final WikiWordBlock w = (WikiWordBlock) obj; ret = wikiword.equals( w.wikiword ) && content.equals( w.content ); } return ret; } /** {@inheritDoc} */ public final int hashCode() { final int magic1 = 17; final int magic2 = 37; return magic1 + magic2 * wikiword.hashCode() + magic2 * content.hashCode(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/VerbatimBlockParser.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000005102�11150514042�033363� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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 java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.util.ByLineSource; /** * Parse verbatim blocks * * @author Christian Nardi * @version $Id: VerbatimBlockParser.java 746991 2009-02-23 12:35:46Z vsiveton $ * @since 1.1 */ public class VerbatimBlockParser implements BlockParser { /** * pattern to detect verbatim start tags */ private static final Pattern VERBATIM_START_PATTERN = Pattern.compile( "\\s*<verbatim>" ); private static final Pattern VERBATIM_END_PATTERN = Pattern.compile( "</verbatim>" ); /** {@inheritDoc} */ public final boolean accept( final String line ) { return VERBATIM_START_PATTERN.matcher( line ).lookingAt(); } /** * {@inheritDoc} */ public final Block visit( final String line, final ByLineSource source ) throws ParseException { if ( !accept( line ) ) { throw new IllegalAccessError( "call accept before this ;)" ); } final List lines = new ArrayList(); Matcher matcher = VERBATIM_START_PATTERN.matcher( line ); matcher.find(); String l = line.substring( matcher.end() ); while ( l != null ) { matcher = VERBATIM_END_PATTERN.matcher( l ); if ( matcher.find() ) { lines.add( new TextBlock( l.substring( 0, matcher.start() ) + "\n" ) ); break; } lines.add( new TextBlock( l + "\n" ) ); l = source.getNextLine(); } return new VerbatimBlock( (Block[]) lines.toArray( new Block[] {} ) ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000164�00000000000�011566� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/NopBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002723�11075462240�033401� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that not represent anything * * @author Juan F. Codagnone * @version $Id: NopBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class NopBlock implements Block { /** {@inheritDoc} */ public final void traverse( final Sink sink ) { // nothing to do!! } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { return this == obj && getClass().equals( obj.getClass() ); } /** {@inheritDoc} */ public final int hashCode() { final int magic = 518409602; return magic; } } ���������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TextBlock.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000004624�11167436114�033406� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that holds plain text * * @author Juan F. Codagnone * @version $Id: TextBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class TextBlock implements Block { /** * the text */ private final String text; /** * Creates the TextBlock. * * @param text some text. can't ben <code>null</code> * @throws IllegalArgumentException if parameters are not in the domain */ TextBlock( final String text ) { if ( text == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.text = text; } /** {@inheritDoc} */ public final void traverse( final Sink sink ) { sink.text( text ); } /** {@inheritDoc} */ public final String toString() { return getClass().getName() + ": [" + text.replaceAll( "\n", "\\n" ) + "]"; } /** * Returns the text. * * @return <code>String</code> with the text. */ final String getText() { return text; } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj instanceof TextBlock ) { final TextBlock textBlock = (TextBlock) obj; ret = text.equals( textBlock.text ); } return ret; } /** {@inheritDoc} */ public final int hashCode() { return text.hashCode(); } } ������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/AbstractFatherBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000006703�11075462240�033403� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.Arrays; import org.apache.maven.doxia.sink.Sink; /** * Generic Block for the Block that have child blocks. * * @author Juan F. Codagnone * @version $Id: AbstractFatherBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ abstract class AbstractFatherBlock implements Block { /** * @see AbstractFatherBlock#AbstractFatherBlock(Block[]) */ private final Block[] childBlocks; /** * method called before traversing the childs * * @param sink a sink to fill */ abstract void before( Sink sink ); /** * method called after traversing the childs * * @param sink a sink to fill */ abstract void after( Sink sink ); /** * Creates the AbstractFatherBlock. * * @param childBlocks child blocks */ AbstractFatherBlock( final Block[] childBlocks ) { if ( childBlocks == null ) { throw new IllegalArgumentException( "argument can't be null" ); } for ( int i = 0; i < childBlocks.length; i++ ) { if ( childBlocks[i] == null ) { throw new IllegalArgumentException( "bucket " + i + " can't be null" ); } } this.childBlocks = childBlocks; } /** {@inheritDoc} */ public final void traverse( final Sink sink ) { before( sink ); for ( int i = 0; i < childBlocks.length; i++ ) { Block block = childBlocks[i]; block.traverse( sink ); } after( sink ); } /** * Returns the childBlocks. * * @return <code>Block[]</code> with the childBlocks. */ public final Block[] getBlocks() { return childBlocks; } /** {@inheritDoc}*/ public boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj == null ) { ret = false; } else if ( obj.getClass().equals( this.getClass() ) ) { if ( obj instanceof AbstractFatherBlock ) { final AbstractFatherBlock a = (AbstractFatherBlock) obj; ret = Arrays.equals( a.childBlocks, this.childBlocks ); } } return ret; } /** {@inheritDoc}*/ public int hashCode() { int result = 1; if ( childBlocks != null ) { for ( int i = 0; i < childBlocks.length; i++ ) { result += childBlocks[i].hashCode(); } } return result; } } �������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000170�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/SectionBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000010657�11167436114�033411� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.lang.reflect.Method; import java.util.Collections; import org.apache.maven.doxia.sink.Sink; /** * Block that represents a section * * @author Juan F. Codagnone * @version $Id: SectionBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ public class SectionBlock extends AbstractFatherBlock { /** {@inheritDoc} */ private final String title; /** {@inheritDoc} */ private final int level; /** * Creates the SectionBlock. * <p/> * No parameter can be <code>null</code> * * @param title the section title. * @param level the section level: 0 < level < 6 * @param blocks child blocks */ public SectionBlock( final String title, final int level, final Block[] blocks ) { super( blocks ); final int maxLevel = 5; if ( title == null ) { throw new IllegalArgumentException( "title cant be null" ); } else if ( level < 1 || level > maxLevel ) { throw new IllegalArgumentException( "invalid level: " + level ); } this.title = title; this.level = level; } /** {@inheritDoc} */ final void before( final Sink sink ) { sectionStart( sink ); sectionTitle( sink ); sink.text( title ); sectionTitle_( sink ); } /** {@inheritDoc} */ final void after( final Sink sink ) { sectionEnd( sink ); } /** * call to sink.section<Level>() * * @param sink sink */ private void sectionStart( final Sink sink ) { invokeVoidVoid( sink, "section" + level ); } /** * call to sink.section<Level>_() * * @param sink sink */ private void sectionEnd( final Sink sink ) { invokeVoidVoid( sink, "section" + level + "_" ); } /** * Let you call sink's methods that returns <code>null</code> and have * no parameters. * * @param sink the Sink * @param name the name of the method to call */ private void invokeVoidVoid( final Sink sink, final String name ) { try { final Method m = sink.getClass().getMethod( name, new Class[] {} ); m.invoke( sink, Collections.EMPTY_LIST.toArray() ); } catch ( Exception e ) { // FIXME throw new IllegalArgumentException( "invoking sink's " + name + " method: " + e.getMessage() ); } } /** * Returns the level. * * @return <code>int</code> with the level. */ public final int getLevel() { return level; } /** * Returns the title. * * @return <code>String</code> with the title. */ public final String getTitle() { return title; } /** {@inheritDoc} */ public final String toString() { final StringBuffer sb = new StringBuffer(); sb.append( "Section {title: '" ); sb.append( getTitle() ); sb.append( "' level: " ); sb.append( getLevel() ); sb.append( "}: [" ); for ( int i = 0; i < getBlocks().length; i++ ) { final Block block = getBlocks()[i]; sb.append( block.toString() ); sb.append( ", " ); } sb.append( "]" ); return sb.toString(); } /** @param sink */ private void sectionTitle( final Sink sink ) { invokeVoidVoid( sink, "sectionTitle" + level ); } /** @param sink */ private void sectionTitle_( final Sink sink ) { invokeVoidVoid( sink, "sectionTitle" + level + "_" ); } } ���������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000171�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/VerbatimBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000003060�11151264317�033374� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.SinkEventAttributeSet; /** * Represents a verbatim block * * @author Christian Nardi * @version $Id: VerbatimBlock.java 747837 2009-02-25 15:50:39Z ltheussl $ */ class VerbatimBlock extends AbstractFatherBlock { /** * Creates the VerbatimBlock. * * @param childBlocks child blocks */ VerbatimBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.verbatim( SinkEventAttributeSet.BOXED ); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.verbatim_(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000200�00000000000�011555� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableCellHeaderBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002771�11075462240�033404� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Table Cell headear * * @author Juan F. Codagnone * @version $Id: TableCellHeaderBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class TableCellHeaderBlock extends AbstractFatherBlock { /** * Creates the TableCellHeaderBlock. * * @param childBlocks childrens */ TableCellHeaderBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.tableHeaderCell(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.tableHeaderCell_(); } } �������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000166�00000000000�011570� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ImageBlock.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000004406�11075462240�033401� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that represents an image. * * @author Christian Nardi * @version $Id: ImageBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class ImageBlock implements Block { /** * img reference */ private final String reference; /** * Creates the ImageBlock. * * @param imgReference img reference * @throws IllegalArgumentException if the argument is <code>null</code> */ ImageBlock( final String imgReference ) { if ( imgReference == null ) { throw new IllegalArgumentException( "arguments can't be null" ); } this.reference = imgReference; } /** {@inheritDoc} */ public final void traverse( final Sink sink ) { sink.figure(); sink.figureGraphics( reference ); sink.figure_(); } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj instanceof ImageBlock ) { final ImageBlock l = (ImageBlock) obj; ret = reference.equals( l.reference ); } return ret; } /** {@inheritDoc} */ public final int hashCode() { final int magic1 = 17; final int magic2 = 37; return magic1 + magic2 * reference.hashCode(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000200�00000000000�011555� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/WikiWordLinkResolver.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002370�10767707462�033416� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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. */ /** * Resolves the WikiWordLinks * * @author Christian D. Nardi * @version $Id: WikiWordLinkResolver.java 638290 2008-03-18 09:45:22Z bentmann $ */ interface WikiWordLinkResolver { /** * Given a wikiWord, it returns a link string. * * @param wikiWord wikiWord to resolve * @return the link representation of the wikiWord. */ String resolveLink( final String wikiWord ); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/BoldBlock.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002731�11075462240�033400� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that represents the bold text format * * @author Juan F. Codagnone * @version $Id: BoldBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class BoldBlock extends AbstractFatherBlock { /** * Creates the BoldBlock. * * @param childBlocks child blocks */ public BoldBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.bold(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.bold_(); } } ���������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000174�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableBlockParser.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000006712�11150514042�033373� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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 java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.maven.doxia.util.ByLineSource; import org.apache.maven.doxia.parser.ParseException; /** * Parse tables * * @author Juan F. Codagnone * @version $Id: TableBlockParser.java 746991 2009-02-23 12:35:46Z vsiveton $ */ public class TableBlockParser implements BlockParser { /** * pattern to detect tables */ private static final Pattern TABLE_PATTERN = Pattern.compile( "^\\s*([|].*[|])+\\s*$" ); /** * text parser */ private FormatedTextParser textParser; /** {@inheritDoc} */ public final boolean accept( final String line ) { return TABLE_PATTERN.matcher( line ).lookingAt(); } /** * {@inheritDoc} */ public final Block visit( final String line, final ByLineSource source ) throws ParseException { if ( !accept( line ) ) { throw new IllegalAccessError( "call accept before this ;)" ); } final List rows = new ArrayList(); String l = line; do { final Matcher m = TABLE_PATTERN.matcher( l ); if ( m.lookingAt() ) { final List cells = new ArrayList(); /* for each cell... */ for ( int lh = l.indexOf( '|' ) + 1, rh; ( rh = l.indexOf( '|', lh ) ) != -1; lh = rh + 1 ) { final Block[] bs = textParser.parse( l.substring( lh, rh ).trim() ); if ( bs.length == 1 && bs[0] instanceof BoldBlock ) { final Block[] tmp = ( (BoldBlock) bs[0] ).getBlocks(); cells.add( new TableCellHeaderBlock( tmp ) ); } else { cells.add( new TableCellBlock( bs ) ); } } rows.add( new TableRowBlock( (Block[]) cells.toArray( new Block[] {} ) ) ); } } while ( ( l = source.getNextLine() ) != null && accept( l ) ); assert rows.size() >= 1; return new TableBlock( (Block[]) rows.toArray( new Block[] {} ) ); } /** * <p>Setter for the field <code>textParser</code>.</p> * * @param textParser text parser to be set */ public final void setTextParser( final FormatedTextParser textParser ) { if ( textParser == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.textParser = textParser; } } ������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/LinkBlock.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000005315�11167436114�033404� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that represents a link. * * @author Juan F. Codagnone * @version $Id: LinkBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class LinkBlock implements Block { /** * link reference */ private final String reference; /** * link text */ private final Block content; /** * Creates the LinkBlock. * * @param reference reference anchor * @param text text to display * @deprecated */ LinkBlock( final String reference, final String text ) { this( reference, new TextBlock( text ) ); } /** * Creates the LinkBlock. * * @param reference reference anchor, not null. * @param content block with the displayed content, not null. */ LinkBlock( final String reference, final Block content ) { if ( reference == null || content == null ) { throw new IllegalArgumentException( "arguments can't be null" ); } this.reference = reference; this.content = content; } /** {@inheritDoc} */ public final void traverse( final Sink sink ) { sink.link( reference ); content.traverse( sink ); sink.link_(); } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj instanceof LinkBlock ) { final LinkBlock l = (LinkBlock) obj; ret = reference.equals( l.reference ) && content.equals( l.content ); } return ret; } /** {@inheritDoc} */ public final int hashCode() { final int magic1 = 17; final int magic2 = 37; return magic1 + magic2 * reference.hashCode() + magic2 * content.hashCode(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000167�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ItalicBlock.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002736�11075462240�033405� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that represents the italic text format * * @author Juan F. Codagnone * @version $Id: ItalicBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class ItalicBlock extends AbstractFatherBlock { /** * Creates the BoldBlock. * * @param childBlocks child blocks */ ItalicBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.italic(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.italic_(); } } ����������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000166�00000000000�011570� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableBlock.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000003515�11102715517�033400� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Represents a table * * @author Juan F. Codagnone * @version $Id: TableBlock.java 709605 2008-10-31 23:57:03Z hboutemy $ */ class TableBlock extends AbstractFatherBlock { /** * Creates the TableBlock. * * @param childBlocks child blocks */ public TableBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.table(); sink.tableRows( getJustification(), false ); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.tableRows_(); sink.table_(); } private int[] getJustification() { int[] justification = new int[( (AbstractFatherBlock) getBlocks()[0] ).getBlocks().length]; for ( int i = 0; i < justification.length; i++ ) { justification[i] = Sink.JUSTIFY_CENTER; } return justification; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000172�00000000000�011565� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ParagraphBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002524�11167436114�033403� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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 Juan F. Codagnone * @version $Id: ParagraphBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class ParagraphBlock extends AbstractFatherBlock { ParagraphBlock( final Block[] blocks ) { super( blocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.paragraph(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.paragraph_(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ListBlock.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002426�11167436114�033404� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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. */ /** * <pre> * - item1 * - item2 * - item2.1 * ... * </pre> * * @author Juan F. Codagnone * @version $Id: ListBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ abstract class ListBlock extends AbstractFatherBlock { /** * Creates the ListBlock. * * @param blocks list of list items, not null. */ ListBlock( final ListItemBlock[] blocks ) { super( blocks ); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000176�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/SectionBlockParser.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000011412�11167436114�033377� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.regex.Matcher; import java.util.regex.Pattern; import org.apache.maven.doxia.util.ByLineSource; import org.apache.maven.doxia.parser.ParseException; /** * Parse looking for sections * * @author Juan F. Codagnone * @version $Id: SectionBlockParser.java 763762 2009-04-09 18:19:56Z ltheussl $ */ public class SectionBlockParser implements BlockParser { /** * '---++ Header', '---## Header' */ private static final Pattern HEADER_DA = Pattern.compile( "^---([+]+)\\s*(.+)\\s*$" ); /** * {@link ParagraphBlockParser} to use. injected */ private ParagraphBlockParser paraParser; /** * {@link ParagraphBlockParser} to use. injected */ private HRuleBlockParser hrulerParser; /** {@link VerbatimBlockParser} */ private VerbatimBlockParser verbatimBlockParser; /** * {@inheritDoc} */ public final boolean accept( final String line ) { return HEADER_DA.matcher( line ).lookingAt(); } /** * {@inheritDoc} */ public final Block visit( final String line, final ByLineSource source ) throws ParseException { final Matcher m = HEADER_DA.matcher( line ); if ( !m.lookingAt() ) { throw new IllegalArgumentException( "don't know how to handle: " + line ); } String newLine; final ArrayList blocks = new ArrayList(); while ( ( newLine = source.getNextLine() ) != null && !accept( newLine ) ) { if ( hrulerParser.accept( newLine ) ) { blocks.add( hrulerParser.visit( newLine, source ) ); } else { if ( verbatimBlockParser.accept( newLine ) ) { blocks.add( verbatimBlockParser.visit( newLine, source ) ); } else { blocks.add( paraParser.visit( newLine, source ) ); } } } if ( newLine != null ) { source.ungetLine(); } return new SectionBlock( m.group( 2 ), getLevel( m.group( 1 ) ), (Block[]) blocks.toArray( new Block[] {} ) ); } /** * @param s "++" * @return tha level of the section * @throws IllegalArgumentException on error */ static int getLevel( final String s ) throws IllegalArgumentException { for ( int i = 0, n = s.length(); i < n; i++ ) { if ( s.charAt( i ) != '+' ) { throw new IllegalArgumentException( "the argument must have only" + " '+' characters" ); } } return s.length(); } /** * Sets the paraParser. * * @param paraParser <code>ParagraphBlockParser</code> with the paraParser. */ public final void setParaParser( final ParagraphBlockParser paraParser ) { if ( paraParser == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.paraParser = paraParser; } /** * Sets the hrulerParser. * * @param hrulerParser <code>HRuleBlockParser</code> with the hrulerParser. */ public final void setHrulerParser( final HRuleBlockParser hrulerParser ) { if ( hrulerParser == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.hrulerParser = hrulerParser; } /** * Sets the verbatimBlockParser. * * @param verbatimBlockParser <code>VerbatimBlockParser</code> with the verbatimBlockParser. * @since 1.1 */ public final void setVerbatimBlockParser( VerbatimBlockParser verbatimBlockParser ) { if ( verbatimBlockParser == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.verbatimBlockParser = verbatimBlockParser; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000171�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableRowBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002730�11075462240�033377� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Represens a Table Row * * @author Juan F. Codagnone * @version $Id: TableRowBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class TableRowBlock extends AbstractFatherBlock { /** * Creates the TableRowBlock. * * @param childBlocks children blocks */ TableRowBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.tableRow(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.tableRow_(); } } ����������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000167�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/BlockParser.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000003117�11216135717�033402� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Parse a twiki syntax block * * @author Juan F. Codagnone * @version $Id: BlockParser.java 785531 2009-06-17 09:47:59Z ltheussl $ */ public interface BlockParser { /** * <p>accept.</p> * * @param line text line * @return <code>true</code> if this class can handle this line */ boolean accept( String line ); /** * <p>visit.</p> * * @param line a line of text * @param source the source of lines * @return a block * @throws org.apache.maven.doxia.parser.ParseException on error */ Block visit( String line, ByLineSource source ) throws ParseException; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000167�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/AnchorBlock.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000004153�11167436114�033403� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Represents an anchor * * @author Juan F. Codagnone * @version $Id: AnchorBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class AnchorBlock implements Block { /** * anchor name */ private final String name; /** * Creates the AnchorBlock. * * @param name name of the anchor, not null. */ AnchorBlock( final String name ) { if ( name == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.name = name; } /** {@inheritDoc}*/ public final void traverse( final Sink sink ) { sink.anchor( name ); sink.anchor_(); } /** {@inheritDoc}*/ public final boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj instanceof AnchorBlock ) { final AnchorBlock a = (AnchorBlock) obj; ret = name.equals( a.name ); } return ret; } /** {@inheritDoc}*/ public final int hashCode() { return name.hashCode(); } /** {@inheritDoc}*/ public String toString() { return name; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000166�00000000000�011570� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/XHTMLBlock.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000004213�11167436114�033400� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * An XHTML Block * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: XHTMLBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class XHTMLBlock implements Block { private final String tag; /** * Creates the XHTMLBlock. * * @param tag the tag, eg: <pre> * @throws IllegalArgumentException if the arguments are <code>null</code> */ XHTMLBlock( final String tag ) { if ( tag == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.tag = tag; } /** {@inheritDoc}*/ public final void traverse( final Sink sink ) { if ( tag.trim().length() == 0 ) { return; } sink.rawText( tag ); } /** {@inheritDoc}*/ public final boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj instanceof XHTMLBlock ) { final XHTMLBlock a = (XHTMLBlock) obj; ret = tag.equals( a.tag ); } return ret; } /** {@inheritDoc}*/ public final int hashCode() { return tag.hashCode(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000174�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/HRuleBlockParser.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000004515�11150514042�033372� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.regex.Matcher; import java.util.regex.Pattern; import org.apache.maven.doxia.util.ByLineSource; import org.apache.maven.doxia.parser.ParseException; /** * Block that represents an horizontal rule * * @author Juan F. Codagnone * @version $Id: HRuleBlockParser.java 746991 2009-02-23 12:35:46Z vsiveton $ */ public class HRuleBlockParser implements BlockParser { /** * pattern used to detect horizontal rulers */ private static final Pattern HRULE_PATTERN = Pattern.compile( "^(---)(-*)(.*)$" ); /** {@inheritDoc} */ public final boolean accept( final String line ) { final Matcher m = HRULE_PATTERN.matcher( line ); boolean ret = false; if ( m.lookingAt() ) { final int textGroup = 3; String s = m.group( textGroup ); if ( s != null && !s.startsWith( "+" ) ) { ret = true; } } return ret; } /** * {@inheritDoc} */ public final Block visit( final String line, final ByLineSource source ) throws ParseException { Block ret = new HorizontalRuleBlock(); final Matcher matcher = HRULE_PATTERN.matcher( line ); if ( matcher.lookingAt() ) { final int textGroup = 3; source.unget( matcher.group( textGroup ) ); } else { throw new ParseException( "i was expecting a hruler!" ); } return ret; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000166�00000000000�011570� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TextParser.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000031422�11216135717�033402� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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 java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Parse almost plain text in search of WikiWords, links, ... * * @author Juan F. Codagnone * @version $Id: TextParser.java 785531 2009-06-17 09:47:59Z ltheussl $ */ public class TextParser { /** * pattern to detect WikiWords */ private static final Pattern WIKIWORD_PATTERN = Pattern.compile( "(!?([A-Z]\\w*[.])?([A-Z][a-z]+){2,}(#\\w*)?)" ); /** * pattern to detect SpecificLinks links [[reference][text]] */ private static final Pattern SPECIFICLINK_PATTERN = Pattern.compile( "!?\\[\\[([^\\]]+)\\]\\[([^\\]]+)\\]\\]" ); /** * pattern to detect ForcedLinks links [[reference asd]] */ private static final Pattern FORCEDLINK_PATTERN = Pattern.compile( "(!)?(\\[\\[(.+)\\]\\])" ); /** * anchor name */ private static final Pattern ANCHOR_PATTERN = Pattern.compile( "#(([A-Z][A-Za-z]*){2,})" ); /** * url word */ private static final Pattern URL_PATTERN = Pattern.compile( "(\\w+):[/][/][^\\s]*" ); /** * image pattern specification */ private static final Pattern IMAGE_PATTERN = Pattern.compile( "(.*)\\.(png|jpg|gif|bmp)" ); /** * image tag pattern specification (used for images at relative URLs) */ private static final Pattern IMAGE_TAG_PATTERN = Pattern.compile( "<img\\b.*?\\bsrc=([\"'])(.*?)\\1.*>", Pattern.CASE_INSENSITIVE ); /** HTML tag pattern */ private static final Pattern HTML_TAG_PATTERN = Pattern.compile( "<(/?)([\\w]*)(.*?)(/?)>", Pattern.DOTALL ); /** * resolves wikiWordLinks */ private final WikiWordLinkResolver wikiWordLinkResolver; /** resolves noautolink tag */ private boolean noautolink; /** * Creates the TextParser. * * @param resolver resolver for wikiWord links */ public TextParser( final WikiWordLinkResolver resolver ) { this.wikiWordLinkResolver = resolver; } /** * <p>parse.</p> * * @param line line to parse * @return a list of block that represents the input */ public final List parse( final String line ) { final List ret = new ArrayList(); final Matcher linkMatcher = SPECIFICLINK_PATTERN.matcher( line ); final Matcher wikiMatcher = WIKIWORD_PATTERN.matcher( line ); final Matcher forcedLinkMatcher = FORCEDLINK_PATTERN.matcher( line ); final Matcher anchorMatcher = ANCHOR_PATTERN.matcher( line ); final Matcher urlMatcher = URL_PATTERN.matcher( line ); final Matcher imageTagMatcher = IMAGE_TAG_PATTERN.matcher( line ); final Matcher tagMatcher = HTML_TAG_PATTERN.matcher( line ); Matcher xhtmlMatcher = null; if ( tagMatcher.find() ) { String tag = tagMatcher.group( 2 ); Pattern pattern = Pattern.compile( "(\\<" + tag + ".*\\>)(.*)?(\\<\\/" + tag + "\\>)(.*)?", Pattern.DOTALL ); xhtmlMatcher = pattern.matcher( line ); } if ( xhtmlMatcher != null && xhtmlMatcher.find() ) { parseXHTML( line, ret, xhtmlMatcher ); } else if ( linkMatcher.find() ) { parseLink( line, ret, linkMatcher ); } else if ( wikiMatcher.find() && startLikeWord( wikiMatcher, line ) && !noautolink ) { parseWiki( line, ret, wikiMatcher ); } else if ( forcedLinkMatcher.find() ) { parseForcedLink( line, ret, forcedLinkMatcher ); } else if ( anchorMatcher.find() && isAWord( anchorMatcher, line ) ) { parseAnchor( line, ret, anchorMatcher ); } else if ( urlMatcher.find() && isAWord( urlMatcher, line ) ) { parseUrl( line, ret, urlMatcher ); } else if ( imageTagMatcher.find() ) { parseImage( line, ret, imageTagMatcher ); } else { if ( line.length() != 0 ) { ret.add( new TextBlock( line ) ); } } return ret; } /** * Parses the image tag * @param line the line to parse * @param ret where the results live * @param imageTagMatcher image tag matcher */ private void parseImage( final String line, final List ret, final Matcher imageTagMatcher ) { ret.addAll( parse( line.substring( 0, imageTagMatcher.start() ) ) ); final String src = imageTagMatcher.group( 2 ); ret.add( new ImageBlock( src ) ); ret.addAll( parse( line.substring( imageTagMatcher.end(), line.length() ) ) ); } /** * Parses the url * @param line the line to parse * @param ret where the results live * @param urlMatcher url matcher */ private void parseUrl( final String line, final List ret, final Matcher urlMatcher ) { ret.addAll( parse( line.substring( 0, urlMatcher.start() ) ) ); final String url = urlMatcher.group( 0 ); final Matcher imageMatcher = IMAGE_PATTERN.matcher( url ); if ( imageMatcher.matches() ) { ret.add( new ImageBlock( url ) ); } else { ret.add( new LinkBlock( url, new TextBlock( url ) ) ); } ret.addAll( parse( line.substring( urlMatcher.end(), line.length() ) ) ); } /** * Parses the anchor * @param line the line to parse * @param ret where the results live * @param anchorMatcher anchor matcher */ private void parseAnchor( final String line, final List ret, final Matcher anchorMatcher ) { ret.addAll( parse( line.substring( 0, anchorMatcher.start() ) ) ); ret.add( new AnchorBlock( anchorMatcher.group( 1 ) ) ); ret.addAll( parse( line.substring( anchorMatcher.end(), line.length() ) ) ); } /** * Parses the link * @param line line to parse * @param ret where the results live * @param forcedLinkMatcher forced link matcher */ private void parseForcedLink( final String line, final List ret, final Matcher forcedLinkMatcher ) { if ( forcedLinkMatcher.group( 1 ) != null ) { ret.add( new TextBlock( forcedLinkMatcher.group( 2 ) ) ); } else { final String showText = forcedLinkMatcher.group( 3 ); // mailto link: if ( showText.trim().startsWith( "mailto:" ) ) { String s = showText.trim(); int i = s.indexOf( ' ' ); if ( i == -1 ) { ret.add( new TextBlock( s ) ); } else { ret.add( new LinkBlock( s.substring( 0, i ), new TextBlock( s.substring( i ).trim() ) ) ); } } else { ret.addAll( parse( line.substring( 0, forcedLinkMatcher.start() ) ) ); ret.add( createLink( showText, showText ) ); ret.addAll( parse( line.substring( forcedLinkMatcher.end(), line.length() ) ) ); } } } /** * Decides between a WikiWordBlock or a a LinkBlock * @param link the link text * @param showText the show text. * @return either a WikiWordBlock or a LinkBlock */ private Block createLink( final String link, final String showText ) { final Block content; if ( URL_PATTERN.matcher( showText ).matches() && IMAGE_PATTERN.matcher( showText ).matches() ) { content = new ImageBlock( showText ); } else { content = new TextBlock( showText ); } if ( URL_PATTERN.matcher( link ).matches() ) { return new LinkBlock( link, content ); } final StringTokenizer tokenizer = new StringTokenizer( link ); final StringBuffer sb = new StringBuffer(); while ( tokenizer.hasMoreElements() ) { final String s = tokenizer.nextToken(); sb.append( s.substring( 0, 1 ).toUpperCase() ); sb.append( s.substring( 1 ) ); } return new WikiWordBlock( sb.toString(), content, wikiWordLinkResolver ); } /** * Parses a wiki word * @param line the line to parse * @param ret where the results live * @param wikiMatcher wiki matcher */ private void parseWiki( final String line, final List ret, final Matcher wikiMatcher ) { final String wikiWord = wikiMatcher.group(); ret.addAll( parse( line.substring( 0, wikiMatcher.start() ) ) ); if ( wikiWord.startsWith( "!" ) ) { // link prevention ret.add( new TextBlock( wikiWord.substring( 1 ) ) ); } else { ret.add( new WikiWordBlock( wikiWord, wikiWordLinkResolver ) ); } ret.addAll( parse( line.substring( wikiMatcher.end(), line.length() ) ) ); } /** * Parses a link * @param line the line to parse * @param ret where the results live * @param linkMatcher link matcher */ private void parseLink( final String line, final List ret, final Matcher linkMatcher ) { ret.addAll( parse( line.substring( 0, linkMatcher.start() ) ) ); if ( line.charAt( linkMatcher.start() ) == '!' ) { ret.add( new TextBlock( line.substring( linkMatcher.start() + 1, linkMatcher.end() ) ) ); } else { ret.add( createLink( linkMatcher.group( 1 ), linkMatcher.group( 2 ) ) ); } ret.addAll( parse( line.substring( linkMatcher.end(), line.length() ) ) ); } /** * Parses xhtml. * * @param line the line to parse * @param ret where the results live * @param xhtmlMatcher xhtml matcher */ private void parseXHTML( final String line, final List ret, final Matcher xhtmlMatcher ) { if ( xhtmlMatcher.group( 1 ).indexOf( "noautolink" ) != -1 ) { noautolink = true; } else { ret.add( new XHTMLBlock( xhtmlMatcher.group( 1 ) ) ); } ret.addAll( parse( xhtmlMatcher.group( 2 ) ) ); if ( xhtmlMatcher.group( 1 ).indexOf( "noautolink" ) != -1 ) { noautolink = false; } else { ret.add( new XHTMLBlock( xhtmlMatcher.group( 3 ) ) ); } ret.addAll( parse( xhtmlMatcher.group( 4 ) ) ); } /** * @param m matcher to test * @param line line to test * @return <code>true</code> if the match on m represent a word (must be * a space before the word or must be the beginning of the line) */ private boolean isAWord( final Matcher m, final String line ) { return startLikeWord( m, line ) && endLikeWord( m, line ); } /** * @param m matcher to test * @param line line to test * @return true if it is the beginning of a word */ private boolean startLikeWord( final Matcher m, final String line ) { final int start = m.start(); boolean ret = false; if ( start == 0 ) { ret = true; } else if ( start > 0 ) { if ( isSpace( line.charAt( start - 1 ) ) ) { ret = true; } } return ret; } /** * @param m matcher to test * @param line line to test * @return true if it is the end of a word */ private boolean endLikeWord( final Matcher m, final String line ) { final int end = m.end(); boolean ret = true; if ( end < line.length() ) { ret = isSpace( line.charAt( end ) ); } return ret; } /** * @param c char to test * @return <code>true</code> if c is a space char */ private boolean isSpace( final char c ) { return c == ' ' || c == '\t'; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000172�00000000000�011565� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableCellBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002715�11075462240�033402� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Table cell * * @author Juan F. Codagnone * @version $Id: TableCellBlock.java 705065 2008-10-15 21:46:08Z vsiveton $ */ class TableCellBlock extends AbstractFatherBlock { /** * Creates the TableCellBlock. * * @param childBlocks childrens */ TableCellBlock( final Block[] childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.tableCell(); } /** {@inheritDoc} */ final void after( final Sink sink ) { sink.tableCell_(); } } ���������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000171�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ListItemBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000006116�11167436114�033404� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Block that represents the item in a list * * @author Juan F. Codagnone * @version $Id: ListItemBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class ListItemBlock extends AbstractFatherBlock { private final ListBlock innerList; /** * @see #ListItemBlock(Block[], ListBlock) */ ListItemBlock( final Block[] blocks ) { this( blocks, null ); } /** * Creates the ListItemBlock. * * @param blocks text block, not null. * @param innerList child list */ ListItemBlock( final Block[] blocks, final ListBlock innerList ) { super( blocks ); this.innerList = innerList; } /** {@inheritDoc} */ final void before( final Sink sink ) { sink.listItem(); } /** {@inheritDoc} */ final void after( final Sink sink ) { if ( innerList != null ) { innerList.traverse( sink ); } sink.listItem_(); } /** * Returns the innerList. * * @return <code>UnorderedListBlock</code> with the innerList. */ final ListBlock getInnerList() { return innerList; } /** {@inheritDoc} */ public final boolean equals( final Object obj ) { boolean ret = false; if ( obj == this ) { ret = true; } else if ( obj == null || this == null ) { ret = false; } else if ( obj instanceof ListItemBlock ) { final ListItemBlock li = (ListItemBlock) obj; if ( this.innerList == null && li.innerList == null ) { ret = super.equals( li ); } else if ( this.innerList == null && li.innerList != null ) { ret = false; } else { ret = this.innerList.equals( li.innerList ) && super.equals( li ); } } return ret; } /** {@inheritDoc} */ public final int hashCode() { final int magic1 = 17; final int magic2 = 37; return magic1 + magic2 * super.hashCode() + ( innerList == null ? 0 : magic2 * innerList.hashCode() ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000200�00000000000�011555� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ParagraphBlockParser.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000016424�11150514042�033374� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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.Arrays; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.maven.doxia.util.ByLineSource; import org.apache.maven.doxia.parser.ParseException; /** * Parse paragraphs. * * @author Juan F. Codagnone * @version $Id: ParagraphBlockParser.java 746991 2009-02-23 12:35:46Z vsiveton $ */ public class ParagraphBlockParser implements BlockParser { /** * pattern used to dectect end of paragraph */ private final Pattern paragraphSeparator = Pattern.compile( "^(\\s*)$" ); /** * {@link SectionBlockParser} to use. injected */ private SectionBlockParser sectionParser; /** * {@link ListBlockParser} to use. injected */ private GenericListBlockParser listParser; /** * {@link FormatedTextParser} to use. injected */ private FormatedTextParser textParser; /** * {@link HRuleBlockParser} to use. injected */ private HRuleBlockParser hrulerParser; /** * {@link TableBlockParser} to use. injected */ private TableBlockParser tableBlockParser; /** * {@link TableBlockParser} to use. injected */ private VerbatimBlockParser verbatimParser; /** * no operation block */ private static final NopBlock NOP = new NopBlock(); /** {@inheritDoc} */ public final boolean accept( final String line ) { return !sectionParser.accept( line ) && !hrulerParser.accept( line ) && !verbatimParser.accept( line ); } /** * {@inheritDoc} */ public final Block visit( final String line, final ByLineSource source ) throws ParseException { StringBuffer sb = new StringBuffer(); List childs = new ArrayList(); boolean sawText = false; /* * 1. Skip begininig new lines * 2. Get the text, while \n\n is not found */ boolean pre = false; String l = line; do { Matcher m = paragraphSeparator.matcher( l ); if ( m.lookingAt() ) { if ( sawText ) { break; } } else { sawText = true; /* be able to parse lists / enumerations */ if ( listParser.accept( l ) ) { if ( sb.length() != 0 ) { childs.addAll( Arrays.asList( textParser.parse( sb.toString().trim() ) ) ); sb = new StringBuffer(); } childs.add( listParser.visit( l, source ) ); } else if ( tableBlockParser.accept( l ) ) { childs.add( tableBlockParser.visit( l, source ) ); } else { sb.append( l ); // specific if ( l.indexOf( "<pre>" ) != -1 ) { pre = true; } if ( l.indexOf( "</pre>" ) != -1 ) { pre = false; } if ( !pre ) { sb.append( " " ); } else { // TODO use EOL sb.append( "\n" ); } } } l = source.getNextLine(); } while ( l != null && accept( l ) ); if ( line != null ) { source.ungetLine(); } if ( sb.length() != 0 ) { childs.addAll( Arrays.asList( textParser.parse( sb.toString().trim() ) ) ); sb = new StringBuffer(); } if ( childs.size() == 0 ) { return NOP; } return new ParagraphBlock( (Block[]) childs.toArray( new Block[] {} ) ); } /** * Sets the sectionParser. * * @param aSectionParser <code>SectionBlockParser</code> with the sectionParser. */ public final void setSectionParser( final SectionBlockParser aSectionParser ) { if ( aSectionParser == null ) { throw new IllegalArgumentException( "arg can't be null" ); } this.sectionParser = aSectionParser; } /** * Sets the listParser. * * @param aListParser <code>ListBlockParser</code> with the listParser. */ public final void setListParser( final GenericListBlockParser aListParser ) { if ( aListParser == null ) { throw new IllegalArgumentException( "arg can't be null" ); } this.listParser = aListParser; } /** * Sets the formatTextParser. * * @param aTextParser <code>FormatedTextParser</code> * with the formatTextParser. */ public final void setTextParser( final FormatedTextParser aTextParser ) { if ( aTextParser == null ) { throw new IllegalArgumentException( "arg can't be null" ); } this.textParser = aTextParser; } /** * Sets the hrulerParser. * * @param aHrulerParser <code>HRuleBlockParser</code> with the hrulerParser. */ public final void setHrulerParser( final HRuleBlockParser aHrulerParser ) { if ( aHrulerParser == null ) { throw new IllegalArgumentException( "arg can't be null" ); } this.hrulerParser = aHrulerParser; } /** * <p>Setter for the field <code>tableBlockParser</code>.</p> * * @param aTableBlockParser Table parser to use */ public final void setTableBlockParser( final TableBlockParser aTableBlockParser ) { if ( aTableBlockParser == null ) { throw new IllegalArgumentException( "arg can't be null" ); } this.tableBlockParser = aTableBlockParser; } /** * Sets the verbatimParser. * * @param aVerbatimParser <code>VerbatimBlockParser</code> with the verbatimParser. * @since 1.1 */ public final void setVerbatimParser( final VerbatimBlockParser aVerbatimParser ) { if ( aVerbatimParser == null ) { throw new IllegalArgumentException( "arg can't be null" ); } this.verbatimParser = aVerbatimParser; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000202�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/GenericListBlockParser.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000033320�11150514042�033366� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; import org.apache.maven.doxia.sink.Sink; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Generic list parser * * @author Juan F. Codagnone * @version $Id: GenericListBlockParser.java 746991 2009-02-23 12:35:46Z vsiveton $ */ public class GenericListBlockParser implements BlockParser { static final String EOL = System.getProperty( "line.separator" ); /** * parser used to create text blocks */ private FormatedTextParser formatedTextParser; /** * supported patterns */ private final Pattern[] patterns = new Pattern[TYPES.length]; /** * Creates the GenericListBlockParser. */ public GenericListBlockParser() { for ( int i = 0; i < TYPES.length; i++ ) { patterns[i] = Pattern.compile( "^(( )+)" + TYPES[i].getItemPattern() + "(.*)$" ); } } /** {@inheritDoc} */ public final boolean accept( final String line ) { boolean ret = false; for ( int i = 0; !ret && i < patterns.length; i++ ) { ret |= patterns[i].matcher( line ).lookingAt(); } return ret; } /** * {@inheritDoc} */ public final Block visit( final String line, final ByLineSource source ) throws ParseException { final TreeListBuilder treeListBuilder = new TreeListBuilder( formatedTextParser ); // new TreeListBuilder(formatedTextParser); String l = line; do { if ( !accept( l ) ) { break; } for ( int i = 0; i < patterns.length; i++ ) { final Matcher m = patterns[i].matcher( l ); if ( m.lookingAt() ) { final int numberOfSpaces = 3; final int textGroup = 3; assert m.group( 1 ).length() % numberOfSpaces == 0; final int level = m.group( 1 ).length() / numberOfSpaces; treeListBuilder.feedEntry( TYPES[i], level, m.group( textGroup ).trim() ); break; } } } while ( ( l = source.getNextLine() ) != null ); if ( l != null ) { source.ungetLine(); } return treeListBuilder.getBlock(); } /** * Sets the formatTextParser. * * @param textParser <code>FormatedTextParser</code> with the formatTextParser. */ public final void setTextParser( final FormatedTextParser textParser ) { if ( textParser == null ) { throw new IllegalArgumentException( "formatTextParser can't be null" ); } this.formatedTextParser = textParser; } interface Type { /** * @return the pattern of the item part of the list regex */ String getItemPattern(); /** * @param items children of the new listblock * @return a new ListBlock */ ListBlock createList( final ListItemBlock[] items ); } /** * unordered list */ private static final Type LIST = new Type() { /** {@inheritDoc} */ public String getItemPattern() { return "[*]"; } /** {@inheritDoc} */ public ListBlock createList( final ListItemBlock[] items ) { return new UnorderedListBlock( items ); } }; /** * a. */ private static final Type ORDERED_LOWER_ALPHA = new Type() { /** {@inheritDoc} */ public String getItemPattern() { return "[a-hj-z][.]"; } /** {@inheritDoc} */ public ListBlock createList( final ListItemBlock[] items ) { return new NumeratedListBlock( Sink.NUMBERING_LOWER_ALPHA, items ); } }; /** * A. */ private static final Type ORDERED_UPPER_ALPHA = new Type() { /** {@inheritDoc} */ public String getItemPattern() { return "[A-HJ-Z][.]"; } /** {@inheritDoc} */ public ListBlock createList( final ListItemBlock[] items ) { return new NumeratedListBlock( Sink.NUMBERING_UPPER_ALPHA, items ); } }; /** * 1. */ private static final Type ORDERERED_DECIMAL = new Type() { /** {@inheritDoc} */ public String getItemPattern() { return "[0123456789][.]"; } /** {@inheritDoc} */ public ListBlock createList( final ListItemBlock[] items ) { return new NumeratedListBlock( Sink.NUMBERING_DECIMAL, items ); } }; /** * i. */ private static final Type ORDERERED_LOWER_ROMAN = new Type() { /** {@inheritDoc} */ public String getItemPattern() { return "[i][.]"; } /** {@inheritDoc} */ public ListBlock createList( final ListItemBlock[] items ) { return new NumeratedListBlock( Sink.NUMBERING_LOWER_ROMAN, items ); } }; /** * I. */ private static final Type ORDERERED_UPPER_ROMAN = new Type() { /** {@inheritDoc} */ public String getItemPattern() { return "[I][.]"; } /** {@inheritDoc} */ public ListBlock createList( final ListItemBlock[] items ) { return new NumeratedListBlock( Sink.NUMBERING_UPPER_ROMAN, items ); } }; private static final Type[] TYPES = { LIST, ORDERED_LOWER_ALPHA, ORDERED_UPPER_ALPHA, ORDERERED_DECIMAL, ORDERERED_LOWER_ROMAN, ORDERERED_UPPER_ROMAN }; } /** * It helps to build * * @author Juan F. Codagnone * @version $Id: GenericListBlockParser.java 746991 2009-02-23 12:35:46Z vsiveton $ */ class TreeListBuilder { /** * parser that create text blocks */ private final FormatedTextParser textParser; /** * tree root */ private final TreeComponent root; /** * the current element of the tree */ private TreeComponent current; /** * Creates the TreeListBuilder. * * @param formatTextParser parser that create text blocks * @throws IllegalArgumentException if <code>formatTextParser</code> is null */ TreeListBuilder( final FormatedTextParser formatTextParser ) throws IllegalArgumentException { if ( formatTextParser == null ) { throw new IllegalArgumentException( "argument is null" ); } this.textParser = formatTextParser; root = new TreeComponent( null, "root", null ); current = root; } /** * recibe un nivel y un texto y armar magicamente (manteniendo estado) * el �rbol * * @param type type of list * @param level indentation level of the item * @param text text of the item */ void feedEntry( final GenericListBlockParser.Type type, final int level, final String text ) { final int currentDepth = current.getDepth(); final int incomingLevel = level - 1; if ( incomingLevel == currentDepth ) { // nothing to move } else if ( incomingLevel > currentDepth ) { // el actual ahora es el �ltimo que insert� final TreeComponent[] components = current.getChildren(); if ( components.length == 0 ) { /* for example: * * item1 * * item2 */ for ( int i = 0, n = incomingLevel - currentDepth; i < n; i++ ) { current = current.addChildren( "", type ); } } else { current = components[components.length - 1]; } } else { for ( int i = 0, n = currentDepth - incomingLevel; i < n; i++ ) { current = current.getFather(); if ( current == null ) { throw new IllegalStateException(); } } } current.addChildren( text, type ); } /** * @return a Block for the list that we received */ ListBlock getBlock() { return getList( root ); } /** * Wrapper * * @param tc tree * @return list Block for this tree */ private ListBlock getList( final TreeComponent tc ) { ListItemBlock[] li = (ListItemBlock[]) getListItems( tc ).toArray( new ListItemBlock[] {} ); return tc.getChildren()[0].getType().createList( li ); } /** * @param tc tree * @return list Block for this tree */ private List getListItems( final TreeComponent tc ) { final List blocks = new ArrayList(); for ( int i = 0; i < tc.getChildren().length; i++ ) { final TreeComponent child = tc.getChildren()[i]; Block[] text = new Block[] {}; if ( child.getFather() != null ) { text = textParser.parse( child.getText() ); } if ( child.getChildren().length != 0 ) { blocks.add( new ListItemBlock( text, getList( child ) ) ); } else { blocks.add( new ListItemBlock( text ) ); } } return blocks; } /** * A bidirectional tree node * * @author Juan F. Codagnone * @version $Id: GenericListBlockParser.java 746991 2009-02-23 12:35:46Z vsiveton $ */ class TreeComponent { /** * childrens */ private List children = new ArrayList(); /** * node text */ private String text; /** * the father */ private TreeComponent father; /** * type of the list */ private GenericListBlockParser.Type type; /** * Creates the TreeComponent. * * @param father Component father * @param text component text * @param type component type */ TreeComponent( final TreeComponent father, final String text, final GenericListBlockParser.Type type ) { this.text = text; this.father = father; this.type = type; } /** * @return my childrens */ TreeComponent[] getChildren() { return (TreeComponent[]) children.toArray( new TreeComponent[] {} ); } /** * adds a children node * * @param t text of the children * @param ttype component type * @return the new node created */ TreeComponent addChildren( final String t, final GenericListBlockParser.Type ttype ) { if ( t == null || ttype == null ) { throw new IllegalArgumentException( "argument is null" ); } final TreeComponent ret = new TreeComponent( this, t, ttype ); children.add( ret ); return ret; } /** * @return the father */ TreeComponent getFather() { return father; } /** * @return the node depth in the tree */ int getDepth() { int ret = 0; TreeComponent c = this; while ( ( c = c.getFather() ) != null ) { ret++; } return ret; } /** {@inheritDoc} */ public String toString() { return toString( "" ); } /** {@inheritDoc} */ public String toString( final String indent ) { final StringBuffer sb = new StringBuffer(); if ( father != null ) { sb.append( indent ); sb.append( "- " ); sb.append( text ); sb.append( GenericListBlockParser.EOL ); } for ( Iterator it = children.iterator(); it.hasNext(); ) { TreeComponent lc = (TreeComponent) it.next(); sb.append( lc.toString( indent + " " ) ); } return sb.toString(); } /** * Returns the text. * * @return <code>String</code> with the text. */ String getText() { return text; } /** * Returns the type. * * @return <code>Type</code> with the text. */ GenericListBlockParser.Type getType() { return type; } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000161�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/Block.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parse0000644�0001750�0001750�00000002445�11075462240�033402� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.twiki.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; /** * Document objet model: we parse the document to a bunch of these. * <p/> * Implementators should implement equals() and hashCode() to ease testing * * @author Juan F. Codagnone * @version $Id: Block.java 705065 2008-10-15 21:46:08Z vsiveton $ */ public interface Block { /** * Traverse the block * * @param sink the sink that travers */ void traverse( final Sink sink ); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/pom.xml�������������������������������������������������������������������0000644�0001750�0001750�00000004501�11470562366�016660� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>doxia</artifactId> <groupId>org.apache.maven.doxia</groupId> <version>1.1.4</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>doxia-modules</artifactId> <name>Doxia :: Modules</name> <packaging>pom</packaging> <description>Doxia modules for several markup languages.</description> <modules> <module>doxia-module-apt</module> <module>doxia-module-confluence</module> <module>doxia-module-docbook-simple</module> <module>doxia-module-fml</module> <module>doxia-module-fo</module> <module>doxia-module-itext</module> <module>doxia-module-latex</module> <module>doxia-module-rtf</module> <module>doxia-module-twiki</module> <module>doxia-module-xdoc</module> <module>doxia-module-xhtml</module> </modules> <dependencies> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-core</artifactId> </dependency> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-sink-api</artifactId> </dependency> <!-- test --> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-core</artifactId> <type>test-jar</type> <scope>test</scope> </dependency> </dependencies> </project> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/��������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�022060� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/pom.xml�������������������������������������������0000644�0001750�0001750�00000003623�11470562366�023372� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- 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 http://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>1.1.4</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>doxia-module-confluence</artifactId> <name>Doxia :: Confluence Module</name> <description>A Doxia module for Confluence source documents.</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> </project> �������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/����������������������������������������������0000755�0001750�0001750�00000000000�11632765557�022647� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/�����������������������������������������0000755�0001750�0001750�00000000000�11632765557�023626� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/site/������������������������������������0000755�0001750�0001750�00000000000�11632765557�024572� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/site/confluence/�������������������������0000755�0001750�0001750�00000000000�11632765557�026713� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/site/confluence/page.confluence����������0000644�0001750�0001750�00000003254�10524215463�031657� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/site/confluence/faq.confluence�����������0000644�0001750�0001750�00000023676�10524215463�031524� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������*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 will guarantee it is executed before the next action type. For example, if your plugin generates some source code, you might want it to bind to the "generate-sources" lifecycle phase, so it is guaranteed to run before the "compile" phase. 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? ������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/�������������������������������0000755�0001750�0001750�00000000000�11632765557�025640� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-list.confluence������0000644�0001750�0001750�00000000144�10713410027�032572� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� A paragraph * A nested list item * Another nested list item with two lines Back at the top level ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000151�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/nested-list-heterogenous.confluence������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/nested-list-heterogenous.conflu0000644�0001750�0001750�00000000151�11201210615�033751� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������* A top level list item *# A nested list item *# Another nested list item * Back at the top level �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/figure.confluence��������������0000644�0001750�0001750�00000000556�11165340254�031152� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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!��������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/table-link.confluence����������0000644�0001750�0001750�00000000473�11201107013�031672� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������|| 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 |�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/linebreak.confluence�����������0000644�0001750�0001750�00000000055�10710327724�031621� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Line\\ break. Line\\with 2\\inline\\ Breaks.�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/simple-list.confluence���������0000644�0001750�0001750�00000000467�11165353003�032130� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������* 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 Paragraph * One bullet * A list item with more than one line *bold text, not a list!*���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/anchor.confluence��������������0000644�0001750�0001750�00000000164�10711435127�031136� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������h1. Section Title {anchor:start}Simple paragraph. Simple paragraph{anchor:end} Simple {anchor:middle} paragraph. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/link.confluence����������������0000644�0001750�0001750�00000000163�10713271224�030616� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Line with [middle] link Line with link at the [end] Line with [link#anchor] and [#simple] anchor and [alias|link]�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-figure.confluence����0000644�0001750�0001750�00000000100�10713410027�033070� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� A paragraph !images/logo.png! with a figure Another paragraph ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/unknown-macro.confluence�������0000644�0001750�0001750�00000000145�10711163047�032460� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{unknown:start}Simple paragraph. Simple paragraph{unknown:end}. Simple {unknown:middle} paragraph. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/table.confluence���������������0000644�0001750�0001750�00000000721�11167062617�030760� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 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 |�����������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/nested-format.confluence�������0000644�0001750�0001750�00000000222�10720263577�032437� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� A paragraph with *_bold italic_* _*italic bold*_ *{{bold monospaced}}* A paragraph with *bold _italic_* _italic *bold*_ *bold {{monospaced}}* ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/code.confluence����������������0000644�0001750�0001750�00000000641�11165345361�030602� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.�����������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/nested-list.confluence���������0000644�0001750�0001750�00000000161�10711100347�032105� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� A paragraph * A top level list item ** A nested list item ** Another nested list item * Back at the top level ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/test.confluence����������������0000644�0001750�0001750�00000003254�10662577701�030660� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/escapes.confluence�������������0000644�0001750�0001750�00000000262�10711134027�031301� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Simple paragraph with asterisk \* and underline \_. Simple paragraph with asterisk \*not bold\* and underline \_not italic\_. Simple paragraph with normal \character escaped. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/simple-paragraph.confluence����0000644�0001750�0001750�00000000277�10711100347�033116� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/section.confluence�������������0000644�0001750�0001750�00000000137�10710355722�031331� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������h1. Section1 h2. Section2 h3. Section3 h4. Section4 h5. Section5 h1. TitleWithLeadingSpace ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/note-tip-info.confluence�������0000644�0001750�0001750�00000000627�10721245572�032364� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.)���������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/resources/paragraph-header.confluence����0000644�0001750�0001750�00000000073�10713410027�033050� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� A paragraph h2. A header with a header Another paragraph ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/������������������������������������0000755�0001750�0001750�00000000000�11632765557�024547� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/��������������������������������0000755�0001750�0001750�00000000000�11632765557�025336� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/�������������������������0000755�0001750�0001750�00000000000�11632765557�026557� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/�������������������0000755�0001750�0001750�00000000000�11632765557�027665� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/�������������0000755�0001750�0001750�00000000000�11632765557�030771� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/������0000755�0001750�0001750�00000000000�11632765557�032256� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000152�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/conflu0000755�0001750�0001750�00000000000�11632765557�033465� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000201�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkTest.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000015171�11207472163�033456� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.AbstractSinkTest; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.util.HtmlTools; /** * Test the Confluence Sink * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: ConfluenceSinkTest.java 779565 2009-05-28 11:24:35Z vsiveton $ * @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; } /** Not used. * {@inheritDoc} */ protected String getAuthorBlock( String author ) { return null; } /** 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 getDateBlock( String date ) { return null; } /** Not used. * {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return null; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { return EOL + ConfluenceMarkup.FIGURE_START_MARKUP + source + ConfluenceMarkup.FIGURE_END_MARKUP + caption; } /** Not used. * {@inheritDoc} */ protected String getHeadBlock() { return null; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return ""; } /** {@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 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; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return ConfluenceMarkup.MONOSPACED_START_MARKUP + text + ConfluenceMarkup.MONOSPACED_END_MARKUP; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return ""; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return ConfluenceMarkup.NUMBERING_MARKUP + " " + item + EOL; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return text + EOL + EOL; } /** {@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; } /** {@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"; } // ---------------------------------------------------------------------- // 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 ""; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000203�00000000000�011560� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/confluence/ConfluenceParserTest.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/test/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000050630�11375706236�033464� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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 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.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.ROLE, "confluence" ); output = null; reader = null; writer = null; } /** {@inheritDoc} */ protected void tearDown() throws Exception { IOUtil.close( output ); IOUtil.close( reader ); IOUtil.close( writer ); super.tearDown(); } /** {@inheritDoc} */ protected Parser createParser() { return parser; } /** {@inheritDoc} */ protected String outputExtension() { return "confluence"; } /** @throws Exception */ public void testMarkupTestPage() throws Exception { String result = locateAndParseTestSourceFile( "test" ); assertContainsLines( result, "end:body" ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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" ); } /** @throws Exception */ 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" ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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: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( 8, result.split( "end:listItem\n" ).length ); } /** @throws Exception */ 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 ); } /** @throws Exception */ public void testUnknownMacro() throws Exception { String result = locateAndParseTestSourceFile( "unknown-macro" ); assertContainsLines( result, "begin:paragraph\ntext: {unknown:start}" ); } /** @throws Exception */ 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 ); } /** @throws Exception */ public void testFigure() throws Exception { String result = locateAndParseTestSourceFile( "figure" ); assertContainsLines( result, "begin:figure\nfigureGraphics, name: images/photo.jpg\nend:figure\n" ); assertContainsLines( result, "attempted inline !image.jpg! (should fail)" ); // this isn't ideal... Doxia captions are not the same as what people would use to add text to a confluence assertContainsLines( result, "figureGraphics, name: images/photo.jpg\n" + "begin:figureCaption\ntext: With caption on same line\n" + "end:figureCaption" ); assertContainsLines( result, "figureGraphics, name: images/nolinebreak.jpg\n" + "begin:figureCaption\ntext: With caption underneath and no linebreak\nend:figureCaption" ); // ignore linebreak after figure insert... assertContainsLines( result, "figureGraphics, name: images/linebreak.jpg\n" + "begin:figureCaption\ntext: With caption underneath and linebreak\nend:figureCaption" ); // ignore formtting in caption... assertContainsLines( result, "figureGraphics, name: images/bold.jpg\n" + "begin:figureCaption\ntext: With *bold* caption underneath\nend:figureCaption" ); // DOXIA-303: image attributes are ignored assertContainsLines( result, "begin:figure\nfigureGraphics, name: image.gif\nend:figure\n" ); // 2 paragraphs in the input... (the figures do not go in a paragraph by analogy with AptParser) assertEquals( 3, result.split( "end:paragraph\n" ).length ); } /** @throws Exception */ 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" ); // 3 paragraphs in the input... assertEquals( 4, result.split( "end:paragraph\n" ).length ); // 5 links in the input... assertEquals( 6, result.split( "end:link\n" ).length ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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 ); } /** @throws Exception */ 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" ); // 2 paragraphs in the input... assertEquals( 3, 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 ); // 2 monospaced in the input... assertEquals( 3, result.split( "end:monospaced\n" ).length ); } /** @throws Exception */ 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 * * @throws ParseException */ 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 * * @throws ParseException */ 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 ); } private void assertContainsLines( String message, String result, String lines ) { lines = StringUtils.replace( lines, "\n", EOL ); if ( message != null ) { assertTrue( message, result.indexOf( lines ) != -1 ); } else { assertTrue( result.indexOf( lines ) != -1 ); } } 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; } } ��������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/site/�����������������������������������������0000755�0001750�0001750�00000000000�11632765557�023613� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/site/site.xml���������������������������������0000644�0001750�0001750�00000001672�11103330660�025257� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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> <body> <menu ref="parent"/> <menu ref="reports"/> </body> </project>����������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/�����������������������������������������0000755�0001750�0001750�00000000000�11632765557�023573� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/������������������������������������0000755�0001750�0001750�00000000000�11632765557�024514� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/��������������������������������0000755�0001750�0001750�00000000000�11632765557�025303� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/�������������������������0000755�0001750�0001750�00000000000�11632765557�026524� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/�������������������0000755�0001750�0001750�00000000000�11632765557�027632� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/�������������0000755�0001750�0001750�00000000000�11632765557�030736� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/������0000755�0001750�0001750�00000000000�11632765557�032223� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000152�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000755�0001750�0001750�00000000000�11632765557�033432� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000175�00000000000�011570� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000046504�11244500657�033430� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.Stack; import javax.swing.text.html.HTML.Attribute; import org.apache.maven.doxia.sink.AbstractTextSink; import org.apache.maven.doxia.sink.SinkEventAttributes; 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> * @version $Id: ConfluenceSink.java 807167 2009-08-24 12:03:59Z vsiveton $ * @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 listStyles; /** An indication on if we're in verbatim box mode. */ private boolean verbatimBoxedFlag; /** 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() { write( BOLD_START_MARKUP ); } /** {@inheritDoc} */ public void bold_() { write( BOLD_END_MARKUP ); } /** * 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() { write( " " ); } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { definedTerm(); } /** * Not used. * {@inheritDoc} */ public void definedTerm_() { // nop } /** * Not used. * {@inheritDoc} */ public void definition() { // nop } /** * Not used. * {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { // nop } /** * Not used. * {@inheritDoc} */ public void definition_() { // nop } /** * Not used. * {@inheritDoc} */ public void definitionList() { // nop } /** * Not used. * {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { // nop } /** * Not used. * {@inheritDoc} */ public void definitionList_() { // nop } /** * 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 italic() { write( ITALIC_START_MARKUP ); } /** {@inheritDoc} */ public void italic_() { write( ITALIC_END_MARKUP ); } /** {@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--; } /** {@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() { write( MONOSPACED_START_MARKUP ); } /** {@inheritDoc} */ public void monospaced_() { write( MONOSPACED_END_MARKUP ); } /** * Not used. * {@inheritDoc} */ public void nonBreakingSpace() { // nop } /** {@inheritDoc} */ public void numberedList( int numbering ) { 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--; listStyles.pop(); } /** {@inheritDoc} */ public void numberedListItem() { writeEOL( true ); String style = (String) listStyles.peek(); write( style + 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 writeEOL( true ); writeEOL(); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { table(); } /** {@inheritDoc} */ public void table_() { 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 ); } content( text ); if ( linkName != null ) { write( LINK_MIDDLE_MARKUP + linkName ); } } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { text( text ); } /** * 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 ) ); } /** {@inheritDoc} */ protected void init() { super.init(); this.writer = new StringWriter(); this.headFlag = false; this.levelList = 0; this.listStyles.clear(); this.verbatimBoxedFlag = false; this.tableHeaderFlag = false; this.linkName = null; } /** * 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 ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000203�00000000000�011560� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSiteModule.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002645�11212745470�033425� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.module.site.AbstractSiteModule; /** * <p>ConfluenceSiteModule class.</p> * * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: ConfluenceSiteModule.java 782392 2009-06-07 14:14:16Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="confluence" */ public class ConfluenceSiteModule extends AbstractSiteModule { /** * Default constructor. */ public ConfluenceSiteModule() { super( "confluence", "confluence", "confluence" ); } } �������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceMarkup.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000006413�11077077137�033431� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * @version $Id: ConfluenceMarkup.java 706268 2008-10-20 12:49:35Z vsiveton $ * @since 1.0 */ 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 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: "* */ String LIST_ITEM_MARKUP = "* "; /** Syntax for the mono-spaced style end: "{{" */ String MONOSPACED_END_MARKUP = "{{"; /** Syntax for the mono-spaced style start: "}}" */ String MONOSPACED_START_MARKUP = "}}"; /** Syntax for the numbering decimal markup char: "1." */ String NUMBERING_MARKUP = "1."; /** 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 = "|"; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000204�00000000000�011561� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSinkFactory.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003140�11105660512�033406� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.AbstractTextSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * Confluence implementation of the Sink factory. * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: ConfluenceSinkFactory.java 712574 2008-11-09 22:16:42Z hboutemy $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-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 ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000161�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000755�0001750�0001750�00000000000�11632765557�033432� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000167�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000755�0001750�0001750�00000000000�11632765557�033432� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000220�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002677�10767707462�033447� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.sink.Sink; import java.util.List; /** * @version $Id: TableCellHeaderBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class TableCellHeaderBlock extends AbstractFatherBlock { TableCellHeaderBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.tableHeaderCell(); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.tableHeaderCell_(); } } �����������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000214�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000012021�11203262772�033411� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.util.ByLineReaderSource; import org.apache.maven.doxia.module.confluence.ConfluenceMarkup; 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.util.ByLineSource; import org.apache.maven.doxia.module.confluence.parser.BlockParser; import org.apache.maven.doxia.module.confluence.parser.Block; import org.apache.maven.doxia.module.confluence.parser.BoldBlock; import org.apache.maven.doxia.parser.ParseException; import org.codehaus.plexus.util.StringUtils; /** * Parse tables * * @author Juan F. Codagnone * @version $Id: TableBlockParser.java 775115 2009-05-15 12:54:18Z ltheussl $ */ public class TableBlockParser implements BlockParser { private static final String EMPTY_STRING = ""; private static final String ANY_CHARACTER = ".*"; private static final String ESCAPE_CHARACTER = "\\"; /** {@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 rows = new ArrayList(); String l = line; do { l = l.substring( 0, l.lastIndexOf( "|" ) ); List cells = new ArrayList(); BlockParser headingParser = new SectionBlockParser(); BlockParser figureParser = new FigureBlockParser(); BlockParser[] subparsers = new BlockParser[] { headingParser, figureParser }; BlockParser paragraphParser = new ParagraphBlockParser( subparsers ); if ( l.startsWith( "||" ) ) { String[] text = StringUtils.split( l, "||" ); for ( int i = 0; i < text.length; i++ ) { List textBlocks = new ArrayList(); textBlocks.add( ( ( ParagraphBlockParser) paragraphParser ) .visit(text[i], new ByLineReaderSource( new StringReader( EMPTY_STRING ) ), false ) ); List blocks = new ArrayList(); blocks.add( new BoldBlock( textBlocks ) ); cells.add( new TableCellHeaderBlock( blocks ) ); } } else { int it = 0; String[] text = StringUtils.split( l, "|" ); List 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++; } Object[] pText = texts.toArray(); for ( int i = 0; i < pText.length; i++ ) { List blocks = new ArrayList(); blocks.add( ( (ParagraphBlockParser) paragraphParser ).visit( (String) pText[i], new ByLineReaderSource( new StringReader( EMPTY_STRING ) ), false ) ); 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 ); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000206�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003502�11167436114�033417� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.sink.Sink; import java.util.List; /** * @version $Id: TableBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class TableBlock extends AbstractFatherBlock { TableBlock( List 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; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000211�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002634�10767707462�033440� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.sink.Sink; import java.util.List; /** * @version $Id: TableRowBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class TableRowBlock extends AbstractFatherBlock { TableRowBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.tableRow(); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.tableRow_(); } } ����������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000212�00000000000�011560� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002641�10767707462�033436� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.sink.Sink; import java.util.List; /** * @version $Id: TableCellBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class TableCellBlock extends AbstractFatherBlock { TableCellBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.tableCell(); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.tableCell_(); } } �����������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000217�00000000000�011565� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlockParser.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000005371�11150513171�033414� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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 * @version $Id: DefinitionListBlockParser.java 746983 2009-02-23 12:28:41Z vsiveton $ * @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 { StringBuffer text = new StringBuffer(); StringBuffer title = new StringBuffer(); int index = line.indexOf( "title=" ); if ( index >= 0 ) { line = line.substring( index + 6 ); while ( !( line.indexOf( "}" ) >= 0 ) && 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( StringBuffer title, String line ) { if ( title.length() > 0 ) { title.append( " " ); } title.append( line.trim() ); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000204�00000000000�011561� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002515�10767707462�033436� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; /** * @version $Id: MonospaceBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class MonospaceBlock extends AbstractFatherBlock { MonospaceBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.monospaced(); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.monospaced_(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000211�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlock.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002205�10767707462�033432� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; /** * @version $Id: HorizontalRuleBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class HorizontalRuleBlock implements Block { /** {@inheritDoc} */ public void traverse( Sink sink ) { sink.horizontalRule(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000211�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003545�10767707462�033442� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.Iterator; import java.util.List; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.StringUtils; /** * @version $Id: DefinitionListBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class DefinitionListBlock implements Block { private String title; private List 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 ( Iterator iterator = text.iterator(); iterator.hasNext(); ) { Block block = (Block) iterator.next(); block.traverse( sink ); } sink.definition_(); sink.definitionList_(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000211�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlockParser.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003777�11150513171�033424� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * @version $Id: VerbatimBlockParser.java 746983 2009-02-23 12:28:41Z vsiveton $ */ 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 { StringBuffer text = new StringBuffer(); while ( ( line = source.getNextLine() ) != null ) { if ( line.startsWith( "{code}" ) || line.startsWith( "{noformat}" ) ) { break; } // TODO text.append( line ).append( LS ); } return new VerbatimBlock( text.toString() ); } } �././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/TextBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002620�11167436114�033417� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * @version $Id: TextBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ 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 ); } } ����������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000201�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlock.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003176�10767707462�033442� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; /** * @version $Id: FigureBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ 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_(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000211�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000004372�11216135717�033425� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.Iterator; import java.util.List; import org.apache.maven.doxia.sink.Sink; /** * <p>Abstract AbstractFatherBlock class.</p> * * @version $Id: AbstractFatherBlock.java 785531 2009-06-17 09:47:59Z ltheussl $ */ public abstract class AbstractFatherBlock implements Block { private List 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 childBlocks ) { if ( childBlocks == null ) { throw new IllegalArgumentException( "argument can't be null" ); } this.blocks = childBlocks; } /** {@inheritDoc} */ public void traverse( Sink sink ) { before( sink ); for ( Iterator i = blocks.iterator(); i.hasNext(); ) { Block block = (Block) i.next(); block.traverse( sink ); } after( sink ); } /** * <p>Getter for the field <code>blocks</code>.</p> * * @return a {@link java.util.List} object. */ public List getBlocks() { return blocks; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000202�00000000000�011557� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlock.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000005213�11200507452�033410� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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 <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: SectionBlock.java 772533 2009-05-07 07:35:06Z ltheussl $ */ 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_(); } } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000203�00000000000�011560� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/VerbatimBlock.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002637�11151264317�033424� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.SinkEventAttributeSet; /** * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: VerbatimBlock.java 747837 2009-02-25 15:50:39Z ltheussl $ */ 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_(); } } �������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002716�11167436114�033425� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * * @version $Id: BoldBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ public class BoldBlock extends AbstractFatherBlock { /** * <p>Constructor for BoldBlock.</p> * * @param childBlocks the child blocks. */ public BoldBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.bold(); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.bold_(); } } ��������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000204�00000000000�011561� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinebreakBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002211�10767707462�033427� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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 * @version $Id: LinebreakBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class LinebreakBlock implements Block { /** {@inheritDoc} */ public void traverse( Sink sink ) { sink.lineBreak(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/LinkBlock.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002756�11167436114�033431� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; /** * @version $Id: LinkBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ 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_(); } } ������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000201�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002500�10767707462�033430� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; /** * @version $Id: ItalicBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class ItalicBlock extends AbstractFatherBlock { ItalicBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.italic(); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.italic_(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000217�00000000000�011565� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/HorizontalRuleBlockParser.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002727�11150513171�033416� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * * @version $Id: HorizontalRuleBlockParser.java 746983 2009-02-23 12:28:41Z vsiveton $ */ 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(); } } �����������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000204�00000000000�011561� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003275�11165345361�033427� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; /** * @author Juan F. Codagnone * @version $Id: ParagraphBlock.java 761569 2009-04-03 08:38:09Z ltheussl $ */ class ParagraphBlock extends AbstractFatherBlock { private boolean generateParagraphTags = true; ParagraphBlock( List blocks ) { super( blocks ); } ParagraphBlock( List 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_(); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000210�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/SectionBlockParser.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000004502�11200507452�033410� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * @version $Id: SectionBlockParser.java 772533 2009-05-07 07:35:06Z ltheussl $ */ 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 ); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000201�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BlockParser.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003073�11216135717�033422� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * * @version $Id: BlockParser.java 785531 2009-06-17 09:47:59Z ltheussl $ */ 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; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000201�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AnchorBlock.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002551�11167436114�033422� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; /** * @version $Id: AnchorBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ 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_(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000207�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/FigureBlockParser.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000006034�11167605023�033417� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * * @version $Id: FigureBlockParser.java 763889 2009-04-10 08:57:55Z bentmann $ * @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.indexOf( "|" ) >= 0 ) { // 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 StringBuffer until an * empty line is reached, and while the source contains more lines. * * @param source the source to read new lines from * @return a StringBuffer appended with lines * @throws ParseException */ private String appendUntilEmptyLine( ByLineSource source ) throws ParseException { StringBuffer text = new StringBuffer(); String line; while ( ( line = source.getNextLine() ) != null ) { if ( line.trim().length() == 0 ) { break; } if ( text.length() == 0 ) { text.append( line.trim() ); } else { text.append( " " + line.trim() ); } } return text.toString(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000212�00000000000�011560� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlockParser.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000010235�11203262772�033416� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * * @version $Id: ParagraphBlockParser.java 775115 2009-05-15 12:54:18Z ltheussl $ */ 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 StringBuffer 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 StringBuffer appended with lines * @throws ParseException */ private String appendUntilEmptyLine( String line, ByLineSource source ) throws ParseException { StringBuffer text = new StringBuffer(); do { if ( line.trim().length() == 0 ) { break; } boolean accepted = false; for ( int i = 0; i < parsers.length; i++ ) { BlockParser parser = parsers[i]; 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( " " + line.trim() ); } } while ( ( line = source.getNextLine() ) != null ); return text.toString(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000166�00000000000�011570� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000755�0001750�0001750�00000000000�11632765557�033432� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000214�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002705�11204733376�033425� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.sink.Sink; import java.util.List; /** * <p>NumberedListBlock class.</p> * * @version $Id: NumberedListBlock.java 776605 2009-05-20 07:53:34Z ltheussl $ */ public class NumberedListBlock extends ListBlock { /** * @param childBlocks */ NumberedListBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.numberedList( Sink.NUMBERING_DECIMAL ); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.numberedList_(); } } �����������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000212�00000000000�011560� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000007444�11167436114�033430� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.Iterator; import java.util.List; import org.apache.maven.doxia.module.confluence.parser.ChildBlocksBuilder; /** * <p>TreeListBuilder class.</p> * * @version $Id: TreeListBuilder.java 763762 2009-04-09 18:19:56Z ltheussl $ */ 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 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 = (TreeComponent) 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 list = getListItems( treeComponent ); int type = ( (TreeComponent) treeComponent.getChildren().get( 0 ) ).getType(); if ( type == ListBlockParser.BULLETED_LIST ) { return new BulletedListBlock( list ); } return new NumberedListBlock( list ); } private List getListItems( TreeComponent tc ) { List blocks = new ArrayList(); for ( Iterator i = tc.getChildren().iterator(); i.hasNext(); ) { TreeComponent child = (TreeComponent) i.next(); List 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; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000210�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000005376�10767707462�033446� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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; import java.util.Iterator; /** * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: TreeComponent.java 638290 2008-03-18 09:45:22Z bentmann $ */ class TreeComponent { private static final String EOL = System.getProperty( "line.separator" ); private List 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 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} */ public String toString() { return toString( "" ); } String toString( String indent ) { StringBuffer sb = new StringBuffer(); if ( father != null ) { sb.append( indent ); sb.append( "- " ); sb.append( text ); sb.append( EOL ); } for ( Iterator i = children.iterator(); i.hasNext(); ) { TreeComponent lc = (TreeComponent) i.next(); sb.append( lc.toString( indent + " " ) ); } return sb.toString(); } String getText() { return text; } int getType() { return type; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000212�00000000000�011560� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlockParser.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000010111�11375706236�033417� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * @version $Id: ListBlockParser.java 947266 2010-05-22 07:49:50Z ltheussl $ */ 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(); StringBuffer text = new StringBuffer(); 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( " " + line.trim() ); } } while ( ( line = source.getNextLine() ) != null ); if ( text.length() > 0 ) { addItem( treeListBuilder, text ); } return treeListBuilder.getBlock(); } private void addItem( TreeListBuilder treeListBuilder, StringBuffer 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; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000204�00000000000�011561� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002344�10767707462�033436� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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 java.util.List; /** * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: ListBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ abstract class ListBlock extends AbstractFatherBlock { ListBlock( List childBlocks ) { super( childBlocks ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000214�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002604�10767707462�033435� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.sink.Sink; import java.util.List; /** * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: BulletedListBlock.java 638290 2008-03-18 09:45:22Z bentmann $ */ class BulletedListBlock extends ListBlock { BulletedListBlock( List childBlocks ) { super( childBlocks ); } /** {@inheritDoc} */ public void before( Sink sink ) { sink.list(); } /** {@inheritDoc} */ public void after( Sink sink ) { sink.list_(); } } ����������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000210�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000003337�11167436114�033425� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.sink.Sink; import java.util.List; /** * @version $Id: ListItemBlock.java 763762 2009-04-09 18:19:56Z ltheussl $ */ class ListItemBlock extends AbstractFatherBlock { private ListBlock innerList; ListItemBlock( List blocks ) { this( blocks, null ); } ListItemBlock( List 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; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000173�00000000000�011566� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/Block.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000002247�11216135717�033424� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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> * * @version $Id: Block.java 785531 2009-06-17 09:47:59Z ltheussl $ */ public interface Block { /** * <p>traverse.</p> * * @param sink a {@link org.apache.maven.doxia.sink.Sink} object. */ void traverse( Sink sink ); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000210�00000000000�011556� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000024112�11201374105�033405� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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 * @version $Id: ChildBlocksBuilder.java 773275 2009-05-09 21:40:21Z hboutemy $ * @since 1.1 */ public class ChildBlocksBuilder { private boolean insideBold = false; private boolean insideItalic = false; private boolean insideLink = false; private List blocks = new ArrayList(); private StringBuffer text = new StringBuffer(); 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 getBlocks() { List 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 StringBuffer(); } else { text = addTextBlockIfNecessary( blocks, specialBlocks, text ); insideBold = true; } break; case '_': if ( insideItalic ) { insideItalic = false; specialBlocks = getList( new ItalicBlock( getChildren( text, specialBlocks ) ), specialBlocks ); text = new StringBuffer(); } else { text = addTextBlockIfNecessary( blocks, specialBlocks, text ); insideItalic = true; } break; case '[': insideLink = true; text = addTextBlockIfNecessary( blocks, specialBlocks, text ); break; case ']': if ( insideLink ) { boolean addHTMLSuffix = false; String link = text.toString(); if ( !link.endsWith( ".html" ) ) { if ( link.indexOf( "http" ) < 0 ) { addHTMLSuffix = true; } } if ( link.indexOf( "|" ) > 0 ) { String[] pieces = StringUtils.split( text.toString(), "|" ); if ( addHTMLSuffix ) { if ( pieces[1].indexOf( "#" ) < 0 ) { 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 ); } if ( addHTMLSuffix ) { if ( link.indexOf( "#" ) < 0 ) { 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 StringBuffer(); insideLink = false; } break; case '{': text = addTextBlockIfNecessary( blocks, specialBlocks, text ); if ( charAt( input, i ) == '{' ) // it's monospaced { i++; insideMonospaced = true; } // else it's a confluence macro... break; case '}': // System.out.println( "line = " + line ); if ( charAt( input, i ) == '}' ) { i++; insideMonospaced = false; specialBlocks = getList( new MonospaceBlock( getChildren( text, specialBlocks ) ), specialBlocks ); text = new StringBuffer(); } 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 StringBuffer(); } break; case '\\': // System.out.println( "line = " + line ); if ( charAt( input, i ) == '\\' ) { i++; text = addTextBlockIfNecessary( blocks, specialBlocks, text ); blocks.add( new LinebreakBlock() ); } else { i++; 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 getList( Block block, List currentBlocks ) { List list = new ArrayList(); if ( insideBold || insideItalic || insideMonospaced ) { list.addAll( currentBlocks ); } list.add( block ); return list; } private List getChildren( StringBuffer buffer, List currentBlocks ) { String txt = buffer.toString().trim(); if ( currentBlocks.isEmpty() && StringUtils.isEmpty( txt ) ) { return new ArrayList(); } ArrayList 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 charAt( String input, int i ) { return input.length() > i + 1 ? input.charAt( i + 1 ) : '\0'; } private StringBuffer addTextBlockIfNecessary( List blcks, List specialBlocks, StringBuffer 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 StringBuffer(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000177�00000000000�011572� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/conflu0000644�0001750�0001750�00000012347�11375444145�033432� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������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.Iterator; 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.sink.Sink; import org.apache.maven.doxia.util.ByLineReaderSource; import org.apache.maven.doxia.util.ByLineSource; /** * 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> * * @version $Id: ConfluenceParser.java 946935 2010-05-21 08:46:29Z ltheussl $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="confluence" */ public class ConfluenceParser extends AbstractTextParser { private BlockParser[] parsers; /** * <p>Constructor for ConfluenceParser.</p> */ public ConfluenceParser() { init(); } private List parse( ByLineSource source ) throws ParseException { init(); List blocks = new ArrayList(); String line; while ( ( line = source.getNextLine() ) != null ) { boolean accepted = false; for ( int i = 0; i < parsers.length; i++ ) { BlockParser parser = parsers[i]; 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} */ public synchronized void parse( Reader source, Sink sink ) throws ParseException { ByLineSource src = new ByLineReaderSource( source ); try { List blocks = parse( src ); sink.head(); sink.head_(); sink.body(); for ( Iterator i = blocks.iterator(); i.hasNext(); ) { Block block = (Block) i.next(); 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 }; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/src/����������������������������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�016141� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/src/site/�����������������������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�017105� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/src/site/site.xml���������������������������������������������������������0000644�0001750�0001750�00000001725�11103330660�020550� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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> <body> <menu ref="parent"/> <menu ref="modules"/> <menu ref="reports"/> </body> </project>�������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/�������������������������������������������������������0000755�0001750�0001750�00000000000�11632765556�021053� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/pom.xml������������������������������������������������0000644�0001750�0001750�00000003030�11470562366�022356� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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 http://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>1.1.4</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>doxia-module-latex</artifactId> <name>Doxia :: Latex Module</name> <description>A Doxia module for LaTeX source documents.</description> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> </dependency> </dependencies> </project>��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/���������������������������������������������������0000755�0001750�0001750�00000000000�11632765556�021642� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/����������������������������������������������0000755�0001750�0001750�00000000000�11632765556�022621� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/�����������������������������������������0000755�0001750�0001750�00000000000�11632765556�023542� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/�������������������������������������0000755�0001750�0001750�00000000000�11632765556�024331� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/apache/������������������������������0000755�0001750�0001750�00000000000�11632765556�025552� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/������������������������0000755�0001750�0001750�00000000000�11632765556�026660� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/������������������0000755�0001750�0001750�00000000000�11632765556�027764� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/�����������0000755�0001750�0001750�00000000000�11632765556�031251� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/�����0000755�0001750�0001750�00000000000�11632765556�032366� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000162�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/LatexSinkTest.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/test/java/org/apache/maven/doxia/module/latex/Latex0000644�0001750�0001750�00000015443�11230053175�033352� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.latex; /* * 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.AbstractSinkTest; /** * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: LatexSinkTest.java 795033 2009-07-17 10:46:21Z ltheussl $ */ public class LatexSinkTest extends AbstractSinkTest { /** {@inheritDoc} */ protected String outputExtension() { return "tex"; } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new LatexSink( writer ); } /** {@inheritDoc} */ protected boolean isXmlSink() { return false; } /** {@inheritDoc} */ protected String getTitleBlock( String title ) { return "\\title{" + LatexSink.escaped( title ) + "}" + EOL; } /** {@inheritDoc} */ protected String getAuthorBlock( String author ) { return "\\author{" + LatexSink.escaped( author ) + "}" + EOL; } /** {@inheritDoc} */ protected String getDateBlock( String date ) { return "\\date{" + LatexSink.escaped( date ) + "}" + EOL; } /** {@inheritDoc} */ protected String getHeadBlock() { return ( (LatexSink) getSink() ).defaultSinkCommands() + "\\documentclass[a4paper]{article}" + EOL + EOL + ( (LatexSink) getSink() ).defaultPreamble() + "\\begin{document}" + EOL + EOL; } /** {@inheritDoc} */ protected String getBodyBlock() { return "\\end{document}" + EOL; } /** {@inheritDoc} */ protected String getSectionTitleBlock( String title ) { return title; } /** {@inheritDoc} */ protected String getSection1Block( String title ) { return EOL + "\\section{" + title + "}" + EOL; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return EOL + "\\subsection{" + title + "}" + EOL; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { return EOL + "\\subsubsection{" + title + "}" + EOL; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { return EOL + "\\paragraph{" + title + "}" + EOL; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { return EOL + "\\subparagraph{" + title + "}" + EOL; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return EOL + "\\begin{itemize}" + EOL + "\\item " + LatexSink.escaped( item ) + EOL + "\\end{itemize}" + EOL; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return EOL + "\\begin{enumerate}" + EOL + "\\renewcommand{\\theenumi}{\\roman{enumi}}" + EOL + "\\item " + LatexSink.escaped( item ) + EOL + "\\end{enumerate}" + EOL; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return EOL + "\\begin{description}" + EOL + "\\item[\\mbox{" + definum + "}] " + definition + EOL + "\\end{description}" + EOL; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { return EOL + "\\begin{figure}[htb]" + EOL + "\\begin{center}" + EOL + "\\includegraphics{" + source + "}" + EOL + "\\end{center}" + EOL + "\\caption{Figure\\_caption}" + EOL + "\\end{figure}" + EOL; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { return EOL + "\\begin{table}[htp]" + EOL + "\\begin{center}" + EOL + "\\begin{tabular}{c}" + EOL + "\\begin{tabular}[t]{c}cell\\end{tabular}\\\\" + EOL + "\\end{tabular}" + EOL + "\\end{center}" + EOL + "\\caption{Table\\_caption}" + EOL + "\\end{table}" + EOL; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return EOL + EOL + text + EOL; } /** {@inheritDoc} */ protected String getVerbatimBlock( String text ) { return EOL + "\\begin{small}" + EOL + "\\begin{Verbatim}[frame=single]" + EOL + text + EOL + "\\end{Verbatim}" + EOL + "\\end{small}" + EOL; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return EOL + "\\begin{center}\\rule[0.5ex]{\\linewidth}{1pt}\\end{center}" + EOL; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return EOL + "\\newpage" + EOL; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { return "\\hypertarget{" + anchor + "}{" + anchor + "}"; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { return "\\hyperlink{" + link + "}{" + text + "}"; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { return "\\textit{" + text + "}"; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { return "\\textbf{" + text + "}"; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return "\\texttt{\\small " + text + "}"; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return "\\newline" + EOL; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return "~"; } /** {@inheritDoc} */ protected String getTextBlock( String text ) { // TODO: how to retrieve those outside the sink? return "\\textasciitilde" + EOL + ",\\_=,\\_\\symbol{45},\\_+,\\_*,\\_[,\\_]," + "\\_\\symbol{60},\\_\\symbol{62},\\_\\{,\\_\\},\\_\\textbackslash"; } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { return "~,_=,_-,_+,_*,_[,_],_<,_>,_{,_},_\\"; } /** {@inheritDoc} */ protected String getCommentBlock( String text ) { return EOL + "% Simple comment with ----"; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/site/����������������������������������������������0000755�0001750�0001750�00000000000�11632765556�022606� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/site/site.xml��������������������������������������0000644�0001750�0001750�00000001672�11103330660�024253� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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> <body> <menu ref="parent"/> <menu ref="reports"/> </body> </project>����������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/����������������������������������������������0000755�0001750�0001750�00000000000�11632765556�022566� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/������������������������������������0000755�0001750�0001750�00000000000�11632765556�024600� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/��������������������������������0000755�0001750�0001750�00000000000�11632765556�025367� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/�������������������������0000755�0001750�0001750�00000000000�11632765556�026610� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/�������������������0000755�0001750�0001750�00000000000�11632765556�027716� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/�������������0000755�0001750�0001750�00000000000�11632765556�031022� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/module/������0000755�0001750�0001750�00000000000�11632765556�032307� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000145�00000000000�011565� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/module/latex/����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/module/latex/0000755�0001750�0001750�00000000000�11632765556�033424� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000171�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/module/latex/default_preamble.tex��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/module/latex/0000644�0001750�0001750�00000000513�10772432067�033415� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������% required (do not remove!): \usepackage{graphics} % for images \usepackage{fancyvrb} % for verbatim \usepackage[colorlinks=true,urlcolor=blue,linkcolor=green]{hyperref} % for links and anchors % optional: \usepackage{times} \usepackage[latin1]{inputenc} \pagestyle{plain} \setlength{\parindent}{0pt} \setlength{\parskip}{1ex} �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000176�00000000000�011571� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/module/latex/default_sink_commands.tex���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/resources/org/apache/maven/doxia/module/latex/0000644�0001750�0001750�00000000000�10772432067�033404� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/�����������������������������������������0000755�0001750�0001750�00000000000�11632765556�023507� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/�������������������������������������0000755�0001750�0001750�00000000000�11632765556�024276� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/������������������������������0000755�0001750�0001750�00000000000�11632765556�025517� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/������������������������0000755�0001750�0001750�00000000000�11632765556�026625� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/������������������0000755�0001750�0001750�00000000000�11632765556�027731� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/�����������0000755�0001750�0001750�00000000000�11632765556�031216� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/�����0000755�0001750�0001750�00000000000�11632765556�032333� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000165�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSinkFactory.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/Latex0000644�0001750�0001750�00000003157�11105660512�033316� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.latex; /* * 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.AbstractTextSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * Latex implementation of the Sink factory. * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: LatexSinkFactory.java 712574 2008-11-09 22:16:42Z hboutemy $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="latex" */ public class LatexSinkFactory extends AbstractTextSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { // TODO: can encoding safely be ignored? Shouldn't it be written into the generated Latex source // as inputenc package parameter? return new LatexSink( writer ); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000156�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/LatexSink.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-latex/src/main/java/org/apache/maven/doxia/module/latex/Latex0000644�0001750�0001750�00000076566�11244502114�033331� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.latex; /* * 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.AbstractTextSink; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.LineBreaker; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import java.io.IOException; import java.io.InputStream; import java.io.Writer; import java.util.Locale; /** * Latex Sink implementation. * <br/> * <b>Note</b>: The encoding used is UTF-8. * * @version $Id: LatexSink.java 807174 2009-08-24 12:15:08Z vsiveton $ * @since 1.0 */ public class LatexSink extends AbstractTextSink { /** * Flag that indicates if the document to be written is only a fragment. * * This implies that <code>\\begin{document}</code>, <code>\\title{..}</code> will not be output. */ private final boolean fragmentDocument; private boolean ignoreText; private final LineBreaker out; private final String sinkCommands; private final String preamble; private boolean titleFlag; private int numberedListNesting; private boolean verbatimFlag; private boolean figureFlag; private boolean tableFlag; private boolean gridFlag; private int[] cellJustif; private int cellCount; private boolean isTitle; private String title; // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Constructor, initialize the Writer and the variables. * * @param out 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 LatexSink( Writer out ) { this( out, null, null ); } /** * Constructor, initialize the Writer and the variables. * * @param out 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}. * @param sinkCommands A String representation of commands that go before \documentclass. * @param preamble A String representation of commands that go between \documentclass and \begin{document}. */ protected LatexSink( Writer out, String sinkCommands, String preamble ) { this( out, sinkCommands, preamble, false ); } /** * Constructor, initialize the Writer and the variables. * * @param out 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}. * @param sinkCommands A String representation of commands that go before \documentclass. * @param preamble A String representation of commands that go between \documentclass and \begin{document}. * @param fragmentDocument If this receives events that that are only part of a document. * Typically, headers are omitted if this is true. */ protected LatexSink( Writer out, String sinkCommands, String preamble, boolean fragmentDocument ) { this.out = new LineBreaker( out ); if ( sinkCommands == null ) { sinkCommands = defaultSinkCommands(); } if ( preamble == null ) { preamble = defaultPreamble(); } this.sinkCommands = sinkCommands; this.preamble = preamble; this.fragmentDocument = fragmentDocument; init(); } // ---------------------------------------------------------------------- // Overridables // ---------------------------------------------------------------------- /** * Returns a default \documentclass declaration. * * @return String. */ protected String getDocumentStart() { return "\\documentclass[a4paper]{article}" + EOL + EOL; } /** * Returns a default \begin{document} declaration. * * @return String. */ protected String getDocumentBegin() { return "\\begin{document}" + EOL + EOL; } /** * Returns a default \end{document} declaration. * * @return String. */ protected String getDocumentEnd() { return "\\end{document}" + EOL; } // ---------------------------------------------------------------------- // Sink Implementation // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void head() { head( null ); } /** {@inheritDoc} */ public void head( SinkEventAttributes attributes ) { init(); if ( !fragmentDocument ) { markup( sinkCommands ); markup( getDocumentStart() ); markup( preamble ); markup( getDocumentBegin() ); } } /** * {@inheritDoc} */ public void body() { body( null ); } /** {@inheritDoc} */ public void body( SinkEventAttributes attributes ) { if ( titleFlag ) { if ( fragmentDocument ) { markup( "\\section" ); } else { titleFlag = false; markup( "\\maketitle" + EOL + EOL ); } } } /** * {@inheritDoc} */ public void body_() { if ( !fragmentDocument ) { markup( getDocumentEnd() ); } flush(); } /** * {@inheritDoc} */ public void title() { title( null ); } /** {@inheritDoc} */ public void title( SinkEventAttributes attributes ) { if ( !fragmentDocument ) { titleFlag = true; markup( "\\title{" ); } else { ignoreText = true; } } /** * {@inheritDoc} */ public void title_() { if ( !fragmentDocument ) { markup( "}" + EOL ); } else { ignoreText = false; } } /** * {@inheritDoc} */ public void author() { author( null ); } /** {@inheritDoc} */ public void author( SinkEventAttributes attributes ) { if ( !fragmentDocument ) { markup( "\\author{" ); } else { ignoreText = true; } } /** * {@inheritDoc} */ public void author_() { if ( !fragmentDocument ) { markup( "}" + EOL ); } else { ignoreText = false; } } /** * {@inheritDoc} */ public void date() { date( null ); } /** {@inheritDoc} */ public void date( SinkEventAttributes attributes ) { if ( !fragmentDocument ) { markup( "\\date{" ); } else { ignoreText = true; } } /** * {@inheritDoc} */ public void date_() { if ( !fragmentDocument ) { markup( "}" + EOL ); } else { ignoreText = false; } } /** {@inheritDoc} */ public void sectionTitle( int level, SinkEventAttributes attributes ) { isTitle = true; } /** {@inheritDoc} */ public void sectionTitle_( int level ) { String command = ""; switch ( level ) { case SECTION_LEVEL_1: command = "section"; break; case SECTION_LEVEL_2: command = "subsection"; break; case SECTION_LEVEL_3: command = "subsubsection"; break; case SECTION_LEVEL_4: command = "paragraph"; break; case SECTION_LEVEL_5: command = "subparagraph"; break; default: throw new IllegalArgumentException( "Not a section level: " + level ); } isTitle = false; if ( StringUtils.isNotEmpty( title ) ) { markup( EOL + "\\" + command + "{" + title + "}" + EOL ); title = null; } } // ---------------------------------------------------------------------- // Section Title 1 // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void sectionTitle1() { sectionTitle( SECTION_LEVEL_1, null ); } /** * {@inheritDoc} */ public void sectionTitle1_() { sectionTitle_( SECTION_LEVEL_1 ); } // ---------------------------------------------------------------------- // Section Title 2 // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void sectionTitle2() { sectionTitle( SECTION_LEVEL_2, null ); } /** * {@inheritDoc} */ public void sectionTitle2_() { sectionTitle_( SECTION_LEVEL_2 ); } // ---------------------------------------------------------------------- // Section Title 3 // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void sectionTitle3() { sectionTitle( SECTION_LEVEL_3, null ); } /** * {@inheritDoc} */ public void sectionTitle3_() { sectionTitle_( SECTION_LEVEL_3 ); } // ---------------------------------------------------------------------- // Section Title 4 // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void sectionTitle4() { sectionTitle( SECTION_LEVEL_4, null ); } /** * {@inheritDoc} */ public void sectionTitle4_() { sectionTitle_( SECTION_LEVEL_4 ); } // ---------------------------------------------------------------------- // Section Title 5 // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void sectionTitle5() { sectionTitle( SECTION_LEVEL_5, null ); } /** * {@inheritDoc} */ public void sectionTitle5_() { sectionTitle_( SECTION_LEVEL_5 ); } // ---------------------------------------------------------------------- // List // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void list() { list( null ); } /** {@inheritDoc} */ public void list( SinkEventAttributes attributes ) { markup( EOL + "\\begin{itemize}" ); } /** * {@inheritDoc} */ public void list_() { markup( EOL + "\\end{itemize}" + EOL ); } /** * {@inheritDoc} */ public void listItem() { listItem( null ); } /** {@inheritDoc} */ public void listItem( SinkEventAttributes attributes ) { markup( EOL + "\\item " ); } /** * {@inheritDoc} */ public void numberedList( int numbering ) { numberedList( numbering, null ); } /** {@inheritDoc} */ public void numberedList( int numbering, SinkEventAttributes attributes ) { ++numberedListNesting; String counter; switch ( numberedListNesting ) { case 1: counter = "enumi"; break; case 2: counter = "enumii"; break; case 3: counter = "enumiii"; break; case 4: default: counter = "enumiv"; } String style; switch ( numbering ) { case NUMBERING_UPPER_ALPHA: style = "Alph"; break; case NUMBERING_LOWER_ALPHA: style = "alph"; break; case NUMBERING_UPPER_ROMAN: style = "Roman"; break; case NUMBERING_LOWER_ROMAN: style = "roman"; break; case NUMBERING_DECIMAL: default: style = "arabic"; } markup( EOL + "\\begin{enumerate}" + EOL ); markup( "\\renewcommand{\\the" + counter + "}{\\" + style + "{" + counter + "}}" + EOL ); } /** * {@inheritDoc} */ public void numberedList_() { markup( EOL + "\\end{enumerate}" + EOL ); --numberedListNesting; } /** * {@inheritDoc} */ public void numberedListItem() { numberedListItem( null ); } /** {@inheritDoc} */ public void numberedListItem( SinkEventAttributes attributes ) { markup( "\\item " ); } /** * {@inheritDoc} */ public void definitionList() { definitionList( null ); } /** {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { markup( EOL + "\\begin{description}" ); } /** * {@inheritDoc} */ public void definitionList_() { markup( EOL + "\\end{description}" + EOL ); } /** * {@inheritDoc} */ public void definedTerm() { definedTerm( null ); } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { markup( EOL + "\\item[\\mbox{" ); } /** * {@inheritDoc} */ public void definedTerm_() { markup( "}] " ); } /** {@inheritDoc} */ public void definitionListItem() { definitionListItem( null ); } /** {@inheritDoc} */ public void definitionListItem( SinkEventAttributes attributes ) { // nop } /** {@inheritDoc} */ public void definitionListItem_() { // nop } /** {@inheritDoc} */ public void definition() { definition( null ); } /** {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { // nop } /** {@inheritDoc} */ public void definition_() { // nop } // ---------------------------------------------------------------------- // Figure // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void figure() { figure( null ); } /** {@inheritDoc} */ public void figure( SinkEventAttributes attributes ) { figureFlag = true; markup( EOL + "\\begin{figure}[htb]" + EOL ); } /** * {@inheritDoc} */ public void figure_() { markup( "\\end{figure}" + EOL ); figureFlag = false; } /** * {@inheritDoc} */ public void figureGraphics( String name ) { figureGraphics( name, null ); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { if ( !src.toLowerCase( Locale.ENGLISH ).endsWith( ".eps" ) ) { getLog().warn( "[Latex Sink] Found non-eps figure graphics!" ); } markup( "\\begin{center}" + EOL ); markup( "\\includegraphics{" + src + "}" + EOL ); markup( "\\end{center}" + EOL ); } /** * {@inheritDoc} */ public void figureCaption() { figureCaption( null ); } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { markup( "\\caption{" ); } /** * {@inheritDoc} */ public void figureCaption_() { markup( "}" + EOL ); } // ---------------------------------------------------------------------- // Table // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void table() { table( null ); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { tableFlag = true; markup( EOL + "\\begin{table}[htp]" + EOL ); } /** * {@inheritDoc} */ public void table_() { markup( "\\end{table}" + EOL ); tableFlag = false; } /** * {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { StringBuffer justif = new StringBuffer(); for ( int i = 0; i < justification.length; ++i ) { if ( grid ) { justif.append( '|' ); } switch ( justification[i] ) { case Sink.JUSTIFY_CENTER: justif.append( 'c' ); break; case Sink.JUSTIFY_LEFT: justif.append( 'l' ); break; case Sink.JUSTIFY_RIGHT: justif.append( 'r' ); break; default: break; } } if ( grid ) { justif.append( '|' ); } markup( "\\begin{center}" + EOL ); markup( "\\begin{tabular}{" + justif.toString() + "}" + EOL ); if ( grid ) { markup( "\\hline" + EOL ); } gridFlag = grid; cellJustif = justification; } /** * {@inheritDoc} */ public void tableRows_() { markup( "\\end{tabular}" + EOL ); markup( "\\end{center}" + EOL ); gridFlag = false; cellJustif = null; } /** * {@inheritDoc} */ public void tableRow() { tableRow( null ); } /** {@inheritDoc} */ public void tableRow( SinkEventAttributes attributes ) { cellCount = 0; } /** * {@inheritDoc} */ public void tableRow_() { markup( "\\\\" + EOL ); if ( gridFlag || lastCellWasHeader ) { markup( "\\hline" + EOL ); } cellCount = 0; lastCellWasHeader = false; } /** * {@inheritDoc} */ public void tableCell() { tableCell( (SinkEventAttributes) null ); } /** {@inheritDoc} */ public void tableCell( String width ) { SinkEventAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( javax.swing.text.html.HTML.Attribute.WIDTH, width ); tableCell( att ); } /** {@inheritDoc} */ public void tableCell( SinkEventAttributes attributes ) { tableCell( false ); } /** * {@inheritDoc} */ public void tableCell_() { markup( "\\end{tabular}" ); ++cellCount; } /** * {@inheritDoc} */ public void tableHeaderCell() { tableCell( (SinkEventAttributes) null ); } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { SinkEventAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( javax.swing.text.html.HTML.Attribute.WIDTH, width ); tableHeaderCell( att ); } /** {@inheritDoc} */ public void tableHeaderCell( SinkEventAttributes attributes ) { tableCell( true ); } /** * {@inheritDoc} */ public void tableHeaderCell_() { tableCell_(); } private boolean lastCellWasHeader = false; /** * Starts a table cell. * * @param header True if this is a header cell. */ private void tableCell( boolean header ) { lastCellWasHeader = header; if ( cellCount > 0 ) { markup( " &" + EOL ); } char justif; switch ( cellJustif[cellCount] ) { case Sink.JUSTIFY_LEFT: justif = 'l'; break; case Sink.JUSTIFY_RIGHT: justif = 'r'; break; case Sink.JUSTIFY_CENTER: default: justif = 'c'; break; } markup( "\\begin{tabular}[t]{" + justif + "}" ); } /** * {@inheritDoc} */ public void tableCaption() { tableCaption( null ); } /** {@inheritDoc} */ public void tableCaption( SinkEventAttributes attributes ) { markup( "\\caption{" ); } /** * {@inheritDoc} */ public void tableCaption_() { markup( "}" + EOL ); } /** * {@inheritDoc} */ public void paragraph() { paragraph( null ); } /** {@inheritDoc} */ public void paragraph( SinkEventAttributes attributes ) { markup( EOL + EOL ); } /** * {@inheritDoc} */ public void paragraph_() { markup( EOL ); } /** * {@inheritDoc} */ public void verbatim( boolean boxed ) { verbatim( boxed ? SinkEventAttributeSet.BOXED : null ); } /** {@inheritDoc} */ public void verbatim( SinkEventAttributes attributes ) { boolean boxed = false; if ( attributes != null && attributes.isDefined( SinkEventAttributes.DECORATION ) ) { boxed = "boxed".equals( attributes.getAttribute( SinkEventAttributes.DECORATION ) ); } markup( EOL + "\\begin{small}" + EOL ); if ( boxed ) { markup( "\\begin{Verbatim}[frame=single]" + EOL ); } else { markup( "\\begin{Verbatim}" + EOL ); } verbatimFlag = true; } /** * {@inheritDoc} */ public void verbatim_() { markup( EOL + "\\end{Verbatim}" + EOL ); markup( "\\end{small}" + EOL ); verbatimFlag = false; } /** * {@inheritDoc} */ public void horizontalRule() { horizontalRule( null ); } /** {@inheritDoc} */ public void horizontalRule( SinkEventAttributes attributes ) { markup( EOL + "\\begin{center}\\rule[0.5ex]{\\linewidth}{1pt}\\end{center}" + EOL ); } /** * {@inheritDoc} */ public void pageBreak() { markup( EOL + "\\newpage" + EOL ); } /** * {@inheritDoc} */ public void anchor( String name ) { anchor( name, null ); } /** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { markup( "\\hypertarget{" + name + "}{" ); } /** * {@inheritDoc} */ public void anchor_() { markup( "}" ); } /** * {@inheritDoc} */ public void link( String name ) { link( name, null ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { // TODO: use \\url for simple links if ( DoxiaUtils.isExternalLink( name ) ) { markup( "\\href{" + name + "}{" ); } else { markup( "\\hyperlink{" + name + "}{" ); } } /** * {@inheritDoc} */ public void link_() { markup( "}" ); } /** * {@inheritDoc} */ public void italic() { markup( "\\textit{" ); } /** * {@inheritDoc} */ public void italic_() { markup( "}" ); } /** * {@inheritDoc} */ public void bold() { markup( "\\textbf{" ); } /** * {@inheritDoc} */ public void bold_() { markup( "}" ); } /** * {@inheritDoc} */ public void monospaced() { markup( "\\texttt{\\small " ); } /** * {@inheritDoc} */ public void monospaced_() { markup( "}" ); } /** * {@inheritDoc} */ public void lineBreak() { lineBreak( null ); } /** {@inheritDoc} */ public void lineBreak( SinkEventAttributes attributes ) { markup( ( figureFlag || tableFlag || titleFlag || verbatimFlag ) ? EOL : "\\newline" + EOL ); } /** * {@inheritDoc} */ public void nonBreakingSpace() { markup( "~" ); } /** * {@inheritDoc} */ public void text( String text ) { text( text, null ); } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { if ( ignoreText ) { return; } if ( isTitle ) { title = text; } else if ( verbatimFlag ) { verbatimContent( text ); } else { content( text ); } } /** {@inheritDoc} */ public void rawText( String text ) { verbatimContent( text ); } /** {@inheritDoc} */ public void comment( String comment ) { rawText( EOL + "% " + comment ); } /** * {@inheritDoc} * * Unkown events just log a warning message but are ignored otherwise. * @see org.apache.maven.doxia.sink.Sink#unknown(String,Object[],SinkEventAttributes) */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { getLog().warn( "[Latex Sink] Unknown Sink event: '" + name + "', ignoring!" ); } // ----------------------------------------------------------------------- /** * Writes the text, preserving whitespace. * * @param text the text to write. */ protected void markup( String text ) { if ( text != null ) { out.write( text, /*preserveSpace*/ true ); } } /** * Writes the text, without preserving whitespace. * * @param text the text to write. */ protected void content( String text ) { out.write( escaped( text ), /*preserveSpace*/ false ); } /** * Writes the text, preserving whitespace. * * @param text the text to write. */ protected void verbatimContent( String text ) { out.write( text, /*preserveSpace*/ true ); } // ----------------------------------------------------------------------- /** * Escapes special characters. * * @param text The text to escape. * @return The text with special characters replaced. */ public static String escaped( String text ) { int length = text.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = text.charAt( i ); switch ( c ) { case '-': case '<': case '>': buffer.append( "\\symbol{" ).append( (int) c ).append( "}" ); break; case '~': buffer.append( "\\textasciitilde " ); break; case '^': buffer.append( "\\textasciicircum " ); break; case '|': buffer.append( "\\textbar " ); break; case '\\': buffer.append( "\\textbackslash " ); break; case '$': buffer.append( "\\$" ); break; case '&': buffer.append( "\\&" ); break; case '%': buffer.append( "\\%" ); break; case '#': buffer.append( "\\#" ); break; case '{': buffer.append( "\\{" ); break; case '}': buffer.append( "\\}" ); break; case '_': buffer.append( "\\_" ); break; default: buffer.append( c ); } } return buffer.toString(); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * {@inheritDoc} */ public void flush() { out.flush(); } /** * {@inheritDoc} */ public void close() { out.close(); init(); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Returns the default sink commands from a resource. * * @throws java.io.IOException if the resource file cannot be read. * @return InputStream */ private static InputStream getDefaultSinkCommands() throws IOException { return LatexSink.class.getResource( "default_sink_commands.tex" ).openStream(); } /** * Returns the default preamble from a resource. * * @return InputStream * @throws java.io.IOException if the resource file cannot be read. */ private static InputStream getDefaultPreamble() throws IOException { return LatexSink.class.getResource( "default_preamble.tex" ).openStream(); } /** * Returns the default sink commands. * * @return String. */ protected String defaultSinkCommands() { try { return IOUtil.toString( getDefaultSinkCommands() ); } catch ( IOException ioe ) { // this should not happen getLog().warn( "Could not read default LaTeX commands, the generated LaTeX file will not compile!" ); getLog().debug( ioe ); return ""; } } /** * Returns the default preamble. * * @return String. */ protected String defaultPreamble() { try { return IOUtil.toString( getDefaultPreamble() ); } catch ( IOException ioe ) { // this should not happen getLog().warn( "Could not read default LaTeX preamble, the generated LaTeX file will not compile!" ); getLog().debug( ioe ); return ""; } } /** {@inheritDoc} */ protected void init() { super.init(); this.ignoreText = false; this.titleFlag = false; this.numberedListNesting = 0; this.verbatimFlag = false; this.figureFlag = false; this.tableFlag = false; this.gridFlag = false; this.cellJustif = null; this.cellCount = 0; this.isTitle = false; this.title = null; } } ������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/���������������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�020523� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/pom.xml��������������������������������������������������0000644�0001750�0001750�00000004347�11470562366�022041� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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 http://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>1.1.4</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>doxia-module-apt</artifactId> <name>Doxia :: APT Module</name> <description>A Doxia module for Almost Plain Text source documents.</description> <!-- START SNIPPET: test --> <!-- test snippet --> <!-- END SNIPPET: test --> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-maven-plugin</artifactId> <configuration> <descriptors> <descriptor>src/main/components/components.xml</descriptor> <descriptor>target/generated-resources/plexus/META-INF/plexus/components.xml</descriptor> </descriptors> </configuration> <executions> <execution> <goals> <goal>merge-descriptors</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/�����������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�021312� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�022271� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/��������������������������������������0000755�0001750�0001750�00000000000�11632765557�024303� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/test/���������������������������������0000755�0001750�0001750�00000000000�11632765557�025262� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/test/macro.apt������������������������0000644�0001750�0001750�00000000311�11123451532�027040� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ----- Test DOXIA-77 ----- Vincent Siveton ----- Test DOXIA-77 %{snippet|id=superpom|url=http://svn.apache.org/repos/asf/maven/doxia/doxia/trunk/doxia-test-docs/src/main/resources/pom-4.0.0.xml} �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/test/snippet.apt����������������������0000644�0001750�0001750�00000000214�11147213565�027433� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� * list item 1 %{snippet|id=test|file=pom.xml} list paragraph text * list item 2 +-- Verbatim text +-- list paragraph text ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/test/linebreak.apt��������������������0000644�0001750�0001750�00000000124�10577144430�027705� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ----- Test DOXIA-76 ----- Vincent Siveton ----- Test DOXIA-76 Line\ break. ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/test/comments.apt���������������������0000644�0001750�0001750�00000000203�11331346664�027576� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������~~ comments before title ~~ like a license header, for example ----- Test DOXIA-379 ----- Herve Boutemy ----- Test DOXIA-379 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/test/toc.apt��������������������������0000644�0001750�0001750�00000001162�11200764240�026530� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ---- Test DOXIA-40 ----- Vincent Siveton ----- January 2007 ----- Test DOXIA-40 Section 1 %{toc|section=2|fromDepth=2|toDepth=4} * {SubSection 1.1} SubSection 1.1 ** {Sub-SubSection 1.1.1} SubSection 1.1.1 ** {Sub-SubSection 1.1.2} SubSection 1.1.2 *** {Sub-Sub-SubSection 1.1.2.1} Sub-Sub-SubSection 1.1.2.1 **** {Sub-Sub-Sub-SubSection 1.1.2.1.1} Sub-Sub-Sub-SubSection 1.1.2.1.1 *** {SubSub-SubSection 1.1.2.2} SubSub-SubSection 1.1.2.2 * {SubSection 1.2} SubSection 1.2 * {SubSection 1.3} SubSection 1.3 * {SubSection 1.4} SubSection 1.4 Section 2 * {SubSection 2.1} SubSection 2.1��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/resources/test.apt������������������������������0000644�0001750�0001750�00000004445�10651743017�025762� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ------ Title ------ Author ------ Date Paragraph 1, line 1. Paragraph 1, line 2. Paragraph 2, line 1. Paragraph 2, line 2. Section title * Sub-section title ** Sub-sub-section title *** Sub-sub-sub-section title **** Sub-sub-sub-sub-section title * List item 1. * List item 2. Paragraph contained in list item 2. * Sub-list item 1. * Sub-list item 2. * List item 3. Force end of list: [] +------------------------------------------+ Verbatim text not contained in list item 3 +------------------------------------------+ [[1]] Numbered item 1. [[A]] Numbered item A. [[B]] Numbered item B. [[2]] Numbered item 2. List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]]. [Defined term 1] of definition list. [Defined term 2] of definition list. +-------------------------------+ Verbatim text in a box +-------------------------------+ --- instead of +-- suppresses the box around verbatim text. [figure] Figure caption *----------*--------------+----------------: | Centered | Left-aligned | Right-aligned | | cell 1,1 | cell 1,2 | cell 1,3 | *----------*--------------+----------------: | cell 2,1 | cell 2,2 | cell 2,3 | *----------*--------------+----------------: Table caption No grid, no caption: *-----*------* cell | cell *-----*------* cell | cell *-----*------* *---------*---------* || header || header | *---------*---------* | cell | cell | *---------*---------* Horizontal line: ======================================================================= New page. <Italic> font. <<Bold>> font. <<<Monospaced>>> font. {Anchor}. Link to {{Anchor}}. Link to {{http://www.pixware.fr}}. Link to {{{Anchor}showing alternate text}}. Link to {{{http://www.pixware.fr}Pixware home page}}. Force line\ break. Non\ breaking\ space. Escaped special characters: \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\. Copyright symbol: \251, \xA9, \u00a9. ~~Commented out. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/�������������������������������������������0000755�0001750�0001750�00000000000�11632765557�023212� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/���������������������������������������0000755�0001750�0001750�00000000000�11632765557�024001� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/��������������������������������0000755�0001750�0001750�00000000000�11632765557�025222� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/��������������������������0000755�0001750�0001750�00000000000�11632765557�026330� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/��������������������0000755�0001750�0001750�00000000000�11632765557�027434� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/�������������0000755�0001750�0001750�00000000000�11632765557�030721� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/���������0000755�0001750�0001750�00000000000�11632765557�031505� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000155�00000000000�011566� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptUtilsTest.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptUtilsT0000644�0001750�0001750�00000012624�11166637754�033325� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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 junit.framework.TestCase; /** * Test AptUtils. * * @author ltheussl * @version $Id: AptUtilsTest.java 762718 2009-04-07 11:58:36Z ltheussl $ */ public class AptUtilsTest extends TestCase { /** * Test of isExternalLink method, of class AptUtils. */ public void testIsExternalLink() { String link = "http://maven.apache.org/"; assertTrue( "Should be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "https://maven.apache.org/"; assertTrue( "Should be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "HTTPS://MAVEN.APACHE.ORG/"; assertTrue( "Should be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "ftp:/maven.apache.org/"; assertTrue( "Should be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "mailto:maven@apache.org"; assertTrue( "Should be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "file:/index.html"; assertTrue( "Should be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "resource_type://domain:port/filepathname?query_string#anchor"; assertTrue( "Should be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "index.html"; assertFalse( "Should NOT be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "example.pdf"; assertFalse( "Should NOT be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "./index.html"; assertFalse( "Should NOT be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "../index.html"; assertFalse( "Should NOT be an external link: " + link, AptUtils.isExternalLink( link ) ); // Windows style separators "\" are not allowed link = "file:\\index.html"; assertFalse( "Should NOT be an external link: " + link, AptUtils.isExternalLink( link ) ); link = ".\\index.html"; assertFalse( "Should NOT be an external link: " + link, AptUtils.isExternalLink( link ) ); link = "..\\index.html"; assertFalse( "Should NOT be an external link: " + link, AptUtils.isExternalLink( link ) ); } /** * Test of isInternalLink method, of class AptUtils. */ public void testIsInternalLink() { String link = "index.html"; assertTrue( "Should be an internal link: " + link, AptUtils.isInternalLink( link ) ); link = "file:/index.html"; assertFalse( "Should NOT be an internal link: " + link, AptUtils.isInternalLink( link ) ); link = "./index.html"; assertFalse( "Should NOT be an internal link: " + link, AptUtils.isInternalLink( link ) ); } /** * Test of isLocalLink method, of class AptUtils. */ public void testIsLocalLink() { String link = "/index.html"; assertTrue( "Should be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "./index.html"; assertTrue( "Should be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "../index.html"; assertTrue( "Should be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); link = ".\\index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "\\index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "..\\index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); } /** * Test of encodeAnchor method, of class AptUtils. */ public void testEncodeAnchor() { assertNull( AptUtils.encodeAnchor( null ) ); assertEquals( "a123_:_.-aBc", AptUtils.encodeAnchor( " 12!3 :_.&-a)Bc " ) ); } /** * Test of encodeFragment method, of class AptUtils. */ public void testEncodeFragment() { assertNull( AptUtils.encodeFragment( null ) ); assertEquals( "abc0d", AptUtils.encodeFragment( "a B&c0)D" ) ); } /** * Test of linkToKey method, of class AptUtils. */ public void testLinkToKey() { assertEquals( "abc56au", AptUtils.linkToKey( "aB$%C56 a&\\/'U" ) ); } } ������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000156�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParser0000644�0001750�0001750�00000064356�11331346664�033335� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.io.Reader; 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.Parser; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; import org.codehaus.plexus.util.IOUtil; /** * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: AptParserTest.java 905092 2010-01-31 18:36:36Z hboutemy $ */ public class AptParserTest extends AbstractParserTest { private AptParser parser; /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); parser = (AptParser) lookup( Parser.ROLE, "apt" ); } /** {@inheritDoc} */ protected Parser createParser() { return parser; } protected String parseFileToAptSink( String file ) throws ParseException { StringWriter output = null; Reader reader = null; try { output = new StringWriter(); reader = getTestReader( file ); Sink sink = new AptSink( output ); createParser().parse( reader, sink ); } finally { IOUtil.close( output ); IOUtil.close( reader ); } return output.toString(); } /** @throws Exception */ public void testLineBreak() throws Exception { String linebreak = parseFileToAptSink( "test/linebreak" ); assertTrue( linebreak.indexOf( "Line\\" + EOL + "break." ) != -1 ); } /** @throws Exception */ public void testSnippetMacro() throws Exception { String macro = parseFileToAptSink( "test/macro" ); assertTrue( macro.indexOf( "<modelVersion\\>4.0.0\\</modelVersion\\>" ) != -1 ); } /** @throws Exception */ public void testCommentsBeforeTitle() throws Exception { String comments = parseFileToAptSink( "test/comments" ); assertEquals( 0, comments.indexOf( "~~ comments before title" + EOL + "~~ like a license header, for example" + EOL + " -----" + EOL + " Test DOXIA-379" ) ); } /** @throws Exception */ public void testSnippet() throws Exception { // DOXIA-259 Reader reader = null; SinkEventTestingSink sink = new SinkEventTestingSink(); try { reader = getTestReader( "test/snippet" ); createParser().parse( reader, sink ); } finally { IOUtil.close( reader ); } Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testTocMacro() throws Exception { String toc = parseFileToAptSink( "test/toc" ); // No section, only subsection 1 and 2 assertTrue( toc.indexOf( "* {{{SubSection_1.1}SubSection 1.1}}" ) != -1 ); assertTrue( toc.indexOf( "* {{{SubSection_1.1.2.1.1}SubSection 1.1.2.1.1}}" ) == -1 ); } /** * Parses the test document test.apt and re-emits * it into parser/test.apt. * * @throws java.io.IOException if the test file cannot be read. * @throws org.apache.maven.doxia.parser.ParseException if the test file cannot be parsed. */ public void testTestDocument() throws IOException, ParseException { Writer writer = null; Reader reader = null; try { writer = getTestWriter( "test" ); reader = getTestReader( "test" ); Sink sink = new AptSink( writer ); createParser().parse( reader, sink ); } finally { IOUtil.close( writer ); IOUtil.close( reader ); } } /** @throws Exception */ public void testBoxedVerbatim() throws Exception { String text = "+--" + EOL + "boxed verbatim" + EOL + "+--" + EOL + "---" + EOL + "un-boxed verbatim" + EOL + "---" + EOL; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement element = (SinkEventElement) it.next(); assertEquals( "verbatim", element.getName() ); Object[] args = element.getArgs(); assertEquals( SinkEventAttributeSet.BOXED, args[0] ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "verbatim", element.getName() ); args = element.getArgs(); assertNull( args[0] ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testMultiLinesInTableCells() throws Exception { String text = "*----------*--------------+----------------:" + EOL + " cell 1, | cell 1,2 | cell 1,3" + EOL + " 1 | | " + EOL + "*----------*--------------+----------------:" + EOL + " cell 2,1 | cell 2, | cell 2,3" + EOL + " | 2 |" + EOL + "*----------*--------------+----------------:" + EOL + " cell 3,1 | cell 3,2 | cell 3," + EOL + " | | 3" + EOL + "*----------*--------------+----------------:" + EOL; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 1, 1", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 1,2", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 1,3", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 2,1", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 2, 2", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 2,3", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 3,1", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 3,2", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 3, 3", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testLineBreakInTableCells() throws Exception { String text = "*----------*--------------+----------------:" + EOL + " cell 1,\\ | cell 1,2 | cell 1,3" + EOL + " 1 | | " + EOL + "*----------*--------------+----------------:" + EOL + " cell 2,1 | cell 2,\\ | cell 2,3" + EOL + " | 2 |" + EOL + "*----------*--------------+----------------:" + EOL + " cell 3,1 | cell 3,2 | cell 3,\\" + EOL + " | | 3" + EOL + "*----------*--------------+----------------:" + EOL; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 1,\u00A0", element.getArgs()[0] ); assertEquals( "lineBreak", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "1", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 1,2", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 1,3", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 2,1", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 2,\u00A0", element.getArgs()[0] ); assertEquals( "lineBreak", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "2", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 2,3", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 3,1", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 3,2", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "cell 3,\u00A0", element.getArgs()[0] ); assertEquals( "lineBreak", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "text", element.getName() ); assertNotNull( element.getArgs()[0] ); assertEquals( "3", element.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testDOXIA38() throws Exception { String text = "*----------*--------------*---------------*" + EOL + "| Centered | Centered | Centered |" + EOL + "*----------*--------------+---------------:" + EOL + "| Centered | Left-aligned | Right-aligned |" + EOL + "*----------*--------------+---------------:"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "tableCell", event.getName() ); SinkEventAttributeSet atts = (SinkEventAttributeSet) event.getArgs()[0]; assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertNotNull( event.getArgs()[0] ); assertEquals( "Centered", event.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "tableCell", event.getName() ); atts = (SinkEventAttributeSet) event.getArgs()[0]; assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertNotNull( event.getArgs()[0] ); assertEquals( "Centered", event.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "tableCell", event.getName() ); atts = (SinkEventAttributeSet) event.getArgs()[0]; assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertNotNull( event.getArgs()[0] ); assertEquals( "Centered", event.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "tableCell", event.getName() ); atts = (SinkEventAttributeSet) event.getArgs()[0]; assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertNotNull( event.getArgs()[0] ); assertEquals( "Centered", event.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "tableCell", event.getName() ); atts = (SinkEventAttributeSet) event.getArgs()[0]; assertEquals( "left", atts.getAttribute( SinkEventAttributeSet.ALIGN ) ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertNotNull( event.getArgs()[0] ); assertEquals( "Left-aligned", event.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "tableCell", event.getName() ); atts = (SinkEventAttributeSet) event.getArgs()[0]; assertEquals( "right", atts.getAttribute( SinkEventAttributeSet.ALIGN ) ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertNotNull( event.getArgs()[0] ); assertEquals( "Right-aligned", event.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testSpecialCharactersInTables() throws Exception { // DOXIA-323 String text = " \\~ \\= \\- \\+ \\* \\[ \\] \\< \\> \\{ \\} \\\\" + EOL + EOL + "*--------------------------------------------------+---------------+" + EOL + "| \\~ \\= \\- \\+ \\* \\[ \\] \\< \\> \\{ \\} \\\\ | special chars |" + EOL + "*--------------------------------------------------+---------------+"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "~ = - + * [ ] < > { } \\", event.getArgs()[0] ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "~ = - + * [ ] < > { } \\", event.getArgs()[0] ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); } /** {@inheritDoc} */ protected String outputExtension() { return "apt"; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000160�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptIdentityTest.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptIdenti0000644�0001750�0001750�00000002671�10767707462�033316� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.module.AbstractIdentityTest; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.sink.Sink; /** * Check that piping a full model through an AptParser and an AptSink * leaves the model unchanged. The test is done in AbstractIdentityTest. */ public class AptIdentityTest extends AbstractIdentityTest { /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new AptSink( writer ); } /** {@inheritDoc} */ protected Parser createParser() { return new AptParser(); } } �����������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000154�00000000000�011565� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptSinkTest.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptSinkTe0000644�0001750�0001750�00000020666�11331346664�033272� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.markup.Markup; import org.apache.maven.doxia.sink.AbstractSinkTest; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.StringUtils; /** * Test the <code>AptSink</code> class * * @see AptSink */ public class AptSinkTest extends AbstractSinkTest { /** {@inheritDoc} */ protected String outputExtension() { return "apt"; } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new AptSink( writer ); } /** {@inheritDoc} */ protected boolean isXmlSink() { return false; } /** {@inheritDoc} */ protected String getTitleBlock( String title ) { return title; } /** {@inheritDoc} */ protected String getAuthorBlock( String author ) { return author; } /** {@inheritDoc} */ protected String getDateBlock( String date ) { return date; } /** {@inheritDoc} */ protected String getHeadBlock() { return AptMarkup.HEADER_START_MARKUP + EOL + AptMarkup.HEADER_START_MARKUP + EOL + AptMarkup.HEADER_START_MARKUP + EOL + AptMarkup.HEADER_START_MARKUP + EOL; } /** {@inheritDoc} */ protected String getBodyBlock() { return ""; } /** {@inheritDoc} */ protected String getSectionTitleBlock( String title ) { return title; } /** {@inheritDoc} */ protected String getSection1Block( String title ) { return EOL + title + EOL + EOL + EOL; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return EOL + AptMarkup.SECTION_TITLE_START_MARKUP + title + EOL + EOL + EOL; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { return EOL + StringUtils.repeat( String.valueOf( AptMarkup.SECTION_TITLE_START_MARKUP ), 2 ) + title + EOL + EOL + EOL; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { return EOL + StringUtils.repeat( String.valueOf( AptMarkup.SECTION_TITLE_START_MARKUP ), 3 ) + title + EOL + EOL + EOL; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { return EOL + StringUtils.repeat( String.valueOf( AptMarkup.SECTION_TITLE_START_MARKUP ), 4 ) + title + EOL + EOL + EOL; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return EOL + EOL + Markup.SPACE + "" + AptMarkup.LIST_START_MARKUP + "" + Markup.SPACE + item + EOL + EOL + Markup.SPACE + "" + AptMarkup.LIST_END_MARKUP + EOL; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return EOL + EOL + Markup.SPACE + "" + Markup.LEFT_SQUARE_BRACKET + "" + Markup.LEFT_SQUARE_BRACKET + AptMarkup.NUMBERING_LOWER_ROMAN_CHAR + "" + Markup.RIGHT_SQUARE_BRACKET + "" + Markup.RIGHT_SQUARE_BRACKET + Markup.SPACE + item + EOL + EOL + Markup.SPACE + "" + AptMarkup.LIST_END_MARKUP + EOL; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return EOL + EOL + Markup.SPACE + "" + Markup.LEFT_SQUARE_BRACKET + definum + Markup.RIGHT_SQUARE_BRACKET + "" + Markup.SPACE + definition + EOL + EOL + Markup.SPACE + "" + AptMarkup.LIST_END_MARKUP + EOL; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { return EOL + Markup.LEFT_SQUARE_BRACKET + source + Markup.RIGHT_SQUARE_BRACKET + Markup.SPACE + caption + EOL; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { return EOL + AptMarkup.TABLE_ROW_START_MARKUP + AptMarkup.TABLE_COL_CENTERED_ALIGNED_MARKUP + EOL + cell + AptMarkup.TABLE_ROW_SEPARATOR_MARKUP + EOL + AptMarkup.TABLE_ROW_START_MARKUP + AptMarkup.TABLE_COL_CENTERED_ALIGNED_MARKUP + EOL + caption + EOL; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return EOL + Markup.SPACE + text + EOL + EOL; } /** {@inheritDoc} */ protected String getVerbatimBlock( String text ) { return EOL + EOL + AptMarkup.BOXED_VERBATIM_START_MARKUP + EOL + text + EOL + AptMarkup.BOXED_VERBATIM_START_MARKUP + EOL; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return EOL + AptMarkup.HORIZONTAL_RULE_MARKUP + EOL; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return EOL + AptMarkup.PAGE_BREAK_MARKUP + EOL; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { return AptMarkup.ANCHOR_START_MARKUP + anchor + AptMarkup.ANCHOR_END_MARKUP; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { String lnk = link.startsWith( "#" ) ? link.substring( 1 ) : link; return AptMarkup.LINK_START_1_MARKUP + lnk + AptMarkup.LINK_START_2_MARKUP + text + AptMarkup.LINK_END_MARKUP; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { return AptMarkup.ITALIC_START_MARKUP + text + AptMarkup.ITALIC_END_MARKUP; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { return AptMarkup.BOLD_START_MARKUP + text + AptMarkup.BOLD_END_MARKUP; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return AptMarkup.MONOSPACED_START_MARKUP + text + AptMarkup.MONOSPACED_END_MARKUP; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return String.valueOf( AptMarkup.BACKSLASH ) + EOL; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return AptMarkup.NON_BREAKING_SPACE_MARKUP; } /** {@inheritDoc} */ protected String getTextBlock( String text ) { // "\\~, \\=, \\-, \\+, \\*, \\[, \\], \\<, \\>, \\{, \\}, \\\\" StringBuffer sb = new StringBuffer(); sb.append( getSpecialCharacters( AptMarkup.COMMENT ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.EQUAL ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.MINUS ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.PLUS ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.STAR ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.LEFT_SQUARE_BRACKET ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.RIGHT_SQUARE_BRACKET ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.LESS_THAN ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.GREATER_THAN ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.LEFT_CURLY_BRACKET ) ).append( ",_" ); sb.append( getSpecialCharacters( Markup.RIGHT_CURLY_BRACKET ) ).append( ",_" ); sb.append( getSpecialCharacters( AptMarkup.BACKSLASH ) ); return sb.toString(); } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { return text; } /** * Add a backslash for a special markup character * * @param c * @return the character with a backslash before */ private static String getSpecialCharacters( char c ) { return AptMarkup.BACKSLASH + "" + c; } /** {@inheritDoc} */ protected String getCommentBlock( String text ) { return "~~ Simple comment with ----"; } } ��������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/site/������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�022256� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/site/site.xml����������������������������������������0000644�0001750�0001750�00000001672�11103330660�023722� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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> <body> <menu ref="parent"/> <menu ref="reports"/> </body> </project>����������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�022236� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/components/�������������������������������������0000755�0001750�0001750�00000000000�11632765557�024423� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/components/components.xml�����������������������0000644�0001750�0001750�00000002476�11066147560�027330� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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. --> <component-set> <components> <component> <role>org.apache.maven.doxia.parser.Parser</role> <role-hint>apt</role-hint> <implementation>org.apache.maven.doxia.module.apt.AptParser</implementation> <description></description> <requirements> <requirement> <role>org.apache.maven.doxia.macro.manager.MacroManager</role> <field-name>macroManager</field-name> </requirement> </requirements> </component> </components> </component-set> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/�������������������������������������������0000755�0001750�0001750�00000000000�11632765557�023157� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/���������������������������������������0000755�0001750�0001750�00000000000�11632765557�023746� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/��������������������������������0000755�0001750�0001750�00000000000�11632765557�025167� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/��������������������������0000755�0001750�0001750�00000000000�11632765557�026275� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/��������������������0000755�0001750�0001750�00000000000�11632765557�027401� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/�������������0000755�0001750�0001750�00000000000�11632765557�030666� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/���������0000755�0001750�0001750�00000000000�11632765557�031452� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000156�00000000000�011567� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSiteModule.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSiteMo0000644�0001750�0001750�00000002546�11212745470�033233� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.site.AbstractSiteModule; /** * <p>AptSiteModule class.</p> * * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: AptSiteModule.java 782392 2009-06-07 14:14:16Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="apt" */ public class AptSiteModule extends AbstractSiteModule { /** * Default constructor. */ public AptSiteModule() { super( "apt", "apt", "apt" ); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000151�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptUtils.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptUtils.0000644�0001750�0001750�00000014177�11151220275�033205� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.DoxiaUtils; /** * A collection of utility methods for dealing with APT documents. * * @author ltheussl * @since 1.1 * @version $Id: AptUtils.java 747735 2009-02-25 10:43:09Z ltheussl $ */ public class AptUtils { /** * Replace all characters in a text. * * <pre> * AptTools.encodeFragment( null ) = null * AptTools.encodeFragment( "" ) = "" * AptTools.encodeFragment( "http://www.google.com" ) = "httpwwwgooglecom" * </pre> * * @param text the String to check, may be null. * @return the text with only letter and digit, null if null String input. * @deprecated This method was used for the original apt format, which * removed all non alphanumeric characters from anchors. * Use {@link #encodeAnchor(String)} instead. */ public static String encodeFragment( String text ) { if ( text == null ) { return null; } return linkToKey( text ); } /** * Checks if the given string corresponds to an external URI, * ie is not a link within the same document nor a link to another * document within the same site. This forwards to * {@link org.apache.maven.doxia.util.DoxiaUtils#isExternalLink(String)}. * * @param link The link to check. * @return True if DoxiaUtils.isExternalLink(link) returns true. * * @see org.apache.maven.doxia.util.DoxiaUtils#isExternalLink(String) * @see #isInternalLink(String) * @see #isLocalLink(String) */ public static boolean isExternalLink( String link ) { return DoxiaUtils.isExternalLink( link ); } /** * Checks if the given string corresponds to an internal link, * ie it is a link to an anchor within the same document. * * @param link The link to check. * @return True if link is neither an {@link #isExternalLink(String) external} * nor a {@link #isLocalLink(String) local} link. * * @see org.apache.maven.doxia.util.DoxiaUtils#isInternalLink(String) * @see #isExternalLink(String) * @see #isLocalLink(String) */ public static boolean isInternalLink( String link ) { return ( !isExternalLink( link ) && !isLocalLink( link ) ); } /** * Checks if the given string corresponds to a relative link to another document * within the same site. * * @param link The link to check. * @return True if the link starts with either "/", "./" or "../". * * @see org.apache.maven.doxia.util.DoxiaUtils#isLocalLink(String) * @see #isExternalLink(String) * @see #isInternalLink(String) */ public static boolean isLocalLink( String link ) { return ( link.startsWith( "/" ) || link.startsWith( "./" ) || link.startsWith( "../" ) ); } /** * Transforms the given text such that it can be used as a link. * All non-LetterOrDigit characters are removed and the remaining * characters are transformed to lower-case. * * @param text The text to transform. * @return The text with all non-LetterOrDigit characters removed. * @deprecated This method was used for the original apt format, which * removed all non alphanumeric characters from anchors. * Use {@link #encodeAnchor(String)} instead. */ public static String linkToKey( String text ) { int length = text.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = text.charAt( i ); if ( Character.isLetterOrDigit( c ) ) { buffer.append( Character.toLowerCase( c ) ); } } return buffer.toString(); } /** * Construct a valid anchor. This is a simplified version of * {@link org.apache.maven.doxia.util.DoxiaUtils#encodeId(String)} * to ensure the anchor is a valid Doxia id. * The procedure is identical to the one in * {@link org.apache.maven.doxia.util.HtmlTools#encodeId(String)}: * * <ol> * <li> Trim the id</li> * <li> If the first character is not a letter, prepend the letter 'a'</li> * <li> Any space is replaced with an underscore '_'</li> * <li> Remove any non alphanumeric characters except ':', '_', '.', '-'.</li> * </ol> * * @param id The id to be encoded. * @return The trimmed and encoded id, or null if id is null. */ public static String encodeAnchor( String id ) { if ( id == null ) { return null; } id = id.trim(); int length = id.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = id.charAt( i ); if ( ( i == 0 ) && ( !Character.isLetter( c ) ) ) { buffer.append( 'a' ); } if ( c == ' ' ) { buffer.append( '_' ); } else if ( ( Character.isLetterOrDigit( c ) ) || ( c == '-' ) || ( c == '_' ) || ( c == ':' ) || ( c == '.' ) ) { buffer.append( c ); } } return buffer.toString(); } private AptUtils() { // utility class } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000157�00000000000�011570� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSinkFactory.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSinkFa0000644�0001750�0001750�00000003057�11105660512�033176� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.AbstractTextSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * APT implementation of the Sink factory. * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: AptSinkFactory.java 712574 2008-11-09 22:16:42Z hboutemy $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="apt" */ public class AptSinkFactory extends AbstractTextSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { // encoding can safely be ignored since it isn't written into the generated APT source return new AptSink( writer ); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000162�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParseException.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParseE0000644�0001750�0001750�00000007526�10767707462�033232� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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; /** * Wraps an exception when parsing apt source documents. * * @version $Id: AptParseException.java 638290 2008-03-18 09:45:22Z bentmann $ * @since 1.0 */ public class AptParseException extends ParseException { /** serialVersionUID */ static final long serialVersionUID = 1694654412921168623L; /** * Construct a new AptParseException with the specified detail message. * * @param message The detailed message. * This can later be retrieved by the <code>Throwable.getMessage()</code> method. */ public AptParseException( String message ) { super( message ); } /** * Construct a new AptParseException with the specified detail message and cause. * * @param message The detailed message. * This can later be retrieved by the <code>Throwable.getMessage()</code> method. * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) */ public AptParseException( String message, Exception e ) { super( message, e ); } /** * Construct a new AptParseException with the specified cause, detail message, * filename, line number and column number. * * @param message The detailed message. * This can later be retrieved by the <code>Throwable.getMessage()</code> method. * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @param name Name of a file that couldn't be parsed. * This can later be retrieved by the getFileName() method. * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @param column The column number where the parsing failed. * This can later be retrieved by the getColumnNumber() method. */ public AptParseException( String message, Exception e, String name, int line, int column ) { super( e, message, name, line, column ); } /** * Construct a new AptParseException with the specified detail message and cause. * * @param message The detailed message. * This can later be retrieved by the <code>Throwable.getMessage()</code> method. * @param e the cause. This can be retrieved later by the <code>Throwable.getCause()</code> method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @param column The column number where the parsing failed. * This can later be retrieved by the getColumnNumber() method. */ public AptParseException( String message, Exception e, int line, int column ) { super( message, e, line, column ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000152�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSource.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSource0000644�0001750�0001750�00000003047�11150512716�033264� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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. */ /** * An interface to read apt source documents. * * @version $Id: AptSource.java 746982 2009-02-23 12:25:50Z vsiveton $ */ public interface AptSource { /** * Returns a line of the apt source document. * * @return a line of the apt source. * @throws org.apache.maven.doxia.module.apt.AptParseException if the document can't be parsed. */ String getNextLine() throws AptParseException; /** * Returns the name the apt source document. * * @return the name the apt source document. */ String getName(); /** * Gets the current line number while parsing the document. * * @return the line number. */ int getLineNumber(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000152�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser0000644�0001750�0001750�00000255663�11375443016�033302� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.macro.MacroExecutionException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.macro.manager.MacroNotFoundException; import org.apache.maven.doxia.parser.AbstractTextParser; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkAdapter; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.util.DoxiaUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; import java.util.TreeSet; /** * The APT parser. * <br/> * Based on the <a href="http://www.xmlmind.com/aptconvert.html">APTconvert</a> project. * * @version $Id: AptParser.java 946932 2010-05-21 08:36:30Z ltheussl $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="apt" */ public class AptParser extends AbstractTextParser implements AptMarkup { /** Title event id */ private static final int TITLE = 0; /** Section 1 event id */ private static final int SECTION1 = 1; /** Section 2 event id */ private static final int SECTION2 = 2; /** Section 3 event id */ private static final int SECTION3 = 3; /** Section 4 event id */ private static final int SECTION4 = 4; /** Section 5 event id */ private static final int SECTION5 = 5; /** Paragraph event id */ private static final int PARAGRAPH = 6; /** Verbatim event id */ private static final int VERBATIM = 7; /** Figure event id */ private static final int FIGURE = 8; /** Table event id */ private static final int TABLE = 9; /** List event id */ private static final int LIST_ITEM = 10; /** Numbered list event id */ private static final int NUMBERED_LIST_ITEM = 11; /** Definition list event id */ private static final int DEFINITION_LIST_ITEM = 12; /** Horizontal rule event id */ private static final int HORIZONTAL_RULE = 13; /** Page break event id */ private static final int PG_BREAK = 14; /** List break event id */ private static final int LIST_BREAK = 15; /** Macro event id */ private static final int MACRO = 16; /** Comment event id. */ private static final int COMMENT_BLOCK = 17; /** String representations of event ids */ private static final String TYPE_NAMES[] = { "TITLE", "SECTION1", "SECTION2", "SECTION3", "SECTION4", "SECTION5", "PARAGRAPH", "VERBATIM", "FIGURE", "TABLE", "LIST_ITEM", "NUMBERED_LIST_ITEM", "DEFINITION_LIST_ITEM", "HORIZONTAL_RULE", "PG_BREAK", "LIST_BREAK", "MACRO", "COMMENT_BLOCK" }; /** An array of 85 spaces. */ protected static final char[] SPACES; /** Default tab width. */ public static final int TAB_WIDTH = 8; // ---------------------------------------------------------------------- // Instance fields // ---------------------------------------------------------------------- /** the AptSource. */ private AptSource source; /** a block of AptSource. */ private Block block; /** blockFileName. */ private String blockFileName; /** blockLineNumber. */ private int blockLineNumber; /** sourceContent. */ protected String sourceContent; /** the sink to receive the events. */ protected Sink sink; /** a line of AptSource. */ protected String line; /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ protected Map warnMessages; private static final int NUMBER_OF_SPACES = 85; static { SPACES = new char[NUMBER_OF_SPACES]; for ( int i = 0; i < NUMBER_OF_SPACES; i++ ) { SPACES[i] = ' '; } } // ---------------------------------------------------------------------- // Public methods // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void parse( Reader source, Sink sink ) throws ParseException { init(); try { StringWriter contentWriter = new StringWriter(); IOUtil.copy( source, contentWriter ); sourceContent = contentWriter.toString(); } catch ( IOException e ) { throw new AptParseException( "IOException: " + e.getMessage(), e ); } try { this.source = new AptReaderSource( new StringReader( sourceContent ) ); this.sink = sink; sink.enableLogging( getLog() ); blockFileName = null; blockLineNumber = -1; // Lookahead line. nextLine(); // Lookahead block. nextBlock( /*first*/true ); // traverse comments while ( ( block != null ) && ( block.getType() == COMMENT_BLOCK ) ) { block.traverse(); nextBlock( /*first*/true ); } traverseHead(); traverseBody(); } catch ( AptParseException ape ) { // TODO handle column number throw new AptParseException( ape.getMessage(), ape, getSourceName(), getSourceLineNumber(), -1 ); } finally { logWarnings(); setSecondParsing( false ); init(); } } /** * Returns the name of the Apt source document. * * @return the source name. */ public String getSourceName() { // Use this rather than source.getName() to report errors. return blockFileName; } /** * Returns the current line number of the Apt source document. * * @return the line number. */ public int getSourceLineNumber() { // Use this rather than source.getLineNumber() to report errors. return blockLineNumber; } // ---------------------------------------------------------------------- // Protected methods // ---------------------------------------------------------------------- /** * Parse the next line of the Apt source document. * * @throws org.apache.maven.doxia.module.apt.AptParseException if something goes wrong. */ protected void nextLine() throws AptParseException { line = source.getNextLine(); } /** * Parse the given text. * * @param text the text to parse. * @param begin offset. * @param end offset. * @param sink the sink to receive the events. * @throws org.apache.maven.doxia.module.apt.AptParseException if something goes wrong. */ protected void doTraverseText( String text, int begin, int end, Sink sink ) throws AptParseException { boolean anchor = false; boolean link = false; boolean italic = false; boolean bold = false; boolean monospaced = false; StringBuffer buffer = new StringBuffer( end - begin ); for ( int i = begin; i < end; ++i ) { char c = text.charAt( i ); switch ( c ) { case BACKSLASH: if ( i + 1 < end ) { char escaped = text.charAt( i + 1 ); switch ( escaped ) { case SPACE: ++i; flushTraversed( buffer, sink ); sink.nonBreakingSpace(); break; case '\r': case '\n': ++i; // Skip white space which may follow a line break. while ( i + 1 < end && Character.isWhitespace( text.charAt( i + 1 ) ) ) { ++i; } flushTraversed( buffer, sink ); sink.lineBreak(); break; case BACKSLASH: case PIPE: case COMMENT: case EQUAL: case MINUS: case PLUS: case STAR: case LEFT_SQUARE_BRACKET: case RIGHT_SQUARE_BRACKET: case LESS_THAN: case GREATER_THAN: case LEFT_CURLY_BRACKET: case RIGHT_CURLY_BRACKET: ++i; buffer.append( escaped ); break; case 'x': if ( i + 3 < end && isHexChar( text.charAt( i + 2 ) ) && isHexChar( text.charAt( i + 3 ) ) ) { int value = '?'; try { value = Integer.parseInt( text.substring( i + 2, i + 4 ), 16 ); } catch ( NumberFormatException e ) { if ( getLog().isDebugEnabled() ) { getLog().debug( "Not a number: " + text.substring( i + 2, i + 4 ) ); } } i += 3; buffer.append( (char) value ); } else { buffer.append( BACKSLASH ); } break; case 'u': if ( i + 5 < end && isHexChar( text.charAt( i + 2 ) ) && isHexChar( text.charAt( i + 3 ) ) && isHexChar( text.charAt( i + 4 ) ) && isHexChar( text.charAt( i + 5 ) ) ) { int value = '?'; try { value = Integer.parseInt( text.substring( i + 2, i + 6 ), 16 ); } catch ( NumberFormatException e ) { if ( getLog().isDebugEnabled() ) { getLog().debug( "Not a number: " + text.substring( i + 2, i + 6 ) ); } } i += 5; buffer.append( (char) value ); } else { buffer.append( BACKSLASH ); } break; default: if ( isOctalChar( escaped ) ) { int octalChars = 1; if ( isOctalChar( charAt( text, end, i + 2 ) ) ) { ++octalChars; if ( isOctalChar( charAt( text, end, i + 3 ) ) ) { ++octalChars; } } int value = '?'; try { value = Integer.parseInt( text.substring( i + 1, i + 1 + octalChars ), 8 ); } catch ( NumberFormatException e ) { if ( getLog().isDebugEnabled() ) { getLog().debug( "Not a number: " + text.substring( i + 1, i + 1 + octalChars ) ); } } i += octalChars; buffer.append( (char) value ); } else { buffer.append( BACKSLASH ); } } } else { buffer.append( BACKSLASH ); } break; case LEFT_CURLY_BRACKET: /*}*/ if ( !anchor && !link ) { if ( i + 1 < end && text.charAt( i + 1 ) == LEFT_CURLY_BRACKET /*}*/ ) { ++i; link = true; flushTraversed( buffer, sink ); String linkAnchor = null; if ( i + 1 < end && text.charAt( i + 1 ) == LEFT_CURLY_BRACKET /*}*/ ) { ++i; StringBuffer buf = new StringBuffer(); i = skipTraversedLinkAnchor( text, i + 1, end, buf ); linkAnchor = buf.toString(); } if ( linkAnchor == null ) { linkAnchor = getTraversedLink( text, i + 1, end ); } if ( AptUtils.isInternalLink( linkAnchor ) ) { linkAnchor = "#" + linkAnchor; } int hashIndex = linkAnchor.indexOf( "#" ); if ( hashIndex != -1 && !AptUtils.isExternalLink( linkAnchor ) ) { String hash = linkAnchor.substring( hashIndex + 1 ); if ( hash.endsWith( ".html" ) && !hash.startsWith( "./" ) ) { String msg = "Ambiguous link: '" + hash + "'. If this is a local link, prepend \"./\"!"; logMessage( "ambiguousLink", msg ); } if ( !DoxiaUtils.isValidId( hash ) ) { linkAnchor = linkAnchor.substring( 0, hashIndex ) + "#" + DoxiaUtils.encodeId( hash, true ); String msg = "Modified invalid link: '" + hash + "' to '" + linkAnchor + "'"; logMessage( "modifiedLink", msg ); } } sink.link( linkAnchor ); } else { anchor = true; flushTraversed( buffer, sink ); String linkAnchor = getTraversedAnchor( text, i + 1, end ); linkAnchor = AptUtils.encodeAnchor( linkAnchor ); sink.anchor( linkAnchor ); } } else { buffer.append( c ); } break; case /*{*/RIGHT_CURLY_BRACKET: if ( link && i + 1 < end && text.charAt( i + 1 ) == /*{*/RIGHT_CURLY_BRACKET ) { ++i; link = false; flushTraversed( buffer, sink ); sink.link_(); } else if ( anchor ) { anchor = false; flushTraversed( buffer, sink ); sink.anchor_(); } else { buffer.append( c ); } break; case LESS_THAN: if ( !italic && !bold && !monospaced ) { if ( i + 1 < end && text.charAt( i + 1 ) == LESS_THAN ) { if ( i + 2 < end && text.charAt( i + 2 ) == LESS_THAN ) { i += 2; monospaced = true; flushTraversed( buffer, sink ); sink.monospaced(); } else { ++i; bold = true; flushTraversed( buffer, sink ); sink.bold(); } } else { italic = true; flushTraversed( buffer, sink ); sink.italic(); } } else { buffer.append( c ); } break; case GREATER_THAN: if ( monospaced && i + 2 < end && text.charAt( i + 1 ) == GREATER_THAN && text.charAt( i + 2 ) == GREATER_THAN ) { i += 2; monospaced = false; flushTraversed( buffer, sink ); sink.monospaced_(); } else if ( bold && i + 1 < end && text.charAt( i + 1 ) == GREATER_THAN ) { ++i; bold = false; flushTraversed( buffer, sink ); sink.bold_(); } else if ( italic ) { italic = false; flushTraversed( buffer, sink ); sink.italic_(); } else { buffer.append( c ); } break; default: if ( Character.isWhitespace( c ) ) { buffer.append( SPACE ); // Skip to the last char of a sequence of white spaces. while ( i + 1 < end && Character.isWhitespace( text.charAt( i + 1 ) ) ) { ++i; } } else { buffer.append( c ); } } } if ( monospaced ) { throw new AptParseException( "missing '" + MONOSPACED_END_MARKUP + "'" ); } if ( bold ) { throw new AptParseException( "missing '" + BOLD_END_MARKUP + "'" ); } if ( italic ) { throw new AptParseException( "missing '" + ITALIC_END_MARKUP + "'" ); } if ( link ) { throw new AptParseException( "missing '" + LINK_END_MARKUP + "'" ); } if ( anchor ) { throw new AptParseException( "missing '" + ANCHOR_END_MARKUP + "'" ); } flushTraversed( buffer, sink ); } // ----------------------------------------------------------------------- /** * Returns the character at position i of the given string. * * @param string the string. * @param length length. * @param i offset. * @return the character, or '\0' if i > length. */ protected static char charAt( String string, int length, int i ) { return ( i < length ) ? string.charAt( i ) : '\0'; } /** * Skip spaces. * * @param string string. * @param length length. * @param i offset. * @return int. */ protected static int skipSpace( String string, int length, int i ) { loop: for ( ; i < length; ++i ) { switch ( string.charAt( i ) ) { case SPACE: case TAB: break; default: break loop; } } return i; } /** * Replace part of a string. * * @param string the string * @param oldSub the substring to replace * @param newSub the replacement string * @return String */ protected static String replaceAll( String string, String oldSub, String newSub ) { StringBuffer replaced = new StringBuffer(); int oldSubLength = oldSub.length(); int begin, end; begin = 0; while ( ( end = string.indexOf( oldSub, begin ) ) >= 0 ) { if ( end > begin ) { replaced.append( string.substring( begin, end ) ); } replaced.append( newSub ); begin = end + oldSubLength; } if ( begin < string.length() ) { replaced.append( string.substring( begin ) ); } return replaced.toString(); } /** {@inheritDoc} */ protected void init() { super.init(); this.sourceContent = null; this.sink = null; this.source = null; this.block = null; this.blockFileName = null; this.blockLineNumber = 0; this.line = null; this.warnMessages = null; } // ---------------------------------------------------------------------- // Private methods // ---------------------------------------------------------------------- /** * Parse the head of the Apt source document. * * @throws AptParseException if something goes wrong. */ private void traverseHead() throws AptParseException { sink.head(); if ( block != null && block.getType() == TITLE ) { block.traverse(); nextBlock(); } sink.head_(); } /** * Parse the body of the Apt source document. * * @throws AptParseException if something goes wrong. */ private void traverseBody() throws AptParseException { sink.body(); if ( block != null ) { traverseSectionBlocks(); } while ( block != null ) { traverseSection( 0 ); } sink.body_(); } /** * Parse a section of the Apt source document. * * @param level The section level. * @throws AptParseException if something goes wrong. */ private void traverseSection( int level ) throws AptParseException { if ( block == null ) { return; } int type = SECTION1 + level; expectedBlock( type ); switch ( level ) { case 0: sink.section1(); break; case 1: sink.section2(); break; case 2: sink.section3(); break; case 3: sink.section4(); break; case 4: sink.section5(); break; default: break; } block.traverse(); nextBlock(); traverseSectionBlocks(); while ( block != null ) { if ( block.getType() <= type ) { break; } traverseSection( level + 1 ); } switch ( level ) { case 0: sink.section1_(); break; case 1: sink.section2_(); break; case 2: sink.section3_(); break; case 3: sink.section4_(); break; case 4: sink.section5_(); break; default: break; } } /** * Parse the section blocks of the Apt source document. * * @throws AptParseException if something goes wrong. */ private void traverseSectionBlocks() throws AptParseException { loop: while ( block != null ) { switch ( block.getType() ) { case PARAGRAPH: case VERBATIM: case FIGURE: case TABLE: case HORIZONTAL_RULE: case PG_BREAK: case MACRO: case COMMENT_BLOCK: block.traverse(); nextBlock(); break; case LIST_ITEM: traverseList(); break; case NUMBERED_LIST_ITEM: traverseNumberedList(); break; case DEFINITION_LIST_ITEM: traverseDefinitionList(); break; case LIST_BREAK: // May be this is a list break which has not been indented // very precisely. nextBlock(); break; default: // A section block which starts a new section. break loop; } } } /** * Parse a list of the Apt source document. * * @throws AptParseException if something goes wrong. */ private void traverseList() throws AptParseException { if ( block == null ) { return; } expectedBlock( LIST_ITEM ); int listIndent = block.getIndent(); sink.list(); sink.listItem(); block.traverse(); nextBlock(); loop: while ( block != null ) { int blockIndent = block.getIndent(); switch ( block.getType() ) { case PARAGRAPH: if ( blockIndent < listIndent ) { break loop; } /*FALLTHROUGH*/ case VERBATIM: case MACRO: case FIGURE: case TABLE: case HORIZONTAL_RULE: case PG_BREAK: block.traverse(); nextBlock(); break; case LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } if ( blockIndent > listIndent ) { traverseList(); } else { sink.listItem_(); sink.listItem(); block.traverse(); nextBlock(); } break; case NUMBERED_LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } traverseNumberedList(); break; case DEFINITION_LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } traverseDefinitionList(); break; case LIST_BREAK: if ( blockIndent >= listIndent ) { nextBlock(); } /*FALLTHROUGH*/ default: // A block which ends the list. break loop; } } sink.listItem_(); sink.list_(); } /** * Parse a numbered list of the Apt source document. * * @throws AptParseException if something goes wrong. */ private void traverseNumberedList() throws AptParseException { if ( block == null ) { return; } expectedBlock( NUMBERED_LIST_ITEM ); int listIndent = block.getIndent(); sink.numberedList( ( (NumberedListItem) block ).getNumbering() ); sink.numberedListItem(); block.traverse(); nextBlock(); loop: while ( block != null ) { int blockIndent = block.getIndent(); switch ( block.getType() ) { case PARAGRAPH: if ( blockIndent < listIndent ) { break loop; } /*FALLTHROUGH*/ case VERBATIM: case FIGURE: case TABLE: case HORIZONTAL_RULE: case PG_BREAK: block.traverse(); nextBlock(); break; case LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } traverseList(); break; case NUMBERED_LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } if ( blockIndent > listIndent ) { traverseNumberedList(); } else { sink.numberedListItem_(); sink.numberedListItem(); block.traverse(); nextBlock(); } break; case DEFINITION_LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } traverseDefinitionList(); break; case LIST_BREAK: if ( blockIndent >= listIndent ) { nextBlock(); } /*FALLTHROUGH*/ default: // A block which ends the list. break loop; } } sink.numberedListItem_(); sink.numberedList_(); } /** * Parse a definition list of the Apt source document. * * @throws AptParseException if something goes wrong. */ private void traverseDefinitionList() throws AptParseException { if ( block == null ) { return; } expectedBlock( DEFINITION_LIST_ITEM ); int listIndent = block.getIndent(); sink.definitionList(); sink.definitionListItem(); block.traverse(); nextBlock(); loop: while ( block != null ) { int blockIndent = block.getIndent(); switch ( block.getType() ) { case PARAGRAPH: if ( blockIndent < listIndent ) { break loop; } /*FALLTHROUGH*/ case VERBATIM: case FIGURE: case TABLE: case HORIZONTAL_RULE: case PG_BREAK: block.traverse(); nextBlock(); break; case LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } traverseList(); break; case NUMBERED_LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } traverseNumberedList(); break; case DEFINITION_LIST_ITEM: if ( blockIndent < listIndent ) { break loop; } if ( blockIndent > listIndent ) { traverseDefinitionList(); } else { sink.definition_(); sink.definitionListItem_(); sink.definitionListItem(); block.traverse(); nextBlock(); } break; case LIST_BREAK: if ( blockIndent >= listIndent ) { nextBlock(); } /*FALLTHROUGH*/ default: // A block which ends the list. break loop; } } sink.definition_(); sink.definitionListItem_(); sink.definitionList_(); } /** * Parse the next block of the Apt source document. * * @throws AptParseException if something goes wrong. */ private void nextBlock() throws AptParseException { nextBlock( /*first*/false ); } /** * Parse the next block of the Apt source document. * * @param firstBlock True if this is the first block of the Apt source document. * @throws AptParseException if something goes wrong. */ private void nextBlock( boolean firstBlock ) throws AptParseException { // Skip open lines. int length, indent, i; skipLoop: for ( ;; ) { if ( line == null ) { block = null; return; } length = line.length(); indent = 0; lineLoop: for ( i = 0; i < length; ++i ) { switch ( line.charAt( i ) ) { case SPACE: ++indent; break; case TAB: indent += 8; break; default: break skipLoop; } } if ( i == length ) { nextLine(); } } blockFileName = source.getName(); blockLineNumber = source.getLineNumber(); block = null; switch ( line.charAt( i ) ) { case STAR: if ( indent == 0 ) { if ( charAt( line, length, i + 1 ) == MINUS && charAt( line, length, i + 2 ) == MINUS ) { block = new Table( indent, line ); } else if ( charAt( line, length, i + 1 ) == STAR ) { if ( charAt( line, length, i + 2 ) == STAR ) { if ( charAt( line, length, i + 3 ) == STAR ) { block = new Section5( indent, line ); } else { block = new Section4( indent, line ); } } else { block = new Section3( indent, line ); } } else { block = new Section2( indent, line ); } } else { block = new ListItem( indent, line ); } break; case LEFT_SQUARE_BRACKET: if ( charAt( line, length, i + 1 ) == RIGHT_SQUARE_BRACKET ) { block = new ListBreak( indent, line ); } else { if ( indent == 0 ) { block = new Figure( indent, line ); } else { if ( charAt( line, length, i + 1 ) == LEFT_SQUARE_BRACKET ) { int numbering; switch ( charAt( line, length, i + 2 ) ) { case NUMBERING_LOWER_ALPHA_CHAR: numbering = Sink.NUMBERING_LOWER_ALPHA; break; case NUMBERING_UPPER_ALPHA_CHAR: numbering = Sink.NUMBERING_UPPER_ALPHA; break; case NUMBERING_LOWER_ROMAN_CHAR: numbering = Sink.NUMBERING_LOWER_ROMAN; break; case NUMBERING_UPPER_ROMAN_CHAR: numbering = Sink.NUMBERING_UPPER_ROMAN; break; case NUMBERING: default: // The first item establishes the numbering // scheme for the whole list. numbering = Sink.NUMBERING_DECIMAL; } block = new NumberedListItem( indent, line, numbering ); } else { block = new DefinitionListItem( indent, line ); } } } break; case MINUS: if ( charAt( line, length, i + 1 ) == MINUS && charAt( line, length, i + 2 ) == MINUS ) { if ( indent == 0 ) { block = new Verbatim( indent, line ); } else { if ( firstBlock ) { block = new Title( indent, line ); } } } break; case PLUS: if ( indent == 0 && charAt( line, length, i + 1 ) == MINUS && charAt( line, length, i + 2 ) == MINUS ) { block = new Verbatim( indent, line ); } break; case EQUAL: if ( indent == 0 && charAt( line, length, i + 1 ) == EQUAL && charAt( line, length, i + 2 ) == EQUAL ) { block = new HorizontalRule( indent, line ); } break; case PAGE_BREAK: if ( indent == 0 ) { block = new PageBreak( indent, line ); } break; case PERCENT: if ( indent == 0 && charAt( line, length, i + 1 ) == LEFT_CURLY_BRACKET ) { block = new MacroBlock( indent, line ); } break; case COMMENT: if ( charAt( line, length, i + 1 ) == COMMENT ) { block = new Comment( line.substring( i + 2 ).trim() ); } break; default: break; } if ( block == null ) { if ( indent == 0 ) { block = new Section1( indent, line ); } else { block = new Paragraph( indent, line ); } } } /** * Checks that the current block is of the expected type. * * @param type the expected type. * @throws AptParseException if something goes wrong. */ private void expectedBlock( int type ) throws AptParseException { int blockType = block.getType(); if ( blockType != type ) { throw new AptParseException( "expected " + TYPE_NAMES[type] + ", found " + TYPE_NAMES[blockType] ); } } // ----------------------------------------------------------------------- /** * Determine if c is an octal character. * * @param c the character. * @return boolean */ private static boolean isOctalChar( char c ) { return ( c >= '0' && c <= '7' ); } /** * Determine if c is an hex character. * * @param c the character. * @return boolean */ private static boolean isHexChar( char c ) { return ( ( c >= '0' && c <= '9' ) || ( c >= 'a' && c <= 'f' ) || ( c >= 'A' && c <= 'F' ) ); } /** * Emits the text so far parsed into the given sink. * * @param buffer A StringBuffer that contains the text to be flushed. * @param sink The sink to receive the text. */ private static void flushTraversed( StringBuffer buffer, Sink sink ) { if ( buffer.length() > 0 ) { sink.text( buffer.toString() ); buffer.setLength( 0 ); } } /** * Parse the given text. * * @param text the text to parse. * @param begin offset. * @param end offset. * @param linkAnchor a StringBuffer. * @return int * @throws AptParseException if something goes wrong. */ private static int skipTraversedLinkAnchor( String text, int begin, int end, StringBuffer linkAnchor ) throws AptParseException { int i; loop: for ( i = begin; i < end; ++i ) { char c = text.charAt( i ); switch ( c ) { case RIGHT_CURLY_BRACKET: break loop; case BACKSLASH: if ( i + 1 < end ) { ++i; linkAnchor.append( text.charAt( i ) ); } else { linkAnchor.append( BACKSLASH ); } break; default: linkAnchor.append( c ); } } if ( i == end ) { throw new AptParseException( "missing '" + RIGHT_CURLY_BRACKET + "'" ); } return i; } /** * Parse the given text. * * @param text the text to parse. * @param begin offset. * @param end offset. * @return String * @throws AptParseException if something goes wrong. */ private String getTraversedLink( String text, int begin, int end ) throws AptParseException { char previous2 = LEFT_CURLY_BRACKET; char previous = LEFT_CURLY_BRACKET; int i; for ( i = begin; i < end; ++i ) { char c = text.charAt( i ); if ( c == RIGHT_CURLY_BRACKET && previous == RIGHT_CURLY_BRACKET && previous2 != BACKSLASH ) { break; } previous2 = previous; previous = c; } if ( i == end ) { throw new AptParseException( "missing '" + LEFT_CURLY_BRACKET + LEFT_CURLY_BRACKET + "'" ); } return doGetTraversedLink( text, begin, i - 1 ); } /** * Parse the given text. * * @param text the text to parse. * @param begin offset. * @param end offset. * @return String * @throws AptParseException if something goes wrong. */ private String getTraversedAnchor( String text, int begin, int end ) throws AptParseException { char previous = LEFT_CURLY_BRACKET; int i; for ( i = begin; i < end; ++i ) { char c = text.charAt( i ); if ( c == RIGHT_CURLY_BRACKET && previous != BACKSLASH ) { break; } previous = c; } if ( i == end ) { throw new AptParseException( "missing '" + RIGHT_CURLY_BRACKET + "'" ); } return doGetTraversedLink( text, begin, i ); } /** * Parse the given text. * * @param text the text to parse. * @param begin offset. * @param end offset. * @return String * @throws AptParseException if something goes wrong. */ private String doGetTraversedLink( String text, int begin, int end ) throws AptParseException { final StringBuffer buffer = new StringBuffer( end - begin ); Sink linkSink = new SinkAdapter() { /** {@inheritDoc} */ public void lineBreak() { buffer.append( SPACE ); } /** {@inheritDoc} */ public void nonBreakingSpace() { buffer.append( SPACE ); } /** {@inheritDoc} */ public void text( String text ) { buffer.append( text ); } }; doTraverseText( text, begin, end, linkSink ); return buffer.toString().trim(); } /** * If debug mode is enabled, log the <code>msg</code> as is, otherwise add unique msg in <code>warnMessages</code>. * * @param key not null * @param msg not null * @see #parse(Reader, Sink) * @since 1.1.1 */ private void logMessage( String key, String msg ) { msg = "[APT Parser] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } /** * @since 1.1.2 */ private void logWarnings() { if ( getLog().isWarnEnabled() && this.warnMessages != null && !isSecondParsing() ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } this.warnMessages = null; } } // ----------------------------------------------------------------------- /** A block of an apt source document. */ private abstract class Block { /** type. */ protected int type; /** indent. */ protected int indent; /** text. */ protected String text; /** textLength. */ protected int textLength; /** * Constructor. * * @param type the block type. * @param indent indent. * @throws AptParseException AptParseException */ public Block( int type, int indent ) throws AptParseException { this( type, indent, null ); } /** * Constructor. * * @param type type. * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Block( int type, int indent, String firstLine ) throws AptParseException { this.type = type; this.indent = indent; // Skip first line --- AptParser.this.nextLine(); if ( firstLine == null ) { text = null; textLength = 0; } else { // Read block --- StringBuffer buffer = new StringBuffer( firstLine ); while ( AptParser.this.line != null ) { String l = AptParser.this.line; int length = l.length(); int i = 0; i = skipSpace( l, length, i ); if ( i == length ) { // Stop after open line and skip it. AptParser.this.nextLine(); break; } else if ( ( AptParser.charAt( l, length, i ) == COMMENT && AptParser.charAt( l, length, i + 1 ) == COMMENT ) || type == COMMENT_BLOCK ) { // parse comments as separate blocks line by line break; } buffer.append( EOL ); buffer.append( l ); AptParser.this.nextLine(); } text = buffer.toString(); textLength = text.length(); } } /** * Return the block type. * * @return int */ public final int getType() { return type; } /** * Return the block indent. * * @return int */ public final int getIndent() { return indent; } /** * Parse the block. * * @throws AptParseException if something goes wrong. */ public abstract void traverse() throws AptParseException; /** * Traverse the text. * * @param begin offset. * @throws AptParseException if something goes wrong. */ protected void traverseText( int begin ) throws AptParseException { traverseText( begin, text.length() ); } /** * Traverse the text. * * @param begin offset. * @param end offset. * @throws AptParseException if something goes wrong. */ protected void traverseText( int begin, int end ) throws AptParseException { AptParser.this.doTraverseText( text, begin, end, AptParser.this.sink ); } /** * Skip spaces. * * @return int. */ protected int skipLeadingBullets() { int i = skipSpaceFrom( 0 ); for ( ; i < textLength; ++i ) { if ( text.charAt( i ) != STAR ) { break; } } return skipSpaceFrom( i ); } /** * Skip brackets. * * @param i offset. * @return int. * @throws AptParseException if something goes wrong. */ protected int skipFromLeftToRightBracket( int i ) throws AptParseException { char previous = LEFT_SQUARE_BRACKET; for ( ++i; i < textLength; ++i ) { char c = text.charAt( i ); if ( c == RIGHT_SQUARE_BRACKET && previous != BACKSLASH ) { break; } previous = c; } if ( i == textLength ) { throw new AptParseException( "missing '" + RIGHT_SQUARE_BRACKET + "'" ); } return i; } /** * Skip spaces. * * @param i offset. * @return int. */ protected final int skipSpaceFrom( int i ) { return AptParser.skipSpace( text, textLength, i ); } } /** A ListBreak Block. */ private class ListBreak extends AptParser.Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public ListBreak( int indent, String firstLine ) throws AptParseException { super( AptParser.LIST_BREAK, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { throw new AptParseException( "internal error: traversing list break" ); } } /** A Title Block. */ private class Title extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Title( int indent, String firstLine ) throws AptParseException { super( TITLE, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { StringTokenizer lines = new StringTokenizer( text, EOL ); int separator = -1; boolean firstLine = true; boolean title = false; boolean author = false; boolean date = false; loop: while ( lines.hasMoreTokens() ) { String line = lines.nextToken().trim(); int lineLength = line.length(); if ( AptParser.charAt( line, lineLength, 0 ) == MINUS && AptParser.charAt( line, lineLength, 1 ) == MINUS && AptParser.charAt( line, lineLength, 2 ) == MINUS ) { switch ( separator ) { case 0: if ( title ) { AptParser.this.sink.title_(); } else { throw new AptParseException( "missing title" ); } break; case 1: if ( author ) { AptParser.this.sink.author_(); } break; case 2: // Note that an extra decorative line is allowed // at the end of the author. break loop; default: break; } ++separator; firstLine = true; } else { if ( firstLine ) { firstLine = false; switch ( separator ) { case 0: title = true; AptParser.this.sink.title(); break; case 1: author = true; AptParser.this.sink.author(); break; case 2: date = true; AptParser.this.sink.date(); break; default: break; } } else { // An implicit lineBreak separates title lines. AptParser.this.sink.lineBreak(); } AptParser.this.doTraverseText( line, 0, lineLength, AptParser.this.sink ); } } switch ( separator ) { case 0: if ( title ) { AptParser.this.sink.title_(); } else { throw new AptParseException( "missing title" ); } break; case 1: if ( author ) { AptParser.this.sink.author_(); } break; case 2: if ( date ) { AptParser.this.sink.date_(); } break; default: break; } } } /** A Section Block. */ private abstract class Section extends Block { /** * Constructor. * * @param type type. * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Section( int type, int indent, String firstLine ) throws AptParseException { super( type, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { Title(); traverseText( skipLeadingBullets() ); Title_(); } /** Start a title. */ public abstract void Title(); /** End a title. */ public abstract void Title_(); } /** A Section1 Block. */ private class Section1 extends Section { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Section1( int indent, String firstLine ) throws AptParseException { super( SECTION1, indent, firstLine ); } /** {@inheritDoc} */ public void Title() { AptParser.this.sink.sectionTitle1(); } /** {@inheritDoc} */ public void Title_() { AptParser.this.sink.sectionTitle1_(); } } /** A Section2 Block. */ private class Section2 extends Section { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Section2( int indent, String firstLine ) throws AptParseException { super( SECTION2, indent, firstLine ); } /** {@inheritDoc} */ public void Title() { AptParser.this.sink.sectionTitle2(); } /** {@inheritDoc} */ public void Title_() { AptParser.this.sink.sectionTitle2_(); } } /** A Section3 Block. */ private class Section3 extends Section { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Section3( int indent, String firstLine ) throws AptParseException { super( SECTION3, indent, firstLine ); } /** {@inheritDoc} */ public void Title() { AptParser.this.sink.sectionTitle3(); } /** {@inheritDoc} */ public void Title_() { AptParser.this.sink.sectionTitle3_(); } } /** A Section4 Block. */ private class Section4 extends Section { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Section4( int indent, String firstLine ) throws AptParseException { super( SECTION4, indent, firstLine ); } /** {@inheritDoc} */ public void Title() { AptParser.this.sink.sectionTitle4(); } /** {@inheritDoc} */ public void Title_() { AptParser.this.sink.sectionTitle4_(); } } /** A Section5 Block. */ private class Section5 extends Section { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Section5( int indent, String firstLine ) throws AptParseException { super( SECTION5, indent, firstLine ); } /** {@inheritDoc} */ public void Title() { AptParser.this.sink.sectionTitle5(); } /** {@inheritDoc} */ public void Title_() { AptParser.this.sink.sectionTitle5_(); } } /** A Paragraph Block. */ private class Paragraph extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Paragraph( int indent, String firstLine ) throws AptParseException { super( PARAGRAPH, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { AptParser.this.sink.paragraph(); traverseText( skipSpaceFrom( 0 ) ); AptParser.this.sink.paragraph_(); } } /** A Comment Block. */ private class Comment extends Block { /** * Constructor. * * @param line the comment line. * @throws AptParseException AptParseException */ public Comment( String line ) throws AptParseException { super( COMMENT_BLOCK, 0, line ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { AptParser.this.sink.comment( text ); } } /** A Verbatim Block. */ private class Verbatim extends Block { /** boxed. */ private boolean boxed; /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Verbatim( int indent, String firstLine ) throws AptParseException { super( VERBATIM, indent, null ); // Read block (first line already skipped) --- StringBuffer buffer = new StringBuffer(); char firstChar = firstLine.charAt( 0 ); boxed = ( firstChar == PLUS ); while ( AptParser.this.line != null ) { String l = AptParser.this.line; int length = l.length(); if ( AptParser.charAt( l, length, 0 ) == firstChar && AptParser.charAt( l, length, 1 ) == MINUS && AptParser.charAt( l, length, 2 ) == MINUS ) { AptParser.this.nextLine(); break; } // Expand tabs --- int prevColumn, column; column = 0; for ( int i = 0; i < length; ++i ) { char c = l.charAt( i ); if ( c == TAB ) { prevColumn = column; column = ( ( column + 1 + TAB_WIDTH - 1 ) / TAB_WIDTH ) * TAB_WIDTH; buffer.append( SPACES, 0, column - prevColumn ); } else { ++column; buffer.append( c ); } } buffer.append( EOL ); AptParser.this.nextLine(); } // The last '\n' is mandatory before the "---" delimeter but is // not part of the verbatim text. textLength = buffer.length(); if ( textLength > 0 ) { --textLength; buffer.setLength( textLength ); } text = buffer.toString(); } /** {@inheritDoc} */ public void traverse() throws AptParseException { AptParser.this.sink.verbatim( boxed ? SinkEventAttributeSet.BOXED : null ); AptParser.this.sink.text( text ); AptParser.this.sink.verbatim_(); } } /** A Figure Block. */ private class Figure extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Figure( int indent, String firstLine ) throws AptParseException { super( FIGURE, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { AptParser.this.sink.figure(); int i = skipFromLeftToRightBracket( 0 ); AptParser.this.sink.figureGraphics( text.substring( 1, i ) ); i = skipSpaceFrom( i + 1 ); if ( i < textLength ) { AptParser.this.sink.figureCaption(); traverseText( i ); AptParser.this.sink.figureCaption_(); } AptParser.this.sink.figure_(); } } /** A Table Block. */ private class Table extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public Table( int indent, String firstLine ) throws AptParseException { super( TABLE, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { int captionIndex = -1; int nextLineIndex = 0; int init = 2; int[] justification = null; int rows = 0; int columns = 0; StringBuffer[] cells = null; boolean[] headers = null; boolean grid; AptParser.this.sink.table(); while ( nextLineIndex < textLength ) { int i = text.indexOf( "*--", nextLineIndex ); if ( i < 0 ) { captionIndex = nextLineIndex; break; } String line; i = text.indexOf( '\n', nextLineIndex ); if ( i < 0 ) { line = text.substring( nextLineIndex ); nextLineIndex = textLength; } else { line = text.substring( nextLineIndex, i ); nextLineIndex = i + 1; } int lineLength = line.length(); if ( line.indexOf( "*--" ) == 0 ) { if ( init == 2 ) { init = 1; justification = parseJustification( line, lineLength ); columns = justification.length; cells = new StringBuffer[columns]; headers = new boolean[columns]; for ( i = 0; i < columns; ++i ) { cells[i] = new StringBuffer(); headers[i] = false; } } else { if ( traverseRow( cells, headers, justification ) ) { ++rows; } justification = parseJustification( line, lineLength ); } } else { if ( init == 1 ) { init = 0; grid = ( AptParser.charAt( line, lineLength, 0 ) == PIPE ); AptParser.this.sink.tableRows( justification, grid ); } line = replaceAll( line, "\\|", "\\u007C" ); StringTokenizer cellLines = new StringTokenizer( line, "|", true ); i = 0; boolean processedGrid = false; while ( cellLines.hasMoreTokens() ) { String cellLine = cellLines.nextToken(); if ( "|".equals( cellLine ) ) { if ( processedGrid ) { headers[i] = true; } else { processedGrid = true; headers[i] = false; } continue; } processedGrid = false; cellLine = replaceAll( cellLine, "\\", "\\u00A0" ); // linebreak // Escaped special characters: \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\. cellLine = replaceAll( cellLine, "\\u00A0~", "\\~" ); cellLine = replaceAll( cellLine, "\\u00A0=", "\\=" ); cellLine = replaceAll( cellLine, "\\u00A0-", "\\-" ); cellLine = replaceAll( cellLine, "\\u00A0+", "\\+" ); cellLine = replaceAll( cellLine, "\\u00A0*", "\\*" ); cellLine = replaceAll( cellLine, "\\u00A0[", "\\[" ); cellLine = replaceAll( cellLine, "\\u00A0]", "\\]" ); cellLine = replaceAll( cellLine, "\\u00A0<", "\\<" ); cellLine = replaceAll( cellLine, "\\u00A0>", "\\>" ); cellLine = replaceAll( cellLine, "\\u00A0{", "\\{" ); cellLine = replaceAll( cellLine, "\\u00A0}", "\\}" ); cellLine = replaceAll( cellLine, "\\u00A0\\u00A0", "\\\\" ); cellLine = cellLine.trim(); StringBuffer cell = cells[i]; if ( cellLine.length() > 0 ) { // line break in table cells if ( cell.toString().trim().endsWith( "\\u00A0" ) ) { cell.append( "\\\n" ); } else { if ( cell.length() != 0 ) { // Always add a space for multi line tables cells cell.append( " " ); } } cell.append( cellLine ); } ++i; if ( i == columns ) { break; } } } } if ( rows == 0 ) { throw new AptParseException( "no table rows" ); } AptParser.this.sink.tableRows_(); if ( captionIndex >= 0 ) { AptParser.this.sink.tableCaption(); AptParser.this.doTraverseText( text, captionIndex, textLength, AptParser.this.sink ); AptParser.this.sink.tableCaption_(); } AptParser.this.sink.table_(); } /** * Parse a table justification line. * * @param jline the justification line. * @param lineLength the length of the line. Must be > 2. * @return int[] * @throws AptParseException if something goes wrong. */ private int[] parseJustification( String jline, int lineLength ) throws AptParseException { int columns = 0; for ( int i = 2 /*Skip '*--'*/; i < lineLength; ++i ) { switch ( jline.charAt( i ) ) { case STAR: case PLUS: case COLON: ++columns; break; default: break; } } if ( columns == 0 ) { throw new AptParseException( "no columns specified" ); } int[] justification = new int[columns]; columns = 0; for ( int i = 2; i < lineLength; ++i ) { switch ( jline.charAt( i ) ) { case STAR: justification[columns++] = Sink.JUSTIFY_CENTER; break; case PLUS: justification[columns++] = Sink.JUSTIFY_LEFT; break; case COLON: justification[columns++] = Sink.JUSTIFY_RIGHT; break; default: break; } } return justification; } /** * Traverse a table row. * * @param cells The table cells. * @param headers true for header cells. * @param justification the justification for each cell. * @return boolean * @throws AptParseException if something goes wrong. */ private boolean traverseRow( StringBuffer[] cells, boolean[] headers, int[] justification ) throws AptParseException { // Skip empty row (a decorative line). boolean traversed = false; for ( int i = 0; i < cells.length; ++i ) { if ( cells[i].length() > 0 ) { traversed = true; break; } } if ( traversed ) { AptParser.this.sink.tableRow(); for ( int i = 0; i < cells.length; ++i ) { StringBuffer cell = cells[i]; SinkEventAttributes justif; switch ( justification[i] ) { case Sink.JUSTIFY_CENTER: justif = SinkEventAttributeSet.CENTER; break; case Sink.JUSTIFY_LEFT: justif = SinkEventAttributeSet.LEFT; break; case Sink.JUSTIFY_RIGHT: justif = SinkEventAttributeSet.RIGHT; break; default: justif = SinkEventAttributeSet.LEFT; break; } SinkEventAttributeSet event = new SinkEventAttributeSet(); event.addAttributes( justif ); if ( headers[i] ) { AptParser.this.sink.tableHeaderCell( event ); } else { AptParser.this.sink.tableCell( event ); } if ( cell.length() > 0 ) { AptParser.this.doTraverseText( cell.toString(), 0, cell.length(), AptParser.this.sink ); cell.setLength( 0 ); } if ( headers[i] ) { AptParser.this.sink.tableHeaderCell_(); } else { AptParser.this.sink.tableCell_(); } } AptParser.this.sink.tableRow_(); } return traversed; } } /** A ListItem Block. */ private class ListItem extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public ListItem( int indent, String firstLine ) throws AptParseException { super( LIST_ITEM, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { traverseText( skipLeadingBullets() ); } } /** A NumberedListItem Block. */ private class NumberedListItem extends Block { /** numbering. */ private int numbering; /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @param number numbering. * @throws AptParseException AptParseException */ public NumberedListItem( int indent, String firstLine, int number ) throws AptParseException { super( NUMBERED_LIST_ITEM, indent, firstLine ); this.numbering = number; } /** * getNumbering. * * @return int */ public int getNumbering() { return numbering; } /** {@inheritDoc} */ public void traverse() throws AptParseException { traverseText( skipItemNumber() ); } /** * skipItemNumber. * * @return int * @throws AptParseException AptParseException */ private int skipItemNumber() throws AptParseException { int i = skipSpaceFrom( 0 ); char prevChar = SPACE; for ( ; i < textLength; ++i ) { char c = text.charAt( i ); if ( c == RIGHT_SQUARE_BRACKET && prevChar == RIGHT_SQUARE_BRACKET ) { break; } prevChar = c; } if ( i == textLength ) { throw new AptParseException( "missing '" + RIGHT_SQUARE_BRACKET + RIGHT_SQUARE_BRACKET + "'" ); } return skipSpaceFrom( i + 1 ); } } /** A DefinitionListItem Block. */ private class DefinitionListItem extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public DefinitionListItem( int indent, String firstLine ) throws AptParseException { super( DEFINITION_LIST_ITEM, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { int i = skipSpaceFrom( 0 ); int j = skipFromLeftToRightBracket( i ); AptParser.this.sink.definedTerm(); traverseText( i + 1, j ); AptParser.this.sink.definedTerm_(); j = skipSpaceFrom( j + 1 ); if ( j == textLength ) { // TODO: this doesn't handle the case of a dd in a paragraph //throw new AptParseException( "no definition" ); } AptParser.this.sink.definition(); traverseText( j ); } } /** A HorizontalRule Block. */ private class HorizontalRule extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public HorizontalRule( int indent, String firstLine ) throws AptParseException { super( HORIZONTAL_RULE, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { AptParser.this.sink.horizontalRule(); } } /** A PageBreak Block. */ private class PageBreak extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public PageBreak( int indent, String firstLine ) throws AptParseException { super( PG_BREAK, indent, firstLine ); } /** {@inheritDoc} */ public void traverse() throws AptParseException { AptParser.this.sink.pageBreak(); } } /** A MacroBlock Block. */ private class MacroBlock extends Block { /** * Constructor. * * @param indent indent. * @param firstLine the first line. * @throws AptParseException AptParseException */ public MacroBlock( int indent, String firstLine ) throws AptParseException { super( MACRO, indent ); text = firstLine; } /** {@inheritDoc} */ public void traverse() throws AptParseException { if ( isSecondParsing() ) { return; } String s = text; s = s.substring( 2, s.length() - 1 ); s = escapeForMacro( s ); String[] params = StringUtils.split( s, "|" ); String macroId = params[0]; Map parameters = new HashMap(); for ( int i = 1; i < params.length; i++ ) { String[] param = StringUtils.split( params[i], "=" ); if ( param.length == 1 ) { throw new AptParseException( "Missing 'key=value' pair for macro parameter: " + params[i] ); } String key = unescapeForMacro( param[0] ); String value = unescapeForMacro( param[1] ); parameters.put( key, value ); } parameters.put( "sourceContent", sourceContent ); AptParser aptParser = new AptParser(); aptParser.setSecondParsing( true ); aptParser.enableLogging( getLog() ); parameters.put( "parser", aptParser ); // getBasedir() does not work in multi-module builds, see DOXIA-373 // the basedir should be injected from here, see DOXIA-224 MacroRequest request = new MacroRequest( parameters, getBasedir() ); try { AptParser.this.executeMacro( macroId, request, sink ); } catch ( MacroExecutionException e ) { throw new AptParseException( "Unable to execute macro in the APT document", e ); } catch ( MacroNotFoundException e ) { throw new AptParseException( "Unable to find macro used in the APT document", e ); } } /** * escapeForMacro * * @param s String * @return String */ private String escapeForMacro( String s ) { if ( s == null || s.length() < 1 ) { return s; } String result = s; // use some outrageously out-of-place chars for text // (these are device control one/two in unicode) result = StringUtils.replace( result, "\\=", "\u0011" ); result = StringUtils.replace( result, "\\|", "\u0012" ); return result; } /** * unescapeForMacro * * @param s String * @return String */ private String unescapeForMacro( String s ) { if ( s == null || s.length() < 1 ) { return s; } String result = s; result = StringUtils.replace( result, "\u0011", "=" ); result = StringUtils.replace( result, "\u0012", "|" ); return result; } } } �����������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000160�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReader0000644�0001750�0001750�00000004754�11150512716�033234� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.io.LineNumberReader; import java.io.Reader; import org.codehaus.plexus.util.IOUtil; /** * Reader for apt source documents. * * @version $Id: AptReaderSource.java 746982 2009-02-23 12:25:50Z vsiveton $ */ public class AptReaderSource implements AptSource { /** A reader. */ private LineNumberReader reader; /** lineNumber. */ private int lineNumber; /** * Constructor: intialize reader. * * @param in the reader. */ public AptReaderSource( Reader in ) { reader = new LineNumberReader( in ); lineNumber = -1; } /** {@inheritDoc} */ public String getNextLine() throws AptParseException { if ( reader == null ) { return null; } String line; try { line = reader.readLine(); if ( line == null ) { reader.close(); reader = null; } else { lineNumber = reader.getLineNumber(); } } catch ( IOException e ) { // TODO handle column number throw new AptParseException( "IOException: " + e.getMessage(), e, lineNumber, -1 ); } return line; } /** {@inheritDoc} */ public String getName() { return ""; } /** {@inheritDoc} */ public int getLineNumber() { return lineNumber; } /** * Closes the reader associated with this AptReaderSource. */ public void close() { IOUtil.close( reader ); reader = null; } } ��������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000152�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptMarkup.java�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptMarkup0000644�0001750�0001750�00000014471�11014267211�033262� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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; import org.codehaus.plexus.util.StringUtils; /** * This interface defines all markups and syntaxes used by the <b>APT</b> format. * * @see <a href="http://maven.apache.org/doxia/references/apt-format.html">http://maven.apache.org/doxia/references/apt-format.html</a> * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: AptMarkup.java 657808 2008-05-19 12:11:53Z ltheussl $ * @since 1.0 */ public interface AptMarkup extends TextMarkup { // ---------------------------------------------------------------------- // Markup separators // ---------------------------------------------------------------------- /** APT backslash markup char: '\\' */ char BACKSLASH = '\\'; /** APT comment markup char: '~' */ char COMMENT = '~'; /** APT numbering decimal markup char: '1' */ char NUMBERING = '1'; /** APT numbering lower alpha markup char: 'a' */ char NUMBERING_LOWER_ALPHA_CHAR = 'a'; /** APT numbering lower roman markup char: 'i' */ char NUMBERING_LOWER_ROMAN_CHAR = 'i'; /** APT numbering upper alpha markup char: 'A' */ char NUMBERING_UPPER_ALPHA_CHAR = 'A'; /** APT numbering upper roman markup char: 'I' */ char NUMBERING_UPPER_ROMAN_CHAR = 'I'; /** APT page break markup char: '\f' */ char PAGE_BREAK = '\f'; /** APT percent markup char: '%' */ char PERCENT = '%'; /** APT tab markup char: '\t' */ char TAB = '\t'; // ---------------------------------------------------------------------- // Markup syntax // ---------------------------------------------------------------------- /** Syntax for the anchor end: "}" */ String ANCHOR_END_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); /** Syntax for the anchor start: "{" */ String ANCHOR_START_MARKUP = String.valueOf( LEFT_CURLY_BRACKET ); /** Syntax for the bold style end: ">>" */ String BOLD_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 2 ); /** Syntax for the bold style start: "<<" */ String BOLD_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 2 ); /** Syntax for the boxed verbatim start: "+------+" */ String BOXED_VERBATIM_START_MARKUP = String.valueOf( PLUS ) + StringUtils.repeat( String.valueOf( MINUS ), 6 ) + String.valueOf( PLUS ); /** Syntax for the header start: " -----" */ String HEADER_START_MARKUP = String.valueOf( SPACE ) + StringUtils.repeat( String.valueOf( MINUS ), 5 ); /** Syntax for the horizontal rule: "========" */ String HORIZONTAL_RULE_MARKUP = StringUtils.repeat( String.valueOf( EQUAL ), 8 ); /** Syntax for the italic style end: ">" */ String ITALIC_END_MARKUP = String.valueOf( GREATER_THAN ); /** Syntax for the italic style start: "<" */ String ITALIC_START_MARKUP = String.valueOf( LESS_THAN ); /** Syntax for the link end: "}}" */ String LINK_END_MARKUP = StringUtils.repeat( String.valueOf( RIGHT_CURLY_BRACKET ), 2 ); /** Syntax for the link start: "{{{" */ String LINK_START_1_MARKUP = StringUtils.repeat( String.valueOf( LEFT_CURLY_BRACKET ), 3 ); /** Syntax for the link start: "}" */ String LINK_START_2_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); /** Syntax for the list end: "[]" */ String LIST_END_MARKUP = String.valueOf( LEFT_SQUARE_BRACKET ) + String.valueOf( RIGHT_SQUARE_BRACKET ); /** Syntax for the list start: "*" */ String LIST_START_MARKUP = String.valueOf( STAR ); /** Syntax for the mono-spaced style end: ">>>" */ String MONOSPACED_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 3 ); /** Syntax for the mono-spaced style start: "<<<" */ String MONOSPACED_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 3 ); /** Syntax for the non boxed verbatim start: "------" */ String NON_BOXED_VERBATIM_START_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 6 ); /** Syntax for the non breaking space: "\ " */ String NON_BREAKING_SPACE_MARKUP = String.valueOf( BACKSLASH ) + String.valueOf( SPACE ); /** Syntax for the page break: "\f" */ String PAGE_BREAK_MARKUP = String.valueOf( PAGE_BREAK ); /** Syntax for the section title start: "*" */ String SECTION_TITLE_START_MARKUP = String.valueOf( STAR ); /** Syntax for the table cell start: "|" */ String TABLE_CELL_SEPARATOR_MARKUP = String.valueOf( PIPE ); /** Syntax for the table column, centered style: "-*" */ String TABLE_COL_CENTERED_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) + String.valueOf( STAR ); /** Syntax for the table column, left style: "-+" */ String TABLE_COL_LEFT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) + String.valueOf( PLUS ); /** Syntax for the table column, right style: "-:" */ String TABLE_COL_RIGHT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) + String.valueOf( COLON ); /** Syntax for the table row end: "|" */ String TABLE_ROW_SEPARATOR_MARKUP = String.valueOf( PIPE ); /** Syntax for the table row start: "*--" */ String TABLE_ROW_START_MARKUP = String.valueOf( STAR ) + StringUtils.repeat( String.valueOf( MINUS ), 2 ); /** Syntax for the boxed verbatim end: "+------+" */ String BOXED_VERBATIM_END_MARKUP = BOXED_VERBATIM_START_MARKUP; /** Syntax for the non boxed verbatim end: "------" */ String NON_BOXED_VERBATIM_END_MARKUP = NON_BOXED_VERBATIM_START_MARKUP; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000150�00000000000�011561� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.j0000644�0001750�0001750�00000053303�11331346664�033170� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.apt; /* * 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.Writer; import java.util.Stack; import org.apache.maven.doxia.sink.AbstractTextSink; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.codehaus.plexus.util.StringUtils; /** * APT Sink implementation. * <br/> * <b>Note</b>: The encoding used is UTF-8. * * @author eredmond * @version $Id: AptSink.java 905092 2010-01-31 18:36:36Z hboutemy $ * @since 1.0 */ public class AptSink extends AbstractTextSink implements AptMarkup { // ---------------------------------------------------------------------- // Instance fields // ---------------------------------------------------------------------- /** A buffer that holds the current text. */ private StringBuffer buffer; /** A buffer that holds the table caption. */ private StringBuffer tableCaptionBuffer; /** author. */ private String author; /** title. */ private String title; /** date. */ private String date; /** startFlag. */ private boolean startFlag; /** tableCaptionFlag. */ private boolean tableCaptionFlag; /** headerFlag. */ private boolean headerFlag; /** bufferFlag. */ private boolean bufferFlag; /** itemFlag. */ private boolean itemFlag; /** verbatimFlag. */ private boolean verbatimFlag; /** boxed verbatim. */ private boolean isBoxed; /** gridFlag for tables. */ private boolean gridFlag; /** number of cells in a table. */ private int cellCount; /** The writer to use. */ private final PrintWriter writer; /** justification of table cells. */ private int cellJustif[]; /** a line of a row in a table. */ private String rowLine; /** listNestingIndent. */ private String listNestingIndent; /** listStyles. */ private final Stack listStyles; // ---------------------------------------------------------------------- // Public protected methods // ---------------------------------------------------------------------- /** * 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 AptSink( Writer writer ) { this.writer = new PrintWriter( writer ); this.listStyles = new Stack(); init(); } /** * Returns the buffer that holds the current text. * * @return A StringBuffer. */ protected StringBuffer getBuffer() { return buffer; } /** * Used to determine whether we are in head mode. * * @param headFlag True for head mode. */ protected void setHeadFlag( boolean headFlag ) { this.headerFlag = headFlag; } /** * Reset all variables. * * @deprecated since 1.1.2, use {@link #init()} instead of. */ protected void resetState() { init(); } /** {@inheritDoc} */ protected void init() { super.init(); resetBuffer(); this.tableCaptionBuffer = new StringBuffer(); this.listNestingIndent = ""; this.author = null; this.title = null; this.date = null; this.startFlag = true; this.tableCaptionFlag = false; this.headerFlag = false; this.bufferFlag = false; this.itemFlag = false; this.verbatimFlag = false; this.isBoxed = false; this.gridFlag = false; this.cellCount = 0; this.cellJustif = null; this.rowLine = null; this.listStyles.clear(); } /** * Reset the StringBuffer. */ protected void resetBuffer() { buffer = new StringBuffer(); } /** * Reset the TableCaptionBuffer. */ protected void resetTableCaptionBuffer() { tableCaptionBuffer = new StringBuffer(); } /** {@inheritDoc} */ public void head() { boolean startFlag = this.startFlag; init(); headerFlag = true; this.startFlag = startFlag; } /** {@inheritDoc} */ public void head_() { headerFlag = false; if ( ! startFlag ) { write( EOL ); } write( HEADER_START_MARKUP + EOL ); if ( title != null ) { write( " " + title + EOL ); } write( HEADER_START_MARKUP + EOL ); if ( author != null ) { write( " " + author + EOL ); } write( HEADER_START_MARKUP + EOL ); if ( date != null ) { write( " " + date + EOL ); } write( HEADER_START_MARKUP + EOL ); } /** {@inheritDoc} */ public void title_() { if ( buffer.length() > 0 ) { title = buffer.toString(); resetBuffer(); } } /** {@inheritDoc} */ public void author_() { if ( buffer.length() > 0 ) { author = buffer.toString(); resetBuffer(); } } /** {@inheritDoc} */ public void date_() { if ( buffer.length() > 0 ) { date = buffer.toString(); resetBuffer(); } } /** {@inheritDoc} */ public void section1_() { write( EOL ); } /** {@inheritDoc} */ public void section2_() { write( EOL ); } /** {@inheritDoc} */ public void section3_() { write( EOL ); } /** {@inheritDoc} */ public void section4_() { write( EOL ); } /** {@inheritDoc} */ public void section5_() { write( EOL ); } /** {@inheritDoc} */ public void sectionTitle1() { write( EOL ); } /** {@inheritDoc} */ public void sectionTitle1_() { write( EOL + EOL ); } /** {@inheritDoc} */ public void sectionTitle2() { write( EOL + SECTION_TITLE_START_MARKUP ); } /** {@inheritDoc} */ public void sectionTitle2_() { write( EOL + EOL ); } /** {@inheritDoc} */ public void sectionTitle3() { write( EOL + StringUtils.repeat( SECTION_TITLE_START_MARKUP, 2 ) ); } /** {@inheritDoc} */ public void sectionTitle3_() { write( EOL + EOL ); } /** {@inheritDoc} */ public void sectionTitle4() { write( EOL + StringUtils.repeat( SECTION_TITLE_START_MARKUP, 3 ) ); } /** {@inheritDoc} */ public void sectionTitle4_() { write( EOL + EOL ); } /** {@inheritDoc} */ public void sectionTitle5() { write( EOL + StringUtils.repeat( SECTION_TITLE_START_MARKUP, 4 ) ); } /** {@inheritDoc} */ public void sectionTitle5_() { write( EOL + EOL ); } /** {@inheritDoc} */ public void list() { listNestingIndent += " "; listStyles.push( LIST_START_MARKUP ); write( EOL ); } /** {@inheritDoc} */ public void list_() { if ( listNestingIndent.length() <= 1 ) { write( EOL + listNestingIndent + LIST_END_MARKUP + EOL ); } else { write( EOL ); } listNestingIndent = StringUtils.chomp( listNestingIndent, " " ); listStyles.pop(); itemFlag = false; } /** {@inheritDoc} */ public void listItem() { //if ( !numberedList ) //write( EOL + listNestingIndent + "*" ); //else numberedListItem(); itemFlag = true; } /** {@inheritDoc} */ public void listItem_() { write( EOL ); itemFlag = false; } /** {@inheritDoc} */ public void numberedList( int numbering ) { listNestingIndent += " "; write( EOL ); String style; switch ( numbering ) { case NUMBERING_UPPER_ALPHA: style = String.valueOf( NUMBERING_UPPER_ALPHA_CHAR ); break; case NUMBERING_LOWER_ALPHA: style = String.valueOf( NUMBERING_LOWER_ALPHA_CHAR ); break; case NUMBERING_UPPER_ROMAN: style = String.valueOf( NUMBERING_UPPER_ROMAN_CHAR ); break; case NUMBERING_LOWER_ROMAN: style = String.valueOf( NUMBERING_LOWER_ROMAN_CHAR ); break; case NUMBERING_DECIMAL: default: style = String.valueOf( NUMBERING ); } listStyles.push( style ); } /** {@inheritDoc} */ public void numberedList_() { if ( listNestingIndent.length() <= 1 ) { write( EOL + listNestingIndent + LIST_END_MARKUP + EOL ); } else { write( EOL ); } listNestingIndent = StringUtils.chomp( listNestingIndent, " " ); listStyles.pop(); itemFlag = false; } /** {@inheritDoc} */ public void numberedListItem() { String style = (String) listStyles.peek(); if ( style.equals( String.valueOf( STAR ) ) ) { write( EOL + listNestingIndent + String.valueOf( STAR ) + String.valueOf( SPACE ) ); } else { write( EOL + listNestingIndent + String.valueOf( LEFT_SQUARE_BRACKET ) + String.valueOf( LEFT_SQUARE_BRACKET ) + style + String.valueOf( RIGHT_SQUARE_BRACKET ) + String.valueOf( RIGHT_SQUARE_BRACKET ) + String.valueOf( SPACE ) ); } itemFlag = true; } /** {@inheritDoc} */ public void numberedListItem_() { write( EOL ); itemFlag = false; } /** {@inheritDoc} */ public void definitionList() { listNestingIndent += " "; listStyles.push( "" ); write( EOL ); } /** {@inheritDoc} */ public void definitionList_() { if ( listNestingIndent.length() <= 1 ) { write( EOL + listNestingIndent + LIST_END_MARKUP + EOL ); } else { write( EOL ); } listNestingIndent = StringUtils.chomp( listNestingIndent, " " ); listStyles.pop(); itemFlag = false; } /** {@inheritDoc} */ public void definedTerm() { write( EOL + " [" ); } /** {@inheritDoc} */ public void definedTerm_() { write( "] " ); } /** {@inheritDoc} */ public void definition() { itemFlag = true; } /** {@inheritDoc} */ public void definition_() { write( EOL ); itemFlag = false; } /** {@inheritDoc} */ public void pageBreak() { write( EOL + PAGE_BREAK + EOL ); } /** {@inheritDoc} */ public void paragraph() { if ( itemFlag ) { write( EOL + EOL + " " + listNestingIndent ); } else { write( EOL + " " ); } } /** {@inheritDoc} */ public void paragraph_() { write( EOL + EOL ); } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { verbatimFlag = true; this.isBoxed = boxed; write( EOL ); if ( boxed ) { write( EOL + BOXED_VERBATIM_START_MARKUP + EOL ); } else { write( EOL + NON_BOXED_VERBATIM_START_MARKUP + EOL ); } } /** {@inheritDoc} */ public void verbatim_() { if ( isBoxed ) { write( EOL + BOXED_VERBATIM_END_MARKUP + EOL ); } else { write( EOL + NON_BOXED_VERBATIM_END_MARKUP + EOL ); } isBoxed = false; verbatimFlag = false; } /** {@inheritDoc} */ public void horizontalRule() { write( EOL + HORIZONTAL_RULE_MARKUP + EOL ); } /** {@inheritDoc} */ public void table() { write( EOL ); } /** {@inheritDoc} */ public void table_() { if ( rowLine != null ) { write( rowLine ); } rowLine = null; if ( tableCaptionBuffer.length() > 0 ) { text( tableCaptionBuffer.toString() + EOL ); } resetTableCaptionBuffer(); } /** {@inheritDoc} */ public void tableRows( int justification[], boolean grid ) { cellJustif = justification; gridFlag = grid; } /** {@inheritDoc} */ public void tableRows_() { cellJustif = null; gridFlag = false; } /** {@inheritDoc} */ public void tableRow() { bufferFlag = true; cellCount = 0; } /** {@inheritDoc} */ public void tableRow_() { bufferFlag = false; // write out the header row first, then the data in the buffer buildRowLine(); write( rowLine ); // TODO: This will need to be more clever, for multi-line cells if ( gridFlag ) { write( TABLE_ROW_SEPARATOR_MARKUP ); } write( buffer.toString() ); resetBuffer(); write( EOL ); // only reset cell count if this is the last row cellCount = 0; } /** Construct a table row. */ private void buildRowLine() { StringBuffer rLine = new StringBuffer(); rLine.append( TABLE_ROW_START_MARKUP ); for ( int i = 0; i < cellCount; i++ ) { if ( cellJustif != null ) { switch ( cellJustif[i] ) { case 1: rLine.append( TABLE_COL_LEFT_ALIGNED_MARKUP ); break; case 2: rLine.append( TABLE_COL_RIGHT_ALIGNED_MARKUP ); break; default: rLine.append( TABLE_COL_CENTERED_ALIGNED_MARKUP ); } } else { rLine.append( TABLE_COL_CENTERED_ALIGNED_MARKUP ); } } rLine.append( EOL ); this.rowLine = rLine.toString(); } /** {@inheritDoc} */ public void tableCell() { tableCell( false ); } /** {@inheritDoc} */ public void tableHeaderCell() { tableCell( true ); } /** * Starts a table cell. * * @param headerRow If this cell is part of a header row. */ public void tableCell( boolean headerRow ) { if ( headerRow ) { buffer.append( TABLE_CELL_SEPARATOR_MARKUP ); } } /** {@inheritDoc} */ public void tableCell_() { endTableCell(); } /** {@inheritDoc} */ public void tableHeaderCell_() { endTableCell(); } /** * Ends a table cell. */ private void endTableCell() { buffer.append( TABLE_CELL_SEPARATOR_MARKUP ); cellCount++; } /** {@inheritDoc} */ public void tableCaption() { tableCaptionFlag = true; } /** {@inheritDoc} */ public void tableCaption_() { tableCaptionFlag = false; } /** {@inheritDoc} */ public void figureCaption_() { write( EOL ); } /** {@inheritDoc} */ public void figureGraphics( String name ) { write( EOL + "[" + name + "] " ); } /** {@inheritDoc} */ public void anchor( String name ) { write( ANCHOR_START_MARKUP ); } /** {@inheritDoc} */ public void anchor_() { write( ANCHOR_END_MARKUP ); } /** {@inheritDoc} */ public void link( String name ) { if ( !headerFlag ) { write( LINK_START_1_MARKUP ); text( name.startsWith( "#" ) ? name.substring( 1 ) : name ); write( LINK_START_2_MARKUP ); } } /** {@inheritDoc} */ public void link_() { if ( !headerFlag ) { write( LINK_END_MARKUP ); } } /** * A link with a target. * * @param name The name of the link. * @param target The link target. */ public void link( String name, String target ) { if ( !headerFlag ) { write( LINK_START_1_MARKUP ); text( target ); write( LINK_START_2_MARKUP ); text( name ); } } /** {@inheritDoc} */ public void italic() { if ( !headerFlag ) { write( ITALIC_START_MARKUP ); } } /** {@inheritDoc} */ public void italic_() { if ( !headerFlag ) { write( ITALIC_END_MARKUP ); } } /** {@inheritDoc} */ public void bold() { if ( !headerFlag ) { write( BOLD_START_MARKUP ); } } /** {@inheritDoc} */ public void bold_() { if ( !headerFlag ) { write( BOLD_END_MARKUP ); } } /** {@inheritDoc} */ public void monospaced() { if ( !headerFlag ) { write( MONOSPACED_START_MARKUP ); } } /** {@inheritDoc} */ public void monospaced_() { if ( !headerFlag ) { write( MONOSPACED_END_MARKUP ); } } /** {@inheritDoc} */ public void lineBreak() { if ( headerFlag || bufferFlag ) { buffer.append( EOL ); } else if ( verbatimFlag ) { write( EOL ); } else { write( "\\" + EOL ); } } /** {@inheritDoc} */ public void nonBreakingSpace() { if ( headerFlag || bufferFlag ) { buffer.append( NON_BREAKING_SPACE_MARKUP ); } else { write( NON_BREAKING_SPACE_MARKUP ); } } /** {@inheritDoc} */ public void text( String text ) { if ( tableCaptionFlag ) { tableCaptionBuffer.append( text ); } else if ( headerFlag || bufferFlag ) { buffer.append( text ); } else if ( verbatimFlag ) { verbatimContent( text ); } else { content( text ); } } /** {@inheritDoc} */ public void rawText( String text ) { write( text ); } /** {@inheritDoc} */ public void comment( String comment ) { rawText( ( startFlag ? "" : EOL ) + COMMENT + COMMENT + SPACE + comment.trim() ); } /** * {@inheritDoc} * * Unkown events just log a warning message but are ignored otherwise. * @see org.apache.maven.doxia.sink.Sink#unknown(String,Object[],SinkEventAttributes) */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { getLog().warn( "[Apt Sink] Unknown Sink event: '" + name + "', ignoring!" ); } /** * Write text to output. * * @param text The text to write. */ protected void write( String text ) { startFlag = false; writer.write( unifyEOLs( text ) ); } /** * Write Apt escaped text to output. * * @param text The text to write. */ protected void content( String text ) { write( escapeAPT( text ) ); } /** * Write Apt escaped text to output. * * @param text The text to write. */ protected void verbatimContent( String text ) { write( escapeAPT( text ) ); } /** {@inheritDoc} */ public void flush() { writer.flush(); } /** {@inheritDoc} */ public void close() { writer.close(); init(); } // ---------------------------------------------------------------------- // Private methods // ---------------------------------------------------------------------- /** * Escape special characters in a text in APT: * * <pre> * \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\ * </pre> * * @param text the String to escape, may be null * @return the text escaped, "" if null String input */ private static String escapeAPT( String text ) { if ( text == null ) { return ""; } int length = text.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = text.charAt( i ); switch ( c ) { // 0080 case '\\': case '~': case '=': case '-': case '+': case '*': case '[': case ']': case '<': case '>': case '{': case '}': buffer.append( '\\' ); buffer.append( c ); break; default: buffer.append( c ); } } return buffer.toString(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/��������������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�020674� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/pom.xml�������������������������������������������������0000644�0001750�0001750�00000011776�11470562366�022216� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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 http://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>1.1.4</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>doxia-module-xdoc</artifactId> <name>Doxia :: XDoc Module</name> <description>A Doxia module for Xdoc source documents.</description> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> </dependency> <!-- test --> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-test-docs</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.9.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludes> <!-- See DOXIA-408 --> <exclude>org/apache/maven/doxia/module/xdoc/XmlWriterXdocSinkTest.java</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-maven-plugin</artifactId> <configuration> <descriptors> <descriptor>src/main/components/components.xml</descriptor> <descriptor>target/generated-resources/plexus/META-INF/plexus/components.xml</descriptor> </descriptors> </configuration> <executions> <execution> <goals> <goal>merge-descriptors</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <profiles> <profile> <id>reporting</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>site</phase> <configuration> <tasks> <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" /> <condition property="dir" value="${project.reporting.outputDirectory}/xsddoc"> <matches string="${project.reporting.outputDirectory}" pattern="^${basedir}" /> </condition> <condition property="dir" value="${project.reporting.outputDirectory}/xsddoc"> <not> <isset property="dir" /> </not> </condition> <mkdir dir="${dir}" /> <xsddoc file="${basedir}/src/main/resources/xdoc-2.0.xsd" out="${dir}" doctitle="Reference of Schema Xdoc 2.0" verbose="true" /> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>xsddoc</groupId> <artifactId>xsddoc</artifactId> <version>1.0</version> <exclusions> <exclusion> <groupId>ant</groupId> <artifactId>ant</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-apache-regexp</artifactId> <version>1.7.1</version> </dependency> <dependency> <groupId>xalan</groupId> <artifactId>xalan</artifactId> <version>2.7.1</version> </dependency> </dependencies> </plugin> </plugins> </build> </profile> </profiles> </project> ��doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/����������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�021463� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/�����������������������������������������������0000755�0001750�0001750�00000000000�11632765556�022441� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/resources/�������������������������������������0000755�0001750�0001750�00000000000�11632765556�024453� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/resources/toc.xml������������������������������0000644�0001750�0001750�00000003246�11136075263�025753� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.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. --> <document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 file:../../main/resources/xdoc-2.0.xsd"> <properties> <title>Test DOXIA-40 Vincent Siveton

Test DOXIA-40

Section 1

Section 11

Section 12

Section 13

doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/resources/macro.xml0000644000175000017500000000262511136075263026267 0ustar twernertwerner Test DOXIA-77 Vincent Siveton
doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/resources/report.xml0000644000175000017500000000257611136075263026506 0ustar twernertwerner Synchronization report for Codehaus meeper
Artifact Size (in bytes) Date

Raw report

doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/resources/test.xml0000644000175000017500000001033511136075263026142 0ustar twernertwerner Title Author Date

Paragraph 1, line 1. Paragraph 1, line 2.

Paragraph 2, line 1. Paragraph 2, line 2.

Sub-sub-section title

Sub-sub-sub-section
Sub-sub-sub-sub-section
  • List item 1.
  • List item 2.

    Paragraph contained in list item 2.

    • Sub-list item 1.
    • Sub-list item 2.
  • List item 3. Force end of list:
Verbatim text not contained in list item 3
  1. Numbered item 1.
    1. Numbered item A.
    2. Numbered item B.
  2. Numbered item 2.

List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]].

Defined term 1
of definition list.
Defined term 2
of definition list. Verbatim text in a box

--- instead of +-- suppresses the box around verbatim text.

Figure caption
Table caption
Centered
cell 1,1
Left-aligned
cell 1,2
Right-aligned
cell 1,3
cell 2,1 cell 2,2 cell 2,3

No grid, no caption:

cell cell
cell cell

Horizontal line:


New page.

Italic font. Bold font. Monospaced font.

Anchor. Link to Anchor. Link to http://www.pixware.fr. Link to showing alternate text. Link to Pixware home page.

Force line
break.

Non breaking space.

Escaped special characters:
~
=
-
+
*
[
]
<
>
{
}
\

Copyright symbol: © © ©.

doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/0000755000175000017500000000000011632765556023362 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/0000755000175000017500000000000011632765556024151 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/0000755000175000017500000000000011632765556025372 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/0000755000175000017500000000000011632765556026500 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765556027604 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765556031071 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/0000755000175000017500000000000011632765556032026 5ustar twernertwerner././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XmlWriterXdocSinkTest.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XmlWrit0000644000175000017500000000720311352225025033336 0ustar twernertwernerpackage org.apache.maven.doxia.module.xdoc; /* * 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.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; import org.codehaus.plexus.util.xml.XmlUtil; /** * @author Vincent Siveton * @version $Id: XmlWriterXdocSinkTest.java 926772 2010-03-23 20:52:37Z ltheussl $ * @since 1.1 */ public class XmlWriterXdocSinkTest extends XdocSinkTest { private static final String DEFAULT_INDENT = StringUtils.repeat( " ", XmlUtil.DEFAULT_INDENTATION_SIZE ); /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new XmlWriterXdocSink( new PrettyPrintXMLWriter( writer ) ); } /** {@inheritDoc} */ protected String getSection1Block( String title ) { return "
"; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return ""; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return "
    " + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + "
  • " + item + "
  • " + XmlUtil.DEFAULT_LINE_SEPARATOR + "
"; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return "
    " + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + "
  1. " + item + "
  2. " + XmlUtil.DEFAULT_LINE_SEPARATOR + "
"; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return "
" + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + "
" + definum + "
" + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + "
" + definition + "
" + XmlUtil.DEFAULT_LINE_SEPARATOR + "
"; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { return "\"""; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { return "" + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + "" + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + "" + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + DEFAULT_INDENT + "" + XmlUtil.DEFAULT_LINE_SEPARATOR + DEFAULT_INDENT + "" + XmlUtil.DEFAULT_LINE_SEPARATOR + "
" + caption + "
" + cell + "
"; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return "
"; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return "
"; } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocIdentityTest.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocIde0000644000175000017500000000521611207760055033257 0ustar twernertwernerpackage org.apache.maven.doxia.module.xdoc; /* * 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.module.AbstractIdentityTest; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.StringUtils; /** * Check that piping a full model through an XdocParser and an XdocSink * leaves the model unchanged. */ public class XdocIdentityTest extends AbstractIdentityTest { /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); assertIdentity( true ); } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new XdocSink( writer ); } /** {@inheritDoc} */ protected Parser createParser() { return new XdocParser(); } /** {@inheritDoc} */ protected String getExpected() { // DOXIA-177 String expected = super.getExpected(); String startCaption = "begin:tableCaption"; String endCaption = "end:tableCaption"; int iStartCaption = expected.indexOf( startCaption ); int iEndCaption = expected.indexOf( endCaption ) + endCaption.length(); String captionTag = expected.substring( iStartCaption, iEndCaption ) + EOL + EOL + EOL; expected = StringUtils.replace( expected, captionTag, "" ); int iStartTableRows = expected.substring( 0, iStartCaption ).lastIndexOf( "begin:tableRows" ) + "begin:tableRows".length(); StringBuffer text = new StringBuffer(); text.append( expected.substring( 0, iStartTableRows ) ); text.append( EOL + EOL + EOL ); text.append( captionTag.subSequence( 0, captionTag.indexOf( "end:tableCaption" ) + "end:tableCaption".length() ) ); text.append( expected.substring( iStartTableRows ) ); return text.toString(); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocSinkTest.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocSin0000644000175000017500000001645511352225025033310 0ustar twernertwernerpackage org.apache.maven.doxia.module.xdoc; /* * 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.AbstractSinkTest; import org.apache.maven.doxia.util.HtmlTools; import java.io.StringWriter; import java.io.Writer; import org.apache.maven.doxia.sink.SinkEventAttributeSet; /** * @author Jason van Zyl * @version $Id: XdocSinkTest.java 926772 2010-03-23 20:52:37Z ltheussl $ * @since 1.0 */ public class XdocSinkTest extends AbstractSinkTest { /** {@inheritDoc} */ protected String outputExtension() { return "xml"; } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new XdocSink( writer, "UTF-8" ); } /** {@inheritDoc} */ protected boolean isXmlSink() { return true; } /** {@inheritDoc} */ protected String getTitleBlock( String title ) { return "" + title + ""; } /** {@inheritDoc} */ protected String getAuthorBlock( String author ) { return author; } /** {@inheritDoc} */ protected String getDateBlock( String date ) { return date; } /** {@inheritDoc} */ protected String getHeadBlock() { return "" + "" + ""; } /** {@inheritDoc} */ protected String getBodyBlock() { return ""; } /** {@inheritDoc} */ protected String getSectionTitleBlock( String title ) { return title; } /** {@inheritDoc} */ protected String getSection1Block( String title ) { return "
"; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return ""; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { return "

" + title + "

"; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return "
  • " + item + "
"; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return "
  1. " + item + "
"; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return "
" + definum + "
" + definition + "
"; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { return "\"""; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { return "
" + caption + "
" + cell + "
"; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return "

" + text + "

"; } /** {@inheritDoc} */ protected String getVerbatimBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return "
"; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { return "" + anchor + ""; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return "
"; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return " "; } /** {@inheritDoc} */ protected String getTextBlock( String text ) { // TODO: need to be able to retreive those from outside the sink return HtmlTools.escapeHTML( text ); } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { return "~,_=,_-,_+,_*,_[,_],_<,_>,_{,_},_\\"; } /** * Test verbatim. */ public void testBoxedVerbatim() { Writer writer = new StringWriter(); XdocSink sink = null; try { sink = new XdocSink( writer ); sink.verbatim( null ); sink.verbatim_(); sink.verbatim( SinkEventAttributeSet.BOXED ); sink.verbatim_(); sink.verbatim( new SinkEventAttributeSet( new String[] {SinkEventAttributeSet.WIDTH, "20%"} ) ); sink.verbatim_(); } finally { sink.close(); } assertEquals( "
", writer.toString() );
    }

    /**
     * Test link.
     */
    public void testLinkWithTarget()
    {
        Writer writer =  new StringWriter();
        XdocSink sink = null;

        try
        {
            sink = new XdocSink( writer );

            sink.link( "name", (String) null );
            sink.link_();
            sink.link( "name", "nirvana" );
            sink.link_();
        }
        finally
        {
            sink.close();
        }

        assertEquals( "", writer.toString() );
    }

    /** {@inheritDoc} */
    protected String getCommentBlock( String text )
    {
        return "";
    }
}
././@LongLink0000000000000000000000000000016400000000000011566 Lustar  rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocVal0000644000175000017500000000525711141054030033267 0ustar  twernertwernerpackage org.apache.maven.doxia.module.xdoc;

/*
 * 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.File;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.maven.doxia.markup.XmlMarkup;
import org.apache.maven.doxia.xsd.AbstractXmlValidatorTest;
import org.codehaus.plexus.util.StringUtils;

/**
 * Test XDOC files with namespace.
 *
 * @author Vincent Siveton
 * @version $Id: XdocValidatorTest.java 739557 2009-01-31 13:54:32Z vsiveton $
 * @since 1.0
 */
public class XdocValidatorTest
    extends AbstractXmlValidatorTest
{
    /** The xsd to use */
    private static final File XDOC_XSD = new File( getBasedir(), "/src/main/resources/xdoc-2.0.xsd" );

    /** {@inheritDoc} */
    protected void setUp()
        throws Exception
    {
        super.setUp();
    }

    /** {@inheritDoc} */
    protected void tearDown()
        throws Exception
    {
        super.tearDown();
    }

    /** {@inheritDoc} */
    protected String[] getIncludes()
    {
        return new String[] { "**/*.xml", "**/xdoc/*" };
    }

    /** {@inheritDoc} */
    protected String addNamespaces( String content )
    {
        Pattern pattern = Pattern.compile( ".*<([A-Za-z][A-Za-z0-9:_.-]*)([^>]*)>.*" );
        Matcher matcher = pattern.matcher( content );
        if ( matcher.find() )
        {
            String root = matcher.group( 1 );
            String value = matcher.group( 2 );

            if ( value.indexOf( XDOC_XSD.getName() ) == -1 )
            {
                String faqs =
                    "<" + root + " xmlns=\"http://maven.apache.org/XDOC/2.0\""
                        + "  xmlns:xsi=\"" + XmlMarkup.XML_NAMESPACE + "\""
                        + "  xsi:schemaLocation=\"http://maven.apache.org/XDOC/2.0 " + XDOC_XSD.toURI() + "\" ";

                return StringUtils.replace( content, "<" + root, faqs );
            }
        }

        return content;
    }
}
././@LongLink0000000000000000000000000000017500000000000011570 Lustar  rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocSinkWithLanguageIdTest.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocSin0000644000175000017500000000342011141061207033270 0ustar  twernertwernerpackage org.apache.maven.doxia.module.xdoc;

/*
 * 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 java.util.Locale;

import org.apache.maven.doxia.sink.Sink;

/**
 * @author Vincent Siveton
 * @version $Id: XdocSinkWithLanguageIdTest.java 739565 2009-01-31 14:39:03Z vsiveton $
 */
public class XdocSinkWithLanguageIdTest
    extends XdocSinkTest
{
    /** {@inheritDoc} */
    protected Sink createSink( Writer writer )
    {
        return new XdocSink( writer, "UTF-8", Locale.US.getLanguage() );
    }

    /** {@inheritDoc} */
    protected String getHeadBlock()
    {
        return ""
            + "" + "";
    }
}
././@LongLink0000000000000000000000000000016100000000000011563 Lustar  rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocPar0000644000175000017500000005131511372573734033312 0ustar  twernertwernerpackage org.apache.maven.doxia.module.xdoc;

/*
 * 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.File;
import java.io.FileReader;
import java.io.Reader;
import java.io.Writer;

import java.util.Iterator;
import java.util.List;

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.SinkEventElement;
import org.apache.maven.doxia.sink.SinkEventTestingSink;

import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;

/**
 * @author Jason van Zyl
 * @author Emmanuel Venisse
 * @version $Id: XdocParserTest.java 943628 2010-05-12 18:47:56Z ltheussl $
 * @since 1.0
 */
public class XdocParserTest
    extends AbstractParserTest
{
    private XdocParser parser;

    /** {@inheritDoc} */
    protected void setUp()
        throws Exception
    {
        super.setUp();

        parser = (XdocParser) lookup( Parser.ROLE, "xdoc" );

        // AbstractXmlParser.CachedFileEntityResolver downloads DTD/XSD files in ${java.io.tmpdir}
        // Be sure to delete them
        String tmpDir = System.getProperty( "java.io.tmpdir" );
        String excludes = "xdoc-*.xsd, xml.xsd";
        List tmpFiles = FileUtils.getFileNames( new File( tmpDir ), excludes, null, true );
        for ( Iterator it = tmpFiles.iterator(); it.hasNext(); )
        {
            File tmpFile = new File( it.next().toString() );
            tmpFile.delete();
        }
    }

    /** {@inheritDoc} */
    protected String outputExtension()
    {
        return "xml";
    }

    /** {@inheritDoc} */
    protected Parser createParser()
    {
        return parser;
    }

    /** @throws Exception  */
    public void testSnippetMacro()
        throws Exception
    {
        Writer output = null;
        Reader reader = null;

        try
        {
            output = getTestWriter( "macro" );
            reader = getTestReader( "macro" );

            Sink sink = new XdocSink( output );
            createParser().parse( reader, sink );
            sink.close();
        }
        finally
        {
            IOUtil.close( output );
            IOUtil.close( reader );
        }

        File f = getTestFile( getBasedir(), outputBaseDir() + getOutputDir() + "macro.xml" );
        assertTrue( "The file " + f.getAbsolutePath() + " was not created", f.exists() );

        String content;
        try
        {
            reader = new FileReader( f );
            content = IOUtil.toString( reader );
        }
        finally
        {
            IOUtil.close( reader );
        }

        assertTrue( content.indexOf( "<modelVersion>4.0.0</modelVersion>" ) != -1 );
    }

    /** @throws Exception  */
    public void testTocMacro()
        throws Exception
    {
        Writer output = null;
        Reader reader = null;

        try
        {
            output = getTestWriter( "toc" );
            reader = getTestReader( "toc" );

            Sink sink = new XdocSink( output );
            createParser().parse( reader, sink );
            sink.close();
        }
        finally
        {
            IOUtil.close( output );
            IOUtil.close( reader );
        }

        File f = getTestFile( getBasedir(), outputBaseDir() + getOutputDir() + "toc.xml" );
        assertTrue( "The file " + f.getAbsolutePath() + " was not created", f.exists() );

        String content;
        try
        {
            reader = new FileReader( f );
            content = IOUtil.toString( reader );
        }
        finally
        {
            IOUtil.close( reader );
        }

        // No section, only subsection 1 and 2
        assertTrue( content.indexOf( "Section 11" ) != -1 );
        assertTrue( content.indexOf( "Section 1211" ) == -1 );
    }

    /** @throws Exception  */
    public void testHeadEventsList()
        throws Exception
    {
        String text = ""
                + "title"
                + ""
                + "John Doe"
                + "";

        SinkEventTestingSink sink = new SinkEventTestingSink();

        parser.parse( text, sink );

        Iterator it = sink.getEventList().iterator();

        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "title", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "comment", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "author", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "author_", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
        assertFalse( it.hasNext() );

        // DOXIA-359
        text = ""
                + "properties title"
                + "head title"
                + "";

        sink.reset();
        parser.parse( text, sink );

        it = sink.getEventList().iterator();

        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "title", ( (SinkEventElement) it.next() ).getName() );

        SinkEventElement title = (SinkEventElement) it.next();
        assertEquals( "text", title.getName() );
        assertEquals( "properties title", title.getArgs()[0] );

        assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
        assertFalse( it.hasNext() );
    }

    /** @throws Exception  */
    public void testDocumentBodyEventsList()
        throws Exception
    {
        String text = "";

        SinkEventTestingSink sink = new SinkEventTestingSink();

        parser.parse( text, sink );

        Iterator it = sink.getEventList().iterator();

        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
        assertFalse( it.hasNext() );
    }

    /** @throws Exception  */
    public void testSectionEventsList()
        throws Exception
    {
        String text = "
"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testNestedSectionsEventsList() throws Exception { // DOXIA-241 String text = "
h6
"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section3", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section4", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section5", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle5", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle5_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section5_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section4_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section3_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testSourceEventsList() throws Exception { String text = "what"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); text = "what]]>"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); text = "what]]>"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testSourceContainingDTD() throws Exception { String text = "" + "]]>"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testPreEOL() throws Exception { // test EOLs within : the sink MUST receive a text event for the EOL String text = "what" + EOL + "what"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); } /** * Test section with ids. * * @throws java.lang.Exception if any. */ public void testSectionIdAnchor() throws Exception { String text = "
This is a test." + "Sub-section
"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); SinkEventElement anchorEvt = (SinkEventElement) it.next(); assertEquals( "anchor", anchorEvt.getName() ); assertEquals( "test-id", anchorEvt.getArgs()[0] ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); anchorEvt = (SinkEventElement) it.next(); assertEquals( "anchor", anchorEvt.getName() ); assertEquals( "sub-id", anchorEvt.getArgs()[0] ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** * Test script block. * * @throws java.lang.Exception if any. */ public void testJavaScript() throws Exception { String text = ""; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** * Test unknown tags. * * @throws java.lang.Exception if any. */ public void testUnknown() throws Exception { String text = ""; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** * Test invalid macro tags. */ public void testMacroExceptions() { SinkEventTestingSink sink = new SinkEventTestingSink(); assertParseException( sink, "" ); assertParseException( sink, "" ); assertParseException( sink, "" ); assertParseException( sink, "" ); assertParseException( sink, "" ); assertParseException( sink, "" ); assertParseException( sink, "" ); } private void assertParseException( Sink sink, String text ) { try { parser.parse( text, sink ); fail( "Should not be parseable: '" + text + "'" ); } catch ( ParseException ex ) { assertNotNull( ex ); } } /** @throws Exception */ public void testEntities() throws Exception { final String text = "]>" + "

&&foo;&tritPos;

"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.setValidate( false ); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "&\u0159\uD835\uDFED", textEvt.getArgs()[0] ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "&", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\u0159", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\uD835\uDFED", textEvt.getArgs()[0] ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } } doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/site/0000755000175000017500000000000011632765557022427 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/site/apt/0000755000175000017500000000000011632765557023213 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/site/apt/using-xdoc-xsd.apt0000644000175000017500000000265011140051711026546 0ustar twernertwerner ----- Using Schema XDOC 2.0 ----- Vincent Siveton ------ 2009-01-28 ------ ~~ 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 Using Schema XDOC 2.0 The XDOC XSD is located {{{http://maven.apache.org/xsd/xdoc-2.0.xsd}here}}. Your favorite IDE probably supports XSD schema's for .xml/.xdoc files. You need to specify the following: +-----+ ... +-----+ doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/site/site.xml0000644000175000017500000000260511140051711024066 0ustar twernertwerner doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/0000755000175000017500000000000011632765557022407 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/resources/0000755000175000017500000000000011632765557024421 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/resources/xdoc-2.0.xsd0000644000175000017500000026011711153012172026352 0ustar twernertwerner Xdoc 2.0 XML Schema. This is based on: Extensible HTML version 1.0 Transitional XML Schema http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd For further information, see: http://maven.apache.org/doxia/references/xdoc-format.html ================ Character mnemonic entities ========================= XHTML entity sets are identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent" PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent" PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent" ================== Imported Names ==================================== media type, as per [RFC2045] comma-separated list of media types, as per [RFC2045] a character encoding, as per [RFC2045] a space separated list of character encodings, as per [RFC2045] a language code, as per [RFC3066] a single character, as per section 2.2 of [XML] one or more digits tabindex attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros. space-separated list of link types single or comma-separated list of media descriptors a Uniform Resource Identifier, see [RFC2396] a space separated list of Uniform Resource Identifiers date and time information. ISO date format script expression style sheet data used for titles etc. render in this frame nn for pixels or nn% for percentage length pixel, percentage, or relative integer representing length in pixels these are used for image maps comma separated list of lengths used for object, applet, img, input and iframe a color using sRGB: #RRGGBB as Hex values There are also 16 widely known color names with their sRGB values: Black = #000000 Green = #008000 Silver = #C0C0C0 Lime = #00FF00 Gray = #808080 Olive = #808000 White = #FFFFFF Yellow = #FFFF00 Maroon = #800000 Navy = #000080 Red = #FF0000 Blue = #0000FF Purple = #800080 Teal = #008080 Fuchsia= #FF00FF Aqua = #00FFFF =================== Generic Attributes =============================== core attributes common to most elements id document-wide unique id class space separated list of classes style associated style info title advisory title/amplification internationalization attributes lang language code (backwards compatible) xml:lang language code (as per XML 1.0 spec) dir direction for weak/neutral text attributes for common UI events onclick a pointer button was clicked ondblclick a pointer button was double clicked onmousedown a pointer button was pressed down onmouseup a pointer button was released onmousemove a pointer was moved onto the element onmouseout a pointer was moved away from the element onkeypress a key was pressed and released onkeydown a key was pressed down onkeyup a key was released attributes for elements that can get the focus accesskey accessibility key character tabindex position in tabbing order onfocus the element got the focus onblur the element lost the focus text alignment for p, div, h1-h6. The default is align="left" for ltr headings, "right" for rtl =================== Text Elements ==================================== these can only occur at block level these can only occur at block level "Inline" covers inline or "text-level" element ================== Block level elements ============================== "Flow" mixes block and inline and is used for list items etc. ================== Content models for exclusions ===================== a elements use "Inline" excluding a pre uses "Inline" excluding img, object, applet, big, small, font, or basefont form uses "Flow" excluding form button uses "Flow" but excludes a, form, form controls, iframe ================ Document Head ======================================= content model is "head.misc" combined with a single title and an optional base element in any order The title element is not considered part of the flow of text. It should be displayed, for example as the page header or window title. Exactly one title is required per document. document base URI generic metainformation Relationship values can be used in principle: a) for document specific toolbars/menus when used with the link element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel="stylesheet") c) to make a link to a script (rel="script") d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a PostScript or PDF version (rel="alternate" media="print") style info, which may include CDATA sections script statements, which may include CDATA sections alternate content container for non script-based rendering ======================= Frames ======================================= inline subwindow alternate content container for non frame-based rendering =================== Document Body ==================================== generic language/style container =================== Paragraphs ======================================= =================== Headings ========================================= There are six levels of headings from h1 (the most important) to h6 (the least important). =================== Lists ============================================ Unordered list bullet styles Unordered list Ordered list numbering style 1 arabic numbers 1, 2, 3, ... a lower alpha a, b, c, ... A upper alpha A, B, C, ... i lower roman i, ii, iii, ... I upper roman I, II, III, ... The style is applied to the sequence number which by default is reset to 1 for the first list item in an ordered list. Ordered (numbered) list single column list (DEPRECATED) multiple column list (DEPRECATED) LIStyle is constrained to: "(ULStyle|OLStyle)" list item definition lists - dt for term, dd for its definition =================== Address ========================================== information on author =================== Horizontal Rule ================================== =================== Preformatted Text ================================ content is "Inline" excluding "img|object|applet|big|small|sub|sup|font|basefont" =================== Block-like Quotes ================================ =================== Text alignment =================================== center content =================== Inserted/Deleted Text ============================ ins/del are allowed in block and inline content, but its inappropriate to include block content within an ins element occurring in inline content. ================== The Anchor Element ================================ content is "Inline" except that anchors shouldn't be nested ===================== Inline Elements ================================ generic language/style container I18N BiDi over-ride forced line break emphasis strong emphasis definitional program code sample something user would type variable citation abbreviation acronym inlined quote subscript superscript fixed pitch font italic font bold font bigger font smaller font underline strike-through strike-through base font size local change to font ==================== Object ====================================== object is used to embed objects as part of HTML pages. param elements should precede other content. Parameters can also be expressed as attribute/value pairs on the object element itself when brevity is desired. param is used to supply a named property value. In XML it would seem natural to follow RDF and support an abbreviated syntax where the param elements are replaced by attribute value pairs on the object start tag. =================== Java applet ================================== One of code or object attributes must be present. Place param elements before other content. =================== Images =========================================== To avoid accessibility problems for people who aren't able to see the image, you should provide a text description using the alt and longdesc attributes. In addition, avoid the use of server-side image maps. usemap points to a map element which may be in this document or an external document, although the latter is not widely supported ================== Client-side image maps ============================ These can be placed in the same document or grouped in a separate document although this isn't yet widely supported ================ Forms =============================================== Each label must not contain more than ONE field Label elements shouldn't be nested. form control the name attribute is required for all but submit & reset option selector option group selectable choice multi-line text field The fieldset element is used to group form fields. Only one legend element should occur in the content and if present should only be preceded by whitespace. NOTE: this content model is different from the XHTML 1.0 DTD, closer to the intended content model in HTML4 DTD fieldset label Content is "Flow" excluding a, form and form controls single-line text input control (DEPRECATED) ======================= Tables ======================================= Derived from IETF HTML table standard, see [RFC1942] The border attribute sets the thickness of the frame around the table. The default units are screen pixels. The frame attribute specifies which parts of the frame around the table should be rendered. The values are not the same as CALS to avoid a name clash with the valign attribute. The rules attribute defines which rules to draw between cells: If rules is absent then assume: "none" if border is absent or border="0" otherwise "all" horizontal placement of table relative to document horizontal alignment attributes for cell contents char alignment char, e.g. char=':' charoff offset for alignment char vertical alignment attributes for cell contents Use thead to duplicate headers when breaking table across page boundaries, or for static headers when tbody sections are rendered in scrolling panel. Use tfoot to duplicate footers when breaking table across page boundaries, or for static footers when tbody sections are rendered in scrolling panel. Use multiple tbody sections when rules are needed between groups of table rows. colgroup groups a set of col elements. It allows you to group several semantically related columns together. col elements define the alignment properties for cells in one or more columns. The width attribute specifies the width of the columns, e.g. width=64 width in screen pixels width=0.5* relative width of 0.5 The span attribute causes the attributes of one col element to apply to more than one column. Scope is simpler than headers attribute for common tables th is for headers, td for data and for cells acting as both ================== Xdoc Specific ===================================== ================ Document Structure ================================== 2.0.0 The <document/> element is the root of the Xdoc descriptor. 2.0.0 Optional properties element for this document element. 2.0.0 Optional head element for this document element. 2.0.0 Required body element for this document element. 2.0.0 The identifier of this document element. ================ Document Properties ================================= 2.0.0 Required title element for the document element. 2.0.0 Optional author element for the document element. 2.0.0 Optional creation/last updated date for the document element. 2.0.0 An author element. 2.0.0 The email attribute for the author element. 2.0.0 An date element. The date is recommended (but it is not a requirement) to be align to the ISO-8601 standard, i.e.: YYYY-MM-DD. =================== Document Body ==================================== 2.0.0 The body element. 2.0.0 A section in the body element. 2.0.0 A section element. 2.0.0 A subsection in the section element. 2.0.0 A subsection element. ================ Document Addons ===================================== See "special.extra" group. 2.0.0 A source element. 2.0.0 A macro element. doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/components/0000755000175000017500000000000011632765557024574 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/components/components.xml0000644000175000017500000000260311066147560027471 0ustar twernertwerner org.apache.maven.doxia.parser.Parser xdoc org.apache.maven.doxia.module.xdoc.XdocParser Parse an xdoc model and emit events into the specified doxia Sink. org.apache.maven.doxia.macro.manager.MacroManager macroManager doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/0000755000175000017500000000000011632765556023327 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/0000755000175000017500000000000011632765556024116 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/0000755000175000017500000000000011632765556025337 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/0000755000175000017500000000000011632765556026445 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765556027551 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765556031036 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/0000755000175000017500000000000011632765557031774 5ustar twernertwerner././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSin0000644000175000017500000003403011352225025033242 0ustar twernertwernerpackage org.apache.maven.doxia.module.xdoc; /* * 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 javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Attribute; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.sink.SinkUtils; import org.apache.maven.doxia.sink.XhtmlBaseSink; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.StringUtils; /** * Xdoc Sink implementation. *
* It uses the Xdoc XSD * http://maven.apache.org/xsd/xdoc-2.0.xsd. * * @author James Taylor * @version $Id: XdocSink.java 926772 2010-03-23 20:52:37Z ltheussl $ * @since 1.0 */ public class XdocSink extends XhtmlBaseSink implements XdocMarkup { // ---------------------------------------------------------------------- // Instance fields // ---------------------------------------------------------------------- /** An indication on if we're inside a box (verbatim). */ private boolean boxedFlag; private String encoding; private String languageId; // ---------------------------------------------------------------------- // Constructors // ---------------------------------------------------------------------- /** * Constructor, initialize the Writer. * * @param writer not null writer to write the result. Should be an UTF-8 Writer. * You could use newXmlWriter methods from {@link org.codehaus.plexus.util.WriterFactory}. */ protected XdocSink( Writer writer ) { super( writer ); } /** * Constructor, initialize the Writer and tells which encoding is used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. * @since 1.1 */ protected XdocSink( Writer writer, String encoding ) { this( writer ); this.encoding = encoding; } /** * Constructor, initialize the Writer and tells which encoding and languageId are used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. * @param languageId language identifier for the root element as defined by * IETF BCP 47, Tags for the Identification of Languages; * in addition, the empty string may be specified. * @since 1.1 */ protected XdocSink( Writer writer, String encoding, String languageId ) { this( writer, encoding ); this.languageId = languageId; } // ---------------------------------------------------------------------- // Public protected methods // ---------------------------------------------------------------------- /** {@inheritDoc} */ protected void init() { super.init(); boxedFlag = false; } /** * {@inheritDoc} * @see #head(org.apache.maven.doxia.sink.SinkEventAttributes) */ public void head() { head( null ); } /** * {@inheritDoc} * @see XdocMarkup#DOCUMENT_TAG * @see XdocMarkup#PROPERTIES_TAG */ public void head( SinkEventAttributes attributes ) { init(); setHeadFlag( true ); write( "" ); MutableAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( "xmlns", XDOC_NAMESPACE ); atts.addAttribute( "xmlns:xsi", XML_NAMESPACE ); atts.addAttribute( "xsi:schemaLocation", XDOC_NAMESPACE + " " + XDOC_SYSTEM_ID ); if ( languageId != null ) { atts.addAttribute( Attribute.LANG.toString(), languageId ); atts.addAttribute( "xml:lang", languageId ); } if ( attributes != null ) { atts.addAttributes( attributes ); } writeStartTag( DOCUMENT_TAG, atts ); writeStartTag( PROPERTIES_TAG ); } /** * {@inheritDoc} * @see XdocMarkup#DOCUMENT_TAG * @see XdocMarkup#PROPERTIES_TAG */ public void head_() { setHeadFlag( false ); writeEndTag( PROPERTIES_TAG ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TITLE */ public void title() { writeStartTag( TITLE ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TITLE */ public void title_() { content( getTextBuffer().toString() ); writeEndTag( TITLE ); resetTextBuffer(); } /** * {@inheritDoc} * @see XdocMarkup#AUTHOR_TAG */ public void author_() { if ( getTextBuffer().length() > 0 ) { writeStartTag( AUTHOR_TAG ); String text = HtmlTools.escapeHTML( getTextBuffer().toString() ); // hack: un-escape numerical entities that have been escaped above // note that numerical entities should really be written as one unicode character in the first place text = StringUtils.replace( text, "&#", "&#" ); write( text ); writeEndTag( AUTHOR_TAG ); resetTextBuffer(); } } /** * {@inheritDoc} * @see XdocMarkup#DATE_TAG */ public void date_() { if ( getTextBuffer().length() > 0 ) { writeStartTag( DATE_TAG ); content( getTextBuffer().toString() ); writeEndTag( DATE_TAG ); resetTextBuffer(); } } /** * {@inheritDoc} * @see #body(org.apache.maven.doxia.sink.SinkEventAttributes) */ public void body() { body( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#BODY */ public void body( SinkEventAttributes attributes ) { writeStartTag( BODY, attributes ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#BODY * @see XdocMarkup#DOCUMENT_TAG */ public void body_() { writeEndTag( BODY ); writeEndTag( DOCUMENT_TAG ); flush(); init(); } // ---------------------------------------------------------------------- // Sections // ---------------------------------------------------------------------- /** * {@inheritDoc} * * Starts a section. * @see XdocMarkup#SECTION_TAG * @see XdocMarkup#SUBSECTION_TAG */ protected void onSection( int depth, SinkEventAttributes attributes ) { if ( depth == SECTION_LEVEL_1 ) { write( String.valueOf( LESS_THAN ) + SECTION_TAG.toString() + SinkUtils.getAttributeString( SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ) ) + String.valueOf( SPACE ) + Attribute.NAME + String.valueOf( EQUAL ) + String.valueOf( QUOTE ) ); } else if ( depth == SECTION_LEVEL_2 ) { write( String.valueOf( LESS_THAN ) + SUBSECTION_TAG.toString() + SinkUtils.getAttributeString( SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ) ) + String.valueOf( SPACE ) + Attribute.NAME + String.valueOf( EQUAL ) + String.valueOf( QUOTE ) ); } } /** * {@inheritDoc} * * Ends a section. * @see XdocMarkup#SECTION_TAG * @see XdocMarkup#SUBSECTION_TAG */ protected void onSection_( int depth ) { if ( depth == SECTION_LEVEL_1 ) { writeEndTag( SECTION_TAG ); } else if ( depth == SECTION_LEVEL_2 ) { writeEndTag( SUBSECTION_TAG ); } } /** * {@inheritDoc} * * Starts a section title. * @see javax.swing.text.html.HTML.Tag#H4 * @see javax.swing.text.html.HTML.Tag#H5 * @see javax.swing.text.html.HTML.Tag#H6 */ protected void onSectionTitle( int depth, SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_SECTION_ATTRIBUTES ); if ( depth == SECTION_LEVEL_3 ) { writeStartTag( H4, atts ); } else if ( depth == SECTION_LEVEL_4 ) { writeStartTag( H5, atts ); } else if ( depth == SECTION_LEVEL_5 ) { writeStartTag( H6, atts ); } } /** * {@inheritDoc} * * Ends a section title. * @see javax.swing.text.html.HTML.Tag#H4 * @see javax.swing.text.html.HTML.Tag#H5 * @see javax.swing.text.html.HTML.Tag#H6 */ protected void onSectionTitle_( int depth ) { if ( depth == SECTION_LEVEL_1 || depth == SECTION_LEVEL_2 ) { write( String.valueOf( QUOTE ) + String.valueOf( GREATER_THAN ) ); } else if ( depth == SECTION_LEVEL_3 ) { writeEndTag( H4 ); } else if ( depth == SECTION_LEVEL_4 ) { writeEndTag( H5 ); } else if ( depth == SECTION_LEVEL_5 ) { writeEndTag( H6 ); } } // ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- /** * {@inheritDoc} * @see XdocMarkup#SOURCE_TAG * @see javax.swing.text.html.HTML.Tag#PRE */ public void verbatim( SinkEventAttributes attributes ) { setVerbatimFlag( true ); MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_VERBATIM_ATTRIBUTES ); if ( atts == null ) { atts = new SinkEventAttributeSet(); } boolean boxed = false; if ( atts.isDefined( SinkEventAttributes.DECORATION ) ) { boxed = "boxed".equals( (String) atts.getAttribute( SinkEventAttributes.DECORATION ) ); } boxedFlag = boxed; atts.removeAttribute( SinkEventAttributes.DECORATION ); if ( boxed ) { writeStartTag( SOURCE_TAG, atts ); } else { atts.removeAttribute( Attribute.ALIGN.toString() ); writeStartTag( PRE, atts ); } } /** * {@inheritDoc} * @see XdocMarkup#SOURCE_TAG * @see javax.swing.text.html.HTML.Tag#PRE */ public void verbatim_() { if ( boxedFlag ) { writeEndTag( SOURCE_TAG ); } else { writeEndTag( PRE ); } setVerbatimFlag( false ); boxedFlag = false; } /** * The default align is center. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TABLE */ public void tableRows( int[] justification, boolean grid ) { // similar to super.tableRows( justification, grid ) but without class. this.tableRows = true; setCellJustif( justification ); if ( this.tableAttributes == null ) { this.tableAttributes = new SinkEventAttributeSet( 0 ); } MutableAttributeSet att = new SinkEventAttributeSet(); if ( !tableAttributes.isDefined( Attribute.BORDER.toString() ) ) { att.addAttribute( Attribute.BORDER, ( grid ? "1" : "0" ) ); } att.addAttributes( tableAttributes ); tableAttributes.removeAttributes( tableAttributes ); writeStartTag( TABLE, att ); } /** * The default valign is top. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TR */ public void tableRow() { MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.VALIGN, "top" ); writeStartTag( TR, att ); setCellCount( 0 ); } public void close() { super.close(); init(); } /** * Adds a link with an optional target. * * @param name the link name. * @param target the link target, may be null. */ public void link( String name, String target ) { if ( isHeadFlag() ) { return; } MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.HREF, HtmlTools.escapeHTML( name ) ); if ( target != null ) { att.addAttribute( Attribute.TARGET, target ); } writeStartTag( A, att ); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Write text to output, preserving white space. * * @param text The text to write. * @deprecated use write(String) */ protected void markup( String text ) { write( text ); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.javadoxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocPar0000644000175000017500000003673511244503456033260 0ustar twernertwernerpackage org.apache.maven.doxia.module.xdoc; /* * 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.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import javax.swing.text.html.HTML.Attribute; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.macro.manager.MacroNotFoundException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.parser.XhtmlBaseParser; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Parse an xdoc model and emit events into the specified doxia Sink. * * @author Jason van Zyl * @version $Id: XdocParser.java 807182 2009-08-24 12:27:26Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="xdoc" */ public class XdocParser extends XhtmlBaseParser implements XdocMarkup { /** The source content of the input reader. Used to pass into macros. */ private String sourceContent; /** Empty elements don't write a closing tag. */ private boolean isEmptyElement; /** A macro name. */ private String macroName; /** The macro parameters. */ private Map macroParameters = new HashMap(); /** Indicates that we're inside <properties> or <head>.*/ private boolean inHead; /** Indicates that <title> was called from <properties> or <head>.*/ private boolean hasTitle; /** {@inheritDoc} */ public void parse( Reader source, Sink sink ) throws ParseException { this.sourceContent = null; init(); try { StringWriter contentWriter = new StringWriter(); IOUtil.copy( source, contentWriter ); sourceContent = contentWriter.toString(); } catch ( IOException ex ) { throw new ParseException( "Error reading the input source: " + ex.getMessage(), ex ); } finally { IOUtil.close( source ); } Reader tmp = new StringReader( sourceContent ); // leave this at default (false) until everything is properly implemented, see DOXIA-226 //setIgnorableWhitespace( true ); try { super.parse( tmp, sink ); } finally { this.sourceContent = null; setSecondParsing( false ); init(); } } /** {@inheritDoc} */ protected void handleStartTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { isEmptyElement = parser.isEmptyElementTag(); SinkEventAttributeSet attribs = getAttributesFromParser( parser ); if ( parser.getName().equals( DOCUMENT_TAG.toString() ) ) { //Do nothing return; } else if ( parser.getName().equals( HEAD.toString() ) ) { if ( !inHead ) // we might be in head from a already { this.inHead = true; sink.head( attribs ); } } else if ( parser.getName().equals( TITLE.toString() ) ) { if ( hasTitle ) { getLog().warn( " was already defined in <properties>, ignored <title> in <head>." ); try { parser.nextText(); // ignore next text event } catch ( IOException ex ) { throw new XmlPullParserException( "Failed to parse text", parser, ex ); } } else { sink.title( attribs ); } } else if ( parser.getName().equals( AUTHOR_TAG.toString() ) ) { sink.author( attribs ); } else if ( parser.getName().equals( DATE_TAG.toString() ) ) { sink.date( attribs ); } else if ( parser.getName().equals( META.toString() ) ) { handleMetaStart( parser, sink, attribs ); } else if ( parser.getName().equals( BODY.toString() ) ) { if ( inHead ) { sink.head_(); this.inHead = false; } sink.body( attribs ); } else if ( parser.getName().equals( SECTION_TAG.toString() ) ) { handleSectionStart( Sink.SECTION_LEVEL_1, sink, attribs, parser ); } else if ( parser.getName().equals( SUBSECTION_TAG.toString() ) ) { handleSectionStart( Sink.SECTION_LEVEL_2, sink, attribs, parser ); } else if ( parser.getName().equals( SOURCE_TAG.toString() ) ) { verbatim(); attribs.addAttributes( SinkEventAttributeSet.BOXED ); sink.verbatim( attribs ); } else if ( parser.getName().equals( PROPERTIES_TAG.toString() ) ) { if ( !inHead ) // we might be in head from a <head> already { this.inHead = true; sink.head( attribs ); } } // ---------------------------------------------------------------------- // Macro // ---------------------------------------------------------------------- else if ( parser.getName().equals( MACRO_TAG.toString() ) ) { handleMacroStart( parser ); } else if ( parser.getName().equals( PARAM.toString() ) ) { handleParamStart( parser, sink ); } else if ( !baseStartTag( parser, sink ) ) { if ( isEmptyElement ) { handleUnknown( parser, sink, TAG_TYPE_SIMPLE ); } else { handleUnknown( parser, sink, TAG_TYPE_START ); } if ( getLog().isDebugEnabled() ) { String position = "[" + parser.getLineNumber() + ":" + parser.getColumnNumber() + "]"; String tag = "<" + parser.getName() + ">"; getLog().debug( "Unrecognized xdoc tag: " + tag + " at " + position ); } } } /** {@inheritDoc} */ protected void handleEndTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { if ( parser.getName().equals( DOCUMENT_TAG.toString() ) ) { //Do nothing return; } else if ( parser.getName().equals( HEAD.toString() ) ) { //Do nothing, head is closed with BODY start. } else if ( parser.getName().equals( BODY.toString() ) ) { consecutiveSections( 0, sink ); sink.body_(); } else if ( parser.getName().equals( TITLE.toString() ) ) { if ( !hasTitle ) { sink.title_(); this.hasTitle = true; } } else if ( parser.getName().equals( AUTHOR_TAG.toString() ) ) { sink.author_(); } else if ( parser.getName().equals( DATE_TAG.toString() ) ) { sink.date_(); } else if ( parser.getName().equals( SOURCE_TAG.toString() ) ) { verbatim_(); sink.verbatim_(); } else if ( parser.getName().equals( PROPERTIES_TAG.toString() ) ) { //Do nothing, head is closed with BODY start. } else if ( parser.getName().equals( MACRO_TAG.toString() ) ) { handleMacroEnd( sink ); } else if ( parser.getName().equals( PARAM.toString() ) ) { if ( !StringUtils.isNotEmpty( macroName ) ) { handleUnknown( parser, sink, TAG_TYPE_END ); } } else if ( parser.getName().equals( SECTION_TAG.toString() ) ) { consecutiveSections( 0, sink ); sink.section1_(); } else if ( parser.getName().equals( SUBSECTION_TAG.toString() ) ) { consecutiveSections( Sink.SECTION_LEVEL_1, sink ); } else if ( !baseEndTag( parser, sink ) ) { if ( !isEmptyElement ) { handleUnknown( parser, sink, TAG_TYPE_END ); } } isEmptyElement = false; } /** {@inheritDoc} */ protected void consecutiveSections( int newLevel, Sink sink ) { closeOpenSections( newLevel, sink ); openMissingSections( newLevel, sink ); setSectionLevel( newLevel ); } /** {@inheritDoc} */ protected void init() { super.init(); this.isEmptyElement = false; this.macroName = null; this.macroParameters = null; this.inHead = false; this.hasTitle = false; } /** * Close open h4, h5, h6 sections. */ private void closeOpenSections( int newLevel, Sink sink ) { while ( getSectionLevel() >= newLevel ) { if ( getSectionLevel() == Sink.SECTION_LEVEL_5 ) { sink.section5_(); } else if ( getSectionLevel() == Sink.SECTION_LEVEL_4 ) { sink.section4_(); } else if ( getSectionLevel() == Sink.SECTION_LEVEL_3 ) { sink.section3_(); } else if ( getSectionLevel() == Sink.SECTION_LEVEL_2 ) { sink.section2_(); } setSectionLevel( getSectionLevel() - 1 ); } } private void handleMacroEnd( Sink sink ) throws MacroExecutionException { if ( !isSecondParsing() ) { if ( StringUtils.isNotEmpty( macroName ) ) { // TODO handles specific macro attributes macroParameters.put( "sourceContent", sourceContent ); XdocParser xdocParser = new XdocParser(); xdocParser.setSecondParsing( true ); macroParameters.put( "parser", xdocParser ); MacroRequest request = new MacroRequest( macroParameters, getBasedir() ); try { executeMacro( macroName, request, sink ); } catch ( MacroNotFoundException me ) { throw new MacroExecutionException( "Macro not found: " + macroName, me ); } } } // Reinit macro macroName = null; macroParameters = null; } private void handleMacroStart( XmlPullParser parser ) throws MacroExecutionException { if ( !isSecondParsing() ) { macroName = parser.getAttributeValue( null, Attribute.NAME.toString() ); if ( macroParameters == null ) { macroParameters = new HashMap(); } if ( StringUtils.isEmpty( macroName ) ) { throw new MacroExecutionException( "The '" + Attribute.NAME.toString() + "' attribute for the '" + MACRO_TAG.toString() + "' tag is required." ); } } } private void handleMetaStart( XmlPullParser parser, Sink sink, SinkEventAttributeSet attribs ) { String name = parser.getAttributeValue( null, Attribute.NAME.toString() ); String content = parser.getAttributeValue( null, Attribute.CONTENT.toString() ); if ( "author".equals( name ) ) { sink.author( null ); sink.text( content ); sink.author_(); } else if ( "date".equals( name ) ) { sink.date( null ); sink.text( content ); sink.date_(); } else { sink.unknown( "meta", new Object[] {new Integer( TAG_TYPE_SIMPLE )}, attribs ); } } private void handleParamStart( XmlPullParser parser, Sink sink ) throws MacroExecutionException { if ( !isSecondParsing() ) { if ( StringUtils.isNotEmpty( macroName ) ) { String paramName = parser.getAttributeValue( null, Attribute.NAME.toString() ); String paramValue = parser.getAttributeValue( null, Attribute.VALUE.toString() ); if ( StringUtils.isEmpty( paramName ) || StringUtils.isEmpty( paramValue ) ) { throw new MacroExecutionException( "'" + Attribute.NAME.toString() + "' and '" + Attribute.VALUE.toString() + "' attributes for the '" + PARAM.toString() + "' tag are required inside the '" + MACRO_TAG.toString() + "' tag." ); } macroParameters.put( paramName, paramValue ); } else { // param tag from non-macro object, see MSITE-288 handleUnknown( parser, sink, TAG_TYPE_START ); } } } private void handleSectionStart( int level, Sink sink, SinkEventAttributeSet attribs, XmlPullParser parser ) { consecutiveSections( level, sink ); Object id = attribs.getAttribute( Attribute.ID.toString() ); if ( id != null ) { sink.anchor( id.toString() ); sink.anchor_(); } sink.section( level, attribs ); sink.sectionTitle( level, attribs ); sink.text( HtmlTools.unescapeHTML( parser.getAttributeValue( null, Attribute.NAME.toString() ) ) ); sink.sectionTitle_( level ); } /** * Open missing h4, h5, h6 sections. */ private void openMissingSections( int newLevel, Sink sink ) { while ( getSectionLevel() < newLevel - 1 ) { setSectionLevel( getSectionLevel() + 1 ); if ( getSectionLevel() == Sink.SECTION_LEVEL_5 ) { sink.section5(); } else if ( getSectionLevel() == Sink.SECTION_LEVEL_4 ) { sink.section4(); } else if ( getSectionLevel() == Sink.SECTION_LEVEL_3 ) { sink.section3(); } else if ( getSectionLevel() == Sink.SECTION_LEVEL_2 ) { sink.section2(); } } } } �����������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000161�00000000000�011563� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSiteModule.java����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSit0000644�0001750�0001750�00000002556�11212745470�033266� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.xdoc; /* * 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.site.AbstractSiteModule; /** * <p>XdocSiteModule class.</p> * * @author <a href="mailto:jason@maven.org">Jason van Zyl</a> * @version $Id: XdocSiteModule.java 782392 2009-06-07 14:14:16Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="xdoc" */ public class XdocSiteModule extends AbstractSiteModule { /** * Default constructor. */ public XdocSiteModule() { super( "xdoc", "xml", "xdoc" ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000162�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSinkFactory.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSin0000644�0001750�0001750�00000003224�11141061207�033237� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.xdoc; /* * 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.AbstractXmlSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * Xdoc implementation of the Sink factory. * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: XdocSinkFactory.java 739565 2009-01-31 14:39:03Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="xdoc" */ public class XdocSinkFactory extends AbstractXmlSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { return new XdocSink( writer, encoding ); } /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding, String languageId ) { return new XdocSink( writer, encoding, languageId ); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000155�00000000000�011566� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocMarkup.java��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocMar0000644�0001750�0001750�00000006552�11141054030�033230� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.xdoc; /* * 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 javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.HtmlMarkup; /** * List of <code>Xdoc</code> markups. * <br/> * Xdoc uses several {@link javax.swing.text.html.HTML.Tag} and {@link javax.swing.text.html.HTML.Attribute} * as markups and custom tags. * * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> * @version $Id: XdocMarkup.java 739557 2009-01-31 13:54:32Z vsiveton $ * @since 1.0 */ public interface XdocMarkup extends HtmlMarkup { /** XDOC namespace: "http://maven.apache.org/XDOC/2.0" */ String XDOC_NAMESPACE = "http://maven.apache.org/XDOC/2.0"; /** XDOC system id: "http://maven.apache.org/xsd/xdoc-2.0.xsd" */ String XDOC_SYSTEM_ID = "http://maven.apache.org/xsd/xdoc-2.0.xsd"; // ---------------------------------------------------------------------- // Specific Xdoc tags // ---------------------------------------------------------------------- /** Xdoc tag for <code>author</code> */ Tag AUTHOR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "author"; } }; /** Xdoc tag for <code>date</code> */ Tag DATE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "date"; } }; /** Xdoc tag for <code>document</code> */ Tag DOCUMENT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "document"; } }; /** Xdoc tag for <code>macro</code> */ Tag MACRO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "macro"; } }; /** Xdoc tag for <code>properties</code> */ Tag PROPERTIES_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "properties"; } }; /** Xdoc tag for <code>section</code> */ Tag SECTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "section"; } }; /** Xdoc tag for <code>source</code> */ Tag SOURCE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "source"; } }; /** Xdoc tag for <code>subsection</code> */ Tag SUBSECTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "subsection"; } }; } ������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000164�00000000000�011566� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XmlWriterXdocSink.java�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XmlWrit0000644�0001750�0001750�00000006107�11150514057�033307� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.xdoc; /* * 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.io.StringReader; import java.io.StringWriter; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; import org.codehaus.plexus.util.xml.XMLWriter; import org.codehaus.plexus.util.xml.XmlUtil; /** * A Doxia Sink which produces an xdoc document. * * @author juan <a href="mailto:james@jamestaylor.org">James Taylor</a> * @author Juan F. Codagnone (replaced println with XmlWriterXdocSink) * @version $Id: XmlWriterXdocSink.java 746992 2009-02-23 12:35:59Z vsiveton $ * @deprecated Since 1.1, this sink is not more supported. If you are looking for a <code>Sink</code> which produces * pretty formatted XML, you could use the {@link XdocSink#XdocSink(java.io.Writer)} as usual and reformat the * <code>Sink</code> content produced with {@link XmlUtil#prettyFormat(java.io.Reader, java.io.Writer)}. */ public class XmlWriterXdocSink extends XdocSink { /** Writer used by Xdoc */ private StringWriter xdocWriter; private XMLWriter xmlWriter; private XmlWriterXdocSink( StringWriter out, String encoding ) { super( out, encoding ); this.xdocWriter = out; this.xmlWriter = new PrettyPrintXMLWriter( out ); } /** * <p>Constructor for XmlWriterXdocSink.</p> * * @param out the wanted XML Writer. * @deprecated since 1.1 */ public XmlWriterXdocSink( XMLWriter out ) { this( new StringWriter(), "UTF-8" ); this.xmlWriter = out; } /** {@inheritDoc} */ public void close() { super.close(); String xdocContent = xdocWriter.toString(); if ( getLog().isDebugEnabled() ) { getLog().debug( "Xdoc content: " + xdocContent ); } StringWriter formattedContent = new StringWriter(); try { XmlUtil.prettyFormat( new StringReader( xdocContent ), formattedContent ); } catch ( IOException e ) { if ( getLog().isDebugEnabled() ) { getLog().error( "IOException: " + e.getMessage(), e ); } formattedContent = new StringWriter(); formattedContent.write( xdocContent ); } xmlWriter.writeMarkup( formattedContent.toString() ); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/����������������������������������������������������������0000755�0001750�0001750�00000000000�11632765560�020335� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/pom.xml���������������������������������������������������0000644�0001750�0001750�00000007335�11470562366�021661� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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 http://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>1.1.4</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>doxia-module-fo</artifactId> <name>Doxia :: FO Module</name> <description>A Doxia module for FO (Formatting Objects) source documents.</description> <developers> <developer> <id>ltheussl</id> <name>Lukas Theussl</name> <email>ltheussl@apache.org</email> <organization>Apache Software Foundation</organization> <roles> <role>Java Developer</role> </roles> <timezone>+1</timezone> </developer> </developers> <dependencies> <!-- Doxia --> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-logging-api</artifactId> </dependency> <!-- plexus --> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> </dependency> <!-- misc --> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.6</version> </dependency> <dependency> <groupId>org.apache.xmlgraphics</groupId> <artifactId>fop</artifactId> <version>0.95</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.12</version> <!-- runtime dep for fop --> <scope>runtime</scope> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.9.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <!-- To be sure that JVM will implement AWT in software --> <systemProperties> <property> <name>java.awt.headless</name> <value>true</value> </property> </systemProperties> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>reporting</id> <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>l10n-maven-plugin</artifactId> <version>1.0-alpha-2</version> <configuration> <locales> <locale>en</locale> </locales> <excludes> <exclude>log4j*</exclude> </excludes> </configuration> </plugin> </plugins> </reporting> </profile> </profiles> </project> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/������������������������������������������������������0000755�0001750�0001750�00000000000�11632765560�021124� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/�������������������������������������������������0000755�0001750�0001750�00000000000�11632765557�022111� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/resources/���������������������������������������0000755�0001750�0001750�00000000000�11632765557�024123� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/resources/figure.png�����������������������������0000644�0001750�0001750�00000010701�10635316117�026073� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������‰PNG  ��� IHDR���Z������#ž/���gAMA��ŻČ7Šé���tEXtSoftware�Adobe ImageReadyqÉe<��SIDAThŢíYYŹe×UţÖÚ{źsîPcWUWWUnwŰvşălj«1JŠČ "xL J$„HDâŰ! „¶€ÄAbpl„‘رĹq<$ÁC·Çjčꪺuď=çěa-νŐŐţ 9/·jßsÎŢű[ßúľµ×%UĹĎ®ńe›UTeę˘ÝşôÎúO^|®5Ń.‡{H·Ýű@ÖéJđOëß~úô“~ďR‘ĹV›ŤŁ„d—}|D XÇÄ®·6Ö ™śÉ&¦ÚťIkňd4T!‘™[ŕöu—•»kW·öäˇ<kKôÚîvgw°Ý›™™LÖ z{ŐÎîŐÍË”ÂňňR†˝^ćdfnÁĺ]€l"%—%qŰýáĆ憿üΡ´s|Ą337ë“P†ÎärŕV^ős»N||űĐą=7#*Ę1‰1lţîówZ�ŞJDE‹ĘŻüđĺžűÁÔˇ‰şÜ:ÜÁ‰Ąţ ˝ýç^}î)g¶gç2(Iu_dŕ}]Š÷ŃöÉ{ĎŢ{ŃĐž0SłťÎda­!Q‰Ubm9Żv‡ý~oęäé˘ŰŃ”ĽŻfç˛öT(}€éNOgť™ţDyľ|c(,”I'ŰŰ“şµ@W¤eó,t'ŞÁîµMź›^ĆľkU×ĘŮŘçf—ďÍĚn\~÷Çß<…xôČ’¤\S„ J_…cźŘ;ňË5µM¬ °I €h±�1Ŕß}ö…O}ú“ L�mŕ3żý«eůĎWß=[ožżňç/y  ¬~xé¶#]‰‰Ë*l×�¸ČynˇÝęX[XvĘJľÂŕZĎZ(Ůäł0s4Ţ~WŐą-N-ÎwiçµîÜ|J¦żł}ěřĘÍ·ś>qü”RZßÜ~â?Ă{oľ‘‹yÁË‹“‹‹™ĄPöSí©™iŐ¸×ó¶/j/ŰCuÇe]‹n‡o=9˙¶ĂOßzŤęwŹ;ĆÖ­­ďťĚßq˙ą„Ľ70"HśH‘ÉbQú;{Ż?˙ěí·Üü“×/0P÷˙ńŔ<ł^yió…W7+Ŕ¸ó®ů®ĂŹŢŘžjĺÝ‚|”<w‡;Ó˛,BHµh(˝—H-¸ąt蔟˝#ÎŢšşË0&BŻĹÎ|¶Óv;ŽéÖÜ}ęÖÓ3“csWäyžÝyćŽé®]ßXÖĚÖ¤ö*ôA"69¨Pb4šZŘMĎ v´ęď–e=H•f9Ý|r!§ö[Úé¬ÍĂCł8÷ŻĹb! GQłDTÄ4‚ăŇÚÖĆĄ‹É÷ŢůńóW^úöo®Ţôż4xĺµµ Ŕ“ßyĺÝ›¦ß˝´§@DŕŘéůť­ä$kgŽ-fuóN‘ebsP5H¤l4FŕŮ4s\îňł·¦î\ťO$!ŠŠÓ:vâÔ-§¦ćç[íÜK4Ćĺy»ňéţű{/żřâĘĘÄ˝ľÝŘNŢîľńĆú“O<%m[dÁÂpć\–•U™ˇl…>“Şł%:šň–éÚ`1ĎNž>|ë×ÎwfóŮ{]ćď ±Çj$P…B ftÇ“˙ň÷éÚ­·úëďLK_9}ňĂ‹.†_Ř0 \yk§¶€ ŕcZśĎ2Űʧ&ąí¸]p^Ŕ ˛Ás=†şNJ&ĎxîŽxô—ęąź‹ůś0QT Ę"łŤ‰ć'ŠŐ_85;ť1"ÖÎĺlřG/ľöO˙ř->,ź8ľtňć••“'Ť}ó‰}b0¬3!2R@b“Ř”}(…Ë=qÚeHĽYËzGŹ/î]ŘóEW‹šHL"†D¤$ŃŔqőĹ˙˛Zr ÖXÖ”TâÇî;’4=őćÎAúÄÝË=łĽ»˝=ŮîÔ!şśň‚CJ!Úä“÷ZŇ˝ĹOťĚߦGn÷íYI")%)1‘1¤ŞJ„Ă“nzŇ�1­_Ý*śét3c°yuwj0mn—ý~•‚¤Dä\–=GĄ'1B170śęáŔ#Yg•’©÷ÎpÎíö Ők›ŐTKf—üň=ą !Â*‘Q@ALÄe'K!» GĆ&hŠÉ$a…ąíÄĚ«W«·{UĹoÜ»|˙]‹Yf®^ëľńŢΩ“]K†¦č‡ő@tâ9őq>qźéĚxc%‘ĆDPË”$#&I‘˘čt'g&�;˝áŐk[‡çI”CTŠvNF}ĘGçŮěnő겟›dC�6pY§Ű±ž{őn¤J™ŤŁ[),83»Ęĺĺ…ěČ= ŐŮ)�CÔ¸Ş@ :N–RP¨HTŃXE%-˝Ůȧî\|ćÍíóďí~úľc§Ź·}[j•uYíĆNŰŠTž§ëÉ›ŇÍwćÇďŽ37‘2Ą Ш!@ˇ ("IÁLĘěVŕÚvź$˛ŭ€ťíťjo` W•á­7/čŽÓ{»˝÷Ţľ´sm‡i@yc,Ő ¨9ĎŠ$FŤu`g„ŐSf9ŠöŔs+CR&@ ”�‘0Ib"'ËpX» Ƹzţ^¨ËĘ:uÖ-MćśăWnź»r´{űńQ©!–ľuŰ­Ví=yŮ ?s|ţ#ź±'4Eq©TᬩhTDQ@E‰’ŞUÍ2bÚÝŢÎťX6I"©ő>őözĆ»äŤ×_ßŢ9;s$®,ĎÎÍÍo]Keę“Qe§Pq6ÖUťTťËŠÂƤ¬š;˝ŞG:t˝"şč™¬Ş,I…ŞČBÓÁŞT%šAżęí /oVD0LĚeJR¸Ś¦:Ů[oo‹ŕCеţú^!¦=]@k;^.6/¶§ŽůÚç�N˘‚•™ˇŞ"˘JDDŤf)ĂdSm ¬Âú•µ# íţ Ď]˝Ţ€łÂ9M.#fíN0Ö}6š›<¤”CÖăD[Ş*_ÖŰśH &Ę­u¶ŽľîĐp8@kg§5ŹDQ2"%…*ÄDşĎŽŢNŞë )-»ąÓSELšbČ2FżOÎPř€f3Teruô9űˇ‰.lŮżôěżß<˝l»'D*!&fŁ˘�+¦Ô#R¨ „„Nff&Ú�@ U_×qÎ0ŔÄ­<ϲ,%äy·U´ »K—ŻŔ„Ľ“m¨9R’“ Č(ł‚$‰Oˇ.ŵڭÜĹäĘHTŐÝ+ç;ÇîL ) hPK)B ‘UŐűÎDLîÜD‘g°)IŇA…~ J&†Ü>\IF,ŰmëňĽ]»đ“/çČąă^¬h äĆ‚dECU%€U mg˛śV§írd…łlčnrŇ­BČą"7ĚeYn_Ýlg)!*SŔr™0†}5¬Ü�:ô)¦("d ˘/ÁárÇ™AąqŢo˝mď ő¤)« ŠwGpě i&CEqPŞ-Ée”Ű̱+DÓ íEěIw{·–¬Uj»Ž^R ‚<ł1˛°1SÓ­«ç_>»šÍśÎö|eR0dQŔŤ°’BD„Vîś5€Q–ç­;—19°Ą”ŕ“ńýˇÖ>ěö›;2JŠ!©q0ÎQcčdÎeâj )řh4Ą¨lłş )Ö Ę;_ő÷®ľ;sä¶$ ¨’!€‰H “Řřáúî\ÎËťÖô¤u{ĂPŐŐĺĂízămŰ“)5·”U)¨ŠuäÎTşe,3ç­…íkĎ?5wŹA{Ѥd’Ł�ŃQ™Cj¬@8Љ�Č9«bĚ„śšźÉÚ“I1ł †( ›·’’ ±±D&řhŚ«Ik_9 b0ąłŽS‘9Ǩc4LJ\ĹP×e§p±Ţ1BŞ Ri\OUĆěî—~}0\.Íňtf�X·+ůžoUšÇÚrYôUÁâÁyf) RhµZ63U­^ňÂęŕŐď;Ćäęoj‘$5STÁP…îDTT‰;X! ™?<Ýîv·¶6ŰEÇÔadŽťeG)‘±Î×É%آDoRť4:k ëZ«çÄ–bmX 2¤I4™F¸H9%4ŁźµŢßţY{ďť&„ `+QmŽýŁä'J)É:U€�€@ÍYh$’\t9kß�2 "\Sd†şmŰ”Ć)‰H2Ć4,ńµďőú)E&Ę2Űn ÓŰëűĘ+„®OLL¤" m¤zĽ®&G•F4‚*Ta[ÎÚ:^úţ9 ´0•Űý/ĐĽO DhčŰůD¤DLPUeşžŤW‘*’ŞŞ EĆ­ýů�=¸ÔŻŃ\Đ~"n¶Ç–¬ł ”‰12ŃШŤc15Ž9ióUSŽtj<Łâú{čújy?~ű‘$ŚâH„f Í^Du˙µ¬ś{”i´?UĹČL!1hŠD?ó�ógľ@�ćĎ<x�%čÄgGĺáN"ST•QLUETTSJŇűĚk˘fm*Łq&b"łHF˝ĹA´č@¬™÷ÉŻcFŃÖ\ŐqŇ(Ě,ă›™¸ůkô(fV‘č+@7_~|„ĺAFčx Şűlmh© UŤ1BÄY‹e¨Ů©a\řCDE¤Á±9™ęxM;§éb4}>Śź|_–ě'ü p¨č8\€’DĘŚQyťŇÔlÍ0±a�‹÷?ĽtîŃfsK÷?Üpoyőa‰ASjŘŃ\s3e|žŰN|Öťúś¨HŠćä璉D…™–?ú5fb&b >Ä•Ő‡Źž{äŘąGůŘą‡Ź®ţ±ebR†]}řčąG`WÎ=2Rčňę#ĚÚčŔâĎyáĚ ąÎ>xřě‡Ď>Ř8ý;cv¨Ş”›<ŃaÔˇ)9˘8´I§‹OőŇÓ_YZ}ô *PI)úëđ+®ľň8€Í—Űçŕxţ6^ř›âÖ/&‘ňŐżlŕ÷R3wţáÖó߀jJ1Ôuđ5$X{öˇµgZą˙ëĎ}móű__üČ×-ĂY¬=űĐĄg:zî¨^|ú++«°t˙ŁźůŞ*°˛úČÚóşńňc gG9»ţŇcë/=vxô/ÝđĂB“ Dj˘ŁóŚ6ÔXBQ%—ULhř'c±Ü—Jiŕ q.HFęGľţ f+ÇJb‚¨ŻkU‘$ @бą9ĹĐĚ%)hqőÍxnpŔüF1(€Ĺ{ľô>µ ­o‡áŃę¸oUB4>˘ 4-¬¦QahĽ˝Q cAe+b ďwÚqË~ßjö×­űüä/:·˙ţö ’$ĄcLl @TjzŢe&huLÇńĎ.~çˆqäÜ7 "‚µ§żĽxîŃKßűjcVÍj7^řsŘâ fé r:†cl&MÔ´é1™C)č(đ*‰xDźĄŐG\~ć+"úŢw˙hĺÜ7Ţ'™Í} ö›/?>÷Á/lľňřűććϨ_ý«k‰1F`Ś…Ź>ϲV§[מb`ł¬yłu™¤ ]řö—Vřf3mLşď¨F›c¤áĘł_[¸ëš{6^zě}Šzřě×›AUÝ|ď-4ć:ÖŕĆ©âőg©!‰ěWM‹‹Hd4ÖP©!3»ö™Lmű&ZĆY#I|]ŞDak™Mvúóáü_‹j‰‘¬Ë¤ľöMö6TŐĆ]1v@`‚a2MyHPpR[Űš„ÉpcľĎ ć›2l?}• 4:@"Ć´/Ľ € ÄÄJÍwă#É~ń§ű®¬€Ş$_›–ڎ8ŔQI1†`¬e“6tÓď�(_{|0:ÇVď÷Ţ’UhäJ*MnrÖ€DUD$i"±†YA$$*ŞBŁÚ›č†Lľ^†ýěĚrĂő˙¶oëEC05’����IEND®B`‚���������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/��������������������������������������������0000755�0001750�0001750�00000000000�11632765557�023032� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/����������������������������������������0000755�0001750�0001750�00000000000�11632765557�023621� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/���������������������������������0000755�0001750�0001750�00000000000�11632765557�025042� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/���������������������������0000755�0001750�0001750�00000000000�11632765557�026150� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/���������������������0000755�0001750�0001750�00000000000�11632765557�027254� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/��������������0000755�0001750�0001750�00000000000�11632765557�030541� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/�����������0000755�0001750�0001750�00000000000�11632765557�031145� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000151�00000000000�011562� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoSinkTest.java������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoSinkTest.0000644�0001750�0001750�00000044425�11375443253�033176� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.fo; /* * 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.File; import java.io.StringReader; import java.io.Writer; import org.apache.maven.doxia.document.DocumentMeta; import org.apache.maven.doxia.document.DocumentModel; import org.apache.maven.doxia.document.DocumentTOC; import org.apache.maven.doxia.document.DocumentTOCItem; import org.apache.maven.doxia.parser.XhtmlBaseParser; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.AbstractSinkTest; import org.apache.maven.doxia.sink.SinkTestDocument; /** * <code>FO Sink</code> Test case. * * @version $Id: FoSinkTest.java 946933 2010-05-21 08:39:07Z ltheussl $ */ public class FoSinkTest extends AbstractSinkTest { private FoConfiguration config; // ---------------------------------------------------------------------- // Specific test methods // ---------------------------------------------------------------------- /** * Uses fop to generate a pdf from a test document. * @throws Exception If the conversion fails. */ public void testConvertFO2PDF() throws Exception { String fileName = "test"; // first create fo FoSink fosink = new FoSink( getTestWriter( fileName ) ); fosink.beginDocument(); SinkTestDocument.generate( fosink ); fosink.endDocument(); fosink.close(); // then generate PDF fo2pdf( fileName ); } /** * Uses fop to generate an aggregated pdf from two test documents. * @throws Exception If the conversion fails. */ public void testAggregateMode() throws Exception { FoAggregateSink fosink = new FoAggregateSink( getTestWriter( "aggregate" ) ); fosink.setDocumentModel( getModel() ); fosink.beginDocument(); fosink.coverPage(); fosink.toc(); fosink.setDocumentName( "doc1" ); fosink.setDocumentTitle( "Document 1" ); SinkTestDocument.generate( fosink ); // re-use the same source fosink.setDocumentName( "doc2" ); fosink.setDocumentTitle( "Document 2" ); SinkTestDocument.generate( fosink ); fosink.endDocument(); // then generate PDF fo2pdf( "aggregate" ); } private DocumentModel getModel() { DocumentModel model = new DocumentModel(); model.setToc( getToc() ); model.setMeta( getMeta() ); return model; } private DocumentMeta getMeta() { DocumentMeta meta = new DocumentMeta(); meta.setAuthor( "The Apache Maven Project" ); meta.setTitle( "Doxia FO Sink" ); return meta; } private DocumentTOC getToc() { 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( "What's in here" ); toc.addItem( item1 ); toc.addItem( item2 ); return toc; } // ---------------------------------------------------------------------- // Abstract methods the individual SinkTests must provide // ---------------------------------------------------------------------- /** {@inheritDoc} */ protected String outputExtension() { return "fo"; } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new FoSink( writer ); } /** {@inheritDoc} */ protected boolean isXmlSink() { return true; } /** {@inheritDoc} */ protected String getTitleBlock( String title ) { String attribs = getConfig().getAttributeString( "doc.header.title" ); return EOL + "<fo:block" + attribs + ">" + title + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getAuthorBlock( String author ) { String attribs = getConfig().getAttributeString( "doc.header.author" ); return EOL + "<fo:block" + attribs + ">" + author + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getDateBlock( String date ) { String attribs = getConfig().getAttributeString( "doc.header.date" ); return EOL + "<fo:block" + attribs + ">" + date + "</fo:block>" + EOL; } // TODO protected String getHeadBlock() { return ""; } // TODO: remove public void testHead() { String expected = ""; assertEquals( "Wrong head!", expected, getHeadBlock() ); } /** {@inheritDoc} */ protected String getBodyBlock() { return EOL + "</fo:flow>" + EOL + "</fo:page-sequence>" + EOL + "</fo:root>" + EOL; } /** {@inheritDoc} */ protected String getSectionTitleBlock( String title ) { return title; } /** {@inheritDoc} */ protected String getSection1Block( String title ) { String attribs = getConfig().getAttributeString( "body.text" ); String attrib2 = getConfig().getAttributeString( "body.h1" ); return EOL + EOL + "<fo:block" + attribs + ">" + EOL + EOL + "<fo:block" + attrib2 + ">1 " + title + "</fo:block>" + EOL + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { String attribs = getConfig().getAttributeString( "body.text" ); String attrib2 = getConfig().getAttributeString( "body.h2" ); return EOL + EOL + "<fo:block" + attribs + ">" + EOL + EOL + "<fo:block" + attrib2 + ">0.1 " + title + "</fo:block>" + EOL + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { String attribs = getConfig().getAttributeString( "body.text" ); String attrib2 = getConfig().getAttributeString( "body.h3" ); return EOL + EOL + "<fo:block" + attribs + ">" + EOL + EOL + "<fo:block" + attrib2 + ">0.0.1 " + title + "</fo:block>" + EOL + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { String attribs = getConfig().getAttributeString( "body.text" ); String attrib2 = getConfig().getAttributeString( "body.h4" ); return EOL + EOL + "<fo:block" + attribs + ">" + EOL + EOL + "<fo:block" + attrib2 + ">" + title + "</fo:block>" + EOL + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { String attribs = getConfig().getAttributeString( "body.text" ); String attrib2 = getConfig().getAttributeString( "body.h5" ); return EOL + EOL + "<fo:block" + attribs + ">" + EOL + EOL + "<fo:block" + attrib2 + ">" + title + "</fo:block>" + EOL + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getListBlock( String item ) { String attribs = getConfig().getAttributeString( "list" ); String itemAttribs = getConfig().getAttributeString( "list.item" ); return EOL + EOL + "<fo:list-block" + attribs + ">" + EOL + "<fo:list-item" + itemAttribs + "><fo:list-item-label><fo:block>•</fo:block></fo:list-item-label>" + EOL + EOL + "<fo:list-item-body" + itemAttribs + ">" + EOL + "<fo:block>" + item + "</fo:block>" + EOL + "</fo:list-item-body>" + EOL + "</fo:list-item>" + EOL + "</fo:list-block>" + EOL; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { String attribs = getConfig().getAttributeString( "list" ); String itemAttribs = getConfig().getAttributeString( "list.item" ); return EOL + EOL + "<fo:list-block" + attribs + ">" + EOL + "<fo:list-item" + itemAttribs + ">" + EOL + "<fo:list-item-label>" + EOL + "<fo:block>i.</fo:block>" + EOL + "</fo:list-item-label>" + EOL + EOL + "<fo:list-item-body" + itemAttribs + ">" + EOL + "<fo:block>" + item + "</fo:block>" + EOL + "</fo:list-item-body>" + EOL + "</fo:list-item>" + EOL + "</fo:list-block>" + EOL; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { String dlAtts = getConfig().getAttributeString( "dl" ); String dtAtts = getConfig().getAttributeString( "dt" ); String ddAtts = getConfig().getAttributeString( "dd" ); return EOL + EOL + "<fo:block" + dlAtts + ">" + EOL + "<fo:block" + dtAtts + ">" + definum + "</fo:block>" + EOL + EOL + EOL + "<fo:block" + ddAtts + ">" + definition + "</fo:block>" + EOL + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { String dlAtts = getConfig().getAttributeString( "figure.display" ); String dtAtts = getConfig().getAttributeString( "figure.graphics" ); String ddAtts = getConfig().getAttributeString( "figure.caption" ); return EOL + EOL + "<fo:block" + dlAtts + "><fo:external-graphic" + " src=\"" + source + "\"" + dtAtts + "/>" + EOL + EOL + "<fo:block" + ddAtts + ">" + caption + "</fo:block>" + EOL + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { String dlAtts = getConfig().getAttributeString( "table.padding" ); String dtAtts = getConfig().getAttributeString( "table.layout" ); String ddAtts = getConfig().getAttributeString( "table.body.row" ); // String deAtts = getConfig().getAttributeString( "table.body.cell" ); return EOL + EOL + "<fo:block" + dlAtts + ">" + EOL + "<fo:table" + dtAtts + ">" + EOL + "<fo:table-column column-width=\"proportional-column-width(1)\"/>" + EOL + EOL + "<fo:table-body>" + EOL + "<fo:table-row" + ddAtts + "><fo:table-cell column-number=\"1\" padding-after=\"1.5pt\" padding-end=\"5pt\" " + "keep-together.within-column=\"always\" padding-start=\"2.5pt\" " + "background-color=\"#eeeeee\" padding-before=\"4pt\">" + EOL + "<fo:block line-height=\"1.2em\" " + "text-align=\"center\" font-family=\"Helvetica,sans-serif\" font-size=\"9pt\">" + EOL + cell + "</fo:block>" + EOL + "</fo:table-cell>" + EOL + "</fo:table-row>" + EOL + "</fo:table-body>" + EOL + "</fo:table>" + EOL + "</fo:block>" + EOL + EOL + "<fo:block white-space-collapse=\"true\" space-after=\"6pt\" space-before=\"3pt\" " + "font-family=\"Garamond,serif\" line-height=\"12pt\" text-align=\"center\" font-size=\"11pt\">" + "Table_caption</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { String attribs = getConfig().getAttributeString( "normal.paragraph" ); return EOL + "<fo:block" + attribs + ">" + text + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getVerbatimBlock( String text ) { String attribs = getConfig().getAttributeString( "body.source" ); return EOL + "<fo:block" + attribs + ">" + text + "</fo:block>" + EOL; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { String attribs = getConfig().getAttributeString( "body.rule" ); return EOL + EOL + "<fo:block>" + EOL + "<fo:leader" + attribs + " /></fo:block>" + EOL; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return EOL + "<fo:block break-before=\"page\" />" + EOL; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { // all anchors get '#' pre-pended return EOL + "<fo:inline id=\"#" + anchor + "\">" + anchor + "</fo:inline>"; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { String attribs = getConfig().getAttributeString( "href.internal" ); return EOL + "<fo:basic-link internal-destination=\"" + link + "\">" + EOL + "<fo:inline" + attribs + ">" + text + "</fo:inline></fo:basic-link>"; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { String attribs = getConfig().getAttributeString( "italic" ); return EOL + "<fo:inline" + attribs + ">" + text + "</fo:inline>"; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { String attribs = getConfig().getAttributeString( "bold" ); return EOL + "<fo:inline" + attribs + ">" + text + "</fo:inline>"; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { String attribs = getConfig().getAttributeString( "monospace" ); return EOL + "<fo:inline" + attribs + ">" + text + "</fo:inline>"; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return EOL + EOL + "<fo:block />"; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return " "; } /** {@inheritDoc} */ protected String getTextBlock( String text ) { return FoSink.escaped( text, false ); } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { return text; } // ---------------------------------------------------------------------- // Auxiliary methods // ---------------------------------------------------------------------- private void fo2pdf( String baseName ) throws Exception { // File outputDirectory = new File( getBasedirFile(), getOutputDir() ); File outputDirectory = new File( getBasedir(), outputBaseDir() + getOutputDir() ); File resourceDirectory = new File( getBasedirFile(), "target/test-classes" ); File foFile = new File( outputDirectory, baseName + "." + outputExtension() ); File pdfFile = new File( outputDirectory, baseName + ".pdf" ); FoUtils.convertFO2PDF( foFile, pdfFile, resourceDirectory.getCanonicalPath() ); } private FoConfiguration getConfig() { if ( config == null ) { config = ( (FoSink) getSink() ).getFoConfiguration(); } return config; } /** {@inheritDoc} */ protected String getCommentBlock( String text ) { return "<!-- Simple comment with - - - - -->"; } /** * DOXIA-357 * * @throws Exception if any */ public void testTableCaption() throws Exception { StringBuffer html = new StringBuffer(); html.append( "<table>" ).append( EOL ); html.append( "<caption>caption table</caption>" ).append( EOL ); html.append( "<tr>" ).append( EOL ); html.append( "<td>foo</td>" ).append( EOL ); html.append( "</tr>" ).append( EOL ); html.append( "<tr>" ).append( EOL ); html.append( "<td>bar</td>" ).append( EOL ); html.append( "</tr>" ).append( EOL ); html.append( "</table>" ).append( EOL ); String fileName = "testTableCaption"; // first create fo FoSink fosink = new FoSink( getTestWriter( fileName ) ); fosink.beginDocument(); SinkTestDocument.generateHead( fosink ); fosink.body(); XhtmlBaseParser parser = new XhtmlBaseParser(); parser.parse( new StringReader( html.toString() ), fosink ); fosink.body_(); fosink.endDocument(); fosink.close(); // then generate PDF fo2pdf( fileName ); } /** * @throws Exception if any */ public void testNestedTables() throws Exception { StringBuffer html = new StringBuffer(); html.append( "<table>" ).append( EOL ); html.append( "<caption>first caption</caption>" ).append( EOL ); html.append( "<tr>" ).append( EOL ); html.append( "<td>foo</td>" ).append( EOL ); html.append( "</tr>" ).append( EOL ); html.append( "<tr>" ).append( EOL ); html.append( "<td>" ).append( EOL ); html.append( "<table>" ).append( EOL ); html.append( "<caption>second caption</caption>" ).append( EOL ); html.append( "<tr>" ).append( EOL ); html.append( "<td>foo</td>" ).append( EOL ); html.append( "<td>bar</td>" ).append( EOL ); html.append( "</tr>" ).append( EOL ); html.append( "<tr>" ).append( EOL ); html.append( "<td>foo1</td>" ).append( EOL ); html.append( "<td>" ).append( EOL ); html.append( "<table>" ).append( EOL ); html.append( "<caption>third caption</caption>" ).append( EOL ); html.append( "<tr>" ).append( EOL ); html.append( "<td>foo1</td>" ).append( EOL ); html.append( "<td>bar1</td>" ).append( EOL ); html.append( "</tr>" ).append( EOL ); html.append( "</table>" ).append( EOL ); html.append( "</td>" ).append( EOL ); html.append( "</tr>" ).append( EOL ); html.append( "</table>" ).append( EOL ); html.append( "</td>" ).append( EOL ); html.append( "</tr>" ).append( EOL ); html.append( "</table>" ).append( EOL ); String fileName = "testNestedTables"; // first create fo FoSink fosink = new FoSink( getTestWriter( fileName ) ); fosink.beginDocument(); SinkTestDocument.generateHead( fosink ); fosink.body(); XhtmlBaseParser parser = new XhtmlBaseParser(); parser.parse( new StringReader( html.toString() ), fosink ); fosink.body_(); fosink.endDocument(); fosink.close(); // then generate PDF fo2pdf( fileName ); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000162�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregate0000644�0001750�0001750�00000014055�11250711701�033222� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.fo; /* * 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.StringWriter; import java.io.Writer; import junit.framework.TestCase; /** * Test FoAggregateSink. * * @author ltheussl * @version $Id: FoAggregateSinkTest.java 811802 2009-09-06 10:49:37Z vsiveton $ */ public class FoAggregateSinkTest extends TestCase { private FoAggregateSink sink; private Writer writer; /** * Set up the writer. * * @throws java.lang.Exception if any. */ protected void setUp() throws Exception { super.setUp(); writer = new StringWriter(); } /** * Test of body method, of class FoAggregateSink. */ public void testBody() { try { sink = new FoAggregateSink( writer ); sink.setDocumentName( "folder/documentName.apt" ); sink.setDocumentTitle( "documentTitle" ); sink.body(); sink.body_(); } finally { sink.close(); } assertTrue( writer.toString().indexOf( "<fo:block id=\"./folder/documentName\">" ) != -1 ); } /** * Test of setDocumentName method, of class FoAggregateSink. */ public void testSetDocumentName() { try { sink = new FoAggregateSink( writer ); sink.setDocumentName( "folder\\documentName.boo" ); sink.body(); } finally { sink.close(); } assertTrue( writer.toString().indexOf( "<fo:block id=\"./folder/documentName\">" ) != -1 ); } /** * Test of figureGraphics method, of class FoAggregateSink. */ public void testFigureGraphics() { try { sink = new FoAggregateSink( writer ); sink.setDocumentName( "./folder\\docName.xml" ); sink.figureGraphics( "./../images/fig.png", null ); } finally { sink.close(); } assertTrue( writer.toString().indexOf( "<fo:external-graphic src=\"./images/fig.png\"" ) != -1 ); } /** * Test of anchor method, of class FoAggregateSink. */ public void testAnchor() { try { sink = new FoAggregateSink( writer ); sink.anchor( "invalid Anchor" ); sink.setDocumentName( "./folder\\docName.xml" ); sink.anchor( "validAnchor" ); } finally { sink.close(); } assertTrue( writer.toString().indexOf( "<fo:inline id=\"#invalid_Anchor\">" ) != -1 ); assertTrue( writer.toString().indexOf( "<fo:inline id=\"./folder/docName#validAnchor\">" ) != -1 ); } /** * Test of link method, of class FoAggregateSink. */ public void testLink() { try { sink = new FoAggregateSink( writer ); sink.link( "http://www.example.com/" ); sink.text( "http://www.example.com/" ); sink.link_(); sink.setDocumentName( "./folder\\docName.xml" ); sink.link( "#anchor" ); sink.text( "#anchor" ); sink.link_(); sink.link( "./././index.html" ); sink.text( "./././index.html" ); sink.link_(); sink.link( "./../download.html" ); sink.text( "./../download.html" ); sink.link_(); sink.link( ".///test.html" ); sink.text( "./test.html" ); sink.link_(); sink.link( "./whatsnew-1.1.html" ); sink.text( "./whatsnew-1.1.html" ); sink.link_(); sink.setDocumentName( ".///whatsnew-1.1.html" ); sink.body(); sink.body_(); } finally { sink.close(); } String result = writer.toString(); assertTrue( result.indexOf( "<fo:basic-link external-destination=\"http://www.example.com/\">" ) != -1 ); assertTrue( result.indexOf( "<fo:basic-link internal-destination=\"./folder/docName#anchor\">" ) != -1 ); assertTrue( result.indexOf( "<fo:basic-link internal-destination=\"./folder/index\">" ) != -1 ); assertTrue( result.indexOf( "<fo:basic-link internal-destination=\"./download\">" ) != -1 ); assertTrue( result.indexOf( "<fo:basic-link internal-destination=\"./folder/test\">" ) != -1 ); assertTrue( result.indexOf( "<fo:basic-link internal-destination=\"./folder/whatsnew-1.1\">" ) != -1 ); assertTrue( result.indexOf( "<fo:block id=\"./whatsnew-1.1\">" ) != -1 ); writer = new StringWriter(); try { sink = new FoAggregateSink( writer ); sink.setDocumentName( "./subdir/dir/index.html" ); sink.link( "../../root.html" ); sink.text( "../../root.html" ); sink.link_(); sink.link( "../../../outside.html" ); sink.text( "../../../outside.html" ); sink.link_(); sink.body(); sink.body_(); } finally { sink.close(); } result = writer.toString(); assertTrue( result.indexOf( "<fo:basic-link internal-destination=\"./root\">" ) != -1 ); assertTrue( result.indexOf( "<fo:basic-link internal-destination=\"./outside\">" ) != -1 ); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������././@LongLink���������������������������������������������������������������������������������������0000000�0000000�0000000�00000000162�00000000000�011564� L����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoConfigurationTest.java���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoConfigura0000644�0001750�0001750�00000005137�11243503005�033250� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.apache.maven.doxia.module.fo; /* * 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 javax.swing.text.MutableAttributeSet; import javax.swing.text.SimpleAttributeSet; import junit.framework.TestCase; /** * FoConfiguration tests. * * @version $Id: FoConfigurationTest.java 806502 2009-08-21 11:33:25Z vsiveton $ */ public class FoConfigurationTest extends TestCase { /** Tests the getAttributeString( String ) method. */ public void testGetAttributeString() { FoConfiguration config = new FoConfiguration(); assertEquals( "Null attribute ID should return empty string!", "", config.getAttributeString( null ) ); assertEquals( "Non existent attribute ID should return empty string!", "", config.getAttributeString( "a.dummy.attribute" ) ); assertEquals( "Wrong attributes returned for body.pre!", " font-family=\"monospace\" font-size=\"10pt\"", config.getAttributeString( "body.pre" ) ); } /** Tests the getAttributeSet( String ) method. */ public void testGetAttributeSet() { FoConfiguration config = new FoConfiguration(); assertNull( "Null attribute ID should return null AttributeSet!", config.getAttributeSet( null ) ); assertNull( "Empty attribute ID should return null AttributeSet!", config.getAttributeSet( "" ) ); assertNull( "Non existent attribute ID should return null AttributeSet!", config.getAttributeSet( "a.dummy.attribute" ) ); MutableAttributeSet expected = new SimpleAttributeSet(); expected.addAttribute( "font-size", "10pt" ); expected.addAttribute( "font-family", "monospace" ); MutableAttributeSet actual = config.getAttributeSet( "body.pre" ); assertTrue( "Wrong AttributeSet returned for body.pre!", expected.isEqual( actual ) ); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/site/�������������������������������������������������0000755�0001750�0001750�00000000000�11632765560�022070� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/site/site.xml�����������������������������������������0000644�0001750�0001750�00000002514�11103330660�023536� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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 name="Doxia :: FO Module"> <bannerLeft> <name>Doxia :: FO Module</name> <src>http://maven.apache.org/images/apache-maven-project-2.png</src> <href>http://maven.apache.org/doxia/</href> </bannerLeft> <body> <menu ref="parent"/> <menu name="Doxia :: FO Module"> <item name="Overview" href="index.html"/> <item name="Usage" href="usage.html"/> <item name="Links" href="links.html"/> </menu> <menu ref="reports"/> </body> </project> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/site/xdoc/��������������������������������������������0000755�0001750�0001750�00000000000�11632765560�023025� 5����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������doxia-1.1.4/doxia-modules/doxia-module-fo/src/site/xdoc/index.xml�����������������������������������0000644�0001750�0001750�00000003673�11206001044�024640� 0����������������������������������������������������������������������������������������������������ustar �twerner�������������������������twerner����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?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. --> <document> <properties> <title>Doxia FO Module - Index Lukas Theussl

This is a Doxia module for XSL Formatting Objects.

Currently only a sink is available, ie you can generate FO files either programmatically or by converting from any other input format supported by Doxia, but you cannot parse them.

The generated FO files can then be converted into other formats, eg pdf, using Apache Fop. Check out the usage examples.

  • Table captions not implemented
  • Table width is fixed and column widths are uniformly distributed
doxia-1.1.4/doxia-modules/doxia-module-fo/src/site/xdoc/usage.xml0000644000175000017500000001265511206000343024636 0ustar twernertwerner Doxia FO Module - Usage Lukas Theussl

Here's an example that converts a single apt input file into a fo document. To produce a pdf from the result using Apache FOP, see eg ExampleFO2PDF.

import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import org.apache.maven.doxia.module.apt.AptParser; import org.apache.maven.doxia.module.fo.FoSink; import org.apache.maven.doxia.parser.ParseException; public class Apt2FO { public static void main(String[] args) { try { // Open input apt document: FileReader source = new FileReader( new File( "resources", "test.apt" ) ); // Create FO sink: FoSink fosink = new FoSink( new FileWriter( new File( "output", "test.fo" ) ) ); AptParser parser = new AptParser(); parser.parse( source, fosink ); // close streams fosink.close(); source.close(); } catch ( ParseException e ) { e.printStackTrace(); } catch ( FileNotFoundException e ) { e.printStackTrace(); } catch ( IOException e ) { e.printStackTrace(); } } }

If you want to parse several source documents into a single fo file, so you can generate a single pdf from multiple source files, you should use the FoAggregateSink. A simple example is outlined below, refer to the API docs for more information.

AptParser parser = new AptParser(); FoAggregateSink fosink = new FoAggregateSink( new FileWriter( new File( "out", "aggregate.fo" ) ) ); // getDocumentModel() should return a DocumentModel object fosink.setDocumentModel( getDocumentModel() ); fosink.beginDocument(); fosink.coverPage(); fosink.toc(); // first document FileReader source1 = new FileReader( new File( "resources", "test1.apt" ) ); fosink.setDocumentName( "doc1" ); fosink.setDocumentTitle( "Document 1" ); parser.parse( source1, fosink ); // second document FileReader source2 = new FileReader( new File( "resources", "test2.apt" ) ); fosink.setDocumentName( "doc2" ); fosink.setDocumentTitle( "Document 2" ); parser.parse( source2, fosink ); fosink.endDocument();

To compile and run the following example, you need the following jars on your classpath: doxia-core-1.1.1, doxia-module-fo-1.1.1, doxia-sink-api-1.1.1, doxia-logging-api-1.1.1, commons-configuration-1.4, commons-lang-2.4, plexus-utils-1.5.8, commons-collections-3.2, commons-logging-1.1.1.

import java.io.File; import java.io.IOException; import org.apache.maven.doxia.module.fo.FoSinkFactory; import org.apache.maven.doxia.sink.Sink; public class TestPDF { public static void main( String[] args ) { Sink sink = null; try { sink = new FoSinkFactory().createSink( new File( "." ), "test.fo" ); populateSink( sink ); } catch ( IOException ex ) { ex.printStackTrace(); } finally { sink.close(); } } private static void populateSink( Sink sink ) { sink.head(); sink.title(); sink.text( "Title" ); sink.title_(); sink.author(); sink.text( "Author" ); sink.author_(); sink.date(); sink.text( "Date" ); sink.date_(); sink.head_(); sink.body(); sink.paragraph(); sink.text( "Hello world!" ); sink.paragraph_(); sink.body_(); } }
doxia-1.1.4/doxia-modules/doxia-module-fo/src/site/xdoc/links.xml0000644000175000017500000000304410635316117024660 0ustar twernertwerner Doxia FO Module - Links Lukas Theussl
doxia-1.1.4/doxia-modules/doxia-module-fo/src/main/0000755000175000017500000000000011632765560022050 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/resources/0000755000175000017500000000000011632765560024062 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/resources/doxia-fo.properties0000644000175000017500000000154611203760157027703 0ustar twernertwerner# 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. footer.rights=ALL RIGHTS RESERVED. footer.confidential=PROPRIETARY AND CONFIDENTIAL doxia-1.1.4/doxia-modules/doxia-module-fo/src/main/resources/doxia-fo_en.properties0000644000175000017500000000227611203760157030366 0ustar twernertwerner# 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: # This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It # must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the # JVM's default locale (which need not be "en"). See the method javadoc about # ResourceBundle.getBundle(String, Locale, ClassLoader) # for a full description of the lookup strategy. doxia-1.1.4/doxia-modules/doxia-module-fo/src/main/resources/fo-styles.xslt0000644000175000017500000006635111212474726026731 0ustar twernertwerner 8.27in 11.70in 0.625in 0.6in 1in 1in cover-page 0.7in cover-inside 0in 0in 0in 0in toc 0.7in 0.8in 0.35in 0.125in body 0.7in 0.8in 0.35in 0.125in Garamond,serif Helvetica,sans-serif #000000 always monospace italic bold monospace 10pt 11pt 12pt true 10pt inherited-property-value(start-indent) + 1em inherited-property-value(end-indent) + 1em no-wrap always false black solid 0.5pt #454545 0.25em 0.25em 0.25em 0.25em inherited-property-value(start-indent) + 2.5em inherited-property-value(end-indent) + 3em 0.75em 1em 100% rule 0.5pt black Helvetica,sans-serif 9.0pt 16pt bold 12pt bold 18pt 6pt 9.5pt bold 18pt 5pt 9.5pt 15pt 3pt 9.5pt 9pt 3pt 9.5pt italic 3pt 10pt 6pt 100% dots 1pt #454545 9.5pt 10pt right 2pt Helvetica,sans-serif 6pt #454545 2pt Helvetica,sans-serif 6pt #454545 left Helvetica,sans-serif 9.5pt right black blue green 3pt 6pt inherited-property-value(start-indent) 10pt 1em 1em inherited-property-value(start-indent) + 1em 0.15em 0.25em 1em 1em 1em 1em bold inherited-property-value(start-indent) + 1em inherited-property-value(end-indent) + 1em 0.6em 0.6em 8pt bold red solid 0.5pt red 0.75em inherited-property-value(start-indent) + 2.5em inherited-property-value(end-indent) + 3em Helvetica,sans-serif #000000 always 16pt bold left center 0.5in Helvetica,sans-serif #000000 always 12pt bold left center 0.2in dotted 0.1pt #000000 0.2in dotted 0.1pt #000000 center 16pt 30pt 14pt center 12pt 20pt 14pt center 12pt 20pt 30pt center center auto auto auto auto always center 10pt italic 20pt 30pt false fixed 100% 100% rule 0.5pt black 2.5pt 5pt always Helvetica,sans-serif 1.2em 9pt 12pt always always solid 0.5pt black 11pt bold 5pt 9pt italic 7pt after #bbbbbb white 10pt bold 100% rule 0.5pt black 6pt 9pt italic always always 1pt #D3D3D3 solid 2.5pt #D3D3D3 after 9pt bold bottom auto auto 100% rule 1pt white 100% dots 0.5pt #A9A9A9 100% rule 0.5pt black solid 0.2mm 4pt 1.5pt #eeeeee 9pt 9pt after Helvetica,sans-serif 16pt justify no-wrap dots 5pt #454545 9.5pt end #A9A9A9 16pt 6pt 12pt bold 18pt 11pt 15pt 3pt 10pt 4pt 9.5pt 4pt doxia-1.1.4/doxia-modules/doxia-module-fo/src/main/resources/log4j.properties0000644000175000017500000000202710753326600027207 0ustar twernertwerner# 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. log4j.rootCategory=INFO, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%c:%L] %d{ISO8601} - %m%n log4j.logger.org.apache.fop=ERROR doxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/0000755000175000017500000000000011632765557022777 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/0000755000175000017500000000000011632765557023566 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/0000755000175000017500000000000011632765557025007 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/0000755000175000017500000000000011632765557026115 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765557027221 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765557030506 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/0000755000175000017500000000000011632765560031104 5ustar twernertwerner././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.javadoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.ja0000644000175000017500000001676411147530374033154 0ustar twernertwernerpackage org.apache.maven.doxia.module.fo; /* * 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 javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.XmlMarkup; /** * List of FO markups. * * @author ltheussl * @version $Id: FoMarkup.java 746232 2009-02-20 13:32:44Z ltheussl $ * @since 1.1 */ public interface FoMarkup extends XmlMarkup { /** FO namespace: "http://www.w3.org/1999/XSL/Format" */ String FO_NAMESPACE = "http://www.w3.org/1999/XSL/Format"; // ---------------------------------------------------------------------- // Specific FO tags // ---------------------------------------------------------------------- /** FO tag for root. */ Tag ROOT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "root"; } }; /** FO tag for layout-master-set. */ Tag LAYOUT_MASTER_SET_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "layout-master-set"; } }; /** FO tag for simple-page-master. */ Tag SIMPLE_PAGE_MASTER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "simple-page-master"; } }; /** FO tag for region-body. */ Tag REGION_BODY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "region-body"; } }; /** FO tag for region-before. */ Tag REGION_BEFORE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "region-before"; } }; /** FO tag for region-after. */ Tag REGION_AFTER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "region-after"; } }; /** FO tag for static-content. */ Tag STATIC_CONTENT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "static-content"; } }; /** FO tag for page-sequence. */ Tag PAGE_SEQUENCE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "page-sequence"; } }; /** FO tag for flow. */ Tag FLOW_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "flow"; } }; /** FO tag for block. */ Tag BLOCK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "block"; } }; /** FO tag for list-block. */ Tag LIST_BLOCK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "list-block"; } }; /** FO tag for list-item. */ Tag LIST_ITEM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "list-item"; } }; /** FO tag for list-item-body. */ Tag LIST_ITEM_BODY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "list-item-body"; } }; /** FO tag for list-item-label. */ Tag LIST_ITEM_LABEL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "list-item-label"; } }; /** FO tag for table-and-caption. */ Tag TABLE_AND_CAPTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table-and-caption"; } }; /** FO tag for table. */ Tag TABLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table"; } }; /** FO tag for table-body. */ Tag TABLE_BODY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table-body"; } }; /** FO tag for table-column. */ Tag TABLE_COLUMN_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table-column"; } }; /** FO tag for table-row. */ Tag TABLE_ROW_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table-row"; } }; /** FO tag for table-cell. */ Tag TABLE_CELL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table-cell"; } }; /** FO tag for table-caption. */ Tag TABLE_CAPTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table-caption"; } }; /** FO tag for inline. */ Tag INLINE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "inline"; } }; /** FO tag for basic-link. */ Tag BASIC_LINK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "basic-link"; } }; /** FO tag for leader. */ Tag LEADER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "leader"; } }; /** FO tag for page-number. */ Tag PAGE_NUMBER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "page-number"; } }; /** FO tag for page-number-citation. */ Tag PAGE_NUMBER_CITATION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "page-number-citation"; } }; /** FO tag for bookmark-tree. */ Tag BOOKMARK_TREE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bookmark-tree"; } }; /** FO tag for bookmark. */ Tag BOOKMARK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bookmark"; } }; /** FO tag for bookmark-title. */ Tag BOOKMARK_TITLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bookmark-title"; } }; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.javadoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoUtils.jav0000644000175000017500000001741611216135717033175 0ustar twernertwernerpackage org.apache.maven.doxia.module.fo; /* * 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.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Date; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXResult; import javax.xml.transform.stream.StreamSource; import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.Fop; import org.apache.fop.apps.FopFactory; import org.apache.fop.apps.MimeConstants; import org.apache.maven.doxia.document.DocumentModel; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; /** * FO Sink utilities. * * @author ltheussl * @version $Id: FoUtils.java 785531 2009-06-17 09:47:59Z ltheussl $ * @since 1.1 */ public class FoUtils { /** To reuse the FopFactory **/ private static final FopFactory FOP_FACTORY = FopFactory.newInstance(); /** To reuse the TransformerFactory **/ private static final TransformerFactory TRANSFORMER_FACTORY = TransformerFactory.newInstance(); /** * Converts an FO file to a PDF file using FOP. * * @param fo the FO file, not null. * @param pdf the target PDF file, not null. * @param resourceDir The base directory for relative path resolution, could be null. * If null, defaults to the parent directory of fo. * @param documentModel the document model to add PDF metadatas like author, title and keywords, could be null. * @throws javax.xml.transform.TransformerException In case of a conversion problem. * @since 1.1.1 */ public static void convertFO2PDF( File fo, File pdf, String resourceDir, DocumentModel documentModel ) throws TransformerException { FOUserAgent foUserAgent = getDefaultUserAgent( fo, resourceDir ); if ( documentModel != null && documentModel.getMeta() != null ) { // http://xmlgraphics.apache.org/fop/embedding.html#user-agent String authors = documentModel.getMeta().getAllAuthorNames(); if ( StringUtils.isNotEmpty( authors ) ) { foUserAgent.setAuthor( authors ); } if ( StringUtils.isNotEmpty( documentModel.getMeta().getTitle() ) ) { foUserAgent.setTitle( documentModel.getMeta().getTitle() ); } String keywords = documentModel.getMeta().getAllKeyWords(); if ( StringUtils.isNotEmpty( keywords ) ) { foUserAgent.setKeywords( keywords ); } if ( StringUtils.isNotEmpty( documentModel.getMeta().getCreator() ) ) { foUserAgent.setCreator( documentModel.getMeta().getCreator() ); } if ( StringUtils.isNotEmpty( documentModel.getMeta().getGenerator() ) ) { foUserAgent.setProducer( documentModel.getMeta().getGenerator() ); } if ( documentModel.getMeta().getCreationDate() != null ) { foUserAgent.setCreationDate( documentModel.getMeta().getCreationDate() ); } } if ( foUserAgent.getCreator() == null ) { foUserAgent.setCreator( System.getProperty( "user.name" ) ); } if ( foUserAgent.getCreationDate() == null ) { foUserAgent.setCreationDate( new Date() ); } convertFO2PDF( fo, pdf, resourceDir, foUserAgent ); } /** * Converts an FO file to a PDF file using FOP. * * @param fo the FO file, not null. * @param pdf the target PDF file, not null. * @param resourceDir The base directory for relative path resolution, could be null. * If null, defaults to the parent directory of fo. * @param foUserAgent the FOUserAgent to use. * May be null, in which case a default user agent will be used. * @throws javax.xml.transform.TransformerException In case of a conversion problem. * @since 1.1.1 */ public static void convertFO2PDF( File fo, File pdf, String resourceDir, FOUserAgent foUserAgent ) throws TransformerException { FOUserAgent userAgent = ( foUserAgent == null ? getDefaultUserAgent( fo, resourceDir ) : foUserAgent ); OutputStream out = null; try { try { out = new BufferedOutputStream( new FileOutputStream( pdf ) ); } catch ( IOException e ) { throw new TransformerException( e ); } Result res = null; try { Fop fop = FOP_FACTORY.newFop( MimeConstants.MIME_PDF, userAgent, out ); res = new SAXResult( fop.getDefaultHandler() ); } catch ( FOPException e ) { throw new TransformerException( e ); } Transformer transformer = null; try { // identity transformer transformer = TRANSFORMER_FACTORY.newTransformer(); } catch ( TransformerConfigurationException e ) { throw new TransformerException( e ); } transformer.transform( new StreamSource( fo ), res ); } finally { IOUtil.close( out ); } } /** * Converts an FO file to a PDF file using FOP. * * @param fo the FO file, not null. * @param pdf the target PDF file, not null. * @param resourceDir The base directory for relative path resolution, could be null. * If null, defaults to the parent directory of fo. * @throws javax.xml.transform.TransformerException In case of a conversion problem. * @see #convertFO2PDF(File, File, String, DocumentModel) */ public static void convertFO2PDF( File fo, File pdf, String resourceDir ) throws TransformerException { convertFO2PDF( fo, pdf, resourceDir, (DocumentModel) null ); } /** * Returns a base URL to be used by the FOUserAgent. * * @param fo the FO file. * @param resourceDir the resource directory. * @return String. */ private static String getBaseURL( File fo, String resourceDir ) { String url = null; if ( resourceDir == null ) { url = "file:///" + fo.getParent() + "/"; } else { url = "file:///" + resourceDir + "/"; } return url; } private static FOUserAgent getDefaultUserAgent( File fo, String resourceDir ) { FOUserAgent foUserAgent = FOP_FACTORY.newFOUserAgent(); foUserAgent.setBaseURL( getBaseURL( fo, resourceDir ) ); return foUserAgent; } private FoUtils() { // Utility class } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.javadoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java0000644000175000017500000013652211251210250033123 0ustar twernertwernerpackage org.apache.maven.doxia.module.fo; /* * 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.File; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import java.util.Set; import java.util.Stack; import java.util.TreeSet; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Attribute; import javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.sink.AbstractXmlSink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.sink.SinkUtils; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; /** * A Doxia Sink that produces a FO model. The usage is similar to the following: * *
 * FoSink sink = new FoSink( writer );
 * sink.beginDocument();
 * ...
 * sink.endDocument();
 * 
* * @author ltheussl * @version $Id: FoSink.java 812141 2009-09-07 13:54:48Z ltheussl $ * @since 1.1 */ public class FoSink extends AbstractXmlSink implements FoMarkup { /** For writing the result. */ private final PrintWriter out; /** Used to get the current position in numbered lists. */ private final Stack listStack; /** Used to get attributes for a given FO element. */ private final FoConfiguration config; /** Counts the current section level. */ private int section = 0; /** Counts the current subsection level. */ private int subsection = 0; /** Counts the current subsubsection level. */ private int subsubsection = 0; /** Verbatim flag. */ private boolean verbatim; /** figure flag. */ private boolean inFigure; private final String encoding; private final String languageId; /** Stack of drawing borders on table cells. */ private final LinkedList tableGridStack; /** Stack of alignment int[] of table cells. */ private final LinkedList cellJustifStack; /** Stack of justification of table cells. */ private final LinkedList isCellJustifStack; /** Stack of current table cell. */ private final LinkedList cellCountStack; /** The stack of StringWriter to write the table result temporary, so we could play with the output and fix fo. */ private final LinkedList tableContentWriterStack; private final LinkedList tableCaptionWriterStack; private final LinkedList tableCaptionXMLWriterStack; /** The stack of table caption */ private final LinkedList tableCaptionStack; /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ protected Map warnMessages; /** * Constructor, initialize the Writer. * * @param writer not null writer to write the result. Should be an UTF-8 Writer. * You could use newXmlWriter methods from {@link org.codehaus.plexus.util.WriterFactory}. */ protected FoSink( Writer writer ) { this( writer, "UTF-8" ); } /** * Constructor, initialize the Writer and tells which encoding is used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. */ protected FoSink( Writer writer, String encoding ) { this( writer, encoding, null ); } /** * Constructor, initialize the Writer and tells which encoding and languageId are used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. * @param languageId language identifier for the root element as defined by * IETF BCP 47, Tags for the Identification of Languages; * in addition, the empty string may be specified. */ protected FoSink( Writer writer, String encoding, String languageId ) { if ( writer == null ) { throw new NullPointerException( "Null writer in FO Sink!" ); } this.out = new PrintWriter( writer ); this.encoding = encoding; this.languageId = languageId; this.config = new FoConfiguration(); this.listStack = new Stack(); this.tableGridStack = new LinkedList(); this.cellJustifStack = new LinkedList(); this.isCellJustifStack = new LinkedList(); this.cellCountStack = new LinkedList(); this.tableContentWriterStack = new LinkedList(); this.tableCaptionWriterStack = new LinkedList(); this.tableCaptionXMLWriterStack = new LinkedList(); this.tableCaptionStack = new LinkedList(); setNameSpace( "fo" ); } // TODO add FOP compliance mode? /** * Load configuration parameters from a File. * * @param configFile the configuration file. * * @throws java.io.IOException if the File cannot be read * or some error occurs when initializing the configuration parameters. * * @since 1.1.1 */ public void load( File configFile ) throws IOException { config.load( configFile ); } /** {@inheritDoc} */ public void head( SinkEventAttributes attributes ) { init(); startPageSequence( "0", null, null ); } /** {@inheritDoc} */ public void head() { head( null ); } /** {@inheritDoc} */ public void head_() { writeEOL(); } /** {@inheritDoc} */ public void title( SinkEventAttributes attributes ) { writeStartTag( BLOCK_TAG, "doc.header.title" ); } /** {@inheritDoc} */ public void title() { title( null ); } /** {@inheritDoc} */ public void title_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void author( SinkEventAttributes attributes ) { writeStartTag( BLOCK_TAG, "doc.header.author" ); } /** {@inheritDoc} */ public void author() { author( null ); } /** {@inheritDoc} */ public void author_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void date( SinkEventAttributes attributes ) { writeStartTag( BLOCK_TAG, "doc.header.date" ); } /** {@inheritDoc} */ public void date() { date( null ); } /** {@inheritDoc} */ public void date_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void body( SinkEventAttributes attributes ) { // noop } /** {@inheritDoc} */ public void body() { body( null ); } /** {@inheritDoc} */ public void body_() { writeEOL(); writeEndTag( FLOW_TAG ); writeEOL(); writeEndTag( PAGE_SEQUENCE_TAG ); writeEOL(); endDocument(); } // ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- /** {@inheritDoc} */ public void sectionTitle() { // nop } /** {@inheritDoc} */ public void sectionTitle_() { // nop } /** {@inheritDoc} */ public void section( int level, SinkEventAttributes attributes ) { if ( level == SECTION_LEVEL_1 ) { section++; subsection = 0; subsubsection = 0; } else if ( level == SECTION_LEVEL_2 ) { subsection++; subsubsection = 0; } else if ( level == SECTION_LEVEL_3 ) { subsubsection++; } onSection(); } /** {@inheritDoc} */ public void section_( int level ) { onSection_(); } /** {@inheritDoc} */ public void sectionTitle( int level, SinkEventAttributes attributes ) { onSectionTitle( level ); } /** {@inheritDoc} */ public void sectionTitle_( int level ) { onSectionTitle_(); } /** {@inheritDoc} */ public void section1() { section( SECTION_LEVEL_1, null ); } /** {@inheritDoc} */ public void sectionTitle1() { sectionTitle( SECTION_LEVEL_1, null ); } /** {@inheritDoc} */ public void sectionTitle1_() { sectionTitle_( SECTION_LEVEL_1 ); } /** {@inheritDoc} */ public void section1_() { section_( SECTION_LEVEL_1 ); } /** {@inheritDoc} */ public void section2() { section( SECTION_LEVEL_2, null ); } /** {@inheritDoc} */ public void sectionTitle2() { sectionTitle( SECTION_LEVEL_2, null ); } /** {@inheritDoc} */ public void sectionTitle2_() { sectionTitle_( SECTION_LEVEL_2 ); } /** {@inheritDoc} */ public void section2_() { section_( SECTION_LEVEL_2 ); } /** {@inheritDoc} */ public void section3() { section( SECTION_LEVEL_3, null ); } /** {@inheritDoc} */ public void sectionTitle3() { sectionTitle( SECTION_LEVEL_3, null ); } /** {@inheritDoc} */ public void sectionTitle3_() { sectionTitle_( SECTION_LEVEL_3 ); } /** {@inheritDoc} */ public void section3_() { section_( SECTION_LEVEL_3 ); } /** {@inheritDoc} */ public void section4() { section( SECTION_LEVEL_4, null ); } /** {@inheritDoc} */ public void sectionTitle4() { sectionTitle( SECTION_LEVEL_4, null ); } /** {@inheritDoc} */ public void sectionTitle4_() { sectionTitle_( SECTION_LEVEL_4 ); } /** {@inheritDoc} */ public void section4_() { section_( SECTION_LEVEL_4 ); } /** {@inheritDoc} */ public void section5() { section( SECTION_LEVEL_5, null ); } /** {@inheritDoc} */ public void sectionTitle5() { sectionTitle( SECTION_LEVEL_5, null ); } /** {@inheritDoc} */ public void sectionTitle5_() { sectionTitle_( SECTION_LEVEL_5 ); } /** {@inheritDoc} */ public void section5_() { section_( SECTION_LEVEL_5 ); } /** Starts a section/subsection. */ private void onSection() { writeEOL(); writeStartTag( BLOCK_TAG, "body.text" ); } /** * Starts a section title. * * @param depth The section level. */ private void onSectionTitle( int depth ) { StringBuffer title = new StringBuffer( 16 ); title.append( getChapterString() ); writeEOL(); if ( depth == SECTION_LEVEL_1 ) { writeStartTag( BLOCK_TAG, "body.h1" ); title.append( section ).append( " " ); } else if ( depth == SECTION_LEVEL_2 ) { writeStartTag( BLOCK_TAG, "body.h2" ); title.append( section ).append( "." ); title.append( subsection ).append( " " ); } else if ( depth == SECTION_LEVEL_3 ) { writeStartTag( BLOCK_TAG, "body.h3" ); title.append( section ).append( "." ); title.append( subsection ).append( "." ); title.append( subsubsection ).append( " " ); } else if ( depth == SECTION_LEVEL_4 ) { writeStartTag( BLOCK_TAG, "body.h4" ); } else { writeStartTag( BLOCK_TAG, "body.h5" ); } write( title.toString() ); } /** Ends a section title. */ private void onSectionTitle_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** Ends a section/subsection. */ private void onSection_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** * Resets the section counter to 0. * Only useful for overriding classes, like AggregateSink, the FoSink puts everything into one chapter. */ protected void resetSectionCounter() { this.section = 0; } /** * Returns the current chapter number as a string. * By default does nothing, gets overridden by AggregateSink. * * @return an empty String. */ protected String getChapterString() { return ""; } // ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- /** {@inheritDoc} */ public void list( SinkEventAttributes attributes ) { writeEOL(); writeStartTag( LIST_BLOCK_TAG, "list" ); } /** {@inheritDoc} */ public void list() { list( null ); } /** {@inheritDoc} */ public void list_() { writeEndTag( LIST_BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void listItem( SinkEventAttributes attributes ) { writeStartTag( LIST_ITEM_TAG, "list.item" ); writeStartTag( LIST_ITEM_LABEL_TAG ); writeStartTag( BLOCK_TAG ); write( "•" ); // TODO customize? writeEndTag( BLOCK_TAG ); writeEndTag( LIST_ITEM_LABEL_TAG ); writeEOL(); writeStartTag( LIST_ITEM_BODY_TAG, "list.item" ); writeEOL(); writeStartTag( BLOCK_TAG ); } /** {@inheritDoc} */ public void listItem() { listItem( null ); } /** {@inheritDoc} */ public void listItem_() { writeEndTag( BLOCK_TAG ); writeEOL(); writeEndTag( LIST_ITEM_BODY_TAG ); writeEOL(); writeEndTag( LIST_ITEM_TAG ); writeEOL(); } /** {@inheritDoc} */ public void numberedList( int numbering, SinkEventAttributes attributes ) { this.listStack.push( new NumberedListItem( numbering ) ); writeEOL(); writeStartTag( LIST_BLOCK_TAG, "list" ); } /** {@inheritDoc} */ public void numberedList( int numbering ) { numberedList( numbering, null ); } /** {@inheritDoc} */ public void numberedList_() { this.listStack.pop(); writeEndTag( LIST_BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void numberedListItem( SinkEventAttributes attributes ) { NumberedListItem current = (NumberedListItem) this.listStack.peek(); current.next(); writeStartTag( LIST_ITEM_TAG, "list.item" ); writeEOL(); writeStartTag( LIST_ITEM_LABEL_TAG ); writeEOL(); writeStartTag( BLOCK_TAG ); write( current.getListItemSymbol() ); writeEndTag( BLOCK_TAG ); writeEOL(); writeEndTag( LIST_ITEM_LABEL_TAG ); writeEOL(); writeStartTag( LIST_ITEM_BODY_TAG, "list.item" ); writeEOL(); writeStartTag( BLOCK_TAG ); } /** {@inheritDoc} */ public void numberedListItem() { numberedListItem( null ); } /** {@inheritDoc} */ public void numberedListItem_() { writeEndTag( BLOCK_TAG ); writeEOL(); writeEndTag( LIST_ITEM_BODY_TAG ); writeEOL(); writeEndTag( LIST_ITEM_TAG ); writeEOL(); } /** {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { writeEOL(); writeStartTag( BLOCK_TAG, "dl" ); } /** {@inheritDoc} */ public void definitionList() { definitionList( null ); } /** {@inheritDoc} */ public void definitionList_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void definitionListItem( SinkEventAttributes attributes ) { // nop } /** {@inheritDoc} */ public void definitionListItem() { definitionListItem( null ); } /** {@inheritDoc} */ public void definitionListItem_() { // nop } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { writeStartTag( BLOCK_TAG, "dt" ); } /** {@inheritDoc} */ public void definedTerm() { definedTerm( null ); } /** {@inheritDoc} */ public void definedTerm_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { writeEOL(); writeStartTag( BLOCK_TAG, "dd" ); } /** {@inheritDoc} */ public void definition() { definition( null ); } /** {@inheritDoc} */ public void definition_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void figure( SinkEventAttributes attributes ) { this.inFigure = true; writeEOL(); writeStartTag( BLOCK_TAG, "figure.display" ); } /** {@inheritDoc} */ public void figure() { figure( null ); } /** {@inheritDoc} */ public void figure_() { this.inFigure = false; writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void figureGraphics( String name ) { figureGraphics( name, null ); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { MutableAttributeSet atts = config.getAttributeSet( "figure.graphics" ); atts.addAttribute( Attribute.SRC.toString(), src ); // http://xmlgraphics.apache.org/fop/graphics.html#resolution final String[] valids = new String[] {"content-height", "content-width", "height", "width"}; final MutableAttributeSet filtered = SinkUtils.filterAttributes( attributes, valids ); if ( filtered != null ) { atts.addAttributes( filtered ); } writeln( "" ); } /** * Flags if we are inside a figure. * * @return True if we are between {@link #figure()} and {@link #figure_()} calls. */ protected boolean isFigure() { return this.inFigure; } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { writeStartTag( BLOCK_TAG, "figure.caption" ); } /** {@inheritDoc} */ public void figureCaption() { figureCaption( null ); } /** {@inheritDoc} */ public void figureCaption_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void paragraph() { paragraph( null ); } /** {@inheritDoc} */ public void paragraph( SinkEventAttributes attributes ) { MutableAttributeSet atts = config.getAttributeSet( "normal.paragraph" ); if ( attributes != null && attributes.isDefined( SinkEventAttributes.ALIGN ) ) { atts.addAttribute( "text-align", attributes.getAttribute( SinkEventAttributes.ALIGN ) ); } writeEOL(); writeStartTag( BLOCK_TAG, atts ); } /** {@inheritDoc} */ public void paragraph_() { writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void verbatim( SinkEventAttributes attributes ) { this.verbatim = true; boolean boxed = false; if ( attributes != null && attributes.isDefined( SinkEventAttributes.DECORATION ) ) { boxed = "boxed".equals( attributes.getAttribute( SinkEventAttributes.DECORATION ).toString() ); } if ( boxed ) { writeStartTag( BLOCK_TAG, "body.source" ); } else { writeStartTag( BLOCK_TAG, "body.pre" ); } } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { verbatim( boxed ? SinkEventAttributeSet.BOXED : null ); } /** {@inheritDoc} */ public void verbatim_() { this.verbatim = false; writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void horizontalRule( SinkEventAttributes attributes ) { writeEOL(); writeEOL(); writeStartTag( BLOCK_TAG ); writeEmptyTag( LEADER_TAG, "body.rule" ); writeEndTag( BLOCK_TAG ); writeEOL(); } /** {@inheritDoc} */ public void horizontalRule() { horizontalRule( null ); } /** {@inheritDoc} */ public void pageBreak() { writeEmptyTag( BLOCK_TAG, "break-before", "page" ); writeEOL(); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { writeEOL(); writeStartTag( BLOCK_TAG, "table.padding" ); // is XSL-FO 1.0 standard but still not implemented in FOP 0.95 //writeStartTag( TABLE_AND_CAPTION_TAG ); this.tableContentWriterStack.addLast( new StringWriter() ); writeStartTag( TABLE_TAG, "table.layout" ); } /** {@inheritDoc} */ public void table() { table( null ); } /** {@inheritDoc} */ public void table_() { String content = this.tableContentWriterStack.removeLast().toString(); StringBuffer sb = new StringBuffer(); int cellCount = Integer.parseInt( this.cellCountStack.removeLast().toString() ); for ( int i = 0; i < cellCount; i++ ) { sb.append( "" ); sb.append( EOL ); } int index = content.indexOf( ">" ) + 1; writeln( content.substring( 0, index ) ); write( sb.toString() ); write( content.substring( index ) ); writeEndTag( TABLE_TAG ); writeEOL(); // is XSL-FO 1.0 standard but still not implemented in FOP 0.95 //writeEndTag( TABLE_AND_CAPTION_TAG ); writeEndTag( BLOCK_TAG ); writeEOL(); if ( !this.tableCaptionStack.isEmpty() && this.tableCaptionStack.getLast() != null ) { paragraph( SinkEventAttributeSet.CENTER ); write( this.tableCaptionStack.removeLast().toString() ); paragraph_(); } } /** {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { this.tableGridStack.addLast( Boolean.valueOf( grid ) ); this.cellJustifStack.addLast( justification ); this.isCellJustifStack.addLast( Boolean.valueOf( true ) ); this.cellCountStack.addLast( new Integer( 0 ) ); writeEOL(); writeStartTag( TABLE_BODY_TAG ); } /** {@inheritDoc} */ public void tableRows_() { this.tableGridStack.removeLast(); this.cellJustifStack.removeLast(); this.isCellJustifStack.removeLast(); writeEndTag( TABLE_BODY_TAG ); writeEOL(); } /** {@inheritDoc} */ public void tableRow( SinkEventAttributes attributes ) { // TODO spacer rows writeStartTag( TABLE_ROW_TAG, "table.body.row" ); this.cellCountStack.removeLast(); this.cellCountStack.addLast( new Integer( 0 ) ); } /** {@inheritDoc} */ public void tableRow() { tableRow( null ); } /** {@inheritDoc} */ public void tableRow_() { writeEndTag( TABLE_ROW_TAG ); writeEOL(); } /** {@inheritDoc} */ public void tableCell( SinkEventAttributes attributes ) { tableCell( false, attributes ); } /** {@inheritDoc} */ public void tableCell() { tableCell( (SinkEventAttributes) null ); } /** {@inheritDoc} */ public void tableCell( String width ) { // TODO: fop can't handle cell width tableCell(); } /** {@inheritDoc} */ public void tableHeaderCell( SinkEventAttributes attributes ) { tableCell( true, attributes ); } /** {@inheritDoc} */ public void tableHeaderCell() { tableHeaderCell( (SinkEventAttributes) null ); } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { // TODO: fop can't handle cell width tableHeaderCell(); } /** * Writes a table cell. * * @param headerRow true if this is a header cell. * @param attributes the cell attributes, could be null. */ private void tableCell( boolean headerRow, SinkEventAttributes attributes ) { MutableAttributeSet cellAtts = headerRow ? config.getAttributeSet( "table.heading.cell" ) : config.getAttributeSet( "table.body.cell" ); // the column-number is needed for the hack to center the table, see tableRows. int cellCount = Integer.parseInt( this.cellCountStack.getLast().toString() ); cellAtts.addAttribute( "column-number", String.valueOf( cellCount + 1 ) ); if ( this.tableGridStack.getLast().equals( Boolean.TRUE ) ) { cellAtts.addAttributes( config.getAttributeSet( "table.body.cell.grid" ) ); } MutableAttributeSet blockAtts = headerRow ? config.getAttributeSet( "table.heading.block" ) : config.getAttributeSet( "table.body.block" ); String justif = null; if ( attributes == null ) { attributes = new SinkEventAttributeSet( 0 ); } if ( attributes.isDefined( Attribute.ALIGN.toString() ) ) { justif = attributes.getAttribute( Attribute.ALIGN.toString() ).toString(); } int[] cellJustif = (int[]) this.cellJustifStack.getLast(); if ( justif == null && cellJustif != null && cellJustif.length > 0 && this.isCellJustifStack.getLast().equals( Boolean.TRUE ) ) { switch ( cellJustif[Math.min( cellCount, cellJustif.length - 1 )] ) { case JUSTIFY_LEFT: justif = "left"; break; case JUSTIFY_RIGHT: justif = "right"; break; case JUSTIFY_CENTER: default: justif = "center"; } } if ( justif != null ) { blockAtts.addAttribute( "text-align", justif ); } writeStartTag( TABLE_CELL_TAG, cellAtts ); writeEOL(); writeStartTag( BLOCK_TAG, blockAtts ); writeEOL(); } /** {@inheritDoc} */ public void tableCell_() { writeEndTag( BLOCK_TAG ); writeEOL(); writeEndTag( TABLE_CELL_TAG ); writeEOL(); if ( this.isCellJustifStack.getLast().equals( Boolean.TRUE ) ) { int cellCount = Integer.parseInt( this.cellCountStack.removeLast().toString() ); this.cellCountStack.addLast( new Integer( ++cellCount ) ); } } /** {@inheritDoc} */ public void tableHeaderCell_() { tableCell_(); } /** {@inheritDoc} */ public void tableCaption( SinkEventAttributes attributes ) { StringWriter sw = new StringWriter(); this.tableCaptionWriterStack.addLast( sw ); this.tableCaptionXMLWriterStack.addLast( new PrettyPrintXMLWriter( sw ) ); // is XSL-FO 1.0 standard but not implemented in FOP 0.95 //writeStartTag( TABLE_CAPTION_TAG ); // TODO: how to implement this otherwise? // table-footer doesn't work because it has to be declared before table-body. } /** {@inheritDoc} */ public void tableCaption() { tableCaption( null ); } /** {@inheritDoc} */ public void tableCaption_() { if ( !this.tableCaptionXMLWriterStack.isEmpty() && this.tableCaptionXMLWriterStack.getLast() != null ) { this.tableCaptionStack.addLast( this.tableCaptionWriterStack.removeLast().toString() ); this.tableCaptionXMLWriterStack.removeLast(); } // is XSL-FO 1.0 standard but not implemented in FOP 0.95 //writeEndTag( TABLE_CAPTION_TAG ); } /** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } String anchor = name; if ( !DoxiaUtils.isValidId( anchor ) ) { anchor = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + anchor + "'"; logMessage( "modifiedLink", msg ); } anchor = "#" + name; writeStartTag( INLINE_TAG, "id", anchor ); } /** {@inheritDoc} */ public void anchor( String name ) { anchor( name, null ); } /** {@inheritDoc} */ public void anchor_() { writeEndTag( INLINE_TAG ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { if ( name == null ) { throw new NullPointerException( "Link name cannot be null!" ); } if ( DoxiaUtils.isExternalLink( name ) ) { writeStartTag( BASIC_LINK_TAG, "external-destination", HtmlTools.escapeHTML( name ) ); writeStartTag( INLINE_TAG, "href.external" ); } else if ( DoxiaUtils.isInternalLink( name ) ) { String anchor = name.substring( 1 ); if ( !DoxiaUtils.isValidId( anchor ) ) { anchor = DoxiaUtils.encodeId( anchor, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + anchor + "'"; logMessage( "modifiedLink", msg ); } anchor = "#" + anchor; writeStartTag( BASIC_LINK_TAG, "internal-destination", HtmlTools.escapeHTML( anchor ) ); writeStartTag( INLINE_TAG, "href.internal" ); } else { // treat everything else as is String anchor = name; writeStartTag( BASIC_LINK_TAG, "internal-destination", HtmlTools.escapeHTML( anchor ) ); writeStartTag( INLINE_TAG, "href.internal" ); } } /** {@inheritDoc} */ public void link( String name ) { link( name, null ); } /** {@inheritDoc} */ public void link_() { writeEndTag( INLINE_TAG ); writeEndTag( BASIC_LINK_TAG ); } /** {@inheritDoc} */ public void italic() { writeStartTag( INLINE_TAG, "italic" ); } /** {@inheritDoc} */ public void italic_() { writeEndTag( INLINE_TAG ); } /** {@inheritDoc} */ public void bold() { writeStartTag( INLINE_TAG, "bold" ); } /** {@inheritDoc} */ public void bold_() { writeEndTag( INLINE_TAG ); } /** {@inheritDoc} */ public void monospaced() { writeStartTag( INLINE_TAG, "monospace" ); } /** {@inheritDoc} */ public void monospaced_() { writeEndTag( INLINE_TAG ); } /** {@inheritDoc} */ public void lineBreak( SinkEventAttributes attributes ) { writeEOL(); writeEOL(); writeSimpleTag( BLOCK_TAG ); } /** {@inheritDoc} */ public void lineBreak() { lineBreak( null ); } /** {@inheritDoc} */ public void nonBreakingSpace() { write( " " ); } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { content( text ); } /** {@inheritDoc} */ public void text( String text ) { text( text, null ); } /** {@inheritDoc} */ public void rawText( String text ) { write( text ); } /** {@inheritDoc} */ public void flush() { out.flush(); } /** {@inheritDoc} */ public void close() { out.close(); if ( getLog().isWarnEnabled() && this.warnMessages != null ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } this.warnMessages = null; } init(); } /** * {@inheritDoc} * * Unkown events just log a warning message but are ignored otherwise. * @see org.apache.maven.doxia.sink.Sink#unknown(String,Object[],SinkEventAttributes) */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { String msg = "Unknown Sink event: '" + name + "', ignoring!"; logMessage( "unknownEvent", msg ); } /** {@inheritDoc} */ public void comment( String comment ) { if ( StringUtils.isNotEmpty( comment ) && comment.indexOf( "--" ) != -1 ) { String originalComment = comment; // http://www.w3.org/TR/2000/REC-xml-20001006#sec-comments while ( comment.indexOf( "--" ) != -1 ) { comment = StringUtils.replace( comment, "--", "- -" ); } String msg = "Modified invalid comment: '" + originalComment + "' to '" + comment + "'"; logMessage( "modifyComment", msg ); } StringBuffer buf = new StringBuffer( comment.length() + 9 ); buf.append( LESS_THAN ).append( BANG ).append( MINUS ).append( MINUS ).append( SPACE ); buf.append( comment ); buf.append( SPACE ).append( MINUS ).append( MINUS ).append( GREATER_THAN ); write( buf.toString() ); } /** * Writes the beginning of a FO document. */ public void beginDocument() { write( "" ); writeEOL(); MutableAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( "xmlns:" + getNameSpace(), FO_NAMESPACE ); if ( languageId != null ) { atts.addAttribute( "language", languageId ); } writeStartTag( ROOT_TAG, atts ); writeStartTag( LAYOUT_MASTER_SET_TAG ); writeStartTag( SIMPLE_PAGE_MASTER_TAG, "layout.master.set.cover-page" ); writeEmptyTag( REGION_BODY_TAG, "layout.master.set.cover-page.region-body" ); writeEndTag( SIMPLE_PAGE_MASTER_TAG ); writeEOL(); writeStartTag( SIMPLE_PAGE_MASTER_TAG, "layout.master.set.toc" ); writeEmptyTag( REGION_BODY_TAG, "layout.master.set.toc.region-body" ); writeEmptyTag( REGION_BEFORE_TAG, "layout.master.set.toc.region-before" ); writeEmptyTag( REGION_AFTER_TAG, "layout.master.set.toc.region-after" ); writeEndTag( SIMPLE_PAGE_MASTER_TAG ); writeEOL(); writeStartTag( SIMPLE_PAGE_MASTER_TAG, "layout.master.set.body" ); writeEmptyTag( REGION_BODY_TAG, "layout.master.set.body.region-body" ); writeEmptyTag( REGION_BEFORE_TAG, "layout.master.set.body.region-before" ); writeEmptyTag( REGION_AFTER_TAG, "layout.master.set.body.region-after" ); writeEndTag( SIMPLE_PAGE_MASTER_TAG ); writeEOL(); writeEndTag( LAYOUT_MASTER_SET_TAG ); writeEOL(); pdfBookmarks(); } /** * Writes the end of a FO document, flushes and closes the stream. */ public void endDocument() { writeEndTag( ROOT_TAG ); writeEOL(); flush(); close(); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Returns the configuration object of this sink. * * @return The configuration object of this sink. */ protected FoConfiguration getFoConfiguration() { return config; } /** * Writes a start tag, prepending EOL. * * @param tag The tag. * @param attributeId An id identifying the attribute set. */ protected void writeStartTag( Tag tag, String attributeId ) { writeEOL(); writeStartTag( tag, config.getAttributeSet( attributeId ) ); } /** * Writes a start tag, prepending EOL. * * @param tag The tag. * @param id An id to add. * @param name The name (value) of the id. */ protected void writeStartTag( Tag tag, String id, String name ) { writeEOL(); MutableAttributeSet att = new SinkEventAttributeSet( new String[] {id, name} ); writeStartTag( tag, att ); } /** * Writes a start tag, prepending EOL. * * @param tag The tag. * @param id An id to add. * @param name The name (value) of the id. * @param attributeId An id identifying the attribute set. */ protected void writeStartTag( Tag tag, String id, String name, String attributeId ) { MutableAttributeSet att = config.getAttributeSet( attributeId ); // make sure we don't add it twice if ( att.isDefined( id ) ) { att.removeAttribute( id ); } att.addAttribute( id, name ); writeEOL(); writeStartTag( tag, att ); } /** * Writes an empty tag, prepending EOL. * * @param tag The tag. * @param id An id to add. * @param name The name (value) of the id. */ protected void writeEmptyTag( Tag tag, String id, String name ) { MutableAttributeSet att = new SinkEventAttributeSet( new String[] {id, name} ); writeEOL(); writeSimpleTag( tag, att ); } /** * Writes a simple tag, appending EOL. * * @param tag The tag name. * @param attributeId An id identifying the attribute set. */ protected void writeEmptyTag( Tag tag, String attributeId ) { writeEOL(); writeSimpleTag( tag, config.getAttributeSet( attributeId ) ); } /** * {@inheritDoc} * * Writes a text, swallowing any exceptions. */ protected void write( String text ) { if ( !this.tableCaptionXMLWriterStack.isEmpty() && this.tableCaptionXMLWriterStack.getLast() != null ) { ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).writeText( unifyEOLs( text ) ); } else if ( !this.tableContentWriterStack.isEmpty() && this.tableContentWriterStack.getLast() != null ) { ( (StringWriter) this.tableContentWriterStack.getLast() ).write( unifyEOLs( text ) ); } else { out.write( unifyEOLs( text ) ); } } /** * Writes a text, appending EOL. * * @param text The text to write. */ protected void writeln( String text ) { write( text ); writeEOL(); } /** * Writes content, escaping special characters. * * @param text The text to write. */ protected void content( String text ) { write( escaped( text, verbatim ) ); } /** * Escapes special characters so that the text can be included in a fo file. * * @param text The text to process. * @param verb In verbatim mode, white space and newlines are escaped. * @return The text with special characters escaped. */ public static String escaped( String text, boolean verb ) { int length = text.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = text.charAt( i ); switch ( c ) { case ' ': if ( verb ) { buffer.append( " " ); } else { buffer.append( c ); } break; case '<': buffer.append( "<" ); break; case '>': buffer.append( ">" ); break; case '&': buffer.append( "&" ); break; case '\n': buffer.append( EOL ); if ( verb ) { buffer.append( "" + EOL ); } break; default: if ( needsSymbolFont( c ) ) { // TODO: make font configurable? buffer.append( "" ).append( c ).append( "" ); } else { buffer.append( c ); } } } return buffer.toString(); } /** {@inheritDoc} */ protected void writeStartTag( Tag t, MutableAttributeSet att, boolean isSimpleTag ) { if ( this.tableCaptionXMLWriterStack.isEmpty() ) { super.writeStartTag ( t, att, isSimpleTag ); } else { String tag = ( getNameSpace() != null ? getNameSpace() + ":" : "" ) + t.toString(); ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).startElement( tag ); if ( att != null ) { Enumeration names = att.getAttributeNames(); while ( names.hasMoreElements() ) { Object key = names.nextElement(); Object value = att.getAttribute( key ); ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ) .addAttribute( key.toString(), value.toString() ); } } if ( isSimpleTag ) { ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).endElement(); } } } /** {@inheritDoc} */ protected void writeEndTag( Tag t ) { if ( this.tableCaptionXMLWriterStack.isEmpty() ) { super.writeEndTag( t ); } else { ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).endElement(); } } private static final char UPPER_ALPHA = 0x391; private static final char PIV = 0x3d6; private static final char OLINE = 0x203e; private static final char DIAMS = 0x2666; private static final char EURO = 0x20ac; private static final char TRADE = 0x2122; private static final char PRIME = 0x2032; private static final char PPRIME = 0x2033; private static boolean needsSymbolFont( char c ) { // greek characters and mathematical symbols, except the euro and trade symbols // symbols I couldn't get to display in any font: // zwnj (0x200C), zwj (0x200D), lrm (0x200E), rlm (0x200F), oline (0x203E), // lceil (0x2038), rceil (0x2039), lfloor (0x203A), rfloor (0x203B) return ( c >= UPPER_ALPHA && c <= PIV ) || ( c == PRIME || c == PPRIME ) || ( c >= OLINE && c <= DIAMS && c != EURO && c != TRADE ); } /** * Starts a page sequence. * * @param initPageNumber The initial page number. Should be either "0" (for the first page) or "auto". * @param headerText The text to write in the header, if null, nothing is written. * @param footerText The text to write in the footer, if null, nothing is written. */ protected void startPageSequence( String initPageNumber, String headerText, String footerText ) { writeln( "" ); regionBefore( headerText ); regionAfter( footerText ); writeln( "" ); chapterHeading( null, true ); } /** * Writes a 'xsl-region-before' block. * * @param headerText The text to write in the header, if null, nothing is written. */ protected void regionBefore( String headerText ) { // do nothing, overridden by AggregateSink } /** * Writes a 'xsl-region-after' block. By default does nothing, gets overridden by AggregateSink. * * @param footerText The text to write in the footer, if null, nothing is written. */ protected void regionAfter( String footerText ) { // do nothing, overridden by AggregateSink } /** * Writes a chapter heading. By default does nothing, gets overridden by AggregateSink. * * @param headerText The text to write in the header, if null, the current document title is written. * @param chapterNumber True if the chapter number should be written in front of the text. */ protected void chapterHeading( String headerText, boolean chapterNumber ) { // do nothing, overridden by AggregateSink } /** * Writes a fo:bookmark-tree. By default does nothing, gets overridden by AggregateSink. */ protected void pdfBookmarks() { // do nothing, overridden by AggregateSink } /** * If debug mode is enabled, log the msg as is, otherwise add unique msg in warnMessages. * * @param key not null * @param msg not null * @see #close() * @since 1.1.1 */ protected void logMessage( String key, String msg ) { msg = "[FO Sink] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } /** {@inheritDoc} */ protected void init() { super.init(); this.listStack.clear(); this.tableGridStack.clear(); this.cellJustifStack.clear(); this.isCellJustifStack.clear(); this.cellCountStack.clear(); this.tableContentWriterStack.clear(); this.tableCaptionWriterStack.clear(); this.tableCaptionXMLWriterStack.clear(); this.tableCaptionStack.clear(); this.section = 0; this.subsection = 0; this.subsubsection = 0; this.verbatim = false; this.inFigure = false; this.warnMessages = null; } }././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/NumberedListItem.javadoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/NumberedLis0000644000175000017500000001216711375443253033243 0ustar twernertwernerpackage org.apache.maven.doxia.module.fo; /* * 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; /** * Used to count the position in a numbered list. * * @author ltheussl * @version $Id: NumberedListItem.java 946933 2010-05-21 08:39:07Z ltheussl $ * @since 1.1 */ public class NumberedListItem { /** Arabic decimals from 1 - 26. */ private static final String[] DECIMALS = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26" }; /** Lower-case alphanumerics from a - z. */ private static final String[] LOWER_ALPHAS = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; /** Upper-case alphanumerics from A - Z. */ private static final String[] UPPER_ALPHAS = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; /** Lower-case roman numbers from i - xxvi. */ private static final String[] LOWER_ROMANS = { "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix", "x", "xi", "xii", "xiii", "xiv", "xv", "xvi", "xvii", "xviii", "xix", "xx", "xxi", "xxii", "xxiii", "xxiv", "xxv", "xxvi" }; /** Upper-case roman numbers from I - XXVI. */ private static final String[] UPPER_ROMANS = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI", "XXII", "XXIII", "XXIV", "XXV", "XXVI" }; /** The position in the list. */ private int count; /** The numbering format. */ private final int format; /** * Constructor. Initializes count and format. * * @param itemFormat The numbering format of this List. * Should be one of the formats defined in {@link org.apache.maven.doxia.sink.Sink}. */ public NumberedListItem( int itemFormat ) { if ( !isValidItemFormat( itemFormat ) ) { throw new IllegalArgumentException( "Unknown item format!" ); } this.format = itemFormat; this.count = 0; } /** * Returns the current count, ie the position in the list. * * @return The current count. */ public int count() { return count; } /** * Returns the numbering format. * * @return The numbering format. */ public int format() { return format; } /** * Increase the current count by 1. */ public void next() { count++; } /** * Returns the symbol for the current list item. * * @return The symbol for the current list item. */ public String getListItemSymbol() { int j = count() - 1; if ( j < 0 ) { j = 0; } else if ( j > DECIMALS.length - 1 ) { j = DECIMALS.length - 1; } String symbol; switch ( format() ) { case Sink.NUMBERING_UPPER_ALPHA: symbol = UPPER_ALPHAS[j]; break; case Sink.NUMBERING_LOWER_ALPHA: symbol = LOWER_ALPHAS[j]; break; case Sink.NUMBERING_UPPER_ROMAN: symbol = UPPER_ROMANS[j]; break; case Sink.NUMBERING_LOWER_ROMAN: symbol = LOWER_ROMANS[j]; break; case Sink.NUMBERING_DECIMAL: default: symbol = DECIMALS[j]; } return symbol + "."; } /** * Determines if the given format is one of the formats defined in * {@link org.apache.maven.doxia.sink.Sink}. * * @param itemFormat the format to check. * @return True if the format is a valid item format according to the Sink API. */ private boolean isValidItemFormat( int itemFormat ) { return ( ( itemFormat == Sink.NUMBERING_UPPER_ALPHA ) || ( itemFormat == Sink.NUMBERING_LOWER_ALPHA ) || ( itemFormat == Sink.NUMBERING_UPPER_ROMAN ) || ( itemFormat == Sink.NUMBERING_LOWER_ROMAN ) || ( itemFormat == Sink.NUMBERING_DECIMAL ) ); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSinkFactory.javadoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSinkFacto0000644000175000017500000000320611141061207033154 0ustar twernertwernerpackage org.apache.maven.doxia.module.fo; /* * 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.AbstractXmlSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * FO implementation of the Sink factory. * * @author Vincent Siveton * @version $Id: FoSinkFactory.java 739565 2009-01-31 14:39:03Z vsiveton $ * @since 1.1 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="fo" */ public class FoSinkFactory extends AbstractXmlSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { return new FoSink( writer, encoding ); } /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding, String languageId ) { return new FoSink( writer, encoding, languageId ); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.javadoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregate0000644000175000017500000011051611250711701033166 0ustar twernertwernerpackage org.apache.maven.doxia.module.fo; /* * 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.io.Writer; import java.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.ResourceBundle; import java.util.Stack; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.document.DocumentCover; import org.apache.maven.doxia.document.DocumentMeta; import org.apache.maven.doxia.document.DocumentModel; import org.apache.maven.doxia.document.DocumentTOC; import org.apache.maven.doxia.document.DocumentTOCItem; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.StringUtils; /** * A Doxia Sink that produces an aggregated FO model. The usage is similar to the following: * *
 * FoAggregateSink sink = new FoAggregateSink( writer );
 * sink.setDocumentModel( documentModel );
 * sink.beginDocument();
 * sink.coverPage();
 * sink.toc();
 * ...
 * sink.endDocument();
 * 
* * Note: the documentModel object contains several * document metadata, but only a few * of them are used in this sink (i.e. author, confidential, date and title), the others are ignored. * * @author ltheussl * @version $Id: FoAggregateSink.java 811802 2009-09-06 10:49:37Z vsiveton $ * @since 1.1 */ public class FoAggregateSink extends FoSink { /** * No Table Of Content. * @see #setDocumentModel(DocumentModel, int) */ public static int TOC_NONE = 0; /** * Table Of Content at the start of the document. * @see #setDocumentModel(DocumentModel, int) */ public static int TOC_START = 1; /** * Table Of Content at the end of the document. * @see #setDocumentModel(DocumentModel, int) */ public static int TOC_END = 2; // TODO: make configurable private static final String COVER_HEADER_HEIGHT = "1.5in"; /** The document model to be used by this sink. */ private DocumentModel docModel; /** Counts the current chapter level. */ private int chapter = 0; /** Name of the source file of the current document, relative to the source root. */ private String docName; /** Title of the chapter, used in the page header. */ private String docTitle = ""; /** Content in head is ignored in aggregated documents. */ private boolean ignoreText; /** Current position of the TOC, see {@link #TOC_POSITION} */ private int tocPosition; /** Used to get the current position in the TOC. */ private final Stack tocStack = new Stack(); /** * Constructor. * * @param writer The writer for writing the result. */ public FoAggregateSink( Writer writer ) { super( writer ); } /** {@inheritDoc} */ public void head() { head( null ); } /** {@inheritDoc} */ public void head( SinkEventAttributes attributes ) { init(); ignoreText = true; } /** {@inheritDoc} */ public void head_() { ignoreText = false; writeEOL(); } /** {@inheritDoc} */ public void title() { title( null ); } /** {@inheritDoc} */ public void title( SinkEventAttributes attributes ) { // ignored } /** {@inheritDoc} */ public void title_() { // ignored } /** {@inheritDoc} */ public void author() { author( null ); } /** {@inheritDoc} */ public void author( SinkEventAttributes attributes ) { // ignored } /** {@inheritDoc} */ public void author_() { // ignored } /** {@inheritDoc} */ public void date() { date( null ); } /** {@inheritDoc} */ public void date( SinkEventAttributes attributes ) { // ignored } /** {@inheritDoc} */ public void date_() { // ignored } /** {@inheritDoc} */ public void body() { body( null ); } /** {@inheritDoc} */ public void body( SinkEventAttributes attributes ) { chapter++; resetSectionCounter(); startPageSequence( getHeaderText(), getFooterText() ); if ( docName == null ) { getLog().warn( "No document root specified, local links will not be resolved correctly!" ); } else { writeStartTag( BLOCK_TAG, "id", docName ); } } /** {@inheritDoc} */ public void body_() { writeEOL(); writeEndTag( BLOCK_TAG ); writeEndTag( FLOW_TAG ); writeEndTag( PAGE_SEQUENCE_TAG ); // reset document name docName = null; } /** * Sets the title of the current document. This is used as a chapter title in the page header. * * @param title the title of the current document. */ public void setDocumentTitle( String title ) { this.docTitle = title; if ( title == null ) { this.docTitle = ""; } } /** * Sets the name of the current source document, relative to the source root. * Used to resolve links to other source documents. * * @param name the name for the current document. */ public void setDocumentName( String name ) { this.docName = getIdName( name ); } /** * Sets the DocumentModel to be used by this sink. The DocumentModel provides all the meta-information * required to render a document, eg settings for the cover page, table of contents, etc. *
* By default, a TOC will be added at the beginning of the document. * * @param model the DocumentModel. * @see #setDocumentModel(DocumentModel, String) * @see #TOC_START */ public void setDocumentModel( DocumentModel model ) { setDocumentModel( model, TOC_START ); } /** * Sets the DocumentModel to be used by this sink. The DocumentModel provides all the meta-information * required to render a document, eg settings for the cover page, table of contents, etc. * * @param model the DocumentModel, could be null. * @param tocPos should be one of these values: {@link #TOC_NONE}, {@link #TOC_START} and {@link #TOC_END}. * @since 1.1.2 */ public void setDocumentModel( DocumentModel model, int tocPos ) { this.docModel = model; if ( !( tocPos == TOC_NONE || tocPos == TOC_START || tocPos == TOC_END ) ) { if ( getLog().isDebugEnabled() ) { getLog().debug( "Unrecognized value for tocPosition: " + tocPos + ", using no toc." ); } tocPos = TOC_NONE; } this.tocPosition = tocPos; if ( this.docModel != null && this.docModel.getToc() != null && this.tocPosition != TOC_NONE ) { DocumentTOCItem tocItem = new DocumentTOCItem(); tocItem.setName( this.docModel.getToc().getName() ); tocItem.setRef( "./toc" ); List items = new LinkedList(); if ( this.tocPosition == TOC_START ) { items.add( tocItem ); } items.addAll( this.docModel.getToc().getItems() ); if ( this.tocPosition == TOC_END ) { items.add( tocItem ); } this.docModel.getToc().setItems( items ); } } /** * Translates the given name to a usable id. * Prepends "./" and strips any extension. * * @param name the name for the current document. * @return String */ private String getIdName( String name ) { if ( StringUtils.isEmpty( name ) ) { getLog().warn( "Empty document reference, links will not be resolved correctly!" ); return ""; } String idName = name.replace( '\\', '/' ); // prepend "./" and strip extension if ( !idName.startsWith( "./" ) ) { idName = "./" + idName; } if ( idName.substring( 2 ).lastIndexOf( "." ) != -1 ) { idName = idName.substring( 0, idName.lastIndexOf( "." ) ); } while ( idName.indexOf( "//" ) != -1 ) { idName = StringUtils.replace( idName, "//", "/" ); } return idName; } // ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- /** {@inheritDoc} */ public void figureGraphics( String name ) { figureGraphics( name, null ); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { String anchor = src; while ( anchor.startsWith( "./" ) ) { anchor = anchor.substring( 2 ); } if ( anchor.startsWith( "../" ) && docName != null ) { anchor = resolveLinkRelativeToBase( anchor ); } super.figureGraphics( anchor, attributes ); } /** {@inheritDoc} */ public void anchor( String name ) { anchor( name, null ); } /** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } String anchor = name; if ( !DoxiaUtils.isValidId( anchor ) ) { anchor = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + anchor + "'"; logMessage( "modifiedLink", msg ); } anchor = "#" + anchor; if ( docName != null ) { anchor = docName + anchor; } writeStartTag( INLINE_TAG, "id", anchor ); } /** {@inheritDoc} */ public void link( String name ) { link( name, null ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { if ( name == null ) { throw new NullPointerException( "Link name cannot be null!" ); } if ( DoxiaUtils.isExternalLink( name ) ) { // external links writeStartTag( BASIC_LINK_TAG, "external-destination", HtmlTools.escapeHTML( name ) ); writeStartTag( INLINE_TAG, "href.external" ); return; } while ( name.indexOf( "//" ) != -1 ) { name = StringUtils.replace( name, "//", "/" ); } if ( DoxiaUtils.isInternalLink( name ) ) { // internal link (ie anchor is in the same source document) String anchor = name.substring( 1 ); if ( !DoxiaUtils.isValidId( anchor ) ) { String tmp = anchor; anchor = DoxiaUtils.encodeId( anchor, true ); String msg = "Modified invalid anchor name: '" + tmp + "' to '" + anchor + "'"; logMessage( "modifiedLink", msg ); } if ( docName != null ) { anchor = docName + "#" + anchor; } writeStartTag( BASIC_LINK_TAG, "internal-destination", HtmlTools.escapeHTML( anchor ) ); writeStartTag( INLINE_TAG, "href.internal" ); } else if ( name.startsWith( "../" ) ) { // local link (ie anchor is not in the same source document) if ( docName == null ) { // can't resolve link without base, fop will issue a warning writeStartTag( BASIC_LINK_TAG, "internal-destination", HtmlTools.escapeHTML( name ) ); writeStartTag( INLINE_TAG, "href.internal" ); return; } String anchor = resolveLinkRelativeToBase( chopExtension( name ) ); writeStartTag( BASIC_LINK_TAG, "internal-destination", HtmlTools.escapeHTML( anchor ) ); writeStartTag( INLINE_TAG, "href.internal" ); } else { // local link (ie anchor is not in the same source document) String anchor = name; if ( anchor.startsWith( "./" ) ) { this.link( anchor.substring( 2 ) ); return; } anchor = chopExtension( anchor ); String base = docName.substring( 0, docName.lastIndexOf( "/" ) ); anchor = base + "/" + anchor; writeStartTag( BASIC_LINK_TAG, "internal-destination", HtmlTools.escapeHTML( anchor ) ); writeStartTag( INLINE_TAG, "href.internal" ); } } // only call this if docName != null !!! private String resolveLinkRelativeToBase( String name ) { String anchor = name; String base = docName.substring( 0, docName.lastIndexOf( "/" ) ); if ( base.indexOf( "/" ) != -1 ) { while ( anchor.startsWith( "../" ) ) { base = base.substring( 0, base.lastIndexOf( "/" ) ); anchor = anchor.substring( 3 ); if ( base.lastIndexOf( "/" ) == -1 ) { while ( anchor.startsWith( "../" ) ) { anchor = anchor.substring( 3 ); } break; } } } return base + "/" + anchor; } private String chopExtension( String name ) { String anchor = name; int dot = anchor.lastIndexOf( "." ); if ( dot != -1 && dot != anchor.length() && anchor.charAt( dot + 1 ) != '/' ) { int hash = anchor.indexOf( "#", dot ); if ( hash != -1 ) { int dot2 = anchor.indexOf( ".", hash ); if ( dot2 != -1 ) { anchor = anchor.substring( 0, dot ) + "#" + HtmlTools.encodeId( anchor.substring( hash + 1, dot2 ) ); } else { anchor = anchor.substring( 0, dot ) + "#" + HtmlTools.encodeId( anchor.substring( hash + 1, anchor.length() ) ); } } else { anchor = anchor.substring( 0, dot ); } } return anchor; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * {@inheritDoc} * * Writes a start tag, prepending EOL. */ protected void writeStartTag( Tag tag, String attributeId ) { if ( !ignoreText ) { super.writeStartTag( tag, attributeId ); } } /** * {@inheritDoc} * * Writes a start tag, prepending EOL. */ protected void writeStartTag( Tag tag, String id, String name ) { if ( !ignoreText ) { super.writeStartTag( tag, id, name ); } } /** * {@inheritDoc} * * Writes an end tag, appending EOL. */ protected void writeEndTag( Tag t ) { if ( !ignoreText ) { super.writeEndTag( t ); } } /** * {@inheritDoc} * * Writes a simple tag, appending EOL. */ protected void writeEmptyTag( Tag tag, String attributeId ) { if ( !ignoreText ) { super.writeEmptyTag( tag, attributeId ); } } /** * {@inheritDoc} * * Writes a text, swallowing any exceptions. */ protected void write( String text ) { if ( !ignoreText ) { super.write( text ); } } /** * {@inheritDoc} * * Writes a text, appending EOL. */ protected void writeln( String text ) { if ( !ignoreText ) { super.writeln( text ); } } /** * {@inheritDoc} * * Writes content, escaping special characters. */ protected void content( String text ) { if ( !ignoreText ) { super.content( text ); } } /** * Writes EOL. */ protected void newline() { if ( !ignoreText ) { writeEOL(); } } /** * Starts a page sequence, depending on the current chapter. * * @param headerText The text to write in the header, if null, nothing is written. * @param footerText The text to write in the footer, if null, nothing is written. */ protected void startPageSequence( String headerText, String footerText ) { if ( chapter == 1 ) { startPageSequence( "0", headerText, footerText ); } else { startPageSequence( "auto", headerText, footerText ); } } /** * Returns the text to write in the header of each page. * * @return String */ protected String getHeaderText() { return Integer.toString( chapter ) + " " + docTitle; } /** * Returns the text to write in the footer of each page. * * @return String */ protected String getFooterText() { int actualYear; String add = " • " + getBundle( Locale.US ).getString( "footer.rights" ); String companyName = ""; if ( docModel != null && docModel.getMeta() != null && docModel.getMeta().isConfidential() ) { add = add + " • " + getBundle( Locale.US ).getString( "footer.confidential" ); } if ( docModel != null && docModel.getCover() != null && docModel.getCover().getCompanyName() != null ) { companyName = docModel.getCover().getCompanyName(); } if ( docModel != null && docModel.getMeta() != null && docModel.getMeta().getDate() != null ) { Calendar date = Calendar.getInstance(); date.setTime( docModel.getMeta().getDate() ); actualYear = date.get( Calendar.YEAR ); } else { actualYear = Calendar.getInstance().get( Calendar.YEAR ); } return "©" + actualYear + ", " + companyName + add; } /** * {@inheritDoc} * * Returns the current chapter number as a string. */ protected String getChapterString() { return Integer.toString( chapter ) + "."; } /** * {@inheritDoc} * * Writes a 'xsl-region-before' block. */ protected void regionBefore( String headerText ) { writeStartTag( STATIC_CONTENT_TAG, "flow-name", "xsl-region-before" ); writeln( "" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "5.625in" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "0.625in" ); writeStartTag( TABLE_BODY_TAG, "" ); writeStartTag( TABLE_ROW_TAG, "" ); writeStartTag( TABLE_CELL_TAG, "" ); writeStartTag( BLOCK_TAG, "header.style" ); if ( headerText != null ) { write( headerText ); } writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeStartTag( TABLE_CELL_TAG, "" ); writeStartTag( BLOCK_TAG, "page.number" ); writeEmptyTag( PAGE_NUMBER_TAG, "" ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); writeEndTag( TABLE_BODY_TAG ); writeEndTag( TABLE_TAG ); writeEndTag( STATIC_CONTENT_TAG ); } /** * {@inheritDoc} * * Writes a 'xsl-region-after' block. */ protected void regionAfter( String footerText ) { writeStartTag( STATIC_CONTENT_TAG, "flow-name", "xsl-region-after" ); writeStartTag( BLOCK_TAG, "footer.style" ); if ( footerText != null ) { write( footerText ); } writeEndTag( BLOCK_TAG ); writeEndTag( STATIC_CONTENT_TAG ); } /** * {@inheritDoc} * * Writes a chapter heading. */ protected void chapterHeading( String headerText, boolean chapterNumber ) { writeStartTag( BLOCK_TAG, "" ); writeStartTag( LIST_BLOCK_TAG, "" ); writeStartTag( LIST_ITEM_TAG, "" ); writeln( "" ); writeStartTag( BLOCK_TAG, "outdented.number.style" ); if ( chapterNumber ) { writeStartTag( BLOCK_TAG, "chapter.title" ); write( Integer.toString( chapter ) ); writeEndTag( BLOCK_TAG ); } writeEndTag( BLOCK_TAG ); writeEndTag( LIST_ITEM_LABEL_TAG ); writeln( "" ); writeStartTag( BLOCK_TAG, "chapter.title" ); if ( headerText == null ) { write( docTitle ); } else { write( headerText ); } writeEndTag( BLOCK_TAG ); writeEndTag( LIST_ITEM_BODY_TAG ); writeEndTag( LIST_ITEM_TAG ); writeEndTag( LIST_BLOCK_TAG ); writeEndTag( BLOCK_TAG ); writeStartTag( BLOCK_TAG, "space-after.optimum", "0em" ); writeEmptyTag( LEADER_TAG, "chapter.rule" ); writeEndTag( BLOCK_TAG ); } /** * Writes a table of contents. The DocumentModel has to contain a DocumentTOC for this to work. */ public void toc() { if ( docModel == null || docModel.getToc() == null || docModel.getToc().getItems() == null || this.tocPosition == TOC_NONE ) { return; } DocumentTOC toc = docModel.getToc(); writeln( "" ); regionBefore( toc.getName() ); regionAfter( getFooterText() ); writeStartTag( FLOW_TAG, "flow-name", "xsl-region-body" ); writeStartTag( BLOCK_TAG, "id", "./toc" ); chapterHeading( toc.getName(), false ); writeln( "" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "0.45in" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "0.4in" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "0.4in" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "5in" ); // TODO {$maxBodyWidth - 1.25}in writeStartTag( TABLE_BODY_TAG ); writeTocItems( toc.getItems(), 1 ); writeEndTag( TABLE_BODY_TAG ); writeEndTag( TABLE_TAG ); writeEndTag( BLOCK_TAG ); writeEndTag( FLOW_TAG ); writeEndTag( PAGE_SEQUENCE_TAG ); } private void writeTocItems( List tocItems, int level ) { final int maxTocLevel = 4; if ( level < 1 || level > maxTocLevel ) { return; } tocStack.push( new NumberedListItem( NUMBERING_DECIMAL ) ); for ( Iterator k = tocItems.iterator(); k.hasNext(); ) { DocumentTOCItem tocItem = (DocumentTOCItem) k.next(); String ref = getIdName( tocItem.getRef() ); writeStartTag( TABLE_ROW_TAG, "keep-with-next", "auto" ); if ( level > 2 ) { for ( int i = 0; i < level - 2; i++ ) { writeStartTag( TABLE_CELL_TAG ); writeSimpleTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); } } writeStartTag( TABLE_CELL_TAG, "toc.cell" ); writeStartTag( BLOCK_TAG, "toc.number.style" ); NumberedListItem current = (NumberedListItem) tocStack.peek(); current.next(); write( currentTocNumber() ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); String span = "3"; if ( level > 2 ) { span = Integer.toString( 5 - level ); } writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", span, "toc.cell" ); MutableAttributeSet atts = getFoConfiguration().getAttributeSet( "toc.h" + level + ".style" ); atts.addAttribute( "text-align-last", "justify" ); writeStartTag( BLOCK_TAG, atts ); writeStartTag( BASIC_LINK_TAG, "internal-destination", ref ); write( tocItem.getName() ); writeEndTag( BASIC_LINK_TAG ); writeEmptyTag( LEADER_TAG, "toc.leader.style" ); writeStartTag( INLINE_TAG, "page.number" ); writeEmptyTag( PAGE_NUMBER_CITATION_TAG, "ref-id", ref ); writeEndTag( INLINE_TAG ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); if ( tocItem.getItems() != null ) { writeTocItems( tocItem.getItems(), level + 1 ); } } tocStack.pop(); } private String currentTocNumber() { String ch = ( (NumberedListItem) tocStack.get( 0 ) ).getListItemSymbol(); for ( int i = 1; i < tocStack.size(); i++ ) { ch = ch + "." + ( (NumberedListItem) tocStack.get( i ) ).getListItemSymbol(); } return ch; } /** * {@inheritDoc} * * Writes a fo:bookmark-tree. The DocumentModel has to contain a DocumentTOC for this to work. */ protected void pdfBookmarks() { if ( docModel == null || docModel.getToc() == null ) { return; } writeStartTag( BOOKMARK_TREE_TAG ); renderBookmarkItems( docModel.getToc().getItems() ); writeEndTag( BOOKMARK_TREE_TAG ); } private void renderBookmarkItems( List items ) { for ( Iterator k = items.iterator(); k.hasNext(); ) { DocumentTOCItem tocItem = (DocumentTOCItem) k.next(); String ref = getIdName( tocItem.getRef() ); writeStartTag( BOOKMARK_TAG, "internal-destination", ref ); writeStartTag( BOOKMARK_TITLE_TAG ); write( tocItem.getName() ); writeEndTag( BOOKMARK_TITLE_TAG ); if ( tocItem.getItems() != null ) { renderBookmarkItems( tocItem.getItems() ); } writeEndTag( BOOKMARK_TAG ); } } /** * Writes a cover page. The DocumentModel has to contain a DocumentMeta for this to work. */ public void coverPage() { if ( this.docModel == null ) { return; } DocumentCover cover = docModel.getCover(); DocumentMeta meta = docModel.getMeta(); if ( cover == null && meta == null ) { return; // no information for cover page: ignore } // TODO: remove hard-coded settings writeStartTag( PAGE_SEQUENCE_TAG, "master-reference", "cover-page" ); writeStartTag( FLOW_TAG, "flow-name", "xsl-region-body" ); writeStartTag( BLOCK_TAG, "text-align", "center" ); writeln( "" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "3.125in" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "3.125in" ); writeStartTag( TABLE_BODY_TAG ); writeCoverHead( cover ); writeCoverBody( cover, meta ); writeCoverFooter( cover, meta ); writeEndTag( TABLE_BODY_TAG ); writeEndTag( TABLE_TAG ); writeEndTag( BLOCK_TAG ); writeEndTag( FLOW_TAG ); writeEndTag( PAGE_SEQUENCE_TAG ); } private void writeCoverHead( DocumentCover cover ) { if ( cover == null ) { return; } String compLogo = cover.getCompanyLogo(); String projLogo = cover.getProjectLogo(); writeStartTag( TABLE_ROW_TAG, "height", COVER_HEADER_HEIGHT ); writeStartTag( TABLE_CELL_TAG ); if ( StringUtils.isNotEmpty( compLogo ) ) { SinkEventAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( "text-align", "left" ); atts.addAttribute( "vertical-align", "top" ); writeStartTag( BLOCK_TAG, atts ); figureGraphics( compLogo, getGraphicsAttributes( compLogo ) ); writeEndTag( BLOCK_TAG ); } writeSimpleTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeStartTag( TABLE_CELL_TAG ); if ( StringUtils.isNotEmpty( projLogo ) ) { SinkEventAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( "text-align", "right" ); atts.addAttribute( "vertical-align", "top" ); writeStartTag( BLOCK_TAG, atts ); figureGraphics( projLogo, getGraphicsAttributes( projLogo ) ); writeEndTag( BLOCK_TAG ); } writeSimpleTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); } private void writeCoverBody( DocumentCover cover, DocumentMeta meta ) { if ( cover == null && meta == null ) { return; } String subtitle = null; String title = null; String type = null; String version = null; if ( cover == null ) { // aleady checked that meta != null getLog().debug( "The DocumentCover is not defined, using the DocumentMeta title as cover title." ); title = meta.getTitle(); } else { subtitle = cover.getCoverSubTitle(); title = cover.getCoverTitle(); type = cover.getCoverType(); version = cover.getCoverVersion(); } writeln( "" ); writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2" ); writeStartTag( BLOCK_TAG, "line-height", "0.014in" ); writeEmptyTag( LEADER_TAG, "chapter.rule" ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); writeStartTag( TABLE_ROW_TAG, "height", "7.447in" ); writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2" ); writeln( "" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "2.083in" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "2.083in" ); writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "2.083in" ); writeStartTag( TABLE_BODY_TAG ); writeStartTag( TABLE_ROW_TAG ); writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "3" ); writeSimpleTag( BLOCK_TAG ); writeEmptyTag( BLOCK_TAG, "space-before", "3.2235in" ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); writeStartTag( TABLE_ROW_TAG ); writeStartTag( TABLE_CELL_TAG ); writeEmptyTag( BLOCK_TAG, "space-after", "0.5in" ); writeEndTag( TABLE_CELL_TAG ); writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2", "cover.border.left" ); writeStartTag( BLOCK_TAG, "cover.title" ); write( title == null ? "" : title ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); writeStartTag( TABLE_ROW_TAG ); writeStartTag( TABLE_CELL_TAG ); writeSimpleTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2", "cover.border.left.bottom" ); writeStartTag( BLOCK_TAG, "cover.subtitle" ); write( subtitle == null ? ( version == null ? "" : " v. " + version ) : subtitle ); writeEndTag( BLOCK_TAG ); writeStartTag( BLOCK_TAG, "cover.subtitle" ); write( type == null ? "" : type ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); writeEndTag( TABLE_BODY_TAG ); writeEndTag( TABLE_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); writeStartTag( TABLE_ROW_TAG, "height", "0.014in" ); writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2" ); writeln( "" ); writeEmptyTag( LEADER_TAG, "chapter.rule" ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); writeStartTag( TABLE_ROW_TAG ); writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2" ); writeSimpleTag( BLOCK_TAG ); writeEmptyTag( BLOCK_TAG, "space-before", "0.2in" ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); } private void writeCoverFooter( DocumentCover cover, DocumentMeta meta ) { if ( cover == null && meta == null ) { return; } String date = null; String compName = null; if ( cover == null ) { // aleady checked that meta != null getLog().debug( "The DocumentCover is not defined, using the DocumentMeta author as company name." ); compName = meta.getAuthor(); } else { compName = cover.getCompanyName(); if ( cover.getCoverdate() == null ) { cover.setCoverDate( new Date() ); date = cover.getCoverdate(); cover.setCoverDate( null ); } else { date = cover.getCoverdate(); } } writeStartTag( TABLE_ROW_TAG, "height", "0.3in" ); writeStartTag( TABLE_CELL_TAG ); MutableAttributeSet att = getFoConfiguration().getAttributeSet( "cover.subtitle" ); att.addAttribute( "height", "0.3in" ); att.addAttribute( "text-align", "left" ); writeStartTag( BLOCK_TAG, att ); write( compName == null ? ( cover.getAuthor() == null ? "" : cover.getAuthor() ) : compName ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeStartTag( TABLE_CELL_TAG ); att = getFoConfiguration().getAttributeSet( "cover.subtitle" ); att.addAttribute( "height", "0.3in" ); att.addAttribute( "text-align", "right" ); writeStartTag( BLOCK_TAG, att ); write( date == null ? "" : date ); writeEndTag( BLOCK_TAG ); writeEndTag( TABLE_CELL_TAG ); writeEndTag( TABLE_ROW_TAG ); } private ResourceBundle getBundle( Locale locale ) { return ResourceBundle.getBundle( "doxia-fo", locale, this.getClass().getClassLoader() ); } private SinkEventAttributeSet getGraphicsAttributes( String logo ) { MutableAttributeSet atts = null; try { atts = DoxiaUtils.getImageAttributes( logo ); } catch ( IOException e ) { getLog().debug( e ); } if ( atts == null ) { return new SinkEventAttributeSet( new String[] { SinkEventAttributes.HEIGHT, COVER_HEADER_HEIGHT } ); } // FOP dpi: 72 // Max width : 3.125 inch, table cell size, see #coverPage() final int maxWidth = 225; // 3.125 * 72 if ( Integer.parseInt( atts.getAttribute( SinkEventAttributes.WIDTH ).toString() ) > maxWidth ) { atts.addAttribute( "content-width", "3.125in" ); } return new SinkEventAttributeSet( atts ); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.javadoxia-1.1.4/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfigura0000644000175000017500000001423211203765221033217 0ustar twernertwernerpackage org.apache.maven.doxia.module.fo; /* * 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.File; import java.io.IOException; import java.util.List; import javax.swing.text.MutableAttributeSet; import javax.swing.text.SimpleAttributeSet; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.XMLConfiguration; import org.apache.maven.doxia.sink.SinkUtils; import org.codehaus.plexus.util.ReaderFactory; /** * A utility class to construct FO configuration parameters. * * @author ltheussl * @version $Id: FoConfiguration.java 775622 2009-05-17 10:44:33Z vsiveton $ * @since 1.1 */ public class FoConfiguration { /** Holds the single attributes. */ private MutableAttributeSet attributeSet; /** The configuration instance. */ private final XMLConfiguration config; /** The list of attribute sets. */ private List sets; /** * Constructor. */ public FoConfiguration() { this.config = new XMLConfiguration(); // necessary because some attributes contain commas: config.setDelimiterParsingDisabled( true ); loadDefaultConfig(); } /** * Load configuration parameters from a File. * * @param configFile the configuration file. * * @throws java.io.IOException if the File cannot be read * or some error occurs when initializing the configuration parameters. * * @since 1.1.1 */ public void load( File configFile ) throws IOException { config.clear(); try { config.load( configFile ); } catch ( ConfigurationException cex ) { IOException ioe = new IOException(); ioe.initCause( cex ); throw ioe; } loadDefaultConfig(); // this adds default values that are missing from above } /** * Builds a list of attributes. * * @param attributeId A unique id to identify the set of attributes. * This should correspond to the name of an attribute-set * defined in the configuration file. * @return A string that contains a list of attributes with * the values configured for the current builder. Returns the * empty string if attributeId is null or if attributeId * is not a valid identifier. */ public String getAttributeString( String attributeId ) { if ( attributeId == null ) { return ""; } reset(); addAttributes( attributeId ); return SinkUtils.getAttributeString( attributeSet ); } /** * Builds a set of attributes. * * @param attributeId A unique id to identify the set of attributes. * This should correspond to the name of an attribute-set * defined in the configuration file. * @return A MutableAttributeSet that contains the attributes with * the values configured for the current builder. Returns null * if attributeId is null or empty, or if attributeId is not a valid identifier. */ public MutableAttributeSet getAttributeSet( String attributeId ) { if ( attributeId == null || attributeId.length() == 0 ) { return null; } reset(); addAttributes( attributeId ); if ( attributeSet.getAttributeCount() == 0 ) { return null; } return attributeSet; } /** * Adds an attribute to the current StringBuffer. * * @param attributeId A unique id to identify the set of attributes. * This should correspond to the name of an attribute-set * defined in the configuration file. */ private void addAttributes( String attributeId ) { int index = sets.indexOf( attributeId ); String keybase = "xsl:attribute-set(" + String.valueOf( index ) + ")"; Object prop = config.getProperty( keybase + ".xsl:attribute" ); if ( prop instanceof List ) { List values = (List) prop; List keys = config.getList( keybase + ".xsl:attribute[@name]" ); for ( int i = 0; i < values.size(); i++ ) { attributeSet.addAttribute( keys.get( i ), values.get( i ) ); } } else if ( prop instanceof String ) { String value = config.getString( keybase + ".xsl:attribute" ); String key = config.getString( keybase + ".xsl:attribute[@name]" ); attributeSet.addAttribute( key, value ); } String extend = config.getString( keybase + "[@use-attribute-sets]" ); if ( extend != null ) { addAttributes( extend ); } } /** Load the default fo configuration file. */ private void loadDefaultConfig() { try { config.load( ReaderFactory.newXmlReader( getClass().getResourceAsStream( "/fo-styles.xslt" ) ) ); } catch ( ConfigurationException cex ) { // this should not happen throw new RuntimeException( cex ); } catch ( IOException e ) { // this should not happen throw new RuntimeException( e ); } this.sets = config.getList( "xsl:attribute-set[@name]" ); reset(); } /** * (Re-)initialize the AttributeSet. */ private void reset() { this.attributeSet = new SimpleAttributeSet(); } } doxia-1.1.4/doxia-modules/doxia-module-rtf/0000755000175000017500000000000011632765554020527 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/pom.xml0000644000175000017500000000317511470562366022046 0ustar twernertwerner 4.0.0 doxia-modules org.apache.maven.doxia 1.1.4 ../pom.xml doxia-module-rtf Doxia :: RTF Module A Doxia module for Rich Text Format source documents. org.apache.maven.doxia doxia-module-apt ${projectVersion} test doxia-1.1.4/doxia-modules/doxia-module-rtf/src/0000755000175000017500000000000011632765554021316 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/0000755000175000017500000000000011632765554022275 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/resources/0000755000175000017500000000000011632765554024307 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/resources/test.apt0000644000175000017500000000071410577144475025776 0ustar twernertwerner ----- Maven: the cute and fluffy build tool. ----- Jason van Zyl ----- Maven: the cute and fluffy build tool that's good for the whole family Maven will make you laugh; Maven will make you jump for joy; Maven will make you put that dirty little tool called Ant in the litter box with the cat treats where it belongs! * Say Goodbye the build time stains! Maven helps you get rid of those build stains. Wash with Maven and go! doxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/0000755000175000017500000000000011632765554023216 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/0000755000175000017500000000000011632765554024005 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/apache/0000755000175000017500000000000011632765554025226 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/0000755000175000017500000000000011632765554026334 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765554027440 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765554030725 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/0000755000175000017500000000000011632765554031520 5ustar twernertwerner././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/RtfSinkTest.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/test/java/org/apache/maven/doxia/module/rtf/RtfSinkTe0000644000175000017500000000535411134645456033316 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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.AbstractSinkTestCase; import org.apache.maven.doxia.sink.SinkTestDocument; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.module.apt.AptParser; import org.codehaus.plexus.util.IOUtil; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; import java.io.Reader; import java.io.InputStream; import java.io.InputStreamReader; /** * @author Jason van Zyl * @version $Id: RtfSinkTest.java 735472 2009-01-18 15:30:54Z vsiveton $ */ public class RtfSinkTest extends AbstractSinkTestCase { /** {@inheritDoc} */ protected String outputExtension() { return "rtf"; } /** {@inheritDoc} */ protected Parser createParser() { return new AptParser(); } /** {@inheritDoc} */ protected Sink createSink() throws Exception { File outputFile = new File( getBasedirFile(), "target/output/test.rtf" ); outputFile.getParentFile().mkdirs(); return new RtfSink( new FileOutputStream( outputFile ) ); } /** {@inheritDoc} */ protected Reader getTestReader() throws Exception { InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( "test.apt" ); InputStreamReader reader = new InputStreamReader( is ); return reader; } public void testDocument() throws Exception { File outputFile = new File( getBasedirFile(), "target/test-output/sink/testDocument.rtf" ); outputFile.getParentFile().mkdirs(); OutputStream out = new FileOutputStream( outputFile ); Sink sink = new RtfSink( out ); try { SinkTestDocument.generate( sink ); } finally { sink.close(); IOUtil.close( out ); } } } doxia-1.1.4/doxia-modules/doxia-module-rtf/src/site/0000755000175000017500000000000011632765554022262 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/site/site.xml0000644000175000017500000000167211103330660023731 0ustar twernertwerner doxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/0000755000175000017500000000000011632765554022242 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/0000755000175000017500000000000011632765554023163 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/0000755000175000017500000000000011632765554023752 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/0000755000175000017500000000000011632765554025173 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/0000755000175000017500000000000011632765554026301 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765554027405 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765554030672 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/0000755000175000017500000000000011632765554031465 5ustar twernertwerner././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/AlphaNumerals.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/AlphaNume0000644000175000017500000000274711073632077033264 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: AlphaNumerals.java 703394 2008-10-10 10:53:51Z vsiveton $ */ class AlphaNumerals { static String toString( int n ) { return toString( n, false ); } static String toString( int n, boolean lowerCase ) { StringBuffer alpha = new StringBuffer(); char zeroLetter = lowerCase ? '`' : '@'; while ( n > 0 ) { char letter = (char) ( zeroLetter + ( n % 27 ) ); if ( letter == zeroLetter ) { letter = '0'; } alpha.insert( 0, letter ); n /= 27; } return alpha.toString(); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SerifItalic.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SerifItal0000644000175000017500000003235410767707462033303 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: SerifItalic.java 638290 2008-03-18 09:45:22Z bentmann $ */ class SerifItalic extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 39, -11, 302, 667 ), new CharMetrics( 420, 0, 144, 421, 432, 666 ), new CharMetrics( 500, 0, 2, 0, 540, 676 ), new CharMetrics( 500, 0, 31, -89, 497, 731 ), new CharMetrics( 833, 0, 79, -13, 790, 676 ), new CharMetrics( 778, 0, 76, -18, 723, 666 ), new CharMetrics( 333, 0, 151, 436, 290, 666 ), new CharMetrics( 333, 0, 42, -181, 315, 669 ), new CharMetrics( 333, 0, 16, -180, 289, 669 ), new CharMetrics( 500, 0, 128, 255, 492, 666 ), new CharMetrics( 675, 0, 86, 0, 590, 506 ), new CharMetrics( 250, 0, -4, -129, 135, 101 ), new CharMetrics( 333, 0, 49, 192, 282, 255 ), new CharMetrics( 250, 0, 27, -11, 138, 100 ), new CharMetrics( 278, 0, -65, -18, 386, 666 ), new CharMetrics( 500, 0, 32, -7, 497, 676 ), new CharMetrics( 500, 0, 49, 0, 409, 676 ), new CharMetrics( 500, 0, 12, 0, 452, 676 ), new CharMetrics( 500, 0, 15, -7, 465, 676 ), new CharMetrics( 500, 0, 1, 0, 479, 676 ), new CharMetrics( 500, 0, 15, -7, 491, 666 ), new CharMetrics( 500, 0, 30, -7, 521, 686 ), new CharMetrics( 500, 0, 75, -8, 537, 666 ), new CharMetrics( 500, 0, 30, -7, 493, 676 ), new CharMetrics( 500, 0, 23, -17, 492, 676 ), new CharMetrics( 333, 0, 50, -11, 261, 441 ), new CharMetrics( 333, 0, 27, -129, 261, 441 ), new CharMetrics( 675, 0, 84, -8, 592, 514 ), new CharMetrics( 675, 0, 86, 120, 590, 386 ), new CharMetrics( 675, 0, 84, -8, 592, 514 ), new CharMetrics( 500, 0, 132, -12, 472, 664 ), new CharMetrics( 920, 0, 118, -18, 806, 666 ), new CharMetrics( 611, 0, -51, 0, 564, 668 ), new CharMetrics( 611, 0, -8, 0, 588, 653 ), new CharMetrics( 667, 0, 66, -18, 689, 666 ), new CharMetrics( 722, 0, -8, 0, 700, 653 ), new CharMetrics( 611, 0, -1, 0, 634, 653 ), new CharMetrics( 611, 0, 8, 0, 645, 653 ), new CharMetrics( 722, 0, 52, -18, 722, 666 ), new CharMetrics( 722, 0, -8, 0, 767, 653 ), new CharMetrics( 333, 0, -8, 0, 384, 653 ), new CharMetrics( 444, 0, -6, -18, 491, 653 ), new CharMetrics( 667, 0, 7, 0, 722, 653 ), new CharMetrics( 556, 0, -8, 0, 559, 653 ), new CharMetrics( 833, 0, -18, 0, 873, 653 ), new CharMetrics( 667, 0, -20, -15, 727, 653 ), new CharMetrics( 722, 0, 60, -18, 699, 666 ), new CharMetrics( 611, 0, 0, 0, 605, 653 ), new CharMetrics( 722, 0, 59, -182, 699, 666 ), new CharMetrics( 611, 0, -13, 0, 588, 653 ), new CharMetrics( 500, 0, 17, -18, 508, 667 ), new CharMetrics( 556, 0, 59, 0, 633, 653 ), new CharMetrics( 722, 0, 102, -18, 765, 653 ), new CharMetrics( 611, 0, 76, -18, 688, 653 ), new CharMetrics( 833, 0, 71, -18, 906, 653 ), new CharMetrics( 611, 0, -29, 0, 655, 653 ), new CharMetrics( 556, 0, 78, 0, 633, 653 ), new CharMetrics( 556, 0, -6, 0, 606, 653 ), new CharMetrics( 389, 0, 21, -153, 391, 663 ), new CharMetrics( 278, 0, -41, -18, 319, 666 ), new CharMetrics( 389, 0, 12, -153, 382, 663 ), new CharMetrics( 422, 0, 0, 301, 422, 666 ), new CharMetrics( 500, 0, 0, -125, 500, -75 ), new CharMetrics( 333, 0, 171, 436, 310, 666 ), new CharMetrics( 500, 0, 17, -11, 476, 441 ), new CharMetrics( 500, 0, 23, -11, 473, 683 ), new CharMetrics( 444, 0, 30, -11, 425, 441 ), new CharMetrics( 500, 0, 15, -13, 527, 683 ), new CharMetrics( 444, 0, 31, -11, 412, 441 ), new CharMetrics( 278, 0, -147, -207, 424, 678 ), new CharMetrics( 500, 0, 8, -206, 472, 441 ), new CharMetrics( 500, 0, 19, -9, 478, 683 ), new CharMetrics( 278, 0, 49, -11, 264, 654 ), new CharMetrics( 278, 0, -124, -207, 276, 654 ), new CharMetrics( 444, 0, 14, -11, 461, 683 ), new CharMetrics( 278, 0, 41, -11, 279, 683 ), new CharMetrics( 722, 0, 12, -9, 704, 441 ), new CharMetrics( 500, 0, 14, -9, 474, 441 ), new CharMetrics( 500, 0, 27, -11, 468, 441 ), new CharMetrics( 500, 0, -75, -205, 469, 441 ), new CharMetrics( 500, 0, 25, -209, 483, 441 ), new CharMetrics( 389, 0, 45, 0, 412, 441 ), new CharMetrics( 389, 0, 16, -13, 366, 442 ), new CharMetrics( 278, 0, 37, -11, 296, 546 ), new CharMetrics( 500, 0, 42, -11, 475, 441 ), new CharMetrics( 444, 0, 21, -18, 426, 441 ), new CharMetrics( 667, 0, 16, -18, 648, 441 ), new CharMetrics( 444, 0, -27, -11, 447, 441 ), new CharMetrics( 444, 0, -24, -206, 426, 441 ), new CharMetrics( 389, 0, -2, -81, 380, 428 ), new CharMetrics( 400, 0, 51, -177, 407, 687 ), new CharMetrics( 275, 0, 105, -18, 171, 666 ), new CharMetrics( 400, 0, -7, -177, 349, 687 ), new CharMetrics( 541, 0, 40, 183, 502, 323 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 49, -11, 235, 441 ), new CharMetrics( 333, 0, 121, 492, 311, 664 ), new CharMetrics( 333, 0, 180, 494, 403, 664 ), new CharMetrics( 333, 0, 91, 492, 385, 661 ), new CharMetrics( 333, 0, 100, 517, 427, 624 ), new CharMetrics( 333, 0, 99, 532, 411, 583 ), new CharMetrics( 333, 0, 117, 492, 418, 650 ), new CharMetrics( 333, 0, 207, 508, 305, 606 ), new CharMetrics( 333, 0, 107, 508, 405, 606 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 155, 492, 355, 691 ), new CharMetrics( 333, 0, -30, -217, 182, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 93, 494, 486, 664 ), new CharMetrics( 333, 0, -20, -169, 200, 40 ), new CharMetrics( 333, 0, 121, 492, 426, 661 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 389, 0, 59, -205, 322, 473 ), new CharMetrics( 500, 0, 77, -143, 472, 560 ), new CharMetrics( 500, 0, 10, -6, 517, 670 ), new CharMetrics( 500, 0, -22, 53, 522, 597 ), new CharMetrics( 500, 0, 27, 0, 603, 653 ), new CharMetrics( 275, 0, 105, -18, 171, 666 ), new CharMetrics( 500, 0, 53, -162, 461, 666 ), new CharMetrics( 333, 0, 107, 508, 405, 606 ), new CharMetrics( 760, 0, 41, -18, 719, 666 ), new CharMetrics( 276, 0, 42, 406, 352, 676 ), new CharMetrics( 500, 0, 53, 37, 445, 403 ), new CharMetrics( 675, 0, 86, 108, 590, 386 ), new CharMetrics( 333, 0, 49, 192, 282, 255 ), new CharMetrics( 760, 0, 41, -18, 719, 666 ), new CharMetrics( 333, 0, 99, 532, 411, 583 ), new CharMetrics( 400, 0, 101, 390, 387, 676 ), new CharMetrics( 675, 0, 86, 0, 590, 506 ), new CharMetrics( 300, 0, 33, 271, 324, 676 ), new CharMetrics( 300, 0, 43, 268, 339, 676 ), new CharMetrics( 333, 0, 180, 494, 403, 664 ), new CharMetrics( 500, 0, -30, -209, 497, 428 ), new CharMetrics( 523, 0, 55, -123, 616, 653 ), new CharMetrics( 250, 0, 70, 199, 181, 310 ), new CharMetrics( 333, 0, -30, -217, 182, 0 ), new CharMetrics( 300, 0, 43, 271, 284, 676 ), new CharMetrics( 310, 0, 67, 406, 362, 676 ), new CharMetrics( 500, 0, 55, 37, 447, 403 ), new CharMetrics( 750, 0, 33, -10, 736, 676 ), new CharMetrics( 750, 0, 34, -10, 749, 676 ), new CharMetrics( 750, 0, 23, -10, 736, 676 ), new CharMetrics( 500, 0, 28, -205, 368, 471 ), new CharMetrics( 611, 0, -51, 0, 564, 876 ), new CharMetrics( 611, 0, -51, 0, 564, 876 ), new CharMetrics( 611, 0, -51, 0, 564, 873 ), new CharMetrics( 611, 0, -51, 0, 566, 836 ), new CharMetrics( 611, 0, -51, 0, 564, 818 ), new CharMetrics( 611, 0, -51, 0, 564, 883 ), new CharMetrics( 889, 0, -27, 0, 911, 653 ), new CharMetrics( 667, 0, 66, -217, 689, 666 ), new CharMetrics( 611, 0, -1, 0, 634, 876 ), new CharMetrics( 611, 0, -1, 0, 634, 876 ), new CharMetrics( 611, 0, -1, 0, 634, 873 ), new CharMetrics( 611, 0, -1, 0, 634, 818 ), new CharMetrics( 333, 0, -8, 0, 384, 876 ), new CharMetrics( 333, 0, -8, 0, 413, 876 ), new CharMetrics( 333, 0, -8, 0, 425, 873 ), new CharMetrics( 333, 0, -8, 0, 435, 818 ), new CharMetrics( 722, 0, -8, 0, 700, 653 ), new CharMetrics( 667, 0, -20, -15, 727, 836 ), new CharMetrics( 722, 0, 60, -18, 699, 876 ), new CharMetrics( 722, 0, 60, -18, 699, 876 ), new CharMetrics( 722, 0, 60, -18, 699, 873 ), new CharMetrics( 722, 0, 60, -18, 699, 836 ), new CharMetrics( 722, 0, 60, -18, 699, 818 ), new CharMetrics( 675, 0, 93, 8, 582, 497 ), new CharMetrics( 722, 0, 60, -105, 699, 722 ), new CharMetrics( 722, 0, 102, -18, 765, 876 ), new CharMetrics( 722, 0, 102, -18, 765, 876 ), new CharMetrics( 722, 0, 102, -18, 765, 873 ), new CharMetrics( 722, 0, 102, -18, 765, 818 ), new CharMetrics( 556, 0, 78, 0, 633, 876 ), new CharMetrics( 611, 0, 0, 0, 569, 653 ), new CharMetrics( 500, 0, -168, -207, 493, 679 ), new CharMetrics( 500, 0, 17, -11, 476, 664 ), new CharMetrics( 500, 0, 17, -11, 487, 664 ), new CharMetrics( 500, 0, 17, -11, 476, 661 ), new CharMetrics( 500, 0, 17, -11, 511, 624 ), new CharMetrics( 500, 0, 17, -11, 489, 606 ), new CharMetrics( 500, 0, 17, -11, 476, 691 ), new CharMetrics( 667, 0, 23, -11, 640, 441 ), new CharMetrics( 444, 0, 26, -217, 425, 441 ), new CharMetrics( 444, 0, 31, -11, 412, 664 ), new CharMetrics( 444, 0, 31, -11, 459, 664 ), new CharMetrics( 444, 0, 31, -11, 441, 661 ), new CharMetrics( 444, 0, 31, -11, 451, 606 ), new CharMetrics( 278, 0, 49, -11, 284, 664 ), new CharMetrics( 278, 0, 49, -11, 356, 664 ), new CharMetrics( 278, 0, 34, -11, 328, 661 ), new CharMetrics( 278, 0, 49, -11, 353, 606 ), new CharMetrics( 500, 0, 27, -11, 482, 683 ), new CharMetrics( 500, 0, 14, -9, 476, 624 ), new CharMetrics( 500, 0, 27, -11, 468, 664 ), new CharMetrics( 500, 0, 27, -11, 487, 664 ), new CharMetrics( 500, 0, 27, -11, 468, 661 ), new CharMetrics( 500, 0, 27, -11, 496, 624 ), new CharMetrics( 500, 0, 27, -11, 489, 606 ), new CharMetrics( 675, 0, 86, -11, 590, 517 ), new CharMetrics( 500, 0, 28, -135, 469, 554 ), new CharMetrics( 500, 0, 42, -11, 475, 664 ), new CharMetrics( 500, 0, 42, -11, 477, 664 ), new CharMetrics( 500, 0, 42, -11, 475, 661 ), new CharMetrics( 500, 0, 42, -11, 479, 606 ), new CharMetrics( 444, 0, -24, -206, 459, 664 ), new CharMetrics( 500, 0, -75, -205, 469, 683 ), new CharMetrics( 444, 0, -24, -206, 441, 606 )}; SerifItalic() { super( false, 683, -205, new CharMetrics( 0, 0, -169, -217, 1010, 883 ), metrics ); } } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBoldItalic.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif0000644000175000017500000003235010767707462033312 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: SansSerifBoldItalic.java 638290 2008-03-18 09:45:22Z bentmann $ */ class SansSerifBoldItalic extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 94, 0, 397, 718 ), new CharMetrics( 474, 0, 193, 447, 529, 718 ), new CharMetrics( 556, 0, 60, 0, 644, 698 ), new CharMetrics( 556, 0, 67, -115, 622, 775 ), new CharMetrics( 889, 0, 136, -19, 901, 710 ), new CharMetrics( 722, 0, 89, -19, 732, 718 ), new CharMetrics( 278, 0, 167, 445, 362, 718 ), new CharMetrics( 333, 0, 76, -208, 470, 734 ), new CharMetrics( 333, 0, -25, -208, 369, 734 ), new CharMetrics( 389, 0, 146, 387, 481, 718 ), new CharMetrics( 584, 0, 82, 0, 610, 506 ), new CharMetrics( 278, 0, 28, -168, 245, 146 ), new CharMetrics( 333, 0, 73, 215, 379, 345 ), new CharMetrics( 278, 0, 64, 0, 245, 146 ), new CharMetrics( 278, 0, -37, -19, 468, 737 ), new CharMetrics( 556, 0, 86, -19, 617, 710 ), new CharMetrics( 556, 0, 173, 0, 529, 710 ), new CharMetrics( 556, 0, 26, 0, 619, 710 ), new CharMetrics( 556, 0, 65, -19, 608, 710 ), new CharMetrics( 556, 0, 60, 0, 598, 710 ), new CharMetrics( 556, 0, 64, -19, 636, 698 ), new CharMetrics( 556, 0, 85, -19, 619, 710 ), new CharMetrics( 556, 0, 125, 0, 676, 698 ), new CharMetrics( 556, 0, 69, -19, 616, 710 ), new CharMetrics( 556, 0, 78, -19, 615, 710 ), new CharMetrics( 333, 0, 92, 0, 351, 512 ), new CharMetrics( 333, 0, 56, -168, 351, 512 ), new CharMetrics( 584, 0, 82, -8, 655, 514 ), new CharMetrics( 584, 0, 58, 87, 633, 419 ), new CharMetrics( 584, 0, 36, -8, 609, 514 ), new CharMetrics( 611, 0, 165, 0, 671, 727 ), new CharMetrics( 975, 0, 186, -19, 954, 737 ), new CharMetrics( 722, 0, 20, 0, 702, 718 ), new CharMetrics( 722, 0, 76, 0, 764, 718 ), new CharMetrics( 722, 0, 107, -19, 789, 737 ), new CharMetrics( 722, 0, 76, 0, 777, 718 ), new CharMetrics( 667, 0, 76, 0, 757, 718 ), new CharMetrics( 611, 0, 76, 0, 740, 718 ), new CharMetrics( 778, 0, 108, -19, 817, 737 ), new CharMetrics( 722, 0, 71, 0, 804, 718 ), new CharMetrics( 278, 0, 64, 0, 367, 718 ), new CharMetrics( 556, 0, 60, -18, 637, 718 ), new CharMetrics( 722, 0, 87, 0, 858, 718 ), new CharMetrics( 611, 0, 76, 0, 611, 718 ), new CharMetrics( 833, 0, 69, 0, 918, 718 ), new CharMetrics( 722, 0, 69, 0, 807, 718 ), new CharMetrics( 778, 0, 107, -19, 823, 737 ), new CharMetrics( 667, 0, 76, 0, 738, 718 ), new CharMetrics( 778, 0, 107, -52, 823, 737 ), new CharMetrics( 722, 0, 76, 0, 778, 718 ), new CharMetrics( 667, 0, 81, -19, 718, 737 ), new CharMetrics( 611, 0, 140, 0, 751, 718 ), new CharMetrics( 722, 0, 116, -19, 804, 718 ), new CharMetrics( 667, 0, 172, 0, 801, 718 ), new CharMetrics( 944, 0, 169, 0, 1082, 718 ), new CharMetrics( 667, 0, 14, 0, 791, 718 ), new CharMetrics( 667, 0, 168, 0, 806, 718 ), new CharMetrics( 611, 0, 25, 0, 737, 718 ), new CharMetrics( 333, 0, 21, -196, 462, 722 ), new CharMetrics( 278, 0, 124, -19, 307, 737 ), new CharMetrics( 333, 0, -18, -196, 423, 722 ), new CharMetrics( 584, 0, 131, 323, 591, 698 ), new CharMetrics( 556, 0, -27, -125, 540, -75 ), new CharMetrics( 278, 0, 165, 454, 361, 727 ), new CharMetrics( 556, 0, 55, -14, 583, 546 ), new CharMetrics( 611, 0, 61, -14, 645, 718 ), new CharMetrics( 556, 0, 79, -14, 599, 546 ), new CharMetrics( 611, 0, 82, -14, 704, 718 ), new CharMetrics( 556, 0, 70, -14, 593, 546 ), new CharMetrics( 333, 0, 87, 0, 469, 727 ), new CharMetrics( 611, 0, 38, -217, 666, 546 ), new CharMetrics( 611, 0, 65, 0, 629, 718 ), new CharMetrics( 278, 0, 69, 0, 363, 725 ), new CharMetrics( 278, 0, -42, -214, 363, 725 ), new CharMetrics( 556, 0, 69, 0, 670, 718 ), new CharMetrics( 278, 0, 69, 0, 362, 718 ), new CharMetrics( 889, 0, 64, 0, 909, 546 ), new CharMetrics( 611, 0, 65, 0, 629, 546 ), new CharMetrics( 611, 0, 82, -14, 643, 546 ), new CharMetrics( 611, 0, 18, -207, 645, 546 ), new CharMetrics( 611, 0, 80, -207, 665, 546 ), new CharMetrics( 389, 0, 64, 0, 489, 546 ), new CharMetrics( 556, 0, 63, -14, 584, 546 ), new CharMetrics( 333, 0, 100, -6, 422, 676 ), new CharMetrics( 611, 0, 98, -14, 658, 532 ), new CharMetrics( 556, 0, 126, 0, 656, 532 ), new CharMetrics( 778, 0, 123, 0, 882, 532 ), new CharMetrics( 556, 0, 15, 0, 648, 532 ), new CharMetrics( 556, 0, 42, -214, 652, 532 ), new CharMetrics( 500, 0, 20, 0, 583, 532 ), new CharMetrics( 389, 0, 94, -196, 518, 722 ), new CharMetrics( 280, 0, 80, -19, 353, 737 ), new CharMetrics( 389, 0, -18, -196, 407, 722 ), new CharMetrics( 584, 0, 115, 163, 577, 343 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 69, 0, 322, 532 ), new CharMetrics( 333, 0, 136, 604, 353, 750 ), new CharMetrics( 333, 0, 236, 604, 515, 750 ), new CharMetrics( 333, 0, 118, 604, 471, 750 ), new CharMetrics( 333, 0, 113, 610, 507, 737 ), new CharMetrics( 333, 0, 122, 604, 483, 678 ), new CharMetrics( 333, 0, 156, 604, 494, 750 ), new CharMetrics( 333, 0, 235, 614, 385, 729 ), new CharMetrics( 333, 0, 137, 614, 482, 729 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 200, 568, 420, 776 ), new CharMetrics( 333, 0, -37, -228, 220, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 137, 604, 645, 750 ), new CharMetrics( 333, 0, 41, -228, 264, 0 ), new CharMetrics( 333, 0, 149, 604, 502, 750 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 50, -186, 353, 532 ), new CharMetrics( 556, 0, 79, -118, 599, 628 ), new CharMetrics( 556, 0, 50, -16, 635, 718 ), new CharMetrics( 556, 0, 27, 76, 680, 636 ), new CharMetrics( 556, 0, 60, 0, 713, 698 ), new CharMetrics( 280, 0, 80, -19, 353, 737 ), new CharMetrics( 556, 0, 61, -184, 598, 727 ), new CharMetrics( 333, 0, 137, 614, 482, 729 ), new CharMetrics( 737, 0, 56, -19, 835, 737 ), new CharMetrics( 370, 0, 92, 276, 465, 737 ), new CharMetrics( 556, 0, 135, 76, 571, 484 ), new CharMetrics( 584, 0, 105, 108, 633, 419 ), new CharMetrics( 333, 0, 73, 215, 379, 345 ), new CharMetrics( 737, 0, 55, -19, 834, 737 ), new CharMetrics( 333, 0, 122, 604, 483, 678 ), new CharMetrics( 400, 0, 175, 426, 467, 712 ), new CharMetrics( 584, 0, 40, 0, 625, 506 ), new CharMetrics( 333, 0, 69, 283, 449, 710 ), new CharMetrics( 333, 0, 91, 271, 441, 710 ), new CharMetrics( 333, 0, 236, 604, 515, 750 ), new CharMetrics( 611, 0, 22, -207, 658, 532 ), new CharMetrics( 556, 0, 98, -191, 688, 700 ), new CharMetrics( 278, 0, 110, 172, 276, 334 ), new CharMetrics( 333, 0, -37, -228, 220, 0 ), new CharMetrics( 333, 0, 148, 283, 388, 710 ), new CharMetrics( 365, 0, 92, 276, 485, 737 ), new CharMetrics( 556, 0, 104, 76, 540, 484 ), new CharMetrics( 834, 0, 132, -19, 806, 710 ), new CharMetrics( 834, 0, 132, -19, 858, 710 ), new CharMetrics( 834, 0, 99, -19, 839, 710 ), new CharMetrics( 611, 0, 53, -195, 559, 532 ), new CharMetrics( 722, 0, 20, 0, 702, 936 ), new CharMetrics( 722, 0, 20, 0, 750, 936 ), new CharMetrics( 722, 0, 20, 0, 706, 936 ), new CharMetrics( 722, 0, 20, 0, 741, 923 ), new CharMetrics( 722, 0, 20, 0, 716, 915 ), new CharMetrics( 722, 0, 20, 0, 702, 962 ), new CharMetrics( 1000, 0, 5, 0, 1100, 718 ), new CharMetrics( 722, 0, 107, -228, 789, 737 ), new CharMetrics( 667, 0, 76, 0, 757, 936 ), new CharMetrics( 667, 0, 76, 0, 757, 936 ), new CharMetrics( 667, 0, 76, 0, 757, 936 ), new CharMetrics( 667, 0, 76, 0, 757, 915 ), new CharMetrics( 278, 0, 64, 0, 367, 936 ), new CharMetrics( 278, 0, 64, 0, 528, 936 ), new CharMetrics( 278, 0, 64, 0, 484, 936 ), new CharMetrics( 278, 0, 64, 0, 494, 915 ), new CharMetrics( 722, 0, 62, 0, 777, 718 ), new CharMetrics( 722, 0, 69, 0, 807, 923 ), new CharMetrics( 778, 0, 107, -19, 823, 936 ), new CharMetrics( 778, 0, 107, -19, 823, 936 ), new CharMetrics( 778, 0, 107, -19, 823, 936 ), new CharMetrics( 778, 0, 107, -19, 823, 923 ), new CharMetrics( 778, 0, 107, -19, 823, 915 ), new CharMetrics( 584, 0, 57, 1, 635, 505 ), new CharMetrics( 778, 0, 35, -27, 894, 745 ), new CharMetrics( 722, 0, 116, -19, 804, 936 ), new CharMetrics( 722, 0, 116, -19, 804, 936 ), new CharMetrics( 722, 0, 116, -19, 804, 936 ), new CharMetrics( 722, 0, 116, -19, 804, 915 ), new CharMetrics( 667, 0, 168, 0, 806, 936 ), new CharMetrics( 667, 0, 76, 0, 716, 718 ), new CharMetrics( 611, 0, 69, -14, 657, 731 ), new CharMetrics( 556, 0, 55, -14, 583, 750 ), new CharMetrics( 556, 0, 55, -14, 627, 750 ), new CharMetrics( 556, 0, 55, -14, 583, 750 ), new CharMetrics( 556, 0, 55, -14, 619, 737 ), new CharMetrics( 556, 0, 55, -14, 594, 729 ), new CharMetrics( 556, 0, 55, -14, 583, 776 ), new CharMetrics( 889, 0, 56, -14, 923, 546 ), new CharMetrics( 556, 0, 79, -228, 599, 546 ), new CharMetrics( 556, 0, 70, -14, 593, 750 ), new CharMetrics( 556, 0, 70, -14, 627, 750 ), new CharMetrics( 556, 0, 70, -14, 593, 750 ), new CharMetrics( 556, 0, 70, -14, 594, 729 ), new CharMetrics( 278, 0, 69, 0, 326, 750 ), new CharMetrics( 278, 0, 69, 0, 488, 750 ), new CharMetrics( 278, 0, 69, 0, 444, 750 ), new CharMetrics( 278, 0, 69, 0, 455, 729 ), new CharMetrics( 611, 0, 82, -14, 670, 737 ), new CharMetrics( 611, 0, 65, 0, 646, 737 ), new CharMetrics( 611, 0, 82, -14, 643, 750 ), new CharMetrics( 611, 0, 82, -14, 654, 750 ), new CharMetrics( 611, 0, 82, -14, 643, 750 ), new CharMetrics( 611, 0, 82, -14, 646, 737 ), new CharMetrics( 611, 0, 82, -14, 643, 729 ), new CharMetrics( 584, 0, 82, -42, 610, 548 ), new CharMetrics( 611, 0, 22, -29, 701, 560 ), new CharMetrics( 611, 0, 98, -14, 658, 750 ), new CharMetrics( 611, 0, 98, -14, 658, 750 ), new CharMetrics( 611, 0, 98, -14, 658, 750 ), new CharMetrics( 611, 0, 98, -14, 658, 729 ), new CharMetrics( 556, 0, 42, -214, 652, 750 ), new CharMetrics( 611, 0, 18, -208, 645, 718 ), new CharMetrics( 556, 0, 42, -214, 652, 729 )}; SansSerifBoldItalic() { super( false, 718, -207, new CharMetrics( 0, 0, -174, -228, 1114, 962 ), metrics ); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SerifBold.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SerifBold0000644000175000017500000003223410767707462033267 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: SerifBold.java 638290 2008-03-18 09:45:22Z bentmann $ */ class SerifBold extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 81, -13, 251, 691 ), new CharMetrics( 555, 0, 83, 404, 472, 691 ), new CharMetrics( 500, 0, 4, 0, 496, 700 ), new CharMetrics( 500, 0, 29, -99, 472, 750 ), new CharMetrics( 1000, 0, 124, -14, 877, 692 ), new CharMetrics( 833, 0, 62, -16, 787, 691 ), new CharMetrics( 333, 0, 79, 356, 263, 691 ), new CharMetrics( 333, 0, 46, -168, 306, 694 ), new CharMetrics( 333, 0, 27, -168, 287, 694 ), new CharMetrics( 500, 0, 56, 255, 447, 691 ), new CharMetrics( 570, 0, 33, 0, 537, 506 ), new CharMetrics( 250, 0, 39, -180, 223, 155 ), new CharMetrics( 333, 0, 44, 171, 287, 287 ), new CharMetrics( 250, 0, 41, -13, 210, 156 ), new CharMetrics( 278, 0, -24, -19, 302, 691 ), new CharMetrics( 500, 0, 24, -13, 476, 688 ), new CharMetrics( 500, 0, 65, 0, 442, 688 ), new CharMetrics( 500, 0, 17, 0, 478, 688 ), new CharMetrics( 500, 0, 16, -14, 468, 688 ), new CharMetrics( 500, 0, 19, 0, 475, 688 ), new CharMetrics( 500, 0, 22, -8, 470, 676 ), new CharMetrics( 500, 0, 28, -13, 475, 688 ), new CharMetrics( 500, 0, 17, 0, 477, 676 ), new CharMetrics( 500, 0, 28, -13, 472, 688 ), new CharMetrics( 500, 0, 26, -13, 473, 688 ), new CharMetrics( 333, 0, 82, -13, 251, 472 ), new CharMetrics( 333, 0, 82, -180, 266, 472 ), new CharMetrics( 570, 0, 31, -8, 539, 514 ), new CharMetrics( 570, 0, 33, 107, 537, 399 ), new CharMetrics( 570, 0, 31, -8, 539, 514 ), new CharMetrics( 500, 0, 57, -13, 445, 689 ), new CharMetrics( 930, 0, 108, -19, 822, 691 ), new CharMetrics( 722, 0, 9, 0, 689, 690 ), new CharMetrics( 667, 0, 16, 0, 619, 676 ), new CharMetrics( 722, 0, 49, -19, 687, 691 ), new CharMetrics( 722, 0, 14, 0, 690, 676 ), new CharMetrics( 667, 0, 16, 0, 641, 676 ), new CharMetrics( 611, 0, 16, 0, 583, 676 ), new CharMetrics( 778, 0, 37, -19, 755, 691 ), new CharMetrics( 778, 0, 21, 0, 759, 676 ), new CharMetrics( 389, 0, 20, 0, 370, 676 ), new CharMetrics( 500, 0, 3, -96, 479, 676 ), new CharMetrics( 778, 0, 30, 0, 769, 676 ), new CharMetrics( 667, 0, 19, 0, 638, 676 ), new CharMetrics( 944, 0, 14, 0, 921, 676 ), new CharMetrics( 722, 0, 16, -18, 701, 676 ), new CharMetrics( 778, 0, 35, -19, 743, 691 ), new CharMetrics( 611, 0, 16, 0, 600, 676 ), new CharMetrics( 778, 0, 35, -176, 743, 691 ), new CharMetrics( 722, 0, 26, 0, 715, 676 ), new CharMetrics( 556, 0, 35, -19, 513, 692 ), new CharMetrics( 667, 0, 31, 0, 636, 676 ), new CharMetrics( 722, 0, 16, -19, 701, 676 ), new CharMetrics( 722, 0, 16, -18, 701, 676 ), new CharMetrics( 1000, 0, 19, -15, 981, 676 ), new CharMetrics( 722, 0, 16, 0, 699, 676 ), new CharMetrics( 722, 0, 15, 0, 699, 676 ), new CharMetrics( 667, 0, 28, 0, 634, 676 ), new CharMetrics( 333, 0, 67, -149, 301, 678 ), new CharMetrics( 278, 0, -25, -19, 303, 691 ), new CharMetrics( 333, 0, 32, -149, 266, 678 ), new CharMetrics( 581, 0, 73, 311, 509, 676 ), new CharMetrics( 500, 0, 0, -125, 500, -75 ), new CharMetrics( 333, 0, 70, 356, 254, 691 ), new CharMetrics( 500, 0, 25, -14, 488, 473 ), new CharMetrics( 556, 0, 17, -14, 521, 676 ), new CharMetrics( 444, 0, 25, -14, 430, 473 ), new CharMetrics( 556, 0, 25, -14, 534, 676 ), new CharMetrics( 444, 0, 25, -14, 426, 473 ), new CharMetrics( 333, 0, 14, 0, 389, 691 ), new CharMetrics( 500, 0, 28, -206, 483, 473 ), new CharMetrics( 556, 0, 16, 0, 534, 676 ), new CharMetrics( 278, 0, 16, 0, 255, 691 ), new CharMetrics( 333, 0, -57, -203, 263, 691 ), new CharMetrics( 556, 0, 22, 0, 543, 676 ), new CharMetrics( 278, 0, 16, 0, 255, 676 ), new CharMetrics( 833, 0, 16, 0, 814, 473 ), new CharMetrics( 556, 0, 21, 0, 539, 473 ), new CharMetrics( 500, 0, 25, -14, 476, 473 ), new CharMetrics( 556, 0, 19, -205, 524, 473 ), new CharMetrics( 556, 0, 34, -205, 536, 473 ), new CharMetrics( 444, 0, 29, 0, 434, 473 ), new CharMetrics( 389, 0, 25, -14, 361, 473 ), new CharMetrics( 333, 0, 20, -12, 332, 630 ), new CharMetrics( 556, 0, 16, -14, 537, 461 ), new CharMetrics( 500, 0, 21, -14, 485, 461 ), new CharMetrics( 722, 0, 23, -14, 707, 461 ), new CharMetrics( 500, 0, 12, 0, 484, 461 ), new CharMetrics( 500, 0, 16, -205, 480, 461 ), new CharMetrics( 444, 0, 21, 0, 420, 461 ), new CharMetrics( 394, 0, 22, -175, 340, 698 ), new CharMetrics( 220, 0, 66, -19, 154, 691 ), new CharMetrics( 394, 0, 54, -175, 372, 698 ), new CharMetrics( 520, 0, 29, 173, 491, 333 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 16, 0, 255, 461 ), new CharMetrics( 333, 0, 8, 528, 246, 713 ), new CharMetrics( 333, 0, 86, 528, 324, 713 ), new CharMetrics( 333, 0, -2, 528, 335, 704 ), new CharMetrics( 333, 0, -16, 547, 349, 674 ), new CharMetrics( 333, 0, 1, 565, 331, 637 ), new CharMetrics( 333, 0, 15, 528, 318, 691 ), new CharMetrics( 333, 0, 103, 537, 230, 667 ), new CharMetrics( 333, 0, -2, 537, 335, 667 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 60, 527, 273, 740 ), new CharMetrics( 333, 0, 68, -218, 294, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, -13, 528, 425, 713 ), new CharMetrics( 333, 0, 90, -173, 319, 44 ), new CharMetrics( 333, 0, -2, 528, 335, 704 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 82, -203, 252, 501 ), new CharMetrics( 500, 0, 53, -140, 458, 588 ), new CharMetrics( 500, 0, 21, -14, 477, 684 ), new CharMetrics( 500, 0, -26, 61, 526, 613 ), new CharMetrics( 500, 0, -64, 0, 547, 676 ), new CharMetrics( 220, 0, 66, -19, 154, 691 ), new CharMetrics( 500, 0, 57, -132, 443, 691 ), new CharMetrics( 333, 0, -2, 537, 335, 667 ), new CharMetrics( 747, 0, 26, -19, 721, 691 ), new CharMetrics( 300, 0, -1, 397, 301, 688 ), new CharMetrics( 500, 0, 23, 36, 473, 415 ), new CharMetrics( 570, 0, 33, 108, 537, 399 ), new CharMetrics( 333, 0, 44, 171, 287, 287 ), new CharMetrics( 747, 0, 26, -19, 721, 691 ), new CharMetrics( 333, 0, 1, 565, 331, 637 ), new CharMetrics( 400, 0, 57, 402, 343, 688 ), new CharMetrics( 570, 0, 33, 0, 537, 506 ), new CharMetrics( 300, 0, 0, 275, 300, 688 ), new CharMetrics( 300, 0, 3, 268, 297, 688 ), new CharMetrics( 333, 0, 86, 528, 324, 713 ), new CharMetrics( 556, 0, 33, -206, 536, 461 ), new CharMetrics( 540, 0, 0, -186, 519, 676 ), new CharMetrics( 250, 0, 41, 248, 210, 417 ), new CharMetrics( 333, 0, 68, -218, 294, 0 ), new CharMetrics( 300, 0, 28, 275, 273, 688 ), new CharMetrics( 330, 0, 18, 397, 312, 688 ), new CharMetrics( 500, 0, 27, 36, 477, 415 ), new CharMetrics( 750, 0, 28, -12, 743, 688 ), new CharMetrics( 750, 0, -7, -12, 775, 688 ), new CharMetrics( 750, 0, 23, -12, 733, 688 ), new CharMetrics( 500, 0, 55, -201, 443, 501 ), new CharMetrics( 722, 0, 9, 0, 689, 923 ), new CharMetrics( 722, 0, 9, 0, 689, 923 ), new CharMetrics( 722, 0, 9, 0, 689, 914 ), new CharMetrics( 722, 0, 9, 0, 689, 884 ), new CharMetrics( 722, 0, 9, 0, 689, 877 ), new CharMetrics( 722, 0, 9, 0, 689, 935 ), new CharMetrics( 1000, 0, 4, 0, 951, 676 ), new CharMetrics( 722, 0, 49, -218, 687, 691 ), new CharMetrics( 667, 0, 16, 0, 641, 923 ), new CharMetrics( 667, 0, 16, 0, 641, 923 ), new CharMetrics( 667, 0, 16, 0, 641, 914 ), new CharMetrics( 667, 0, 16, 0, 641, 877 ), new CharMetrics( 389, 0, 20, 0, 370, 923 ), new CharMetrics( 389, 0, 20, 0, 370, 923 ), new CharMetrics( 389, 0, 20, 0, 370, 914 ), new CharMetrics( 389, 0, 20, 0, 370, 877 ), new CharMetrics( 722, 0, 6, 0, 690, 676 ), new CharMetrics( 722, 0, 16, -18, 701, 884 ), new CharMetrics( 778, 0, 35, -19, 743, 923 ), new CharMetrics( 778, 0, 35, -19, 743, 923 ), new CharMetrics( 778, 0, 35, -19, 743, 914 ), new CharMetrics( 778, 0, 35, -19, 743, 884 ), new CharMetrics( 778, 0, 35, -19, 743, 877 ), new CharMetrics( 570, 0, 48, 16, 522, 490 ), new CharMetrics( 778, 0, 35, -74, 743, 737 ), new CharMetrics( 722, 0, 16, -19, 701, 923 ), new CharMetrics( 722, 0, 16, -19, 701, 923 ), new CharMetrics( 722, 0, 16, -19, 701, 914 ), new CharMetrics( 722, 0, 16, -19, 701, 877 ), new CharMetrics( 722, 0, 15, 0, 699, 928 ), new CharMetrics( 611, 0, 16, 0, 600, 676 ), new CharMetrics( 556, 0, 19, -12, 517, 691 ), new CharMetrics( 500, 0, 25, -14, 488, 713 ), new CharMetrics( 500, 0, 25, -14, 488, 713 ), new CharMetrics( 500, 0, 25, -14, 488, 704 ), new CharMetrics( 500, 0, 25, -14, 488, 674 ), new CharMetrics( 500, 0, 25, -14, 488, 667 ), new CharMetrics( 500, 0, 25, -14, 488, 740 ), new CharMetrics( 722, 0, 33, -14, 693, 473 ), new CharMetrics( 444, 0, 25, -218, 430, 473 ), new CharMetrics( 444, 0, 25, -14, 426, 713 ), new CharMetrics( 444, 0, 25, -14, 426, 713 ), new CharMetrics( 444, 0, 25, -14, 426, 704 ), new CharMetrics( 444, 0, 25, -14, 426, 667 ), new CharMetrics( 278, 0, -26, 0, 255, 713 ), new CharMetrics( 278, 0, 16, 0, 290, 713 ), new CharMetrics( 278, 0, -36, 0, 301, 704 ), new CharMetrics( 278, 0, -36, 0, 301, 667 ), new CharMetrics( 500, 0, 25, -14, 476, 691 ), new CharMetrics( 556, 0, 21, 0, 539, 674 ), new CharMetrics( 500, 0, 25, -14, 476, 713 ), new CharMetrics( 500, 0, 25, -14, 476, 713 ), new CharMetrics( 500, 0, 25, -14, 476, 704 ), new CharMetrics( 500, 0, 25, -14, 476, 674 ), new CharMetrics( 500, 0, 25, -14, 476, 667 ), new CharMetrics( 570, 0, 33, -31, 537, 537 ), new CharMetrics( 500, 0, 25, -92, 476, 549 ), new CharMetrics( 556, 0, 16, -14, 537, 713 ), new CharMetrics( 556, 0, 16, -14, 537, 713 ), new CharMetrics( 556, 0, 16, -14, 537, 704 ), new CharMetrics( 556, 0, 16, -14, 537, 667 ), new CharMetrics( 500, 0, 16, -205, 480, 713 ), new CharMetrics( 556, 0, 19, -205, 524, 676 ), new CharMetrics( 500, 0, 16, -205, 480, 667 )}; SerifBold() { super( false, 676, -205, new CharMetrics( 0, 0, -168, -218, 1000, 935 ), metrics ); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/PBMReader.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/PBMReader0000644000175000017500000001646311117200664033143 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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.BufferedInputStream; import java.io.BufferedReader; import java.io.EOFException; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; /** * PBM images reader. * * @version $Id: PBMReader.java 724307 2008-12-08 11:15:00Z vsiveton $ */ class PBMReader { static final int TYPE_PBM = 1; static final int TYPE_PGM = 2; static final int TYPE_PPM = 3; private static final String BAD_FILE_FORMAT = "bad file format"; private static final String UNSUPPORTED_TYPE = "unsupported file type"; private static final String UNSUPPORTED_FORMAT = "unsupported data format"; private static final String UNSUPPORTED_DEPTH = "unsupported color depth"; protected int type; protected boolean binary; protected int width; protected int height; protected int maxValue; private int bytesPerLine; private InputStream stream; PBMReader( String fileName ) throws Exception { HeaderReader header = new HeaderReader(); int length = header.read( fileName ); if ( type != TYPE_PPM ) { throw new Exception( UNSUPPORTED_TYPE ); } if ( !binary ) { throw new Exception( UNSUPPORTED_FORMAT ); } if ( maxValue > 255 ) { throw new Exception( UNSUPPORTED_DEPTH ); } switch ( type ) { case TYPE_PBM: bytesPerLine = ( width + 7 ) / 8; break; case TYPE_PGM: bytesPerLine = width; break; case TYPE_PPM: bytesPerLine = 3 * width; break; } stream = new BufferedInputStream( new FileInputStream( fileName ) ); skip( length ); } int type() { return type; } int width() { return width; } int height() { return height; } int maxValue() { return maxValue; } int bytesPerLine() { return bytesPerLine; } long skip( long count ) throws IOException { long skipped = stream.skip( count ); if ( skipped < count ) { byte[] b = new byte[512]; while ( skipped < count ) { int len = (int) Math.min( b.length, ( count - skipped ) ); int n = stream.read( b, 0, len ); if ( n < 0 ) { break; // end of file } skipped += n; } } return skipped; } int read( byte[] b, int off, int len ) throws IOException { int count = 0; while ( count < len ) { int n = stream.read( b, off + count, len - count ); if ( n < 0 ) { break; // end of file } count += n; } return count; } // ----------------------------------------------------------------------- class HeaderReader { private Reader reader; private int offset; int read( String fileName ) throws Exception { String field; reader = new BufferedReader( new InputStreamReader( new FileInputStream( fileName ), "US-ASCII" ) ); offset = 0; field = getField(); if ( field.length() != 2 || field.charAt( 0 ) != 'P' ) { reader.close(); throw new Exception( BAD_FILE_FORMAT ); } switch ( field.charAt( 1 ) ) { case '1': case '4': type = TYPE_PBM; break; case '2': case '5': type = TYPE_PGM; break; case '3': case '6': type = TYPE_PPM; break; default: reader.close(); throw new Exception( BAD_FILE_FORMAT ); } if ( field.charAt( 1 ) > '3' ) { binary = true; } else { binary = false; } try { width = Integer.parseInt( getField() ); height = Integer.parseInt( getField() ); if ( type == TYPE_PBM ) { maxValue = 1; } else { maxValue = Integer.parseInt( getField() ); } } catch ( NumberFormatException e ) { reader.close(); throw new Exception( BAD_FILE_FORMAT ); } reader.close(); return offset; } private String getField() throws IOException { char c; StringBuffer field = new StringBuffer(); try { do { while ( ( c = getChar() ) == '#' ) { skipComment(); } } while ( Character.isWhitespace( c ) ); field.append( c ); while ( !Character.isWhitespace( c = getChar() ) ) { if ( c == '#' ) { skipComment(); break; } field.append( c ); } } catch ( EOFException ignore ) { // nop } return field.toString(); } private char getChar() throws IOException, EOFException { int c = reader.read(); if ( c < 0 ) { throw new EOFException(); } offset += 1; return (char) c; } private void skipComment() throws IOException { try { while ( getChar() != '\n' ) { ; } } catch ( EOFException ignore ) { // nop } } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Serif.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Serif.jav0000644000175000017500000003220710767707462033245 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: Serif.java 638290 2008-03-18 09:45:22Z bentmann $ */ class Serif extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 130, -9, 238, 676 ), new CharMetrics( 408, 0, 77, 431, 331, 676 ), new CharMetrics( 500, 0, 5, 0, 496, 662 ), new CharMetrics( 500, 0, 44, -87, 457, 727 ), new CharMetrics( 833, 0, 61, -13, 772, 676 ), new CharMetrics( 778, 0, 42, -13, 750, 676 ), new CharMetrics( 333, 0, 79, 433, 218, 676 ), new CharMetrics( 333, 0, 48, -177, 304, 676 ), new CharMetrics( 333, 0, 29, -177, 285, 676 ), new CharMetrics( 500, 0, 69, 265, 432, 676 ), new CharMetrics( 564, 0, 30, 0, 534, 506 ), new CharMetrics( 250, 0, 56, -141, 195, 102 ), new CharMetrics( 333, 0, 39, 194, 285, 257 ), new CharMetrics( 250, 0, 70, -11, 181, 100 ), new CharMetrics( 278, 0, -9, -14, 287, 676 ), new CharMetrics( 500, 0, 24, -14, 476, 676 ), new CharMetrics( 500, 0, 111, 0, 394, 676 ), new CharMetrics( 500, 0, 30, 0, 475, 676 ), new CharMetrics( 500, 0, 43, -14, 431, 676 ), new CharMetrics( 500, 0, 12, 0, 472, 676 ), new CharMetrics( 500, 0, 32, -14, 438, 688 ), new CharMetrics( 500, 0, 34, -14, 468, 684 ), new CharMetrics( 500, 0, 20, -8, 449, 662 ), new CharMetrics( 500, 0, 56, -14, 445, 676 ), new CharMetrics( 500, 0, 30, -22, 459, 676 ), new CharMetrics( 278, 0, 81, -11, 192, 459 ), new CharMetrics( 278, 0, 80, -141, 219, 459 ), new CharMetrics( 564, 0, 28, -8, 536, 514 ), new CharMetrics( 564, 0, 30, 120, 534, 386 ), new CharMetrics( 564, 0, 28, -8, 536, 514 ), new CharMetrics( 444, 0, 68, -8, 414, 676 ), new CharMetrics( 921, 0, 116, -14, 809, 676 ), new CharMetrics( 722, 0, 15, 0, 706, 674 ), new CharMetrics( 667, 0, 17, 0, 593, 662 ), new CharMetrics( 667, 0, 28, -14, 633, 676 ), new CharMetrics( 722, 0, 16, 0, 685, 662 ), new CharMetrics( 611, 0, 12, 0, 597, 662 ), new CharMetrics( 556, 0, 12, 0, 546, 662 ), new CharMetrics( 722, 0, 32, -14, 709, 676 ), new CharMetrics( 722, 0, 19, 0, 702, 662 ), new CharMetrics( 333, 0, 18, 0, 315, 662 ), new CharMetrics( 389, 0, 10, -14, 370, 662 ), new CharMetrics( 722, 0, 34, 0, 723, 662 ), new CharMetrics( 611, 0, 12, 0, 598, 662 ), new CharMetrics( 889, 0, 12, 0, 863, 662 ), new CharMetrics( 722, 0, 12, -11, 707, 662 ), new CharMetrics( 722, 0, 34, -14, 688, 676 ), new CharMetrics( 556, 0, 16, 0, 542, 662 ), new CharMetrics( 722, 0, 34, -178, 701, 676 ), new CharMetrics( 667, 0, 17, 0, 659, 662 ), new CharMetrics( 556, 0, 42, -14, 491, 676 ), new CharMetrics( 611, 0, 17, 0, 593, 662 ), new CharMetrics( 722, 0, 14, -14, 705, 662 ), new CharMetrics( 722, 0, 16, -11, 697, 662 ), new CharMetrics( 944, 0, 5, -11, 932, 662 ), new CharMetrics( 722, 0, 10, 0, 704, 662 ), new CharMetrics( 722, 0, 22, 0, 703, 662 ), new CharMetrics( 611, 0, 9, 0, 597, 662 ), new CharMetrics( 333, 0, 88, -156, 299, 662 ), new CharMetrics( 278, 0, -9, -14, 287, 676 ), new CharMetrics( 333, 0, 34, -156, 245, 662 ), new CharMetrics( 469, 0, 24, 297, 446, 662 ), new CharMetrics( 500, 0, 0, -125, 500, -75 ), new CharMetrics( 333, 0, 115, 433, 254, 676 ), new CharMetrics( 444, 0, 37, -10, 442, 460 ), new CharMetrics( 500, 0, 3, -10, 468, 683 ), new CharMetrics( 444, 0, 25, -10, 412, 460 ), new CharMetrics( 500, 0, 27, -10, 491, 683 ), new CharMetrics( 444, 0, 25, -10, 424, 460 ), new CharMetrics( 333, 0, 20, 0, 383, 683 ), new CharMetrics( 500, 0, 28, -218, 470, 460 ), new CharMetrics( 500, 0, 9, 0, 487, 683 ), new CharMetrics( 278, 0, 16, 0, 253, 683 ), new CharMetrics( 278, 0, -70, -218, 194, 683 ), new CharMetrics( 500, 0, 7, 0, 505, 683 ), new CharMetrics( 278, 0, 19, 0, 257, 683 ), new CharMetrics( 778, 0, 16, 0, 775, 460 ), new CharMetrics( 500, 0, 16, 0, 485, 460 ), new CharMetrics( 500, 0, 29, -10, 470, 460 ), new CharMetrics( 500, 0, 5, -217, 470, 460 ), new CharMetrics( 500, 0, 24, -217, 488, 460 ), new CharMetrics( 333, 0, 5, 0, 335, 460 ), new CharMetrics( 389, 0, 51, -10, 348, 460 ), new CharMetrics( 278, 0, 13, -10, 279, 579 ), new CharMetrics( 500, 0, 9, -10, 479, 450 ), new CharMetrics( 500, 0, 19, -14, 477, 450 ), new CharMetrics( 722, 0, 21, -14, 694, 450 ), new CharMetrics( 500, 0, 17, 0, 479, 450 ), new CharMetrics( 500, 0, 14, -218, 475, 450 ), new CharMetrics( 444, 0, 27, 0, 418, 450 ), new CharMetrics( 480, 0, 100, -181, 350, 680 ), new CharMetrics( 200, 0, 67, -14, 133, 676 ), new CharMetrics( 480, 0, 130, -181, 380, 680 ), new CharMetrics( 541, 0, 40, 183, 502, 323 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 16, 0, 253, 460 ), new CharMetrics( 333, 0, 19, 507, 242, 678 ), new CharMetrics( 333, 0, 93, 507, 317, 678 ), new CharMetrics( 333, 0, 11, 507, 322, 674 ), new CharMetrics( 333, 0, 1, 532, 331, 638 ), new CharMetrics( 333, 0, 11, 547, 322, 601 ), new CharMetrics( 333, 0, 26, 507, 307, 664 ), new CharMetrics( 333, 0, 118, 523, 216, 623 ), new CharMetrics( 333, 0, 18, 523, 315, 623 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 67, 512, 266, 711 ), new CharMetrics( 333, 0, 52, -215, 261, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, -3, 507, 377, 678 ), new CharMetrics( 333, 0, 64, -165, 249, 0 ), new CharMetrics( 333, 0, 11, 507, 322, 674 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 97, -218, 205, 467 ), new CharMetrics( 500, 0, 53, -138, 448, 579 ), new CharMetrics( 500, 0, 12, -8, 490, 676 ), new CharMetrics( 500, 0, -22, 58, 522, 602 ), new CharMetrics( 500, 0, -53, 0, 512, 662 ), new CharMetrics( 200, 0, 67, -14, 133, 676 ), new CharMetrics( 500, 0, 70, -148, 426, 676 ), new CharMetrics( 333, 0, 18, 523, 315, 623 ), new CharMetrics( 760, 0, 38, -14, 722, 676 ), new CharMetrics( 276, 0, 4, 394, 270, 676 ), new CharMetrics( 500, 0, 42, 33, 456, 416 ), new CharMetrics( 564, 0, 30, 108, 534, 386 ), new CharMetrics( 333, 0, 39, 194, 285, 257 ), new CharMetrics( 760, 0, 38, -14, 722, 676 ), new CharMetrics( 333, 0, 11, 547, 322, 601 ), new CharMetrics( 400, 0, 57, 390, 343, 676 ), new CharMetrics( 564, 0, 30, 0, 534, 506 ), new CharMetrics( 300, 0, 1, 270, 296, 676 ), new CharMetrics( 300, 0, 15, 262, 291, 676 ), new CharMetrics( 333, 0, 93, 507, 317, 678 ), new CharMetrics( 500, 0, 36, -218, 512, 450 ), new CharMetrics( 453, 0, -22, -154, 450, 662 ), new CharMetrics( 250, 0, 70, 199, 181, 310 ), new CharMetrics( 333, 0, 52, -215, 261, 0 ), new CharMetrics( 300, 0, 57, 270, 248, 676 ), new CharMetrics( 310, 0, 6, 394, 304, 676 ), new CharMetrics( 500, 0, 44, 33, 458, 416 ), new CharMetrics( 750, 0, 37, -14, 718, 676 ), new CharMetrics( 750, 0, 31, -14, 746, 676 ), new CharMetrics( 750, 0, 15, -14, 718, 676 ), new CharMetrics( 444, 0, 30, -218, 376, 466 ), new CharMetrics( 722, 0, 15, 0, 706, 890 ), new CharMetrics( 722, 0, 15, 0, 706, 890 ), new CharMetrics( 722, 0, 15, 0, 706, 886 ), new CharMetrics( 722, 0, 15, 0, 706, 850 ), new CharMetrics( 722, 0, 15, 0, 706, 835 ), new CharMetrics( 722, 0, 15, 0, 706, 898 ), new CharMetrics( 889, 0, 0, 0, 863, 662 ), new CharMetrics( 667, 0, 28, -215, 633, 676 ), new CharMetrics( 611, 0, 12, 0, 597, 890 ), new CharMetrics( 611, 0, 12, 0, 597, 890 ), new CharMetrics( 611, 0, 12, 0, 597, 886 ), new CharMetrics( 611, 0, 12, 0, 597, 835 ), new CharMetrics( 333, 0, 18, 0, 315, 890 ), new CharMetrics( 333, 0, 18, 0, 317, 890 ), new CharMetrics( 333, 0, 11, 0, 322, 886 ), new CharMetrics( 333, 0, 18, 0, 315, 835 ), new CharMetrics( 722, 0, 16, 0, 685, 662 ), new CharMetrics( 722, 0, 12, -11, 707, 850 ), new CharMetrics( 722, 0, 34, -14, 688, 890 ), new CharMetrics( 722, 0, 34, -14, 688, 890 ), new CharMetrics( 722, 0, 34, -14, 688, 886 ), new CharMetrics( 722, 0, 34, -14, 688, 850 ), new CharMetrics( 722, 0, 34, -14, 688, 835 ), new CharMetrics( 564, 0, 38, 8, 527, 497 ), new CharMetrics( 722, 0, 34, -80, 688, 734 ), new CharMetrics( 722, 0, 14, -14, 705, 890 ), new CharMetrics( 722, 0, 14, -14, 705, 890 ), new CharMetrics( 722, 0, 14, -14, 705, 886 ), new CharMetrics( 722, 0, 14, -14, 705, 835 ), new CharMetrics( 722, 0, 22, 0, 703, 890 ), new CharMetrics( 556, 0, 16, 0, 542, 662 ), new CharMetrics( 500, 0, 12, -9, 468, 683 ), new CharMetrics( 444, 0, 37, -10, 442, 678 ), new CharMetrics( 444, 0, 37, -10, 442, 678 ), new CharMetrics( 444, 0, 37, -10, 442, 674 ), new CharMetrics( 444, 0, 37, -10, 442, 638 ), new CharMetrics( 444, 0, 37, -10, 442, 623 ), new CharMetrics( 444, 0, 37, -10, 442, 711 ), new CharMetrics( 667, 0, 38, -10, 632, 460 ), new CharMetrics( 444, 0, 25, -215, 412, 460 ), new CharMetrics( 444, 0, 25, -10, 424, 678 ), new CharMetrics( 444, 0, 25, -10, 424, 678 ), new CharMetrics( 444, 0, 25, -10, 424, 674 ), new CharMetrics( 444, 0, 25, -10, 424, 623 ), new CharMetrics( 278, 0, -8, 0, 253, 678 ), new CharMetrics( 278, 0, 16, 0, 290, 678 ), new CharMetrics( 278, 0, -16, 0, 295, 674 ), new CharMetrics( 278, 0, -9, 0, 288, 623 ), new CharMetrics( 500, 0, 29, -10, 471, 686 ), new CharMetrics( 500, 0, 16, 0, 485, 638 ), new CharMetrics( 500, 0, 29, -10, 470, 678 ), new CharMetrics( 500, 0, 29, -10, 470, 678 ), new CharMetrics( 500, 0, 29, -10, 470, 674 ), new CharMetrics( 500, 0, 29, -10, 470, 638 ), new CharMetrics( 500, 0, 29, -10, 470, 623 ), new CharMetrics( 564, 0, 30, -10, 534, 516 ), new CharMetrics( 500, 0, 29, -112, 470, 551 ), new CharMetrics( 500, 0, 9, -10, 479, 678 ), new CharMetrics( 500, 0, 9, -10, 479, 678 ), new CharMetrics( 500, 0, 9, -10, 479, 674 ), new CharMetrics( 500, 0, 9, -10, 479, 623 ), new CharMetrics( 500, 0, 14, -218, 475, 678 ), new CharMetrics( 500, 0, 5, -217, 470, 683 ), new CharMetrics( 500, 0, 14, -218, 475, 623 )}; Serif() { super( false, 683, -217, new CharMetrics( 0, 0, -168, -218, 1000, 898 ), metrics ); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RomanNumerals.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RomanNume0000644000175000017500000000362711073632077033311 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: RomanNumerals.java 703394 2008-10-10 10:53:51Z vsiveton $ */ class RomanNumerals { private static final int[] NUMBERS = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; private static final String[] UPPER_CASE_LETTERS = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; private static final String[] LOWER_CASE_LETTERS = {"m", "cm", "d", "cd", "c", "xc", "l", "xl", "x", "ix", "v", "iv", "i"}; // ----------------------------------------------------------------------- static String toString( int n ) { return toString( n, false ); } static String toString( int n, boolean lowerCase ) { StringBuffer roman = new StringBuffer(); String[] letters = lowerCase ? LOWER_CASE_LETTERS : UPPER_CASE_LETTERS; for ( int i = 0; i < NUMBERS.length; ++i ) { while ( n >= NUMBERS[i] ) { roman.append( letters[i] ); n -= NUMBERS[i]; } } return roman.toString(); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SerifBoldItalic.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SerifBold0000644000175000017500000003241210767707462033265 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: SerifBoldItalic.java 638290 2008-03-18 09:45:22Z bentmann $ */ class SerifBoldItalic extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 389, 0, 67, -13, 370, 684 ), new CharMetrics( 555, 0, 136, 398, 536, 685 ), new CharMetrics( 500, 0, -33, 0, 533, 700 ), new CharMetrics( 500, 0, -20, -100, 497, 733 ), new CharMetrics( 833, 0, 39, -10, 793, 692 ), new CharMetrics( 778, 0, 5, -19, 699, 682 ), new CharMetrics( 333, 0, 98, 369, 302, 685 ), new CharMetrics( 333, 0, 28, -179, 344, 685 ), new CharMetrics( 333, 0, -44, -179, 271, 685 ), new CharMetrics( 500, 0, 65, 249, 456, 685 ), new CharMetrics( 570, 0, 33, 0, 537, 506 ), new CharMetrics( 250, 0, -60, -182, 144, 134 ), new CharMetrics( 333, 0, 2, 166, 271, 282 ), new CharMetrics( 250, 0, -9, -13, 139, 135 ), new CharMetrics( 278, 0, -64, -18, 342, 685 ), new CharMetrics( 500, 0, 17, -14, 477, 683 ), new CharMetrics( 500, 0, 5, 0, 419, 683 ), new CharMetrics( 500, 0, -27, 0, 446, 683 ), new CharMetrics( 500, 0, -15, -13, 450, 683 ), new CharMetrics( 500, 0, -15, 0, 503, 683 ), new CharMetrics( 500, 0, -11, -13, 487, 669 ), new CharMetrics( 500, 0, 23, -15, 509, 679 ), new CharMetrics( 500, 0, 52, 0, 525, 669 ), new CharMetrics( 500, 0, 3, -13, 476, 683 ), new CharMetrics( 500, 0, -12, -10, 475, 683 ), new CharMetrics( 333, 0, 23, -13, 264, 459 ), new CharMetrics( 333, 0, -25, -183, 264, 459 ), new CharMetrics( 570, 0, 31, -8, 539, 514 ), new CharMetrics( 570, 0, 33, 107, 537, 399 ), new CharMetrics( 570, 0, 31, -8, 539, 514 ), new CharMetrics( 500, 0, 79, -13, 470, 684 ), new CharMetrics( 832, 0, 63, -18, 770, 685 ), new CharMetrics( 667, 0, -67, 0, 593, 683 ), new CharMetrics( 667, 0, -24, 0, 624, 669 ), new CharMetrics( 667, 0, 32, -18, 677, 685 ), new CharMetrics( 722, 0, -46, 0, 685, 669 ), new CharMetrics( 667, 0, -27, 0, 653, 669 ), new CharMetrics( 667, 0, -13, 0, 660, 669 ), new CharMetrics( 722, 0, 21, -18, 706, 685 ), new CharMetrics( 778, 0, -24, 0, 799, 669 ), new CharMetrics( 389, 0, -32, 0, 406, 669 ), new CharMetrics( 500, 0, -46, -99, 524, 669 ), new CharMetrics( 667, 0, -21, 0, 702, 669 ), new CharMetrics( 611, 0, -22, 0, 590, 669 ), new CharMetrics( 889, 0, -29, -12, 917, 669 ), new CharMetrics( 722, 0, -27, -15, 748, 669 ), new CharMetrics( 722, 0, 27, -18, 691, 685 ), new CharMetrics( 611, 0, -27, 0, 613, 669 ), new CharMetrics( 722, 0, 27, -208, 691, 685 ), new CharMetrics( 667, 0, -29, 0, 623, 669 ), new CharMetrics( 556, 0, 2, -18, 526, 685 ), new CharMetrics( 611, 0, 50, 0, 650, 669 ), new CharMetrics( 722, 0, 67, -18, 744, 669 ), new CharMetrics( 667, 0, 65, -18, 715, 669 ), new CharMetrics( 889, 0, 65, -18, 940, 669 ), new CharMetrics( 667, 0, -24, 0, 694, 669 ), new CharMetrics( 611, 0, 73, 0, 659, 669 ), new CharMetrics( 611, 0, -11, 0, 590, 669 ), new CharMetrics( 333, 0, -37, -159, 362, 674 ), new CharMetrics( 278, 0, -1, -18, 279, 685 ), new CharMetrics( 333, 0, -56, -157, 343, 674 ), new CharMetrics( 570, 0, 67, 304, 503, 669 ), new CharMetrics( 500, 0, 0, -125, 500, -75 ), new CharMetrics( 333, 0, 128, 369, 332, 685 ), new CharMetrics( 500, 0, -21, -14, 455, 462 ), new CharMetrics( 500, 0, -14, -13, 444, 699 ), new CharMetrics( 444, 0, -5, -13, 392, 462 ), new CharMetrics( 500, 0, -21, -13, 517, 699 ), new CharMetrics( 444, 0, 5, -13, 398, 462 ), new CharMetrics( 333, 0, -169, -205, 446, 698 ), new CharMetrics( 500, 0, -52, -203, 478, 462 ), new CharMetrics( 556, 0, -13, -9, 498, 699 ), new CharMetrics( 278, 0, 2, -9, 263, 684 ), new CharMetrics( 278, 0, -189, -207, 279, 684 ), new CharMetrics( 500, 0, -23, -8, 483, 699 ), new CharMetrics( 278, 0, 2, -9, 290, 699 ), new CharMetrics( 778, 0, -14, -9, 722, 462 ), new CharMetrics( 556, 0, -6, -9, 493, 462 ), new CharMetrics( 500, 0, -3, -13, 441, 462 ), new CharMetrics( 500, 0, -120, -205, 446, 462 ), new CharMetrics( 500, 0, 1, -205, 471, 462 ), new CharMetrics( 389, 0, -21, 0, 389, 462 ), new CharMetrics( 389, 0, -19, -13, 333, 462 ), new CharMetrics( 278, 0, -11, -9, 281, 594 ), new CharMetrics( 556, 0, 15, -9, 492, 462 ), new CharMetrics( 444, 0, 16, -13, 401, 462 ), new CharMetrics( 667, 0, 16, -13, 614, 462 ), new CharMetrics( 500, 0, -46, -13, 469, 462 ), new CharMetrics( 444, 0, -94, -205, 392, 462 ), new CharMetrics( 389, 0, -43, -78, 368, 449 ), new CharMetrics( 348, 0, 5, -187, 436, 686 ), new CharMetrics( 220, 0, 66, -18, 154, 685 ), new CharMetrics( 348, 0, -129, -187, 302, 686 ), new CharMetrics( 570, 0, 54, 173, 516, 333 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 2, -9, 238, 462 ), new CharMetrics( 333, 0, 85, 516, 297, 697 ), new CharMetrics( 333, 0, 139, 516, 379, 697 ), new CharMetrics( 333, 0, 40, 516, 367, 690 ), new CharMetrics( 333, 0, 48, 536, 407, 655 ), new CharMetrics( 333, 0, 51, 553, 393, 623 ), new CharMetrics( 333, 0, 71, 516, 387, 678 ), new CharMetrics( 333, 0, 163, 525, 293, 655 ), new CharMetrics( 333, 0, 55, 525, 397, 655 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 127, 516, 340, 729 ), new CharMetrics( 333, 0, -80, -218, 156, 5 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 69, 516, 498, 697 ), new CharMetrics( 333, 0, -40, -173, 189, 44 ), new CharMetrics( 333, 0, 79, 516, 411, 690 ), new CharMetrics( 250, 0, 0, 0, 0, 0 ), new CharMetrics( 389, 0, 19, -205, 322, 492 ), new CharMetrics( 500, 0, 42, -143, 439, 576 ), new CharMetrics( 500, 0, -32, -12, 510, 683 ), new CharMetrics( 500, 0, -26, 34, 526, 586 ), new CharMetrics( 500, 0, 33, 0, 628, 669 ), new CharMetrics( 220, 0, 66, -18, 154, 685 ), new CharMetrics( 500, 0, 36, -143, 459, 685 ), new CharMetrics( 333, 0, 55, 525, 397, 655 ), new CharMetrics( 747, 0, 30, -18, 718, 685 ), new CharMetrics( 266, 0, 16, 399, 330, 685 ), new CharMetrics( 500, 0, 12, 32, 468, 415 ), new CharMetrics( 606, 0, 51, 108, 555, 399 ), new CharMetrics( 333, 0, 2, 166, 271, 282 ), new CharMetrics( 747, 0, 30, -18, 718, 685 ), new CharMetrics( 333, 0, 51, 553, 393, 623 ), new CharMetrics( 400, 0, 83, 397, 369, 683 ), new CharMetrics( 570, 0, 33, 0, 537, 506 ), new CharMetrics( 300, 0, 2, 274, 313, 683 ), new CharMetrics( 300, 0, 17, 265, 321, 683 ), new CharMetrics( 333, 0, 139, 516, 379, 697 ), new CharMetrics( 576, 0, -60, -207, 516, 449 ), new CharMetrics( 500, 0, -57, -193, 562, 669 ), new CharMetrics( 250, 0, 51, 257, 199, 405 ), new CharMetrics( 333, 0, -80, -218, 156, 5 ), new CharMetrics( 300, 0, 30, 274, 301, 683 ), new CharMetrics( 300, 0, 56, 400, 347, 685 ), new CharMetrics( 500, 0, 12, 32, 468, 415 ), new CharMetrics( 750, 0, 7, -14, 721, 683 ), new CharMetrics( 750, 0, -9, -14, 723, 683 ), new CharMetrics( 750, 0, 7, -14, 726, 683 ), new CharMetrics( 500, 0, 30, -205, 421, 492 ), new CharMetrics( 667, 0, -67, 0, 593, 904 ), new CharMetrics( 667, 0, -67, 0, 593, 904 ), new CharMetrics( 667, 0, -67, 0, 593, 897 ), new CharMetrics( 667, 0, -67, 0, 593, 862 ), new CharMetrics( 667, 0, -67, 0, 593, 862 ), new CharMetrics( 667, 0, -67, 0, 593, 921 ), new CharMetrics( 944, 0, -64, 0, 918, 669 ), new CharMetrics( 667, 0, 32, -218, 677, 685 ), new CharMetrics( 667, 0, -27, 0, 653, 904 ), new CharMetrics( 667, 0, -27, 0, 653, 904 ), new CharMetrics( 667, 0, -27, 0, 653, 897 ), new CharMetrics( 667, 0, -27, 0, 653, 862 ), new CharMetrics( 389, 0, -32, 0, 406, 904 ), new CharMetrics( 389, 0, -32, 0, 412, 904 ), new CharMetrics( 389, 0, -32, 0, 420, 897 ), new CharMetrics( 389, 0, -32, 0, 445, 862 ), new CharMetrics( 722, 0, -31, 0, 700, 669 ), new CharMetrics( 722, 0, -27, -15, 748, 862 ), new CharMetrics( 722, 0, 27, -18, 691, 904 ), new CharMetrics( 722, 0, 27, -18, 691, 904 ), new CharMetrics( 722, 0, 27, -18, 691, 897 ), new CharMetrics( 722, 0, 27, -18, 691, 862 ), new CharMetrics( 722, 0, 27, -18, 691, 862 ), new CharMetrics( 570, 0, 48, 16, 522, 490 ), new CharMetrics( 722, 0, 27, -125, 691, 764 ), new CharMetrics( 722, 0, 67, -18, 744, 904 ), new CharMetrics( 722, 0, 67, -18, 744, 904 ), new CharMetrics( 722, 0, 67, -18, 744, 897 ), new CharMetrics( 722, 0, 67, -18, 744, 862 ), new CharMetrics( 611, 0, 73, 0, 659, 904 ), new CharMetrics( 611, 0, -27, 0, 573, 669 ), new CharMetrics( 500, 0, -200, -200, 473, 705 ), new CharMetrics( 500, 0, -21, -14, 455, 697 ), new CharMetrics( 500, 0, -21, -14, 463, 697 ), new CharMetrics( 500, 0, -21, -14, 455, 690 ), new CharMetrics( 500, 0, -21, -14, 491, 655 ), new CharMetrics( 500, 0, -21, -14, 471, 655 ), new CharMetrics( 500, 0, -21, -14, 455, 729 ), new CharMetrics( 722, 0, -5, -13, 673, 462 ), new CharMetrics( 444, 0, -24, -218, 392, 462 ), new CharMetrics( 444, 0, 5, -13, 398, 697 ), new CharMetrics( 444, 0, 5, -13, 435, 697 ), new CharMetrics( 444, 0, 5, -13, 423, 690 ), new CharMetrics( 444, 0, 5, -13, 443, 655 ), new CharMetrics( 278, 0, 2, -9, 260, 697 ), new CharMetrics( 278, 0, 2, -9, 352, 697 ), new CharMetrics( 278, 0, -2, -9, 325, 690 ), new CharMetrics( 278, 0, 2, -9, 360, 655 ), new CharMetrics( 500, 0, -3, -13, 454, 699 ), new CharMetrics( 556, 0, -6, -9, 504, 655 ), new CharMetrics( 500, 0, -3, -13, 441, 697 ), new CharMetrics( 500, 0, -3, -13, 463, 697 ), new CharMetrics( 500, 0, -3, -13, 451, 690 ), new CharMetrics( 500, 0, -3, -13, 491, 655 ), new CharMetrics( 500, 0, -3, -13, 466, 655 ), new CharMetrics( 570, 0, 33, -29, 537, 535 ), new CharMetrics( 500, 0, -3, -119, 441, 560 ), new CharMetrics( 556, 0, 15, -9, 492, 697 ), new CharMetrics( 556, 0, 15, -9, 492, 697 ), new CharMetrics( 556, 0, 15, -9, 492, 690 ), new CharMetrics( 556, 0, 15, -9, 494, 655 ), new CharMetrics( 444, 0, -94, -205, 435, 697 ), new CharMetrics( 500, 0, -120, -205, 446, 699 ), new CharMetrics( 444, 0, -94, -205, 438, 655 )}; SerifBoldItalic() { super( false, 699, -205, new CharMetrics( 0, 0, -200, -218, 996, 921 ), metrics ); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif0000644000175000017500000003222310767707462033311 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: SansSerif.java 638290 2008-03-18 09:45:22Z bentmann $ */ class SansSerif extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 90, 0, 187, 718 ), new CharMetrics( 355, 0, 70, 463, 285, 718 ), new CharMetrics( 556, 0, 28, 0, 529, 688 ), new CharMetrics( 556, 0, 32, -115, 520, 775 ), new CharMetrics( 889, 0, 39, -19, 850, 703 ), new CharMetrics( 667, 0, 44, -15, 645, 718 ), new CharMetrics( 222, 0, 53, 463, 157, 718 ), new CharMetrics( 333, 0, 68, -207, 299, 733 ), new CharMetrics( 333, 0, 34, -207, 265, 733 ), new CharMetrics( 389, 0, 39, 431, 349, 718 ), new CharMetrics( 584, 0, 39, 0, 545, 505 ), new CharMetrics( 278, 0, 87, -147, 191, 106 ), new CharMetrics( 333, 0, 44, 232, 289, 322 ), new CharMetrics( 278, 0, 87, 0, 191, 106 ), new CharMetrics( 278, 0, -17, -19, 295, 737 ), new CharMetrics( 556, 0, 37, -19, 519, 703 ), new CharMetrics( 556, 0, 101, 0, 359, 703 ), new CharMetrics( 556, 0, 26, 0, 507, 703 ), new CharMetrics( 556, 0, 34, -19, 522, 703 ), new CharMetrics( 556, 0, 25, 0, 523, 703 ), new CharMetrics( 556, 0, 32, -19, 514, 688 ), new CharMetrics( 556, 0, 38, -19, 518, 703 ), new CharMetrics( 556, 0, 37, 0, 523, 688 ), new CharMetrics( 556, 0, 38, -19, 517, 703 ), new CharMetrics( 556, 0, 42, -19, 514, 703 ), new CharMetrics( 278, 0, 87, 0, 191, 516 ), new CharMetrics( 278, 0, 87, -147, 191, 516 ), new CharMetrics( 584, 0, 48, 11, 536, 495 ), new CharMetrics( 584, 0, 39, 115, 545, 390 ), new CharMetrics( 584, 0, 48, 11, 536, 495 ), new CharMetrics( 556, 0, 56, 0, 492, 727 ), new CharMetrics( 1015, 0, 147, -19, 868, 737 ), new CharMetrics( 667, 0, 14, 0, 654, 718 ), new CharMetrics( 667, 0, 74, 0, 627, 718 ), new CharMetrics( 722, 0, 44, -19, 681, 737 ), new CharMetrics( 722, 0, 81, 0, 674, 718 ), new CharMetrics( 667, 0, 86, 0, 616, 718 ), new CharMetrics( 611, 0, 86, 0, 583, 718 ), new CharMetrics( 778, 0, 48, -19, 704, 737 ), new CharMetrics( 722, 0, 77, 0, 646, 718 ), new CharMetrics( 278, 0, 91, 0, 188, 718 ), new CharMetrics( 500, 0, 17, -19, 428, 718 ), new CharMetrics( 667, 0, 76, 0, 663, 718 ), new CharMetrics( 556, 0, 76, 0, 537, 718 ), new CharMetrics( 833, 0, 73, 0, 761, 718 ), new CharMetrics( 722, 0, 76, 0, 646, 718 ), new CharMetrics( 778, 0, 39, -19, 739, 737 ), new CharMetrics( 667, 0, 86, 0, 622, 718 ), new CharMetrics( 778, 0, 39, -56, 739, 737 ), new CharMetrics( 722, 0, 88, 0, 684, 718 ), new CharMetrics( 667, 0, 49, -19, 620, 737 ), new CharMetrics( 611, 0, 14, 0, 597, 718 ), new CharMetrics( 722, 0, 79, -19, 644, 718 ), new CharMetrics( 667, 0, 20, 0, 647, 718 ), new CharMetrics( 944, 0, 16, 0, 928, 718 ), new CharMetrics( 667, 0, 19, 0, 648, 718 ), new CharMetrics( 667, 0, 14, 0, 653, 718 ), new CharMetrics( 611, 0, 23, 0, 588, 718 ), new CharMetrics( 278, 0, 63, -196, 250, 722 ), new CharMetrics( 278, 0, -17, -19, 295, 737 ), new CharMetrics( 278, 0, 28, -196, 215, 722 ), new CharMetrics( 469, 0, -14, 264, 483, 688 ), new CharMetrics( 556, 0, 0, -125, 556, -75 ), new CharMetrics( 222, 0, 65, 470, 169, 725 ), new CharMetrics( 556, 0, 36, -15, 530, 538 ), new CharMetrics( 556, 0, 58, -15, 517, 718 ), new CharMetrics( 500, 0, 30, -15, 477, 538 ), new CharMetrics( 556, 0, 35, -15, 499, 718 ), new CharMetrics( 556, 0, 40, -15, 516, 538 ), new CharMetrics( 278, 0, 14, 0, 262, 728 ), new CharMetrics( 556, 0, 40, -220, 499, 538 ), new CharMetrics( 556, 0, 65, 0, 491, 718 ), new CharMetrics( 222, 0, 67, 0, 155, 718 ), new CharMetrics( 222, 0, -16, -210, 155, 718 ), new CharMetrics( 500, 0, 67, 0, 501, 718 ), new CharMetrics( 222, 0, 67, 0, 155, 718 ), new CharMetrics( 833, 0, 65, 0, 769, 538 ), new CharMetrics( 556, 0, 65, 0, 491, 538 ), new CharMetrics( 556, 0, 35, -14, 521, 538 ), new CharMetrics( 556, 0, 58, -207, 517, 538 ), new CharMetrics( 556, 0, 35, -207, 494, 538 ), new CharMetrics( 333, 0, 77, 0, 332, 538 ), new CharMetrics( 500, 0, 32, -15, 464, 538 ), new CharMetrics( 278, 0, 14, -7, 257, 669 ), new CharMetrics( 556, 0, 68, -15, 489, 523 ), new CharMetrics( 500, 0, 8, 0, 492, 523 ), new CharMetrics( 722, 0, 14, 0, 709, 523 ), new CharMetrics( 500, 0, 11, 0, 490, 523 ), new CharMetrics( 500, 0, 11, -214, 489, 523 ), new CharMetrics( 500, 0, 31, 0, 469, 523 ), new CharMetrics( 334, 0, 42, -196, 292, 722 ), new CharMetrics( 260, 0, 94, -19, 167, 737 ), new CharMetrics( 334, 0, 42, -196, 292, 722 ), new CharMetrics( 584, 0, 61, 180, 523, 326 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 95, 0, 183, 523 ), new CharMetrics( 333, 0, 14, 593, 211, 734 ), new CharMetrics( 333, 0, 122, 593, 319, 734 ), new CharMetrics( 333, 0, 21, 593, 312, 734 ), new CharMetrics( 333, 0, -4, 606, 337, 722 ), new CharMetrics( 333, 0, 10, 627, 323, 684 ), new CharMetrics( 333, 0, 13, 595, 321, 731 ), new CharMetrics( 333, 0, 121, 604, 212, 706 ), new CharMetrics( 333, 0, 40, 604, 293, 706 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 75, 572, 259, 756 ), new CharMetrics( 333, 0, 45, -225, 259, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 31, 593, 409, 734 ), new CharMetrics( 333, 0, 73, -225, 287, 0 ), new CharMetrics( 333, 0, 21, 593, 312, 734 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 118, -195, 215, 523 ), new CharMetrics( 556, 0, 51, -115, 513, 623 ), new CharMetrics( 556, 0, 33, -16, 539, 718 ), new CharMetrics( 556, 0, 28, 99, 528, 603 ), new CharMetrics( 556, 0, 3, 0, 553, 688 ), new CharMetrics( 260, 0, 94, -19, 167, 737 ), new CharMetrics( 556, 0, 43, -191, 512, 737 ), new CharMetrics( 333, 0, 40, 604, 293, 706 ), new CharMetrics( 737, 0, -14, -19, 752, 737 ), new CharMetrics( 370, 0, 24, 304, 346, 737 ), new CharMetrics( 556, 0, 97, 108, 459, 446 ), new CharMetrics( 584, 0, 39, 108, 545, 390 ), new CharMetrics( 333, 0, 44, 232, 289, 322 ), new CharMetrics( 737, 0, -14, -19, 752, 737 ), new CharMetrics( 333, 0, 10, 627, 323, 684 ), new CharMetrics( 400, 0, 54, 411, 346, 703 ), new CharMetrics( 584, 0, 39, 0, 545, 506 ), new CharMetrics( 333, 0, 4, 281, 323, 703 ), new CharMetrics( 333, 0, 5, 270, 325, 703 ), new CharMetrics( 333, 0, 122, 593, 319, 734 ), new CharMetrics( 556, 0, 68, -207, 489, 523 ), new CharMetrics( 537, 0, 18, -173, 497, 718 ), new CharMetrics( 278, 0, 77, 190, 202, 315 ), new CharMetrics( 333, 0, 45, -225, 259, 0 ), new CharMetrics( 333, 0, 43, 281, 222, 703 ), new CharMetrics( 365, 0, 25, 304, 341, 737 ), new CharMetrics( 556, 0, 97, 108, 459, 446 ), new CharMetrics( 834, 0, 73, -19, 756, 703 ), new CharMetrics( 834, 0, 43, -19, 773, 703 ), new CharMetrics( 834, 0, 45, -19, 810, 703 ), new CharMetrics( 611, 0, 91, -201, 527, 525 ), new CharMetrics( 667, 0, 14, 0, 654, 929 ), new CharMetrics( 667, 0, 14, 0, 654, 929 ), new CharMetrics( 667, 0, 14, 0, 654, 929 ), new CharMetrics( 667, 0, 14, 0, 654, 917 ), new CharMetrics( 667, 0, 14, 0, 654, 901 ), new CharMetrics( 667, 0, 14, 0, 654, 931 ), new CharMetrics( 1000, 0, 8, 0, 951, 718 ), new CharMetrics( 722, 0, 44, -225, 681, 737 ), new CharMetrics( 667, 0, 86, 0, 616, 929 ), new CharMetrics( 667, 0, 86, 0, 616, 929 ), new CharMetrics( 667, 0, 86, 0, 616, 929 ), new CharMetrics( 667, 0, 86, 0, 616, 901 ), new CharMetrics( 278, 0, -13, 0, 188, 929 ), new CharMetrics( 278, 0, 91, 0, 292, 929 ), new CharMetrics( 278, 0, -6, 0, 285, 929 ), new CharMetrics( 278, 0, 13, 0, 266, 901 ), new CharMetrics( 722, 0, 0, 0, 674, 718 ), new CharMetrics( 722, 0, 76, 0, 646, 917 ), new CharMetrics( 778, 0, 39, -19, 739, 929 ), new CharMetrics( 778, 0, 39, -19, 739, 929 ), new CharMetrics( 778, 0, 39, -19, 739, 929 ), new CharMetrics( 778, 0, 39, -19, 739, 917 ), new CharMetrics( 778, 0, 39, -19, 739, 901 ), new CharMetrics( 584, 0, 39, 0, 545, 506 ), new CharMetrics( 778, 0, 39, -19, 740, 737 ), new CharMetrics( 722, 0, 79, -19, 644, 929 ), new CharMetrics( 722, 0, 79, -19, 644, 929 ), new CharMetrics( 722, 0, 79, -19, 644, 929 ), new CharMetrics( 722, 0, 79, -19, 644, 901 ), new CharMetrics( 667, 0, 14, 0, 653, 929 ), new CharMetrics( 667, 0, 86, 0, 622, 718 ), new CharMetrics( 611, 0, 67, -15, 571, 728 ), new CharMetrics( 556, 0, 36, -15, 530, 734 ), new CharMetrics( 556, 0, 36, -15, 530, 734 ), new CharMetrics( 556, 0, 36, -15, 530, 734 ), new CharMetrics( 556, 0, 36, -15, 530, 722 ), new CharMetrics( 556, 0, 36, -15, 530, 706 ), new CharMetrics( 556, 0, 36, -15, 530, 756 ), new CharMetrics( 889, 0, 36, -15, 847, 538 ), new CharMetrics( 500, 0, 30, -225, 477, 538 ), new CharMetrics( 556, 0, 40, -15, 516, 734 ), new CharMetrics( 556, 0, 40, -15, 516, 734 ), new CharMetrics( 556, 0, 40, -15, 516, 734 ), new CharMetrics( 556, 0, 40, -15, 516, 706 ), new CharMetrics( 278, 0, -13, 0, 184, 734 ), new CharMetrics( 278, 0, 95, 0, 292, 734 ), new CharMetrics( 278, 0, -6, 0, 285, 734 ), new CharMetrics( 278, 0, 13, 0, 266, 706 ), new CharMetrics( 556, 0, 35, -15, 522, 737 ), new CharMetrics( 556, 0, 65, 0, 491, 722 ), new CharMetrics( 556, 0, 35, -14, 521, 734 ), new CharMetrics( 556, 0, 35, -14, 521, 734 ), new CharMetrics( 556, 0, 35, -14, 521, 734 ), new CharMetrics( 556, 0, 35, -14, 521, 722 ), new CharMetrics( 556, 0, 35, -14, 521, 706 ), new CharMetrics( 584, 0, 39, -19, 545, 524 ), new CharMetrics( 611, 0, 28, -22, 537, 545 ), new CharMetrics( 556, 0, 68, -15, 489, 734 ), new CharMetrics( 556, 0, 68, -15, 489, 734 ), new CharMetrics( 556, 0, 68, -15, 489, 734 ), new CharMetrics( 556, 0, 68, -15, 489, 706 ), new CharMetrics( 500, 0, 11, -214, 489, 734 ), new CharMetrics( 556, 0, 58, -207, 517, 718 ), new CharMetrics( 500, 0, 11, -214, 489, 706 )}; SansSerif() { super( false, 718, -207, new CharMetrics( 0, 0, -166, -225, 1000, 931 ), metrics ); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifItalic.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif0000644000175000017500000003233510767707462033315 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: SansSerifItalic.java 638290 2008-03-18 09:45:22Z bentmann $ */ class SansSerifItalic extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 90, 0, 340, 718 ), new CharMetrics( 355, 0, 168, 463, 438, 718 ), new CharMetrics( 556, 0, 73, 0, 631, 688 ), new CharMetrics( 556, 0, 69, -115, 617, 775 ), new CharMetrics( 889, 0, 147, -19, 889, 703 ), new CharMetrics( 667, 0, 77, -15, 647, 718 ), new CharMetrics( 222, 0, 151, 463, 310, 718 ), new CharMetrics( 333, 0, 108, -207, 454, 733 ), new CharMetrics( 333, 0, -9, -207, 337, 733 ), new CharMetrics( 389, 0, 165, 431, 475, 718 ), new CharMetrics( 584, 0, 85, 0, 606, 505 ), new CharMetrics( 278, 0, 56, -147, 214, 106 ), new CharMetrics( 333, 0, 93, 232, 357, 322 ), new CharMetrics( 278, 0, 87, 0, 214, 106 ), new CharMetrics( 278, 0, -21, -19, 452, 737 ), new CharMetrics( 556, 0, 93, -19, 608, 703 ), new CharMetrics( 556, 0, 207, 0, 508, 703 ), new CharMetrics( 556, 0, 26, 0, 617, 703 ), new CharMetrics( 556, 0, 75, -19, 610, 703 ), new CharMetrics( 556, 0, 61, 0, 576, 703 ), new CharMetrics( 556, 0, 68, -19, 621, 688 ), new CharMetrics( 556, 0, 91, -19, 615, 703 ), new CharMetrics( 556, 0, 137, 0, 669, 688 ), new CharMetrics( 556, 0, 74, -19, 607, 703 ), new CharMetrics( 556, 0, 82, -19, 609, 703 ), new CharMetrics( 278, 0, 87, 0, 301, 516 ), new CharMetrics( 278, 0, 56, -147, 301, 516 ), new CharMetrics( 584, 0, 94, 11, 641, 495 ), new CharMetrics( 584, 0, 63, 115, 628, 390 ), new CharMetrics( 584, 0, 50, 11, 597, 495 ), new CharMetrics( 556, 0, 161, 0, 610, 727 ), new CharMetrics( 1015, 0, 215, -19, 965, 737 ), new CharMetrics( 667, 0, 14, 0, 654, 718 ), new CharMetrics( 667, 0, 74, 0, 712, 718 ), new CharMetrics( 722, 0, 108, -19, 782, 737 ), new CharMetrics( 722, 0, 81, 0, 764, 718 ), new CharMetrics( 667, 0, 86, 0, 762, 718 ), new CharMetrics( 611, 0, 86, 0, 736, 718 ), new CharMetrics( 778, 0, 111, -19, 799, 737 ), new CharMetrics( 722, 0, 77, 0, 799, 718 ), new CharMetrics( 278, 0, 91, 0, 341, 718 ), new CharMetrics( 500, 0, 47, -19, 581, 718 ), new CharMetrics( 667, 0, 76, 0, 808, 718 ), new CharMetrics( 556, 0, 76, 0, 555, 718 ), new CharMetrics( 833, 0, 73, 0, 914, 718 ), new CharMetrics( 722, 0, 76, 0, 799, 718 ), new CharMetrics( 778, 0, 105, -19, 826, 737 ), new CharMetrics( 667, 0, 86, 0, 737, 718 ), new CharMetrics( 778, 0, 105, -56, 826, 737 ), new CharMetrics( 722, 0, 88, 0, 773, 718 ), new CharMetrics( 667, 0, 90, -19, 713, 737 ), new CharMetrics( 611, 0, 148, 0, 750, 718 ), new CharMetrics( 722, 0, 123, -19, 797, 718 ), new CharMetrics( 667, 0, 173, 0, 800, 718 ), new CharMetrics( 944, 0, 169, 0, 1081, 718 ), new CharMetrics( 667, 0, 19, 0, 790, 718 ), new CharMetrics( 667, 0, 167, 0, 806, 718 ), new CharMetrics( 611, 0, 23, 0, 741, 718 ), new CharMetrics( 278, 0, 21, -196, 403, 722 ), new CharMetrics( 278, 0, 140, -19, 291, 737 ), new CharMetrics( 278, 0, -14, -196, 368, 722 ), new CharMetrics( 469, 0, 42, 264, 539, 688 ), new CharMetrics( 556, 0, -27, -125, 540, -75 ), new CharMetrics( 222, 0, 165, 470, 323, 725 ), new CharMetrics( 556, 0, 61, -15, 559, 538 ), new CharMetrics( 556, 0, 58, -15, 584, 718 ), new CharMetrics( 500, 0, 74, -15, 553, 538 ), new CharMetrics( 556, 0, 84, -15, 652, 718 ), new CharMetrics( 556, 0, 84, -15, 578, 538 ), new CharMetrics( 278, 0, 86, 0, 416, 728 ), new CharMetrics( 556, 0, 42, -220, 610, 538 ), new CharMetrics( 556, 0, 65, 0, 573, 718 ), new CharMetrics( 222, 0, 67, 0, 308, 718 ), new CharMetrics( 222, 0, -60, -210, 308, 718 ), new CharMetrics( 500, 0, 67, 0, 600, 718 ), new CharMetrics( 222, 0, 67, 0, 308, 718 ), new CharMetrics( 833, 0, 65, 0, 852, 538 ), new CharMetrics( 556, 0, 65, 0, 573, 538 ), new CharMetrics( 556, 0, 83, -14, 585, 538 ), new CharMetrics( 556, 0, 14, -207, 584, 538 ), new CharMetrics( 556, 0, 84, -207, 605, 538 ), new CharMetrics( 333, 0, 77, 0, 446, 538 ), new CharMetrics( 500, 0, 63, -15, 529, 538 ), new CharMetrics( 278, 0, 102, -7, 368, 669 ), new CharMetrics( 556, 0, 94, -15, 600, 523 ), new CharMetrics( 500, 0, 119, 0, 603, 523 ), new CharMetrics( 722, 0, 125, 0, 820, 523 ), new CharMetrics( 500, 0, 11, 0, 594, 523 ), new CharMetrics( 500, 0, 15, -214, 600, 523 ), new CharMetrics( 500, 0, 31, 0, 571, 523 ), new CharMetrics( 334, 0, 92, -196, 445, 722 ), new CharMetrics( 260, 0, 90, -19, 324, 737 ), new CharMetrics( 334, 0, 0, -196, 354, 722 ), new CharMetrics( 584, 0, 111, 180, 580, 326 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 95, 0, 294, 523 ), new CharMetrics( 333, 0, 170, 593, 337, 734 ), new CharMetrics( 333, 0, 248, 593, 475, 734 ), new CharMetrics( 333, 0, 147, 593, 438, 734 ), new CharMetrics( 333, 0, 125, 606, 490, 722 ), new CharMetrics( 333, 0, 143, 627, 468, 684 ), new CharMetrics( 333, 0, 167, 595, 476, 731 ), new CharMetrics( 333, 0, 249, 604, 362, 706 ), new CharMetrics( 333, 0, 168, 604, 443, 706 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 214, 572, 402, 756 ), new CharMetrics( 333, 0, 2, -225, 232, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 157, 593, 565, 734 ), new CharMetrics( 333, 0, 43, -225, 249, 0 ), new CharMetrics( 333, 0, 177, 593, 468, 734 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 77, -195, 326, 523 ), new CharMetrics( 556, 0, 95, -115, 584, 623 ), new CharMetrics( 556, 0, 49, -16, 634, 718 ), new CharMetrics( 556, 0, 60, 99, 646, 603 ), new CharMetrics( 556, 0, 81, 0, 699, 688 ), new CharMetrics( 260, 0, 90, -19, 324, 737 ), new CharMetrics( 556, 0, 76, -191, 584, 737 ), new CharMetrics( 333, 0, 168, 604, 443, 706 ), new CharMetrics( 737, 0, 54, -19, 837, 737 ), new CharMetrics( 370, 0, 100, 304, 449, 737 ), new CharMetrics( 556, 0, 146, 108, 554, 446 ), new CharMetrics( 584, 0, 106, 108, 628, 390 ), new CharMetrics( 333, 0, 93, 232, 357, 322 ), new CharMetrics( 737, 0, 54, -19, 837, 737 ), new CharMetrics( 333, 0, 143, 627, 468, 684 ), new CharMetrics( 400, 0, 169, 411, 468, 703 ), new CharMetrics( 584, 0, 39, 0, 618, 506 ), new CharMetrics( 333, 0, 64, 281, 449, 703 ), new CharMetrics( 333, 0, 90, 270, 436, 703 ), new CharMetrics( 333, 0, 248, 593, 475, 734 ), new CharMetrics( 556, 0, 24, -207, 600, 523 ), new CharMetrics( 537, 0, 126, -173, 650, 718 ), new CharMetrics( 278, 0, 129, 190, 257, 315 ), new CharMetrics( 333, 0, 2, -225, 232, 0 ), new CharMetrics( 333, 0, 166, 281, 371, 703 ), new CharMetrics( 365, 0, 100, 304, 468, 737 ), new CharMetrics( 556, 0, 120, 108, 528, 446 ), new CharMetrics( 834, 0, 150, -19, 802, 703 ), new CharMetrics( 834, 0, 114, -19, 839, 703 ), new CharMetrics( 834, 0, 130, -19, 861, 703 ), new CharMetrics( 611, 0, 85, -201, 534, 525 ), new CharMetrics( 667, 0, 14, 0, 654, 929 ), new CharMetrics( 667, 0, 14, 0, 683, 929 ), new CharMetrics( 667, 0, 14, 0, 654, 929 ), new CharMetrics( 667, 0, 14, 0, 699, 917 ), new CharMetrics( 667, 0, 14, 0, 654, 901 ), new CharMetrics( 667, 0, 14, 0, 654, 931 ), new CharMetrics( 1000, 0, 8, 0, 1097, 718 ), new CharMetrics( 722, 0, 108, -225, 782, 737 ), new CharMetrics( 667, 0, 86, 0, 762, 929 ), new CharMetrics( 667, 0, 86, 0, 762, 929 ), new CharMetrics( 667, 0, 86, 0, 762, 929 ), new CharMetrics( 667, 0, 86, 0, 762, 901 ), new CharMetrics( 278, 0, 91, 0, 351, 929 ), new CharMetrics( 278, 0, 91, 0, 489, 929 ), new CharMetrics( 278, 0, 91, 0, 452, 929 ), new CharMetrics( 278, 0, 91, 0, 458, 901 ), new CharMetrics( 722, 0, 69, 0, 764, 718 ), new CharMetrics( 722, 0, 76, 0, 799, 917 ), new CharMetrics( 778, 0, 105, -19, 826, 929 ), new CharMetrics( 778, 0, 105, -19, 826, 929 ), new CharMetrics( 778, 0, 105, -19, 826, 929 ), new CharMetrics( 778, 0, 105, -19, 826, 917 ), new CharMetrics( 778, 0, 105, -19, 826, 901 ), new CharMetrics( 584, 0, 50, 0, 642, 506 ), new CharMetrics( 778, 0, 43, -19, 890, 737 ), new CharMetrics( 722, 0, 123, -19, 797, 929 ), new CharMetrics( 722, 0, 123, -19, 797, 929 ), new CharMetrics( 722, 0, 123, -19, 797, 929 ), new CharMetrics( 722, 0, 123, -19, 797, 901 ), new CharMetrics( 667, 0, 167, 0, 806, 929 ), new CharMetrics( 667, 0, 86, 0, 712, 718 ), new CharMetrics( 611, 0, 67, -15, 658, 728 ), new CharMetrics( 556, 0, 61, -15, 559, 734 ), new CharMetrics( 556, 0, 61, -15, 587, 734 ), new CharMetrics( 556, 0, 61, -15, 559, 734 ), new CharMetrics( 556, 0, 61, -15, 592, 722 ), new CharMetrics( 556, 0, 61, -15, 559, 706 ), new CharMetrics( 556, 0, 61, -15, 559, 756 ), new CharMetrics( 889, 0, 61, -15, 909, 538 ), new CharMetrics( 500, 0, 74, -225, 553, 538 ), new CharMetrics( 556, 0, 84, -15, 578, 734 ), new CharMetrics( 556, 0, 84, -15, 587, 734 ), new CharMetrics( 556, 0, 84, -15, 578, 734 ), new CharMetrics( 556, 0, 84, -15, 578, 706 ), new CharMetrics( 278, 0, 95, 0, 310, 734 ), new CharMetrics( 278, 0, 95, 0, 448, 734 ), new CharMetrics( 278, 0, 95, 0, 411, 734 ), new CharMetrics( 278, 0, 95, 0, 416, 706 ), new CharMetrics( 556, 0, 81, -15, 617, 737 ), new CharMetrics( 556, 0, 65, 0, 592, 722 ), new CharMetrics( 556, 0, 83, -14, 585, 734 ), new CharMetrics( 556, 0, 83, -14, 587, 734 ), new CharMetrics( 556, 0, 83, -14, 585, 734 ), new CharMetrics( 556, 0, 83, -14, 602, 722 ), new CharMetrics( 556, 0, 83, -14, 585, 706 ), new CharMetrics( 584, 0, 85, -19, 606, 524 ), new CharMetrics( 611, 0, 29, -22, 647, 545 ), new CharMetrics( 556, 0, 94, -15, 600, 734 ), new CharMetrics( 556, 0, 94, -15, 600, 734 ), new CharMetrics( 556, 0, 94, -15, 600, 734 ), new CharMetrics( 556, 0, 94, -15, 600, 706 ), new CharMetrics( 500, 0, 15, -214, 600, 734 ), new CharMetrics( 556, 0, 14, -207, 584, 718 ), new CharMetrics( 500, 0, 15, -214, 600, 706 )}; SansSerifItalic() { super( false, 718, -207, new CharMetrics( 0, 0, -170, -225, 1116, 931 ), metrics ); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Font.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Font.java0000644000175000017500000000513611073632773033236 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * A basic font descriptor using standard PostScript font metrics to compute * text extents. All dimensions returned are in twips. * * @version $Id: Font.java 703397 2008-10-10 11:01:15Z vsiveton $ */ class Font { private int size; private FontMetrics metrics; Font( int style, int size /*pts*/ ) throws Exception { this.size = size; metrics = FontMetrics.find( style ); } int ascent() { return toTwips( metrics.ascent ); } int descent() { return toTwips( metrics.descent ); } TextExtents textExtents( String text ) { int i, n; int width = 0; int ascent = 0; int descent = 0; for ( i = 0, n = text.length(); i < n; ++i ) { char c = text.charAt( i ); if ( c > 255 ) { c = ' '; } FontMetrics.CharMetrics charMetrics = this.metrics.charMetrics[c]; width += charMetrics.wx; if ( charMetrics.ury > ascent ) { ascent = charMetrics.ury; } if ( charMetrics.lly < descent ) { descent = charMetrics.lly; } } int height = ascent + Math.abs( descent ); return new TextExtents( toTwips( width ), toTwips( height ), toTwips( ascent ) ); } private int toTwips( int length ) { return (int) Math.rint( (double) length * size / 50. ); } static class TextExtents { int width; int height; int ascent; TextExtents( int width, int height, int ascent ) { this.width = width; this.height = height; this.ascent = ascent; } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSinkFactory.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSinkFa0000644000175000017500000000303011105614026033211 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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.io.OutputStream; import org.apache.maven.doxia.sink.AbstractBinarySinkFactory; import org.apache.maven.doxia.sink.Sink; /** * Rtf implementation of the Sink factory. * * @author Vincent Siveton * @version $Id: RtfSinkFactory.java 712516 2008-11-09 17:04:22Z hboutemy $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="rtf" */ public class RtfSinkFactory extends AbstractBinarySinkFactory { /** {@inheritDoc} */ public Sink createSink( OutputStream out, String encoding ) throws IOException { return new RtfSink( out, encoding ); } } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/MonospaceBoldItalic.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Monospace0000644000175000017500000003237310767707462033346 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: MonospaceBoldItalic.java 638290 2008-03-18 09:45:22Z bentmann $ */ class MonospaceBoldItalic extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 216, -15, 495, 572 ), new CharMetrics( 600, 0, 212, 277, 584, 562 ), new CharMetrics( 600, 0, 88, -45, 640, 651 ), new CharMetrics( 600, 0, 87, -126, 629, 666 ), new CharMetrics( 600, 0, 102, -15, 624, 616 ), new CharMetrics( 600, 0, 62, -15, 594, 543 ), new CharMetrics( 600, 0, 230, 277, 542, 562 ), new CharMetrics( 600, 0, 266, -102, 592, 616 ), new CharMetrics( 600, 0, 117, -102, 444, 616 ), new CharMetrics( 600, 0, 179, 219, 597, 601 ), new CharMetrics( 600, 0, 114, 39, 596, 478 ), new CharMetrics( 600, 0, 99, -111, 430, 174 ), new CharMetrics( 600, 0, 143, 203, 567, 313 ), new CharMetrics( 600, 0, 207, -15, 426, 171 ), new CharMetrics( 600, 0, 91, -77, 626, 626 ), new CharMetrics( 600, 0, 136, -15, 592, 616 ), new CharMetrics( 600, 0, 93, 0, 561, 616 ), new CharMetrics( 600, 0, 61, 0, 593, 616 ), new CharMetrics( 600, 0, 72, -15, 571, 616 ), new CharMetrics( 600, 0, 82, 0, 558, 616 ), new CharMetrics( 600, 0, 77, -15, 621, 601 ), new CharMetrics( 600, 0, 136, -15, 652, 616 ), new CharMetrics( 600, 0, 147, 0, 622, 601 ), new CharMetrics( 600, 0, 115, -15, 604, 616 ), new CharMetrics( 600, 0, 76, -15, 592, 616 ), new CharMetrics( 600, 0, 206, -15, 479, 425 ), new CharMetrics( 600, 0, 99, -111, 480, 425 ), new CharMetrics( 600, 0, 121, 15, 612, 501 ), new CharMetrics( 600, 0, 96, 118, 614, 398 ), new CharMetrics( 600, 0, 97, 15, 589, 501 ), new CharMetrics( 600, 0, 183, -14, 591, 580 ), new CharMetrics( 600, 0, 66, -15, 641, 616 ), new CharMetrics( 600, 0, -9, 0, 631, 562 ), new CharMetrics( 600, 0, 30, 0, 629, 562 ), new CharMetrics( 600, 0, 75, -18, 674, 580 ), new CharMetrics( 600, 0, 30, 0, 664, 562 ), new CharMetrics( 600, 0, 25, 0, 669, 562 ), new CharMetrics( 600, 0, 39, 0, 683, 562 ), new CharMetrics( 600, 0, 75, -18, 674, 580 ), new CharMetrics( 600, 0, 20, 0, 699, 562 ), new CharMetrics( 600, 0, 77, 0, 642, 562 ), new CharMetrics( 600, 0, 59, -18, 720, 562 ), new CharMetrics( 600, 0, 21, 0, 691, 562 ), new CharMetrics( 600, 0, 39, 0, 635, 562 ), new CharMetrics( 600, 0, -2, 0, 721, 562 ), new CharMetrics( 600, 0, 8, -12, 729, 562 ), new CharMetrics( 600, 0, 74, -18, 645, 580 ), new CharMetrics( 600, 0, 48, 0, 642, 562 ), new CharMetrics( 600, 0, 84, -138, 636, 580 ), new CharMetrics( 600, 0, 24, 0, 617, 562 ), new CharMetrics( 600, 0, 54, -22, 672, 582 ), new CharMetrics( 600, 0, 86, 0, 678, 562 ), new CharMetrics( 600, 0, 101, -18, 715, 562 ), new CharMetrics( 600, 0, 84, 0, 732, 562 ), new CharMetrics( 600, 0, 84, 0, 737, 562 ), new CharMetrics( 600, 0, 12, 0, 689, 562 ), new CharMetrics( 600, 0, 109, 0, 708, 562 ), new CharMetrics( 600, 0, 62, 0, 636, 562 ), new CharMetrics( 600, 0, 223, -102, 606, 616 ), new CharMetrics( 600, 0, 223, -77, 496, 626 ), new CharMetrics( 600, 0, 103, -102, 486, 616 ), new CharMetrics( 600, 0, 171, 250, 555, 616 ), new CharMetrics( 600, 0, -27, -125, 584, -75 ), new CharMetrics( 600, 0, 297, 277, 487, 562 ), new CharMetrics( 600, 0, 62, -15, 592, 454 ), new CharMetrics( 600, 0, 13, -15, 636, 626 ), new CharMetrics( 600, 0, 81, -15, 631, 459 ), new CharMetrics( 600, 0, 61, -15, 644, 626 ), new CharMetrics( 600, 0, 81, -15, 604, 454 ), new CharMetrics( 600, 0, 83, 0, 677, 626 ), new CharMetrics( 600, 0, 41, -146, 673, 454 ), new CharMetrics( 600, 0, 18, 0, 614, 626 ), new CharMetrics( 600, 0, 77, 0, 545, 658 ), new CharMetrics( 600, 0, 37, -146, 580, 658 ), new CharMetrics( 600, 0, 33, 0, 642, 626 ), new CharMetrics( 600, 0, 77, 0, 545, 626 ), new CharMetrics( 600, 0, -22, 0, 648, 454 ), new CharMetrics( 600, 0, 18, 0, 614, 454 ), new CharMetrics( 600, 0, 71, -15, 622, 454 ), new CharMetrics( 600, 0, -31, -142, 622, 454 ), new CharMetrics( 600, 0, 61, -142, 684, 454 ), new CharMetrics( 600, 0, 47, 0, 654, 454 ), new CharMetrics( 600, 0, 67, -17, 607, 459 ), new CharMetrics( 600, 0, 118, -15, 566, 562 ), new CharMetrics( 600, 0, 70, -15, 591, 439 ), new CharMetrics( 600, 0, 70, 0, 694, 439 ), new CharMetrics( 600, 0, 53, 0, 711, 439 ), new CharMetrics( 600, 0, 6, 0, 670, 439 ), new CharMetrics( 600, 0, -20, -142, 694, 439 ), new CharMetrics( 600, 0, 81, 0, 613, 439 ), new CharMetrics( 600, 0, 204, -102, 595, 616 ), new CharMetrics( 600, 0, 202, -250, 504, 750 ), new CharMetrics( 600, 0, 114, -102, 506, 616 ), new CharMetrics( 600, 0, 120, 153, 589, 356 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 77, 0, 545, 439 ), new CharMetrics( 600, 0, 272, 508, 503, 661 ), new CharMetrics( 600, 0, 313, 508, 608, 661 ), new CharMetrics( 600, 0, 212, 483, 606, 657 ), new CharMetrics( 600, 0, 200, 493, 642, 636 ), new CharMetrics( 600, 0, 195, 505, 636, 585 ), new CharMetrics( 600, 0, 217, 468, 651, 631 ), new CharMetrics( 600, 0, 346, 485, 490, 625 ), new CharMetrics( 600, 0, 244, 485, 592, 625 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 319, 481, 528, 678 ), new CharMetrics( 600, 0, 169, -206, 367, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 172, 488, 728, 661 ), new CharMetrics( 600, 0, 144, -199, 350, 0 ), new CharMetrics( 600, 0, 238, 493, 632, 667 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 197, -146, 477, 449 ), new CharMetrics( 600, 0, 121, -49, 604, 614 ), new CharMetrics( 600, 0, 107, -28, 650, 611 ), new CharMetrics( 600, 0, 77, 49, 643, 517 ), new CharMetrics( 600, 0, 98, 0, 709, 562 ), new CharMetrics( 600, 0, 218, -175, 488, 675 ), new CharMetrics( 600, 0, 74, -70, 619, 580 ), new CharMetrics( 600, 0, 244, 485, 592, 625 ), new CharMetrics( 600, 0, 53, -18, 667, 580 ), new CharMetrics( 600, 0, 189, 196, 526, 580 ), new CharMetrics( 600, 0, 63, 70, 638, 446 ), new CharMetrics( 600, 0, 135, 103, 617, 413 ), new CharMetrics( 600, 0, 143, 203, 567, 313 ), new CharMetrics( 600, 0, 53, -18, 667, 580 ), new CharMetrics( 600, 0, 195, 505, 636, 585 ), new CharMetrics( 600, 0, 173, 243, 569, 616 ), new CharMetrics( 600, 0, 76, 24, 614, 515 ), new CharMetrics( 600, 0, 192, 230, 541, 616 ), new CharMetrics( 600, 0, 193, 222, 525, 616 ), new CharMetrics( 600, 0, 313, 508, 608, 661 ), new CharMetrics( 600, 0, 50, -142, 591, 439 ), new CharMetrics( 600, 0, 61, -70, 699, 580 ), new CharMetrics( 600, 0, 249, 165, 461, 351 ), new CharMetrics( 600, 0, 169, -206, 367, 0 ), new CharMetrics( 600, 0, 213, 230, 514, 616 ), new CharMetrics( 600, 0, 189, 196, 542, 580 ), new CharMetrics( 600, 0, 72, 70, 647, 446 ), new CharMetrics( 600, 0, 14, -60, 706, 661 ), new CharMetrics( 600, 0, 23, -60, 715, 661 ), new CharMetrics( 600, 0, 8, -60, 698, 661 ), new CharMetrics( 600, 0, 101, -146, 509, 449 ), new CharMetrics( 600, 0, -9, 0, 631, 784 ), new CharMetrics( 600, 0, -9, 0, 665, 784 ), new CharMetrics( 600, 0, -9, 0, 631, 780 ), new CharMetrics( 600, 0, -9, 0, 638, 759 ), new CharMetrics( 600, 0, -9, 0, 631, 748 ), new CharMetrics( 600, 0, -9, 0, 631, 801 ), new CharMetrics( 600, 0, -29, 0, 707, 562 ), new CharMetrics( 600, 0, 74, -206, 674, 580 ), new CharMetrics( 600, 0, 25, 0, 669, 784 ), new CharMetrics( 600, 0, 25, 0, 669, 784 ), new CharMetrics( 600, 0, 25, 0, 669, 780 ), new CharMetrics( 600, 0, 25, 0, 669, 748 ), new CharMetrics( 600, 0, 77, 0, 642, 784 ), new CharMetrics( 600, 0, 77, 0, 642, 784 ), new CharMetrics( 600, 0, 77, 0, 642, 780 ), new CharMetrics( 600, 0, 77, 0, 642, 748 ), new CharMetrics( 600, 0, 30, 0, 664, 562 ), new CharMetrics( 600, 0, 8, -12, 729, 759 ), new CharMetrics( 600, 0, 74, -18, 645, 784 ), new CharMetrics( 600, 0, 74, -18, 645, 784 ), new CharMetrics( 600, 0, 74, -18, 645, 780 ), new CharMetrics( 600, 0, 74, -18, 668, 759 ), new CharMetrics( 600, 0, 74, -18, 645, 748 ), new CharMetrics( 600, 0, 105, 39, 606, 478 ), new CharMetrics( 600, 0, 48, -22, 672, 584 ), new CharMetrics( 600, 0, 101, -18, 715, 784 ), new CharMetrics( 600, 0, 101, -18, 715, 784 ), new CharMetrics( 600, 0, 101, -18, 715, 780 ), new CharMetrics( 600, 0, 101, -18, 715, 748 ), new CharMetrics( 600, 0, 109, 0, 708, 784 ), new CharMetrics( 600, 0, 48, 0, 619, 562 ), new CharMetrics( 600, 0, 22, -15, 628, 626 ), new CharMetrics( 600, 0, 62, -15, 592, 661 ), new CharMetrics( 600, 0, 62, -15, 608, 661 ), new CharMetrics( 600, 0, 62, -15, 592, 657 ), new CharMetrics( 600, 0, 62, -15, 642, 636 ), new CharMetrics( 600, 0, 62, -15, 592, 625 ), new CharMetrics( 600, 0, 62, -15, 592, 678 ), new CharMetrics( 600, 0, 21, -15, 651, 454 ), new CharMetrics( 600, 0, 81, -206, 631, 459 ), new CharMetrics( 600, 0, 81, -15, 604, 661 ), new CharMetrics( 600, 0, 81, -15, 608, 661 ), new CharMetrics( 600, 0, 81, -15, 606, 657 ), new CharMetrics( 600, 0, 81, -15, 604, 625 ), new CharMetrics( 600, 0, 77, 0, 545, 661 ), new CharMetrics( 600, 0, 77, 0, 608, 661 ), new CharMetrics( 600, 0, 77, 0, 566, 657 ), new CharMetrics( 600, 0, 77, 0, 552, 625 ), new CharMetrics( 600, 0, 93, -27, 661, 626 ), new CharMetrics( 600, 0, 18, 0, 642, 636 ), new CharMetrics( 600, 0, 71, -15, 622, 661 ), new CharMetrics( 600, 0, 71, -15, 622, 661 ), new CharMetrics( 600, 0, 71, -15, 622, 657 ), new CharMetrics( 600, 0, 71, -15, 642, 636 ), new CharMetrics( 600, 0, 71, -15, 622, 625 ), new CharMetrics( 600, 0, 114, 16, 596, 500 ), new CharMetrics( 600, 0, 55, -24, 637, 463 ), new CharMetrics( 600, 0, 70, -15, 591, 661 ), new CharMetrics( 600, 0, 70, -15, 608, 661 ), new CharMetrics( 600, 0, 70, -15, 591, 657 ), new CharMetrics( 600, 0, 70, -15, 591, 625 ), new CharMetrics( 600, 0, -20, -142, 694, 661 ), new CharMetrics( 600, 0, -31, -142, 622, 626 ), new CharMetrics( 600, 0, -20, -142, 694, 625 )}; MonospaceBoldItalic() { super( true, 626, -142, new CharMetrics( 0, 0, -56, -250, 868, 801 ), metrics ); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Monospace.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Monospace0000644000175000017500000003230110767707462033335 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: Monospace.java 638290 2008-03-18 09:45:22Z bentmann $ */ class Monospace extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 236, -15, 364, 572 ), new CharMetrics( 600, 0, 187, 328, 413, 562 ), new CharMetrics( 600, 0, 93, -32, 507, 639 ), new CharMetrics( 600, 0, 105, -126, 496, 662 ), new CharMetrics( 600, 0, 81, -15, 518, 622 ), new CharMetrics( 600, 0, 63, -15, 538, 543 ), new CharMetrics( 600, 0, 213, 328, 376, 562 ), new CharMetrics( 600, 0, 269, -108, 440, 622 ), new CharMetrics( 600, 0, 160, -108, 331, 622 ), new CharMetrics( 600, 0, 116, 257, 484, 607 ), new CharMetrics( 600, 0, 80, 44, 520, 470 ), new CharMetrics( 600, 0, 181, -112, 344, 122 ), new CharMetrics( 600, 0, 103, 231, 497, 285 ), new CharMetrics( 600, 0, 229, -15, 371, 109 ), new CharMetrics( 600, 0, 125, -80, 475, 629 ), new CharMetrics( 600, 0, 106, -15, 494, 622 ), new CharMetrics( 600, 0, 96, 0, 505, 622 ), new CharMetrics( 600, 0, 70, 0, 471, 622 ), new CharMetrics( 600, 0, 75, -15, 466, 622 ), new CharMetrics( 600, 0, 78, 0, 500, 622 ), new CharMetrics( 600, 0, 92, -15, 497, 607 ), new CharMetrics( 600, 0, 111, -15, 497, 622 ), new CharMetrics( 600, 0, 82, 0, 483, 607 ), new CharMetrics( 600, 0, 102, -15, 498, 622 ), new CharMetrics( 600, 0, 96, -15, 489, 622 ), new CharMetrics( 600, 0, 229, -15, 371, 385 ), new CharMetrics( 600, 0, 181, -112, 371, 385 ), new CharMetrics( 600, 0, 41, 42, 519, 472 ), new CharMetrics( 600, 0, 80, 138, 520, 376 ), new CharMetrics( 600, 0, 66, 42, 544, 472 ), new CharMetrics( 600, 0, 129, -15, 492, 572 ), new CharMetrics( 600, 0, 77, -15, 533, 622 ), new CharMetrics( 600, 0, 3, 0, 597, 562 ), new CharMetrics( 600, 0, 43, 0, 559, 562 ), new CharMetrics( 600, 0, 41, -18, 540, 580 ), new CharMetrics( 600, 0, 43, 0, 574, 562 ), new CharMetrics( 600, 0, 53, 0, 550, 562 ), new CharMetrics( 600, 0, 53, 0, 545, 562 ), new CharMetrics( 600, 0, 31, -18, 575, 580 ), new CharMetrics( 600, 0, 32, 0, 568, 562 ), new CharMetrics( 600, 0, 96, 0, 504, 562 ), new CharMetrics( 600, 0, 34, -18, 566, 562 ), new CharMetrics( 600, 0, 38, 0, 582, 562 ), new CharMetrics( 600, 0, 47, 0, 554, 562 ), new CharMetrics( 600, 0, 4, 0, 596, 562 ), new CharMetrics( 600, 0, 7, -13, 593, 562 ), new CharMetrics( 600, 0, 43, -18, 557, 580 ), new CharMetrics( 600, 0, 79, 0, 558, 562 ), new CharMetrics( 600, 0, 43, -138, 557, 580 ), new CharMetrics( 600, 0, 38, 0, 588, 562 ), new CharMetrics( 600, 0, 72, -20, 529, 580 ), new CharMetrics( 600, 0, 38, 0, 563, 562 ), new CharMetrics( 600, 0, 17, -18, 583, 562 ), new CharMetrics( 600, 0, -4, -13, 604, 562 ), new CharMetrics( 600, 0, -3, -13, 603, 562 ), new CharMetrics( 600, 0, 23, 0, 577, 562 ), new CharMetrics( 600, 0, 24, 0, 576, 562 ), new CharMetrics( 600, 0, 86, 0, 514, 562 ), new CharMetrics( 600, 0, 269, -108, 442, 622 ), new CharMetrics( 600, 0, 118, -80, 482, 629 ), new CharMetrics( 600, 0, 158, -108, 331, 622 ), new CharMetrics( 600, 0, 94, 354, 506, 622 ), new CharMetrics( 600, 0, 0, -125, 600, -75 ), new CharMetrics( 600, 0, 224, 328, 387, 562 ), new CharMetrics( 600, 0, 53, -15, 559, 441 ), new CharMetrics( 600, 0, 14, -15, 575, 629 ), new CharMetrics( 600, 0, 66, -15, 529, 441 ), new CharMetrics( 600, 0, 45, -15, 591, 629 ), new CharMetrics( 600, 0, 66, -15, 548, 441 ), new CharMetrics( 600, 0, 114, 0, 531, 629 ), new CharMetrics( 600, 0, 45, -157, 566, 441 ), new CharMetrics( 600, 0, 18, 0, 582, 629 ), new CharMetrics( 600, 0, 95, 0, 505, 657 ), new CharMetrics( 600, 0, 82, -157, 410, 657 ), new CharMetrics( 600, 0, 43, 0, 580, 629 ), new CharMetrics( 600, 0, 95, 0, 505, 629 ), new CharMetrics( 600, 0, -5, 0, 605, 441 ), new CharMetrics( 600, 0, 26, 0, 575, 441 ), new CharMetrics( 600, 0, 62, -15, 538, 441 ), new CharMetrics( 600, 0, 9, -157, 555, 441 ), new CharMetrics( 600, 0, 45, -157, 591, 441 ), new CharMetrics( 600, 0, 60, 0, 559, 441 ), new CharMetrics( 600, 0, 80, -15, 513, 441 ), new CharMetrics( 600, 0, 87, -15, 530, 561 ), new CharMetrics( 600, 0, 21, -15, 562, 426 ), new CharMetrics( 600, 0, 10, -10, 590, 426 ), new CharMetrics( 600, 0, -4, -10, 604, 426 ), new CharMetrics( 600, 0, 20, 0, 580, 426 ), new CharMetrics( 600, 0, 7, -157, 592, 426 ), new CharMetrics( 600, 0, 99, 0, 502, 426 ), new CharMetrics( 600, 0, 182, -108, 437, 622 ), new CharMetrics( 600, 0, 275, -250, 326, 750 ), new CharMetrics( 600, 0, 163, -108, 418, 622 ), new CharMetrics( 600, 0, 63, 197, 540, 320 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 95, 0, 505, 426 ), new CharMetrics( 600, 0, 151, 497, 378, 672 ), new CharMetrics( 600, 0, 242, 497, 469, 672 ), new CharMetrics( 600, 0, 124, 477, 476, 654 ), new CharMetrics( 600, 0, 105, 489, 503, 606 ), new CharMetrics( 600, 0, 120, 525, 480, 565 ), new CharMetrics( 600, 0, 153, 501, 447, 609 ), new CharMetrics( 600, 0, 249, 477, 352, 580 ), new CharMetrics( 600, 0, 148, 492, 453, 595 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 218, 463, 382, 627 ), new CharMetrics( 600, 0, 224, -151, 362, 10 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 133, 497, 540, 672 ), new CharMetrics( 600, 0, 227, -151, 370, 0 ), new CharMetrics( 600, 0, 124, 492, 476, 669 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 236, -157, 364, 430 ), new CharMetrics( 600, 0, 96, -49, 500, 614 ), new CharMetrics( 600, 0, 84, -21, 521, 611 ), new CharMetrics( 600, 0, 73, 58, 527, 506 ), new CharMetrics( 600, 0, 26, 0, 574, 562 ), new CharMetrics( 600, 0, 275, -175, 326, 675 ), new CharMetrics( 600, 0, 113, -78, 488, 580 ), new CharMetrics( 600, 0, 148, 492, 453, 595 ), new CharMetrics( 600, 0, 0, -18, 600, 580 ), new CharMetrics( 600, 0, 156, 249, 442, 580 ), new CharMetrics( 600, 0, 37, 70, 563, 446 ), new CharMetrics( 600, 0, 87, 108, 513, 369 ), new CharMetrics( 600, 0, 103, 231, 497, 285 ), new CharMetrics( 600, 0, 0, -18, 600, 580 ), new CharMetrics( 600, 0, 120, 525, 480, 565 ), new CharMetrics( 600, 0, 123, 269, 477, 622 ), new CharMetrics( 600, 0, 87, 44, 513, 558 ), new CharMetrics( 600, 0, 177, 249, 424, 622 ), new CharMetrics( 600, 0, 155, 240, 406, 622 ), new CharMetrics( 600, 0, 242, 497, 469, 672 ), new CharMetrics( 600, 0, 21, -157, 562, 426 ), new CharMetrics( 600, 0, 50, -78, 511, 562 ), new CharMetrics( 600, 0, 222, 189, 378, 327 ), new CharMetrics( 600, 0, 224, -151, 362, 10 ), new CharMetrics( 600, 0, 172, 249, 428, 622 ), new CharMetrics( 600, 0, 157, 249, 443, 580 ), new CharMetrics( 600, 0, 37, 70, 563, 446 ), new CharMetrics( 600, 0, 0, -57, 600, 665 ), new CharMetrics( 600, 0, 0, -57, 611, 665 ), new CharMetrics( 600, 0, 8, -56, 593, 666 ), new CharMetrics( 600, 0, 108, -157, 471, 430 ), new CharMetrics( 600, 0, 3, 0, 597, 793 ), new CharMetrics( 600, 0, 3, 0, 597, 793 ), new CharMetrics( 600, 0, 3, 0, 597, 775 ), new CharMetrics( 600, 0, 3, 0, 597, 732 ), new CharMetrics( 600, 0, 3, 0, 597, 731 ), new CharMetrics( 600, 0, 3, 0, 597, 753 ), new CharMetrics( 600, 0, 3, 0, 550, 562 ), new CharMetrics( 600, 0, 41, -151, 540, 580 ), new CharMetrics( 600, 0, 53, 0, 550, 793 ), new CharMetrics( 600, 0, 53, 0, 550, 793 ), new CharMetrics( 600, 0, 53, 0, 550, 775 ), new CharMetrics( 600, 0, 53, 0, 550, 731 ), new CharMetrics( 600, 0, 96, 0, 504, 793 ), new CharMetrics( 600, 0, 96, 0, 504, 793 ), new CharMetrics( 600, 0, 96, 0, 504, 775 ), new CharMetrics( 600, 0, 96, 0, 504, 731 ), new CharMetrics( 600, 0, 30, 0, 574, 562 ), new CharMetrics( 600, 0, 7, -13, 593, 732 ), new CharMetrics( 600, 0, 43, -18, 557, 793 ), new CharMetrics( 600, 0, 43, -18, 557, 793 ), new CharMetrics( 600, 0, 43, -18, 557, 775 ), new CharMetrics( 600, 0, 43, -18, 557, 732 ), new CharMetrics( 600, 0, 43, -18, 557, 731 ), new CharMetrics( 600, 0, 87, 43, 515, 470 ), new CharMetrics( 600, 0, 43, -80, 557, 629 ), new CharMetrics( 600, 0, 17, -18, 583, 793 ), new CharMetrics( 600, 0, 17, -18, 583, 793 ), new CharMetrics( 600, 0, 17, -18, 583, 775 ), new CharMetrics( 600, 0, 17, -18, 583, 731 ), new CharMetrics( 600, 0, 24, 0, 576, 793 ), new CharMetrics( 600, 0, 79, 0, 538, 562 ), new CharMetrics( 600, 0, 48, -15, 588, 629 ), new CharMetrics( 600, 0, 53, -15, 559, 672 ), new CharMetrics( 600, 0, 53, -15, 559, 672 ), new CharMetrics( 600, 0, 53, -15, 559, 654 ), new CharMetrics( 600, 0, 53, -15, 559, 606 ), new CharMetrics( 600, 0, 53, -15, 559, 595 ), new CharMetrics( 600, 0, 53, -15, 559, 627 ), new CharMetrics( 600, 0, 19, -15, 570, 441 ), new CharMetrics( 600, 0, 66, -151, 529, 441 ), new CharMetrics( 600, 0, 66, -15, 548, 672 ), new CharMetrics( 600, 0, 66, -15, 548, 672 ), new CharMetrics( 600, 0, 66, -15, 548, 654 ), new CharMetrics( 600, 0, 66, -15, 548, 595 ), new CharMetrics( 600, 0, 95, 0, 505, 672 ), new CharMetrics( 600, 0, 95, 0, 505, 672 ), new CharMetrics( 600, 0, 94, 0, 505, 654 ), new CharMetrics( 600, 0, 95, 0, 505, 595 ), new CharMetrics( 600, 0, 62, -15, 538, 629 ), new CharMetrics( 600, 0, 26, 0, 575, 606 ), new CharMetrics( 600, 0, 62, -15, 538, 672 ), new CharMetrics( 600, 0, 62, -15, 538, 672 ), new CharMetrics( 600, 0, 62, -15, 538, 654 ), new CharMetrics( 600, 0, 62, -15, 538, 606 ), new CharMetrics( 600, 0, 62, -15, 538, 595 ), new CharMetrics( 600, 0, 87, 48, 513, 467 ), new CharMetrics( 600, 0, 62, -80, 538, 506 ), new CharMetrics( 600, 0, 21, -15, 562, 672 ), new CharMetrics( 600, 0, 21, -15, 562, 672 ), new CharMetrics( 600, 0, 21, -15, 562, 654 ), new CharMetrics( 600, 0, 21, -15, 562, 595 ), new CharMetrics( 600, 0, 7, -157, 592, 672 ), new CharMetrics( 600, 0, -6, -157, 555, 629 ), new CharMetrics( 600, 0, 7, -157, 592, 595 )}; Monospace() { super( true, 629, -157, new CharMetrics( 0, 0, -28, -250, 628, 805 ), metrics ); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/MonospaceItalic.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Monospace0000644000175000017500000003241710767707462033345 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: MonospaceItalic.java 638290 2008-03-18 09:45:22Z bentmann $ */ class MonospaceItalic extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 243, -15, 464, 572 ), new CharMetrics( 600, 0, 273, 328, 532, 562 ), new CharMetrics( 600, 0, 133, -32, 596, 639 ), new CharMetrics( 600, 0, 108, -126, 596, 662 ), new CharMetrics( 600, 0, 134, -15, 599, 622 ), new CharMetrics( 600, 0, 87, -15, 580, 543 ), new CharMetrics( 600, 0, 283, 328, 495, 562 ), new CharMetrics( 600, 0, 313, -108, 572, 622 ), new CharMetrics( 600, 0, 137, -108, 396, 622 ), new CharMetrics( 600, 0, 212, 257, 580, 607 ), new CharMetrics( 600, 0, 129, 44, 580, 470 ), new CharMetrics( 600, 0, 157, -112, 370, 122 ), new CharMetrics( 600, 0, 152, 231, 558, 285 ), new CharMetrics( 600, 0, 238, -15, 382, 109 ), new CharMetrics( 600, 0, 112, -80, 604, 629 ), new CharMetrics( 600, 0, 154, -15, 575, 622 ), new CharMetrics( 600, 0, 98, 0, 515, 622 ), new CharMetrics( 600, 0, 70, 0, 568, 622 ), new CharMetrics( 600, 0, 82, -15, 538, 622 ), new CharMetrics( 600, 0, 108, 0, 541, 622 ), new CharMetrics( 600, 0, 99, -15, 589, 607 ), new CharMetrics( 600, 0, 155, -15, 629, 622 ), new CharMetrics( 600, 0, 182, 0, 612, 607 ), new CharMetrics( 600, 0, 132, -15, 588, 622 ), new CharMetrics( 600, 0, 93, -15, 574, 622 ), new CharMetrics( 600, 0, 238, -15, 441, 385 ), new CharMetrics( 600, 0, 157, -112, 441, 385 ), new CharMetrics( 600, 0, 96, 42, 610, 472 ), new CharMetrics( 600, 0, 109, 138, 600, 376 ), new CharMetrics( 600, 0, 85, 42, 599, 472 ), new CharMetrics( 600, 0, 222, -15, 583, 572 ), new CharMetrics( 600, 0, 127, -15, 582, 622 ), new CharMetrics( 600, 0, 3, 0, 607, 562 ), new CharMetrics( 600, 0, 43, 0, 616, 562 ), new CharMetrics( 600, 0, 93, -18, 655, 580 ), new CharMetrics( 600, 0, 43, 0, 645, 562 ), new CharMetrics( 600, 0, 53, 0, 660, 562 ), new CharMetrics( 600, 0, 53, 0, 660, 562 ), new CharMetrics( 600, 0, 83, -18, 645, 580 ), new CharMetrics( 600, 0, 32, 0, 687, 562 ), new CharMetrics( 600, 0, 96, 0, 623, 562 ), new CharMetrics( 600, 0, 52, -18, 685, 562 ), new CharMetrics( 600, 0, 38, 0, 671, 562 ), new CharMetrics( 600, 0, 47, 0, 607, 562 ), new CharMetrics( 600, 0, 4, 0, 715, 562 ), new CharMetrics( 600, 0, 7, -13, 712, 562 ), new CharMetrics( 600, 0, 94, -18, 625, 580 ), new CharMetrics( 600, 0, 79, 0, 644, 562 ), new CharMetrics( 600, 0, 95, -138, 625, 580 ), new CharMetrics( 600, 0, 38, 0, 598, 562 ), new CharMetrics( 600, 0, 76, -20, 650, 580 ), new CharMetrics( 600, 0, 108, 0, 665, 562 ), new CharMetrics( 600, 0, 125, -18, 702, 562 ), new CharMetrics( 600, 0, 105, -13, 723, 562 ), new CharMetrics( 600, 0, 106, -13, 722, 562 ), new CharMetrics( 600, 0, 23, 0, 675, 562 ), new CharMetrics( 600, 0, 133, 0, 695, 562 ), new CharMetrics( 600, 0, 86, 0, 610, 562 ), new CharMetrics( 600, 0, 246, -108, 574, 622 ), new CharMetrics( 600, 0, 249, -80, 468, 629 ), new CharMetrics( 600, 0, 135, -108, 463, 622 ), new CharMetrics( 600, 0, 175, 354, 587, 622 ), new CharMetrics( 600, 0, -27, -125, 584, -75 ), new CharMetrics( 600, 0, 343, 328, 457, 562 ), new CharMetrics( 600, 0, 76, -15, 569, 441 ), new CharMetrics( 600, 0, 29, -15, 625, 629 ), new CharMetrics( 600, 0, 106, -15, 608, 441 ), new CharMetrics( 600, 0, 85, -15, 640, 629 ), new CharMetrics( 600, 0, 106, -15, 598, 441 ), new CharMetrics( 600, 0, 114, 0, 662, 629 ), new CharMetrics( 600, 0, 61, -157, 657, 441 ), new CharMetrics( 600, 0, 33, 0, 592, 629 ), new CharMetrics( 600, 0, 95, 0, 515, 657 ), new CharMetrics( 600, 0, 52, -157, 550, 657 ), new CharMetrics( 600, 0, 58, 0, 633, 629 ), new CharMetrics( 600, 0, 95, 0, 515, 629 ), new CharMetrics( 600, 0, -5, 0, 615, 441 ), new CharMetrics( 600, 0, 26, 0, 585, 441 ), new CharMetrics( 600, 0, 102, -15, 588, 441 ), new CharMetrics( 600, 0, -24, -157, 605, 441 ), new CharMetrics( 600, 0, 85, -157, 682, 441 ), new CharMetrics( 600, 0, 60, 0, 636, 441 ), new CharMetrics( 600, 0, 78, -15, 584, 441 ), new CharMetrics( 600, 0, 167, -15, 561, 561 ), new CharMetrics( 600, 0, 101, -15, 572, 426 ), new CharMetrics( 600, 0, 90, -10, 681, 426 ), new CharMetrics( 600, 0, 76, -10, 695, 426 ), new CharMetrics( 600, 0, 20, 0, 655, 426 ), new CharMetrics( 600, 0, -4, -157, 683, 426 ), new CharMetrics( 600, 0, 99, 0, 593, 426 ), new CharMetrics( 600, 0, 233, -108, 569, 622 ), new CharMetrics( 600, 0, 222, -250, 485, 750 ), new CharMetrics( 600, 0, 140, -108, 477, 622 ), new CharMetrics( 600, 0, 116, 197, 600, 320 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 95, 0, 515, 426 ), new CharMetrics( 600, 0, 294, 497, 484, 672 ), new CharMetrics( 600, 0, 348, 497, 612, 672 ), new CharMetrics( 600, 0, 229, 477, 581, 654 ), new CharMetrics( 600, 0, 212, 489, 629, 606 ), new CharMetrics( 600, 0, 232, 525, 600, 565 ), new CharMetrics( 600, 0, 279, 501, 576, 609 ), new CharMetrics( 600, 0, 360, 477, 466, 580 ), new CharMetrics( 600, 0, 262, 492, 570, 595 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 332, 463, 500, 627 ), new CharMetrics( 600, 0, 197, -151, 344, 10 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 239, 497, 683, 672 ), new CharMetrics( 600, 0, 207, -151, 348, 0 ), new CharMetrics( 600, 0, 262, 492, 614, 669 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 225, -157, 445, 430 ), new CharMetrics( 600, 0, 151, -49, 588, 614 ), new CharMetrics( 600, 0, 124, -21, 621, 611 ), new CharMetrics( 600, 0, 94, 58, 628, 506 ), new CharMetrics( 600, 0, 120, 0, 693, 562 ), new CharMetrics( 600, 0, 238, -175, 469, 675 ), new CharMetrics( 600, 0, 104, -78, 590, 580 ), new CharMetrics( 600, 0, 262, 492, 570, 595 ), new CharMetrics( 600, 0, 53, -18, 667, 580 ), new CharMetrics( 600, 0, 209, 249, 512, 580 ), new CharMetrics( 600, 0, 92, 70, 652, 446 ), new CharMetrics( 600, 0, 155, 108, 591, 369 ), new CharMetrics( 600, 0, 152, 231, 558, 285 ), new CharMetrics( 600, 0, 53, -18, 667, 580 ), new CharMetrics( 600, 0, 232, 525, 600, 565 ), new CharMetrics( 600, 0, 214, 269, 576, 622 ), new CharMetrics( 600, 0, 96, 44, 594, 558 ), new CharMetrics( 600, 0, 230, 249, 535, 622 ), new CharMetrics( 600, 0, 213, 240, 501, 622 ), new CharMetrics( 600, 0, 348, 497, 612, 672 ), new CharMetrics( 600, 0, 72, -157, 572, 426 ), new CharMetrics( 600, 0, 100, -78, 630, 562 ), new CharMetrics( 600, 0, 275, 189, 434, 327 ), new CharMetrics( 600, 0, 197, -151, 344, 10 ), new CharMetrics( 600, 0, 231, 249, 491, 622 ), new CharMetrics( 600, 0, 210, 249, 535, 580 ), new CharMetrics( 600, 0, 58, 70, 618, 446 ), new CharMetrics( 600, 0, 65, -57, 674, 665 ), new CharMetrics( 600, 0, 65, -57, 669, 665 ), new CharMetrics( 600, 0, 73, -56, 659, 666 ), new CharMetrics( 600, 0, 105, -157, 466, 430 ), new CharMetrics( 600, 0, 3, 0, 607, 793 ), new CharMetrics( 600, 0, 3, 0, 658, 793 ), new CharMetrics( 600, 0, 3, 0, 607, 775 ), new CharMetrics( 600, 0, 3, 0, 656, 732 ), new CharMetrics( 600, 0, 3, 0, 607, 731 ), new CharMetrics( 600, 0, 3, 0, 607, 753 ), new CharMetrics( 600, 0, 3, 0, 655, 562 ), new CharMetrics( 600, 0, 93, -151, 658, 580 ), new CharMetrics( 600, 0, 53, 0, 660, 793 ), new CharMetrics( 600, 0, 53, 0, 668, 793 ), new CharMetrics( 600, 0, 53, 0, 660, 775 ), new CharMetrics( 600, 0, 53, 0, 660, 731 ), new CharMetrics( 600, 0, 96, 0, 623, 793 ), new CharMetrics( 600, 0, 96, 0, 638, 793 ), new CharMetrics( 600, 0, 96, 0, 623, 775 ), new CharMetrics( 600, 0, 96, 0, 623, 731 ), new CharMetrics( 600, 0, 43, 0, 645, 562 ), new CharMetrics( 600, 0, 7, -13, 712, 732 ), new CharMetrics( 600, 0, 94, -18, 625, 793 ), new CharMetrics( 600, 0, 94, -18, 638, 793 ), new CharMetrics( 600, 0, 94, -18, 625, 775 ), new CharMetrics( 600, 0, 94, -18, 656, 732 ), new CharMetrics( 600, 0, 94, -18, 625, 731 ), new CharMetrics( 600, 0, 103, 43, 607, 470 ), new CharMetrics( 600, 0, 94, -80, 625, 629 ), new CharMetrics( 600, 0, 125, -18, 702, 793 ), new CharMetrics( 600, 0, 125, -18, 702, 793 ), new CharMetrics( 600, 0, 125, -18, 702, 775 ), new CharMetrics( 600, 0, 125, -18, 702, 731 ), new CharMetrics( 600, 0, 133, 0, 695, 793 ), new CharMetrics( 600, 0, 79, 0, 606, 562 ), new CharMetrics( 600, 0, 48, -15, 617, 629 ), new CharMetrics( 600, 0, 76, -15, 569, 672 ), new CharMetrics( 600, 0, 76, -15, 612, 672 ), new CharMetrics( 600, 0, 76, -15, 581, 654 ), new CharMetrics( 600, 0, 76, -15, 629, 606 ), new CharMetrics( 600, 0, 76, -15, 570, 595 ), new CharMetrics( 600, 0, 76, -15, 569, 627 ), new CharMetrics( 600, 0, 41, -15, 626, 441 ), new CharMetrics( 600, 0, 106, -151, 614, 441 ), new CharMetrics( 600, 0, 106, -15, 598, 672 ), new CharMetrics( 600, 0, 106, -15, 612, 672 ), new CharMetrics( 600, 0, 106, -15, 598, 654 ), new CharMetrics( 600, 0, 106, -15, 598, 595 ), new CharMetrics( 600, 0, 95, 0, 515, 672 ), new CharMetrics( 600, 0, 95, 0, 612, 672 ), new CharMetrics( 600, 0, 95, 0, 551, 654 ), new CharMetrics( 600, 0, 95, 0, 540, 595 ), new CharMetrics( 600, 0, 102, -15, 639, 629 ), new CharMetrics( 600, 0, 26, 0, 629, 606 ), new CharMetrics( 600, 0, 102, -15, 588, 672 ), new CharMetrics( 600, 0, 102, -15, 612, 672 ), new CharMetrics( 600, 0, 102, -15, 588, 654 ), new CharMetrics( 600, 0, 102, -15, 629, 606 ), new CharMetrics( 600, 0, 102, -15, 588, 595 ), new CharMetrics( 600, 0, 136, 48, 573, 467 ), new CharMetrics( 600, 0, 102, -80, 588, 506 ), new CharMetrics( 600, 0, 101, -15, 572, 672 ), new CharMetrics( 600, 0, 101, -15, 602, 672 ), new CharMetrics( 600, 0, 101, -15, 572, 654 ), new CharMetrics( 600, 0, 101, -15, 572, 595 ), new CharMetrics( 600, 0, -4, -157, 683, 672 ), new CharMetrics( 600, 0, -24, -157, 605, 629 ), new CharMetrics( 600, 0, -4, -157, 683, 595 )}; MonospaceItalic() { super( true, 629, -157, new CharMetrics( 0, 0, -28, -250, 742, 805 ), metrics ); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerifBold.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/SansSerif0000644000175000017500000003223310767707462033312 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: SansSerifBold.java 638290 2008-03-18 09:45:22Z bentmann $ */ class SansSerifBold extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 90, 0, 244, 718 ), new CharMetrics( 474, 0, 98, 447, 376, 718 ), new CharMetrics( 556, 0, 18, 0, 538, 698 ), new CharMetrics( 556, 0, 30, -115, 523, 775 ), new CharMetrics( 889, 0, 28, -19, 861, 710 ), new CharMetrics( 722, 0, 54, -19, 701, 718 ), new CharMetrics( 278, 0, 69, 445, 209, 718 ), new CharMetrics( 333, 0, 35, -208, 314, 734 ), new CharMetrics( 333, 0, 19, -208, 298, 734 ), new CharMetrics( 389, 0, 27, 387, 362, 718 ), new CharMetrics( 584, 0, 40, 0, 544, 506 ), new CharMetrics( 278, 0, 64, -168, 214, 146 ), new CharMetrics( 333, 0, 27, 215, 306, 345 ), new CharMetrics( 278, 0, 64, 0, 214, 146 ), new CharMetrics( 278, 0, -33, -19, 311, 737 ), new CharMetrics( 556, 0, 32, -19, 524, 710 ), new CharMetrics( 556, 0, 69, 0, 378, 710 ), new CharMetrics( 556, 0, 26, 0, 511, 710 ), new CharMetrics( 556, 0, 27, -19, 516, 710 ), new CharMetrics( 556, 0, 27, 0, 526, 710 ), new CharMetrics( 556, 0, 27, -19, 516, 698 ), new CharMetrics( 556, 0, 31, -19, 520, 710 ), new CharMetrics( 556, 0, 25, 0, 528, 698 ), new CharMetrics( 556, 0, 32, -19, 524, 710 ), new CharMetrics( 556, 0, 30, -19, 522, 710 ), new CharMetrics( 333, 0, 92, 0, 242, 512 ), new CharMetrics( 333, 0, 92, -168, 242, 512 ), new CharMetrics( 584, 0, 38, -8, 546, 514 ), new CharMetrics( 584, 0, 40, 87, 544, 419 ), new CharMetrics( 584, 0, 38, -8, 546, 514 ), new CharMetrics( 611, 0, 60, 0, 556, 727 ), new CharMetrics( 975, 0, 118, -19, 856, 737 ), new CharMetrics( 722, 0, 20, 0, 702, 718 ), new CharMetrics( 722, 0, 76, 0, 669, 718 ), new CharMetrics( 722, 0, 44, -19, 684, 737 ), new CharMetrics( 722, 0, 76, 0, 685, 718 ), new CharMetrics( 667, 0, 76, 0, 621, 718 ), new CharMetrics( 611, 0, 76, 0, 587, 718 ), new CharMetrics( 778, 0, 44, -19, 713, 737 ), new CharMetrics( 722, 0, 71, 0, 651, 718 ), new CharMetrics( 278, 0, 64, 0, 214, 718 ), new CharMetrics( 556, 0, 22, -18, 484, 718 ), new CharMetrics( 722, 0, 87, 0, 722, 718 ), new CharMetrics( 611, 0, 76, 0, 583, 718 ), new CharMetrics( 833, 0, 69, 0, 765, 718 ), new CharMetrics( 722, 0, 69, 0, 654, 718 ), new CharMetrics( 778, 0, 44, -19, 734, 737 ), new CharMetrics( 667, 0, 76, 0, 627, 718 ), new CharMetrics( 778, 0, 44, -52, 737, 737 ), new CharMetrics( 722, 0, 76, 0, 677, 718 ), new CharMetrics( 667, 0, 39, -19, 629, 737 ), new CharMetrics( 611, 0, 14, 0, 598, 718 ), new CharMetrics( 722, 0, 72, -19, 651, 718 ), new CharMetrics( 667, 0, 19, 0, 648, 718 ), new CharMetrics( 944, 0, 16, 0, 929, 718 ), new CharMetrics( 667, 0, 14, 0, 653, 718 ), new CharMetrics( 667, 0, 15, 0, 653, 718 ), new CharMetrics( 611, 0, 25, 0, 586, 718 ), new CharMetrics( 333, 0, 63, -196, 309, 722 ), new CharMetrics( 278, 0, -33, -19, 311, 737 ), new CharMetrics( 333, 0, 24, -196, 270, 722 ), new CharMetrics( 584, 0, 62, 323, 522, 698 ), new CharMetrics( 556, 0, 0, -125, 556, -75 ), new CharMetrics( 278, 0, 69, 454, 209, 727 ), new CharMetrics( 556, 0, 29, -14, 527, 546 ), new CharMetrics( 611, 0, 61, -14, 578, 718 ), new CharMetrics( 556, 0, 34, -14, 524, 546 ), new CharMetrics( 611, 0, 34, -14, 551, 718 ), new CharMetrics( 556, 0, 23, -14, 528, 546 ), new CharMetrics( 333, 0, 10, 0, 318, 727 ), new CharMetrics( 611, 0, 40, -217, 553, 546 ), new CharMetrics( 611, 0, 65, 0, 546, 718 ), new CharMetrics( 278, 0, 69, 0, 209, 725 ), new CharMetrics( 278, 0, 3, -214, 209, 725 ), new CharMetrics( 556, 0, 69, 0, 562, 718 ), new CharMetrics( 278, 0, 69, 0, 209, 718 ), new CharMetrics( 889, 0, 64, 0, 826, 546 ), new CharMetrics( 611, 0, 65, 0, 546, 546 ), new CharMetrics( 611, 0, 34, -14, 578, 546 ), new CharMetrics( 611, 0, 62, -207, 578, 546 ), new CharMetrics( 611, 0, 34, -207, 552, 546 ), new CharMetrics( 389, 0, 64, 0, 373, 546 ), new CharMetrics( 556, 0, 30, -14, 519, 546 ), new CharMetrics( 333, 0, 10, -6, 309, 676 ), new CharMetrics( 611, 0, 66, -14, 545, 532 ), new CharMetrics( 556, 0, 13, 0, 543, 532 ), new CharMetrics( 778, 0, 10, 0, 769, 532 ), new CharMetrics( 556, 0, 15, 0, 541, 532 ), new CharMetrics( 556, 0, 10, -214, 539, 532 ), new CharMetrics( 500, 0, 20, 0, 480, 532 ), new CharMetrics( 389, 0, 48, -196, 365, 722 ), new CharMetrics( 280, 0, 84, -19, 196, 737 ), new CharMetrics( 389, 0, 24, -196, 341, 722 ), new CharMetrics( 584, 0, 61, 163, 523, 343 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 278, 0, 69, 0, 209, 532 ), new CharMetrics( 333, 0, -23, 604, 225, 750 ), new CharMetrics( 333, 0, 108, 604, 356, 750 ), new CharMetrics( 333, 0, -10, 604, 343, 750 ), new CharMetrics( 333, 0, -17, 610, 350, 737 ), new CharMetrics( 333, 0, -6, 604, 339, 678 ), new CharMetrics( 333, 0, -2, 604, 335, 750 ), new CharMetrics( 333, 0, 104, 614, 230, 729 ), new CharMetrics( 333, 0, 6, 614, 327, 729 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 59, 568, 275, 776 ), new CharMetrics( 333, 0, 6, -228, 245, 0 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 9, 604, 486, 750 ), new CharMetrics( 333, 0, 71, -228, 304, 0 ), new CharMetrics( 333, 0, -10, 604, 343, 750 ), new CharMetrics( 278, 0, 0, 0, 0, 0 ), new CharMetrics( 333, 0, 90, -186, 244, 532 ), new CharMetrics( 556, 0, 34, -118, 524, 628 ), new CharMetrics( 556, 0, 28, -16, 541, 718 ), new CharMetrics( 556, 0, -3, 76, 559, 636 ), new CharMetrics( 556, 0, -9, 0, 565, 698 ), new CharMetrics( 280, 0, 84, -19, 196, 737 ), new CharMetrics( 556, 0, 34, -184, 522, 727 ), new CharMetrics( 333, 0, 6, 614, 327, 729 ), new CharMetrics( 737, 0, -11, -19, 749, 737 ), new CharMetrics( 370, 0, 22, 276, 347, 737 ), new CharMetrics( 556, 0, 88, 76, 468, 484 ), new CharMetrics( 584, 0, 40, 108, 544, 419 ), new CharMetrics( 333, 0, 27, 215, 306, 345 ), new CharMetrics( 737, 0, -11, -19, 748, 737 ), new CharMetrics( 333, 0, -6, 604, 339, 678 ), new CharMetrics( 400, 0, 57, 426, 343, 712 ), new CharMetrics( 584, 0, 40, 0, 544, 506 ), new CharMetrics( 333, 0, 9, 283, 324, 710 ), new CharMetrics( 333, 0, 8, 271, 326, 710 ), new CharMetrics( 333, 0, 108, 604, 356, 750 ), new CharMetrics( 611, 0, 66, -207, 545, 532 ), new CharMetrics( 556, 0, -8, -191, 539, 700 ), new CharMetrics( 278, 0, 58, 172, 220, 334 ), new CharMetrics( 333, 0, 6, -228, 245, 0 ), new CharMetrics( 333, 0, 26, 283, 237, 710 ), new CharMetrics( 365, 0, 6, 276, 360, 737 ), new CharMetrics( 556, 0, 88, 76, 468, 484 ), new CharMetrics( 834, 0, 26, -19, 766, 710 ), new CharMetrics( 834, 0, 26, -19, 794, 710 ), new CharMetrics( 834, 0, 16, -19, 799, 710 ), new CharMetrics( 611, 0, 55, -195, 551, 532 ), new CharMetrics( 722, 0, 20, 0, 702, 936 ), new CharMetrics( 722, 0, 20, 0, 702, 936 ), new CharMetrics( 722, 0, 20, 0, 702, 936 ), new CharMetrics( 722, 0, 20, 0, 702, 923 ), new CharMetrics( 722, 0, 20, 0, 702, 915 ), new CharMetrics( 722, 0, 20, 0, 702, 962 ), new CharMetrics( 1000, 0, 5, 0, 954, 718 ), new CharMetrics( 722, 0, 44, -228, 684, 737 ), new CharMetrics( 667, 0, 76, 0, 621, 936 ), new CharMetrics( 667, 0, 76, 0, 621, 936 ), new CharMetrics( 667, 0, 76, 0, 621, 936 ), new CharMetrics( 667, 0, 76, 0, 621, 915 ), new CharMetrics( 278, 0, -50, 0, 214, 936 ), new CharMetrics( 278, 0, 64, 0, 329, 936 ), new CharMetrics( 278, 0, -37, 0, 316, 936 ), new CharMetrics( 278, 0, -21, 0, 300, 915 ), new CharMetrics( 722, 0, -5, 0, 685, 718 ), new CharMetrics( 722, 0, 69, 0, 654, 923 ), new CharMetrics( 778, 0, 44, -19, 734, 936 ), new CharMetrics( 778, 0, 44, -19, 734, 936 ), new CharMetrics( 778, 0, 44, -19, 734, 936 ), new CharMetrics( 778, 0, 44, -19, 734, 923 ), new CharMetrics( 778, 0, 44, -19, 734, 915 ), new CharMetrics( 584, 0, 40, 1, 545, 505 ), new CharMetrics( 778, 0, 33, -27, 744, 745 ), new CharMetrics( 722, 0, 72, -19, 651, 936 ), new CharMetrics( 722, 0, 72, -19, 651, 936 ), new CharMetrics( 722, 0, 72, -19, 651, 936 ), new CharMetrics( 722, 0, 72, -19, 651, 915 ), new CharMetrics( 667, 0, 15, 0, 653, 936 ), new CharMetrics( 667, 0, 76, 0, 627, 718 ), new CharMetrics( 611, 0, 69, -14, 579, 731 ), new CharMetrics( 556, 0, 29, -14, 527, 750 ), new CharMetrics( 556, 0, 29, -14, 527, 750 ), new CharMetrics( 556, 0, 29, -14, 527, 750 ), new CharMetrics( 556, 0, 29, -14, 527, 737 ), new CharMetrics( 556, 0, 29, -14, 527, 729 ), new CharMetrics( 556, 0, 29, -14, 527, 776 ), new CharMetrics( 889, 0, 29, -14, 858, 546 ), new CharMetrics( 556, 0, 34, -228, 524, 546 ), new CharMetrics( 556, 0, 23, -14, 528, 750 ), new CharMetrics( 556, 0, 23, -14, 528, 750 ), new CharMetrics( 556, 0, 23, -14, 528, 750 ), new CharMetrics( 556, 0, 23, -14, 528, 729 ), new CharMetrics( 278, 0, -50, 0, 209, 750 ), new CharMetrics( 278, 0, 69, 0, 329, 750 ), new CharMetrics( 278, 0, -37, 0, 316, 750 ), new CharMetrics( 278, 0, -21, 0, 300, 729 ), new CharMetrics( 611, 0, 34, -14, 578, 737 ), new CharMetrics( 611, 0, 65, 0, 546, 737 ), new CharMetrics( 611, 0, 34, -14, 578, 750 ), new CharMetrics( 611, 0, 34, -14, 578, 750 ), new CharMetrics( 611, 0, 34, -14, 578, 750 ), new CharMetrics( 611, 0, 34, -14, 578, 737 ), new CharMetrics( 611, 0, 34, -14, 578, 729 ), new CharMetrics( 584, 0, 40, -42, 544, 548 ), new CharMetrics( 611, 0, 22, -29, 589, 560 ), new CharMetrics( 611, 0, 66, -14, 545, 750 ), new CharMetrics( 611, 0, 66, -14, 545, 750 ), new CharMetrics( 611, 0, 66, -14, 545, 750 ), new CharMetrics( 611, 0, 66, -14, 545, 729 ), new CharMetrics( 556, 0, 10, -214, 539, 750 ), new CharMetrics( 611, 0, 62, -208, 578, 718 ), new CharMetrics( 556, 0, 10, -214, 539, 729 )}; SansSerifBold() { super( false, 718, -207, new CharMetrics( 0, 0, -170, -228, 1003, 962 ), metrics ); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/FontMetrics.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/FontMetri0000644000175000017500000000527610767707462033333 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: FontMetrics.java 638290 2008-03-18 09:45:22Z bentmann $ */ class FontMetrics { boolean fixedPitch; short ascent; short descent; CharMetrics bounds; CharMetrics[] charMetrics; FontMetrics( boolean fixedPitch, int ascent, int descent, CharMetrics bounds, CharMetrics[] metrics ) { this.fixedPitch = fixedPitch; this.ascent = (short) ascent; this.descent = (short) descent; this.bounds = bounds; this.charMetrics = metrics; } static FontMetrics find( int style ) throws Exception { String s = FontMetrics.class.getName(); String packageName = s.substring( 0, s.lastIndexOf( '.' ) ); StringBuffer buf = new StringBuffer( packageName + "." ); switch ( style ) { case RtfSink.STYLE_ROMAN: default: buf.append( "Serif" ); break; case RtfSink.STYLE_ITALIC: buf.append( "SerifItalic" ); break; case RtfSink.STYLE_BOLD: buf.append( "SerifBold" ); break; case RtfSink.STYLE_TYPEWRITER: buf.append( "Monospace" ); break; } String className = buf.toString(); Class classObject = Class.forName( className ); return (FontMetrics) classObject.newInstance(); } static class CharMetrics { short wx; short wy; short llx; short lly; short urx; short ury; CharMetrics( int wx, int wy, int llx, int lly, int urx, int ury ) { this.wx = (short) wx; this.wy = (short) wy; this.llx = (short) llx; this.lly = (short) lly; this.urx = (short) urx; this.ury = (short) ury; } } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/WMFWriter.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/WMFWriter0000644000175000017500000003345010767707462033245 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.util.Vector; /** * A Windows MetaFile writer. * * @version $Id: WMFWriter.java 638290 2008-03-18 09:45:22Z bentmann $ */ class WMFWriter { /** * See the libwmf library documentation * (http://www.wvware.com/wmf_doc_index.html) * for a description of WMF format. */ private static Record trailer = new Record( 0, null ); /** * standard header fields */ private short fileType; private short headerSize; private short version; private int fileSize; private short numOfObjects; private int maxRecordSize; private short numOfParams; private Vector records; WMFWriter() { fileType = 2; headerSize = 9; version = 0x0300; fileSize = headerSize + trailer.size(); numOfObjects = 0; maxRecordSize = trailer.size(); numOfParams = 0; records = new Vector(); } void add( Record record ) { records.addElement( record ); int size = record.size(); fileSize += size; if ( size > maxRecordSize ) { maxRecordSize = size; } } int size() { return fileSize; } void write( String fileName ) throws IOException { BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream( fileName ) ); write( out ); out.flush(); out.close(); } void write( OutputStream out ) throws IOException { write16( fileType, out ); write16( headerSize, out ); write16( version, out ); write32( fileSize, out ); write16( numOfObjects, out ); write32( maxRecordSize, out ); write16( numOfParams, out ); for ( int i = 0, n = records.size(); i < n; ++i ) { Record record = (Record) records.elementAt( i ); record.write( out ); } trailer.write( out ); } /** * Writes a 16-bit integer in little-endian format. */ static void write16( int word, OutputStream out ) throws IOException { out.write( word ); out.write( word >> 8 ); } /** * Writes a 32-bit integer in little-endian format. */ static void write32( int dword, OutputStream out ) throws IOException { out.write( dword ); out.write( dword >> 8 ); out.write( dword >> 16 ); out.write( dword >> 24 ); } void print( Writer out ) throws IOException { print16( fileType, out ); print16( headerSize, out ); print16( version, out ); print32( fileSize, out ); print16( numOfObjects, out ); print32( maxRecordSize, out ); print16( numOfParams, out ); out.write( System.getProperty( "line.separator" ) ); for ( int i = 0, n = records.size(); i < n; ++i ) { Record record = (Record) records.elementAt( i ); record.print( out ); } trailer.print( out ); } static void print16( int word, Writer out ) throws IOException { byte[] buf = new byte[2]; buf[0] = (byte) word; buf[1] = (byte) ( word >> 8 ); print( buf, 0, 2, out ); } static void print32( int dword, Writer out ) throws IOException { byte[] buf = new byte[4]; buf[0] = (byte) dword; buf[1] = (byte) ( dword >> 8 ); buf[2] = (byte) ( dword >> 16 ); buf[3] = (byte) ( dword >> 24 ); print( buf, 0, 4, out ); } static void print( byte[] buf, int off, int len, Writer out ) throws IOException { char[] cbuf = new char[2 * len]; for ( int i = off, j = 0, n = off + len; i < n; ++i ) { int d = ( buf[i] >> 4 ) & 0x0f; if ( d < 10 ) { cbuf[j++] = (char) ( '0' + d ); } else { cbuf[j++] = (char) ( 'a' + ( d - 10 ) ); } d = buf[i] & 0x0f; if ( d < 10 ) { cbuf[j++] = (char) ( '0' + d ); } else { cbuf[j++] = (char) ( 'a' + ( d - 10 ) ); } } out.write( cbuf ); } static void print( byte[] buf, int off, int len, Writer out, int lw ) throws IOException { String ls = System.getProperty( "line.separator" ); for ( int i = off; len > 0; ) { int n = Math.min( len, lw / 2 ); print( buf, i, n, out ); out.write( ls ); len -= n; i += n; } } /** * Standard data record. */ static class Record { protected int size; private short function; private short[] parameters; Record( int function, int[] parameters ) { this.function = (short) function; if ( parameters != null ) { this.parameters = new short[parameters.length]; for ( int i = 0; i < parameters.length; ++i ) { this.parameters[i] = (short) parameters[i]; } } size = 3 + ( parameters == null ? 0 : parameters.length ); } int size() { return size; } void write( OutputStream out ) throws IOException { write32( size, out ); write16( function, out ); if ( parameters != null ) { for ( int i = 0; i < parameters.length; ++i ) { write16( parameters[i], out ); } } } void print( Writer out ) throws IOException { print32( size, out ); print16( function, out ); if ( parameters != null ) { for ( int i = 0; i < parameters.length; ++i ) { print16( parameters[i], out ); } } } } /** * DIB data structure. */ static class Dib { /** * compression types */ static final int BI_RGB = 0; static final int BI_RLE8 = 1; static final int BI_RLE4 = 2; static final int BI_BITFIELDS = 3; /* * information header fields */ final int biSize = 40; // header size int biWidth; // image width int biHeight; // image height final short biPlanes = 1; // number of planes short biBitCount; // number of bits per pixel int biCompression; // compression type int biSizeImage; // image data size int biXPelsPerMeter; // horizontal resolution int biYPelsPerMeter; // vertical resolution int biClrUsed; // number of colors int biClrImportant; // number of required colors byte[] palette; // color palette byte[] bitmap; // bitmap data int size() { int size = biSize; if ( palette != null ) { size += palette.length; } if ( bitmap != null ) { if ( biSizeImage != 0 ) { size += biSizeImage; } else { size += bitmap.length; } } return size / 2; } void write( OutputStream out ) throws IOException { write32( biSize, out ); write32( biWidth, out ); write32( biHeight, out ); write16( biPlanes, out ); write16( biBitCount, out ); write32( biCompression, out ); write32( biSizeImage, out ); write32( biXPelsPerMeter, out ); write32( biYPelsPerMeter, out ); write32( biClrUsed, out ); write32( biClrImportant, out ); if ( palette != null ) { out.write( palette ); } if ( bitmap != null ) { if ( biSizeImage != 0 ) { out.write( bitmap, 0, biSizeImage ); } else { out.write( bitmap ); } } } void print( Writer out ) throws IOException { String ls = System.getProperty( "line.separator" ); print32( biSize, out ); print32( biWidth, out ); print32( biHeight, out ); print16( biPlanes, out ); print16( biBitCount, out ); out.write( ls ); print32( biCompression, out ); print32( biSizeImage, out ); print32( biXPelsPerMeter, out ); print32( biYPelsPerMeter, out ); print32( biClrUsed, out ); print32( biClrImportant, out ); out.write( ls ); if ( palette != null ) { WMFWriter.print( palette, 0, palette.length, out, 64 ); } if ( bitmap != null ) { int len = ( biSizeImage != 0 ) ? biSizeImage : bitmap.length; WMFWriter.print( bitmap, 0, len, out, 76 ); } } static int rlEncode8( byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff ) { int i1, i2, j, k, n; int len; for ( i1 = inOff, j = outOff, n = ( inOff + inLen ); i1 < n; ) { for ( i2 = ( i1 + 1 ), len = 1; i2 < n; ++i2, ++len ) { if ( inBuf[i2] != inBuf[i2 - 1] ) { break; } } if ( len > 1 ) { while ( len > 255 ) { outBuf[j++] = (byte) 255; outBuf[j++] = inBuf[i1]; len -= 255; } if ( len > 0 ) { outBuf[j++] = (byte) len; outBuf[j++] = inBuf[i1]; } i1 = i2; continue; } for ( ++i2; i2 < n; ++i2, ++len ) { if ( inBuf[i2] == inBuf[i2 - 1] ) { break; } } while ( len > 255 ) { outBuf[j++] = 0; outBuf[j++] = (byte) 255; for ( k = 0; k < 255; ++k ) { outBuf[j++] = inBuf[i1++]; } outBuf[j++] = (byte) 0; len -= 255; } if ( len > 2 ) { outBuf[j++] = 0; outBuf[j++] = (byte) len; for ( k = 0; k < len; ++k ) { outBuf[j++] = inBuf[i1++]; } if ( len % 2 != 0 ) { outBuf[j++] = 0; } } else { while ( len > 0 ) { outBuf[j++] = 1; outBuf[j++] = inBuf[i1++]; len -= 1; } } } return j - outOff; } } static class DibBitBltRecord extends Record { /** * parameter count */ static final int P_COUNT = 8; /** * parameter indexes */ static final int P_ROP_L = 0; static final int P_ROP_H = 1; static final int P_YSRC = 2; static final int P_XSRC = 3; static final int P_HEIGHT = 4; static final int P_WIDTH = 5; static final int P_YDST = 6; static final int P_XDST = 7; private Dib dib; DibBitBltRecord( int[] parameters, Dib dib ) { super( 0x0940, parameters ); size += dib.size(); this.dib = dib; } /** {@inheritDoc} */ void write( OutputStream out ) throws IOException { super.write( out ); dib.write( out ); } /** {@inheritDoc} */ void print( Writer out ) throws IOException { super.print( out ); dib.print( out ); } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/RtfSink.j0000644000175000017500000015224411244502502033205 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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.awt.Color; import java.io.BufferedOutputStream; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Writer; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; import java.util.TreeSet; import java.util.Vector; import org.apache.maven.doxia.sink.AbstractTextSink; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; /** * RTF Sink implementation. * * @version $Id: RtfSink.java 807178 2009-08-24 12:19:14Z vsiveton $ * @since 1.0 */ public class RtfSink extends AbstractTextSink { /** Paper width, 21 cm */ public static final double DEFAULT_PAPER_WIDTH = 21.; /*cm*/ /** Paper height, 29.7 cm */ public static final double DEFAULT_PAPER_HEIGHT = 29.7; /*cm*/ /** Paper top margin, 2 cm */ public static final double DEFAULT_TOP_MARGIN = 2.; /*cm*/ /** Paper bottom margin, 2 cm */ public static final double DEFAULT_BOTTOM_MARGIN = 2.; /*cm*/ /** Paper left margin, 2 cm */ public static final double DEFAULT_LEFT_MARGIN = 2.; /*cm*/ /** Paper right margin, 2 cm */ public static final double DEFAULT_RIGHT_MARGIN = 2.; /*cm*/ /** Font size, 10 pts */ public static final int DEFAULT_FONT_SIZE = 10; /*pts*/ /** Spacing, 10 pts */ public static final int DEFAULT_SPACING = 10; /*pts*/ /** Resolution, 72 dpi */ public static final int DEFAULT_RESOLUTION = 72; /*dpi*/ /** Image format, bmp */ public static final String DEFAULT_IMAGE_FORMAT = "bmp"; /** Image type, palette */ public static final String DEFAULT_IMAGE_TYPE = "palette"; /** Data format, ascii */ public static final String DEFAULT_DATA_FORMAT = "ascii"; /** Codepage, 1252 */ public static final int DEFAULT_CODE_PAGE = 1252; /** Constant DEFAULT_CHAR_SET=0 */ public static final int DEFAULT_CHAR_SET = 0; /** Constant IMG_FORMAT_BMP="bmp" */ public static final String IMG_FORMAT_BMP = "bmp"; /** Constant IMG_FORMAT_WMF="wmf" */ public static final String IMG_FORMAT_WMF = "wmf"; /** Constant IMG_TYPE_PALETTE="palette" */ public static final String IMG_TYPE_PALETTE = "palette"; /** Constant IMG_TYPE_RGB="rgb" */ public static final String IMG_TYPE_RGB = "rgb"; /** Constant IMG_DATA_ASCII="ascii" */ public static final String IMG_DATA_ASCII = "ascii"; /** Constant IMG_DATA_RAW="raw" */ public static final String IMG_DATA_RAW = "raw"; /** Constant STYLE_ROMAN=0 */ public static final int STYLE_ROMAN = 0; /** Constant STYLE_ITALIC=1 */ public static final int STYLE_ITALIC = 1; /** Constant STYLE_BOLD=2 */ public static final int STYLE_BOLD = 2; /** Constant STYLE_TYPEWRITER=3 */ public static final int STYLE_TYPEWRITER = 3; private static final int CONTEXT_UNDEFINED = 0; private static final int CONTEXT_VERBATIM = 1; private static final int CONTEXT_TABLE = 2; private static final int UNIT_MILLIMETER = 1; private static final int UNIT_CENTIMETER = 2; private static final int UNIT_INCH = 3; private static final int UNIT_PIXEL = 4; private static final int LIST_INDENT = 300; /*twips*/ private static final String LIST_ITEM_HEADER = "- "; private static final int DEFINITION_INDENT = 300; /*twips*/ private static final int CELL_HORIZONTAL_PAD = 60; /*twips*/ private static final int CELL_VERTICAL_PAD = 20; /*twips*/ private static final int BORDER_WIDTH = 15; /*twips*/ private double paperWidth = DEFAULT_PAPER_WIDTH; private double paperHeight = DEFAULT_PAPER_HEIGHT; private double topMargin = DEFAULT_TOP_MARGIN; private double bottomMargin = DEFAULT_BOTTOM_MARGIN; private double leftMargin = DEFAULT_LEFT_MARGIN; private double rightMargin = DEFAULT_RIGHT_MARGIN; protected int fontSize = DEFAULT_FONT_SIZE; private int resolution = DEFAULT_RESOLUTION; private String imageFormat = DEFAULT_IMAGE_FORMAT; private String imageType = DEFAULT_IMAGE_TYPE; private String imageDataFormat = DEFAULT_DATA_FORMAT; private boolean imageCompression = true; private int codePage = DEFAULT_CODE_PAGE; private int charSet = DEFAULT_CHAR_SET; private final Hashtable fontTable; private Context context; private Paragraph paragraph; protected Indentation indentation; protected Space space; private int listItemIndent; private final Vector numbering; private final Vector itemNumber; private int style = STYLE_ROMAN; private int sectionLevel; private boolean emptyHeader; private StringBuffer verbatim; private boolean frame; private Table table; private Row row; private Cell cell; private Line line; protected PrintWriter writer; protected OutputStream stream; // for raw image data /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ private Map warnMessages; // ----------------------------------------------------------------------- /** *

Constructor for RtfSink.

* * @throws java.io.IOException if any */ protected RtfSink() throws IOException { this( System.out ); } /** *

Constructor for RtfSink.

* * @param output not null * @throws java.io.IOException if any */ protected RtfSink( OutputStream output ) throws IOException { this( output, null ); } /** *

Constructor for RtfSink.

* * @param output not null * @param encoding a valid charset * @throws java.io.IOException if any */ protected RtfSink( OutputStream output, String encoding ) throws IOException { this.fontTable = new Hashtable(); this.numbering = new Vector(); this.itemNumber = new Vector(); Writer w; this.stream = new BufferedOutputStream( output ); // TODO: encoding should be consistent with codePage if ( encoding != null ) { w = new OutputStreamWriter( stream, encoding ); } else { w = new OutputStreamWriter( stream ); } this.writer = new PrintWriter( new BufferedWriter( w ) ); init(); } /** * setPaperSize. * * @param width in cm. * @param height in cm. */ public void setPaperSize( double width /*cm*/, double height /*cm*/ ) { paperWidth = width; paperHeight = height; } /** *

Setter for the field topMargin.

* * @param margin margin. */ public void setTopMargin( double margin ) { topMargin = margin; } /** *

Setter for the field bottomMargin.

* * @param margin margin. */ public void setBottomMargin( double margin ) { bottomMargin = margin; } /** *

Setter for the field leftMargin.

* * @param margin margin */ public void setLeftMargin( double margin ) { leftMargin = margin; } /** *

Setter for the field rightMargin.

* * @param margin margin */ public void setRightMargin( double margin ) { rightMargin = margin; } /** *

Setter for the field fontSize.

* * @param size in pts */ public void setFontSize( int size /*pts*/ ) { fontSize = size; } /** *

setSpacing.

* * @param spacing in pts. */ public void setSpacing( int spacing /*pts*/ ) { space.set( 20 * spacing ); } /** *

Setter for the field resolution.

* * @param resolution in dpi */ public void setResolution( int resolution /*dpi*/ ) { this.resolution = resolution; } /** *

Setter for the field imageFormat.

* * @param format */ public void setImageFormat( String format ) { imageFormat = format; } /** *

Setter for the field imageType.

* * @param type */ public void setImageType( String type ) { imageType = type; } /** *

Setter for the field imageDataFormat.

* * @param format */ public void setImageDataFormat( String format ) { imageDataFormat = format; } /** *

Setter for the field imageCompression.

* * @param compression */ public void setImageCompression( boolean compression ) { imageCompression = compression; } /** *

Setter for the field codePage.

* * @param cp */ public void setCodePage( int cp ) { codePage = cp; } /** *

Setter for the field charSet.

* * @param cs */ public void setCharSet( int cs ) { charSet = cs; } /** {@inheritDoc} */ public void head() { init(); writer.println( "{\\rtf1\\ansi\\ansicpg" + codePage + "\\deff0" ); writer.println( "{\\fonttbl" ); writer.println( "{\\f0\\froman\\fcharset" + charSet + " Times;}" ); writer.println( "{\\f1\\fmodern\\fcharset" + charSet + " Courier;}" ); writer.println( "}" ); writer.println( "{\\stylesheet" ); for ( int level = 1; level <= 5; ++level ) { writer.print( "{\\s" + styleNumber( level ) ); writer.print( "\\outlinelevel" + level ); writer.print( " Section Title " + level ); writer.println( ";}" ); } writer.println( "}" ); writer.println( "\\paperw" + toTwips( paperWidth, UNIT_CENTIMETER ) ); writer.println( "\\paperh" + toTwips( paperHeight, UNIT_CENTIMETER ) ); writer.println( "\\margl" + toTwips( leftMargin, UNIT_CENTIMETER ) ); writer.println( "\\margr" + toTwips( rightMargin, UNIT_CENTIMETER ) ); writer.println( "\\margt" + toTwips( topMargin, UNIT_CENTIMETER ) ); writer.println( "\\margb" + toTwips( bottomMargin, UNIT_CENTIMETER ) ); space.set( space.get() / 2 ); space.setNext( 0 ); emptyHeader = true; } /** {@inheritDoc} */ public void head_() { space.restore(); if ( emptyHeader ) { space.setNext( 0 ); } else { space.setNext( 2 * space.get() ); } } /** *

toTwips.

* * @param length a double. * @param unit a int. * @return a int. */ protected int toTwips( double length, int unit ) { double points; switch ( unit ) { case UNIT_MILLIMETER: points = ( length / 25.4 ) * 72.; break; case UNIT_CENTIMETER: points = ( length / 2.54 ) * 72.; break; case UNIT_INCH: points = length * 72.; break; case UNIT_PIXEL: default: points = ( length / resolution ) * 72.; break; } return (int) Math.rint( points * 20. ); } /** {@inheritDoc} */ public void title() { Paragraph p = new Paragraph( STYLE_BOLD, fontSize + 6 ); p.justification = Sink.JUSTIFY_CENTER; beginParagraph( p ); emptyHeader = false; } /** {@inheritDoc} */ public void title_() { endParagraph(); } /** {@inheritDoc} */ public void author() { Paragraph p = new Paragraph( STYLE_ROMAN, fontSize + 2 ); p.justification = Sink.JUSTIFY_CENTER; beginParagraph( p ); emptyHeader = false; } /** {@inheritDoc} */ public void author_() { endParagraph(); } /** {@inheritDoc} */ public void date() { Paragraph p = new Paragraph( STYLE_ROMAN, fontSize ); p.justification = Sink.JUSTIFY_CENTER; beginParagraph( p ); emptyHeader = false; } /** {@inheritDoc} */ public void date_() { endParagraph(); } /** {@inheritDoc} */ public void body() { // nop } /** {@inheritDoc} */ public void body_() { writer.println( "}" ); writer.flush(); } /** {@inheritDoc} */ public void section1() { sectionLevel = 1; } /** {@inheritDoc} */ public void section1_() { // nop } /** {@inheritDoc} */ public void section2() { sectionLevel = 2; } /** {@inheritDoc} */ public void section2_() { // nop } /** {@inheritDoc} */ public void section3() { sectionLevel = 3; } /** {@inheritDoc} */ public void section3_() { // nop } /** {@inheritDoc} */ public void section4() { sectionLevel = 4; } /** {@inheritDoc} */ public void section4_() { // nop } /** {@inheritDoc} */ public void section5() { sectionLevel = 5; } /** {@inheritDoc} */ public void section5_() { // nop } /** {@inheritDoc} */ public void sectionTitle() { int stl = STYLE_BOLD; int size = fontSize; switch ( sectionLevel ) { case 1: size = fontSize + 6; break; case 2: size = fontSize + 4; break; case 3: size = fontSize + 2; break; case 4: break; case 5: stl = STYLE_ROMAN; break; } Paragraph p = new Paragraph( stl, size ); p.style = styleNumber( sectionLevel ); beginParagraph( p ); } /** {@inheritDoc} */ public void sectionTitle_() { endParagraph(); } private int styleNumber( int level ) { return level; } /** {@inheritDoc} */ public void list() { indentation.add( LIST_INDENT ); space.set( space.get() / 2 ); } /** {@inheritDoc} */ public void list_() { indentation.restore(); space.restore(); } /** {@inheritDoc} */ public void listItem() { Paragraph p = new Paragraph(); p.leftIndent = indentation.get() + listItemIndent; p.firstLineIndent = ( -listItemIndent ); beginParagraph( p ); beginStyle( STYLE_BOLD ); writer.println( LIST_ITEM_HEADER ); endStyle(); indentation.add( listItemIndent ); space.set( space.get() / 2 ); } /** {@inheritDoc} */ public void listItem_() { endParagraph(); indentation.restore(); space.restore(); } /** {@inheritDoc} */ public void numberedList( int numbering ) { this.numbering.addElement( new Integer( numbering ) ); itemNumber.addElement( new Counter( 0 ) ); indentation.add( LIST_INDENT ); space.set( space.get() / 2 ); } /** {@inheritDoc} */ public void numberedList_() { numbering.removeElementAt( numbering.size() - 1 ); itemNumber.removeElementAt( itemNumber.size() - 1 ); indentation.restore(); space.restore(); } /** {@inheritDoc} */ public void numberedListItem() { ( (Counter) itemNumber.lastElement() ).increment(); int indent = 0; String header = getItemHeader(); Font font = getFont( STYLE_TYPEWRITER, fontSize ); if ( font != null ) { indent = textWidth( header, font ); } Paragraph p = new Paragraph(); p.leftIndent = indentation.get() + indent; p.firstLineIndent = ( -indent ); beginParagraph( p ); beginStyle( STYLE_TYPEWRITER ); writer.println( header ); endStyle(); indentation.add( indent ); space.set( space.get() / 2 ); } /** {@inheritDoc} */ public void numberedListItem_() { endParagraph(); indentation.restore(); space.restore(); } private String getItemHeader() { int nmb = ( (Integer) this.numbering.lastElement() ).intValue(); int iNmb = ( (Counter) this.itemNumber.lastElement() ).get(); StringBuffer buf = new StringBuffer(); switch ( nmb ) { case Sink.NUMBERING_DECIMAL: default: buf.append( iNmb ); buf.append( ". " ); while ( buf.length() < 4 ) { buf.append( ' ' ); } break; case Sink.NUMBERING_LOWER_ALPHA: buf.append( AlphaNumerals.toString( iNmb, true ) ); buf.append( ") " ); break; case Sink.NUMBERING_UPPER_ALPHA: buf.append( AlphaNumerals.toString( iNmb, false ) ); buf.append( ". " ); break; case Sink.NUMBERING_LOWER_ROMAN: buf.append( RomanNumerals.toString( iNmb, true ) ); buf.append( ") " ); while ( buf.length() < 6 ) { buf.append( ' ' ); } break; case Sink.NUMBERING_UPPER_ROMAN: buf.append( RomanNumerals.toString( iNmb, false ) ); buf.append( ". " ); while ( buf.length() < 6 ) { buf.append( ' ' ); } break; } return buf.toString(); } /** {@inheritDoc} */ public void definitionList() { int next = space.getNext(); indentation.add( LIST_INDENT ); space.set( space.get() / 2 ); space.setNext( next ); } /** {@inheritDoc} */ public void definitionList_() { indentation.restore(); space.restore(); } /** {@inheritDoc} */ public void definitionListItem() { int next = space.getNext(); space.set( space.get() / 2 ); space.setNext( next ); } /** {@inheritDoc} */ public void definitionListItem_() { space.restore(); } /** {@inheritDoc} */ public void definedTerm() { // nop } /** {@inheritDoc} */ public void definedTerm_() { endParagraph(); } /** {@inheritDoc} */ public void definition() { int next = space.getNext(); indentation.add( DEFINITION_INDENT ); space.set( space.get() / 2 ); space.setNext( next ); } /** {@inheritDoc} */ public void definition_() { endParagraph(); indentation.restore(); space.restore(); } /** {@inheritDoc} */ public void table() { // nop } /** {@inheritDoc} */ public void table_() { // nop } /** {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { table = new Table( justification, grid ); context.set( CONTEXT_TABLE ); } /** {@inheritDoc} */ public void tableRows_() { boolean bb = false; boolean br = false; int offset = ( pageWidth() - ( table.width() + indentation.get() ) ) / 2; int x0 = indentation.get() + offset; space.skip(); for ( int i = 0; i < table.rows.size(); ++i ) { Row r = (Row) table.rows.elementAt( i ); writer.print( "\\trowd" ); writer.print( "\\trleft" + x0 ); writer.print( "\\trgaph" + CELL_HORIZONTAL_PAD ); writer.println( "\\trrh" + r.height() ); if ( table.grid ) { if ( i == ( table.rows.size() - 1 ) ) { bb = true; } br = false; } for ( int j = 0, x = x0; j < table.numColumns; ++j ) { if ( table.grid ) { if ( j == ( table.numColumns - 1 ) ) { br = true; } setBorder( true, bb, true, br ); x += BORDER_WIDTH; } x += table.columnWidths[j]; writer.println( "\\clvertalc\\cellx" + x ); } for ( int j = 0; j < table.numColumns; ++j ) { if ( j >= r.cells.size() ) { break; } Cell c = (Cell) r.cells.elementAt( j ); writer.print( "\\pard\\intbl" ); setJustification( table.justification[j] ); writer.println( "\\plain\\f0\\fs" + ( 2 * fontSize ) ); for ( int k = 0; k < c.lines.size(); ++k ) { if ( k > 0 ) { writer.println( "\\line" ); } Line l = (Line) c.lines.elementAt( k ); for ( int n = 0; n < l.items.size(); ++n ) { Item item = (Item) l.items.elementAt( n ); writer.print( "{" ); setStyle( item.style ); writer.println( escape( item.text ) ); writer.println( "}" ); } } writer.println( "\\cell" ); } writer.println( "\\row" ); } context.restore(); } private int pageWidth() { double width = paperWidth - ( leftMargin + rightMargin ); return toTwips( width, UNIT_CENTIMETER ); } private void setBorder( boolean bt, boolean bb, boolean bl, boolean br ) { if ( bt ) { writer.println( "\\clbrdrt\\brdrs\\brdrw" + BORDER_WIDTH ); } if ( bb ) { writer.println( "\\clbrdrb\\brdrs\\brdrw" + BORDER_WIDTH ); } if ( bl ) { writer.println( "\\clbrdrl\\brdrs\\brdrw" + BORDER_WIDTH ); } if ( br ) { writer.println( "\\clbrdrr\\brdrs\\brdrw" + BORDER_WIDTH ); } } private void setJustification( int justification ) { switch ( justification ) { case Sink.JUSTIFY_LEFT: default: writer.println( "\\ql" ); break; case Sink.JUSTIFY_CENTER: writer.println( "\\qc" ); break; case Sink.JUSTIFY_RIGHT: writer.println( "\\qr" ); break; } } private void setStyle( int style ) { switch ( style ) { case STYLE_ITALIC: writer.println( "\\i" ); break; case STYLE_BOLD: writer.println( "\\b" ); break; case STYLE_TYPEWRITER: writer.println( "\\f1" ); break; default: break; } } /** {@inheritDoc} */ public void tableRow() { row = new Row(); } /** {@inheritDoc} */ public void tableRow_() { table.add( row ); } /** {@inheritDoc} */ public void tableHeaderCell() { tableCell(); } /** {@inheritDoc} */ public void tableHeaderCell_() { tableCell_(); } /** {@inheritDoc} */ public void tableCell() { cell = new Cell(); line = new Line(); } /** {@inheritDoc} */ public void tableCell_() { cell.add( line ); row.add( cell ); } /** {@inheritDoc} */ public void tableCaption() { Paragraph p = new Paragraph(); p.justification = Sink.JUSTIFY_CENTER; p.spaceBefore /= 2; beginParagraph( p ); } /** {@inheritDoc} */ public void tableCaption_() { endParagraph(); } /** {@inheritDoc} */ public void paragraph() { if ( paragraph == null ) { beginParagraph( new Paragraph() ); } } /** {@inheritDoc} */ public void paragraph_() { endParagraph(); } private void beginParagraph( Paragraph p ) { p.begin(); this.paragraph = p; if ( style != STYLE_ROMAN ) { beginStyle( style ); } } private void endParagraph() { if ( paragraph != null ) { if ( style != STYLE_ROMAN ) { endStyle(); } paragraph.end(); paragraph = null; } } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { verbatim = new StringBuffer(); frame = boxed; context.set( CONTEXT_VERBATIM ); } /** {@inheritDoc} */ public void verbatim_() { String text = verbatim.toString(); Paragraph p = new Paragraph(); p.fontStyle = STYLE_TYPEWRITER; p.frame = frame; beginParagraph( p ); StringTokenizer t = new StringTokenizer( text, EOL, true ); while ( t.hasMoreTokens() ) { String s = t.nextToken(); if ( s.equals( EOL ) && t.hasMoreTokens() ) { writer.println( "\\line" ); } else { writer.println( escape( s ) ); } } endParagraph(); context.restore(); } /** {@inheritDoc} */ public void figure() { // nop } /** {@inheritDoc} */ public void figure_() { // nop } /** {@inheritDoc} */ public void figureGraphics( String name ) { Paragraph p = new Paragraph(); p.justification = Sink.JUSTIFY_CENTER; beginParagraph( p ); try { writeImage( name ); } catch ( Exception e ) { getLog().error( e.getMessage(), e ); } endParagraph(); } private void writeImage( String source ) throws Exception { if ( !source.toLowerCase().endsWith( ".ppm" ) ) { // TODO support more image types! String msg = "Unsupported image type for image file: '" + source + "'. Only PPM image type is " + "currently supported."; logMessage( "unsupportedImage", msg ); return; } int bytesPerLine; PBMReader ppm = new PBMReader( source ); WMFWriter.Dib dib = new WMFWriter.Dib(); WMFWriter wmf = new WMFWriter(); int srcWidth = ppm.width(); int srcHeight = ppm.height(); dib.biWidth = srcWidth; dib.biHeight = srcHeight; dib.biXPelsPerMeter = (int) ( resolution * 100. / 2.54 ); dib.biYPelsPerMeter = dib.biXPelsPerMeter; if ( imageType.equals( IMG_TYPE_RGB ) ) { dib.biBitCount = 24; dib.biCompression = WMFWriter.Dib.BI_RGB; // no compression bytesPerLine = 4 * ( ( 3 * srcWidth + 3 ) / 4 ); dib.bitmap = new byte[srcHeight * bytesPerLine]; byte[] l = new byte[3 * srcWidth]; for ( int i = ( srcHeight - 1 ); i >= 0; --i ) { ppm.read( l, 0, l.length ); for ( int j = 0, k = ( i * bytesPerLine ); j < l.length; j += 3 ) { // component order = BGR dib.bitmap[k++] = l[j + 2]; dib.bitmap[k++] = l[j + 1]; dib.bitmap[k++] = l[j]; } } } else { dib.biBitCount = 8; bytesPerLine = 4 * ( ( srcWidth + 3 ) / 4 ); byte[] bitmap = new byte[srcHeight * bytesPerLine]; Vector colors = new Vector( 256 ); colors.addElement( Color.white ); colors.addElement( Color.black ); byte[] l = new byte[3 * srcWidth]; for ( int i = ( srcHeight - 1 ); i >= 0; --i ) { ppm.read( l, 0, l.length ); for ( int j = 0, k = ( i * bytesPerLine ); j < l.length; ) { int r = (int) l[j++] & 0xff; int g = (int) l[j++] & 0xff; int b = (int) l[j++] & 0xff; Color color = new Color( r, g, b ); int index = colors.indexOf( color ); if ( index < 0 ) { if ( colors.size() < colors.capacity() ) { colors.addElement( color ); index = colors.size() - 1; } else { index = 1; } } bitmap[k++] = (byte) index; } } dib.biClrUsed = colors.size(); dib.biClrImportant = dib.biClrUsed; dib.palette = new byte[4 * dib.biClrUsed]; for ( int i = 0, j = 0; i < dib.biClrUsed; ++i, ++j ) { Color color = (Color) colors.elementAt( i ); dib.palette[j++] = (byte) color.getBlue(); dib.palette[j++] = (byte) color.getGreen(); dib.palette[j++] = (byte) color.getRed(); } if ( imageCompression ) { dib.biCompression = WMFWriter.Dib.BI_RLE8; dib.bitmap = new byte[bitmap.length + ( 2 * ( bitmap.length / 255 + 1 ) )]; dib.biSizeImage = WMFWriter.Dib.rlEncode8( bitmap, 0, bitmap.length, dib.bitmap, 0 ); } else { dib.biCompression = WMFWriter.Dib.BI_RGB; dib.bitmap = bitmap; } } if ( imageFormat.equals( IMG_FORMAT_WMF ) ) { int[] parameters; WMFWriter.Record record; /* * See the libwmf library documentation * (http://www.wvware.com/wmf_doc_index.html) * for a description of WMF records. */ // set mapping mode to MM_TEXT (logical unit = pixel) parameters = new int[1]; parameters[0] = 1; record = new WMFWriter.Record( 0x0103, parameters ); wmf.add( record ); // set window origin and dimensions parameters = new int[2]; record = new WMFWriter.Record( 0x020b, parameters ); wmf.add( record ); parameters = new int[2]; parameters[0] = srcHeight; parameters[1] = srcWidth; record = new WMFWriter.Record( 0x020c, parameters ); wmf.add( record ); parameters = new int[WMFWriter.DibBitBltRecord.P_COUNT]; // raster operation = SRCCOPY (0x00cc0020) parameters[WMFWriter.DibBitBltRecord.P_ROP_H] = 0x00cc; parameters[WMFWriter.DibBitBltRecord.P_ROP_L] = 0x0020; parameters[WMFWriter.DibBitBltRecord.P_WIDTH] = srcWidth; parameters[WMFWriter.DibBitBltRecord.P_HEIGHT] = srcHeight; record = new WMFWriter.DibBitBltRecord( parameters, dib ); wmf.add( record ); } if ( imageFormat.equals( IMG_FORMAT_WMF ) ) { writer.print( "{\\pict\\wmetafile1" ); writer.println( "\\picbmp\\picbpp" + dib.biBitCount ); } else { writer.print( "{\\pict\\dibitmap0\\wbmplanes1" ); writer.print( "\\wbmbitspixel" + dib.biBitCount ); writer.println( "\\wbmwidthbytes" + bytesPerLine ); } writer.print( "\\picw" + srcWidth ); writer.print( "\\pich" + srcHeight ); writer.print( "\\picwgoal" + toTwips( srcWidth, UNIT_PIXEL ) ); writer.println( "\\pichgoal" + toTwips( srcHeight, UNIT_PIXEL ) ); if ( imageFormat.equals( IMG_FORMAT_WMF ) ) { if ( imageDataFormat.equals( IMG_DATA_RAW ) ) { writer.print( "\\bin" + ( 2 * wmf.size() ) + " " ); writer.flush(); wmf.write( stream ); stream.flush(); } else { wmf.print( writer ); } } else { if ( imageDataFormat.equals( IMG_DATA_RAW ) ) { writer.print( "\\bin" + ( 2 * dib.size() ) + " " ); writer.flush(); dib.write( stream ); stream.flush(); } else { dib.print( writer ); } } writer.println( "}" ); } /** {@inheritDoc} */ public void figureCaption() { Paragraph p = new Paragraph(); p.justification = Sink.JUSTIFY_CENTER; p.spaceBefore /= 2; beginParagraph( p ); } /** {@inheritDoc} */ public void figureCaption_() { endParagraph(); } /** {@inheritDoc} */ public void horizontalRule() { writer.print( "\\pard\\li" + indentation.get() ); int skip = space.getNext(); if ( skip > 0 ) { writer.print( "\\sb" + skip ); } space.setNext( skip ); writer.print( "\\brdrb\\brdrs\\brdrw" + BORDER_WIDTH ); writer.println( "\\plain\\fs1\\par" ); } /** {@inheritDoc} */ public void pageBreak() { writer.println( "\\page" ); } /** {@inheritDoc} */ public void anchor( String name ) { // nop } /** {@inheritDoc} */ public void anchor_() { // nop } /** {@inheritDoc} */ public void link( String name ) { // nop } /** {@inheritDoc} */ public void link_() { // nop } /** {@inheritDoc} */ public void italic() { beginStyle( STYLE_ITALIC ); } /** {@inheritDoc} */ public void italic_() { endStyle(); } /** {@inheritDoc} */ public void bold() { beginStyle( STYLE_BOLD ); } /** {@inheritDoc} */ public void bold_() { endStyle(); } /** {@inheritDoc} */ public void monospaced() { beginStyle( STYLE_TYPEWRITER ); } /** {@inheritDoc} */ public void monospaced_() { endStyle(); } private void beginStyle( int style ) { this.style = style; switch ( context.get() ) { case CONTEXT_TABLE: break; default: if ( paragraph != null ) { switch ( style ) { case STYLE_ITALIC: writer.println( "{\\i" ); break; case STYLE_BOLD: writer.println( "{\\b" ); break; case STYLE_TYPEWRITER: writer.println( "{\\f1" ); break; default: writer.println( "{" ); break; } } break; } } private void endStyle() { style = STYLE_ROMAN; switch ( context.get() ) { case CONTEXT_TABLE: break; default: if ( paragraph != null ) { writer.println( "}" ); } break; } } /** {@inheritDoc} */ public void lineBreak() { switch ( context.get() ) { case CONTEXT_TABLE: cell.add( line ); line = new Line(); break; default: writer.println( "\\line" ); break; } } /** {@inheritDoc} */ public void nonBreakingSpace() { switch ( context.get() ) { case CONTEXT_TABLE: line.add( new Item( style, " " ) ); break; default: writer.println( "\\~" ); break; } } /** {@inheritDoc} */ public void text( String text ) { switch ( context.get() ) { case CONTEXT_VERBATIM: verbatim.append( text ); break; case CONTEXT_TABLE: StringTokenizer t = new StringTokenizer( text, EOL, true ); while ( t.hasMoreTokens() ) { String token = t.nextToken(); if ( token.equals( EOL ) ) { cell.add( line ); line = new Line(); } else { line.add( new Item( style, normalize( token ) ) ); } } break; default: if ( paragraph == null ) { beginParagraph( new Paragraph() ); } writer.println( escape( normalize( text ) ) ); } } /** * {@inheritDoc} * * Unkown events just log a warning message but are ignored otherwise. * @see org.apache.maven.doxia.sink.Sink#unknown(String,Object[],SinkEventAttributes) */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { String msg = "Unknown Sink event: '" + name + "', ignoring!"; logMessage( "unknownEvent", msg ); } private static String normalize( String s ) { int length = s.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = s.charAt( i ); if ( Character.isWhitespace( c ) ) { if ( buffer.length() == 0 || buffer.charAt( buffer.length() - 1 ) != ' ' ) { buffer.append( ' ' ); } } else { buffer.append( c ); } } return buffer.toString(); } private static String escape( String s ) { int length = s.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = s.charAt( i ); switch ( c ) { case '\\': buffer.append( "\\\\" ); break; case '{': buffer.append( "\\{" ); break; case '}': buffer.append( "\\}" ); break; default: buffer.append( c ); } } return buffer.toString(); } /** *

getFont.

* * @param style a int. * @param size a int. * @return a {@link org.apache.maven.doxia.module.rtf.Font} object. */ protected Font getFont( int style, int size ) { Font font = null; StringBuffer buf = new StringBuffer(); buf.append( style ); buf.append( size ); String key = buf.toString(); Object object = fontTable.get( key ); if ( object == null ) { try { font = new Font( style, size ); fontTable.put( key, font ); } catch ( Exception ignored ) { if ( getLog().isDebugEnabled() ) { getLog().debug( ignored.getMessage(), ignored ); } } } else { font = (Font) object; } return font; } private static int textWidth( String text, Font font ) { int width = 0; StringTokenizer t = new StringTokenizer( text, EOL ); while ( t.hasMoreTokens() ) { int w = font.textExtents( t.nextToken() ).width; if ( w > width ) { width = w; } } return width; } /** {@inheritDoc} */ public void flush() { writer.flush(); } /** {@inheritDoc} */ public void close() { writer.close(); if ( getLog().isWarnEnabled() && this.warnMessages != null ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } this.warnMessages = null; } init(); } /** * If debug mode is enabled, log the msg as is, otherwise add unique msg in warnMessages. * * @param key not null * @param msg not null * @see #close() * @since 1.1.1 */ private void logMessage( String key, String msg ) { msg = "[RTF Sink] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } /** {@inheritDoc} */ protected void init() { super.init(); this.fontTable.clear(); this.context = new Context(); this.paragraph = null; this.indentation = new Indentation( 0 ); this.space = new Space( 20 * DEFAULT_SPACING ); Font font = getFont( STYLE_BOLD, fontSize ); if ( font != null ) { this.listItemIndent = textWidth( LIST_ITEM_HEADER, font ); } this.numbering.clear(); this.itemNumber.clear(); this.style = STYLE_ROMAN; this.sectionLevel = 0; this.emptyHeader = false; this.verbatim = null; this.frame = false; this.table = null; this.row = null; this.cell = null; this.line = null; this.warnMessages = null; } // ----------------------------------------------------------------------- static class Counter { private int value; Counter( int value ) { set( value ); } void set( int value ) { this.value = value; } int get() { return value; } void increment() { increment( 1 ); } void increment( int value ) { this.value += value; } } static class Context { private int context = CONTEXT_UNDEFINED; private Vector stack = new Vector(); void set( int context ) { stack.addElement( new Integer( this.context ) ); this.context = context; } void restore() { if ( !stack.isEmpty() ) { context = ( (Integer) stack.lastElement() ).intValue(); stack.removeElementAt( stack.size() - 1 ); } } int get() { return context; } } class Paragraph { int style = 0; int justification = Sink.JUSTIFY_LEFT; int leftIndent = indentation.get(); int rightIndent = 0; int firstLineIndent = 0; int spaceBefore = space.getNext(); int spaceAfter = 0; boolean frame = false; int fontStyle = STYLE_ROMAN; int fontSize = RtfSink.this.fontSize; Paragraph() { // nop } Paragraph( int style, int size ) { fontStyle = style; fontSize = size; } void begin() { writer.print( "\\pard" ); if ( style > 0 ) { writer.print( "\\s" + style ); } switch ( justification ) { case Sink.JUSTIFY_LEFT: default: break; case Sink.JUSTIFY_CENTER: writer.print( "\\qc" ); break; case Sink.JUSTIFY_RIGHT: writer.print( "\\qr" ); break; } if ( leftIndent != 0 ) { writer.print( "\\li" + leftIndent ); } if ( rightIndent != 0 ) { writer.print( "\\ri" + rightIndent ); } if ( firstLineIndent != 0 ) { writer.print( "\\fi" + firstLineIndent ); } if ( spaceBefore != 0 ) { writer.print( "\\sb" + spaceBefore ); } if ( spaceAfter != 0 ) { writer.print( "\\sa" + spaceAfter ); } if ( frame ) { writer.print( "\\box\\brdrs\\brdrw" + BORDER_WIDTH ); } writer.print( "\\plain" ); switch ( fontStyle ) { case STYLE_ROMAN: default: writer.print( "\\f0" ); break; case STYLE_ITALIC: writer.print( "\\f0\\i" ); break; case STYLE_BOLD: writer.print( "\\f0\\b" ); break; case STYLE_TYPEWRITER: writer.print( "\\f1" ); break; } writer.println( "\\fs" + ( 2 * fontSize ) ); } void end() { writer.println( "\\par" ); } } class Space { private int space; private int next; private Vector stack = new Vector(); Space( int space /*twips*/ ) { this.space = space; next = space; } void set( int space /*twips*/ ) { stack.addElement( new Integer( this.space ) ); this.space = space; next = space; } int get() { return space; } void restore() { if ( !stack.isEmpty() ) { space = ( (Integer) stack.lastElement() ).intValue(); stack.removeElementAt( stack.size() - 1 ); next = space; } } void setNext( int space /*twips*/ ) { next = space; } int getNext() { int nxt = this.next; this.next = space; return nxt; } void skip() { skip( getNext() ); } void skip( int space /*twips*/ ) { writer.print( "\\pard" ); if ( ( space -= 10 ) > 0 ) { writer.print( "\\sb" + space ); } writer.println( "\\plain\\fs1\\par" ); } } static class Indentation { private int indent; private Vector stack = new Vector(); Indentation( int indent /*twips*/ ) { this.indent = indent; } void set( int indent /*twips*/ ) { stack.addElement( new Integer( this.indent ) ); this.indent = indent; } int get() { return indent; } void restore() { if ( !stack.isEmpty() ) { indent = ( (Integer) stack.lastElement() ).intValue(); stack.removeElementAt( stack.size() - 1 ); } } void add( int indent /*twips*/ ) { set( this.indent + indent ); } } static class Table { int numColumns; int[] columnWidths; int[] justification; boolean grid; Vector rows; Table( int[] justification, boolean grid ) { numColumns = justification.length; columnWidths = new int[numColumns]; this.justification = justification; this.grid = grid; rows = new Vector(); } void add( Row row ) { rows.addElement( row ); for ( int i = 0; i < numColumns; ++i ) { if ( i >= row.cells.size() ) { break; } Cell cell = (Cell) row.cells.elementAt( i ); int width = cell.boundingBox().width; if ( width > columnWidths[i] ) { columnWidths[i] = width; } } } int width() { int width = 0; for ( int i = 0; i < numColumns; ++i ) { width += columnWidths[i]; } if ( grid ) { width += ( numColumns + 1 ) * BORDER_WIDTH; } return width; } } static class Row { Vector cells = new Vector(); void add( Cell cell ) { cells.addElement( cell ); } int height() { int height = 0; int numCells = cells.size(); for ( int i = 0; i < numCells; ++i ) { Cell cell = (Cell) cells.elementAt( i ); Box box = cell.boundingBox(); if ( box.height > height ) { height = box.height; } } return height; } } class Cell { Vector lines = new Vector(); void add( Line line ) { lines.addElement( line ); } Box boundingBox() { int width = 0; int height = 0; for ( int i = 0; i < lines.size(); ++i ) { int w = 0; int h = 0; Line line = (Line) lines.elementAt( i ); for ( int j = 0; j < line.items.size(); ++j ) { Item item = (Item) line.items.elementAt( j ); Font font = getFont( item.style, fontSize ); if ( font == null ) { continue; } Font.TextExtents x = font.textExtents( item.text ); w += x.width; if ( x.height > h ) { h = x.height; } } if ( w > width ) { width = w; } height += h; } width += ( 2 * CELL_HORIZONTAL_PAD ); height += ( 2 * CELL_VERTICAL_PAD ); // allow one more pixel for grid outline width += toTwips( 1., UNIT_PIXEL ); return new Box( width, height ); } } static class Line { Vector items = new Vector(); void add( Item item ) { items.addElement( item ); } } static class Item { int style; String text; Item( int style, String text ) { this.style = style; this.text = text; } } static class Box { int width; int height; Box( int width, int height ) { this.width = width; this.height = height; } } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/MonospaceBold.javadoxia-1.1.4/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/Monospace0000644000175000017500000003230310767707462033337 0ustar twernertwernerpackage org.apache.maven.doxia.module.rtf; /* * 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. */ /** * @version $Id: MonospaceBold.java 638290 2008-03-18 09:45:22Z bentmann $ */ class MonospaceBold extends FontMetrics { static final CharMetrics[] metrics = {new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 202, -15, 398, 572 ), new CharMetrics( 600, 0, 135, 277, 465, 562 ), new CharMetrics( 600, 0, 56, -45, 544, 651 ), new CharMetrics( 600, 0, 82, -126, 519, 666 ), new CharMetrics( 600, 0, 5, -15, 595, 616 ), new CharMetrics( 600, 0, 36, -15, 546, 543 ), new CharMetrics( 600, 0, 171, 277, 423, 562 ), new CharMetrics( 600, 0, 219, -102, 461, 616 ), new CharMetrics( 600, 0, 139, -102, 381, 616 ), new CharMetrics( 600, 0, 91, 219, 509, 601 ), new CharMetrics( 600, 0, 71, 39, 529, 478 ), new CharMetrics( 600, 0, 123, -111, 393, 174 ), new CharMetrics( 600, 0, 100, 203, 500, 313 ), new CharMetrics( 600, 0, 192, -15, 408, 171 ), new CharMetrics( 600, 0, 98, -77, 502, 626 ), new CharMetrics( 600, 0, 87, -15, 513, 616 ), new CharMetrics( 600, 0, 81, 0, 539, 616 ), new CharMetrics( 600, 0, 61, 0, 499, 616 ), new CharMetrics( 600, 0, 63, -15, 501, 616 ), new CharMetrics( 600, 0, 53, 0, 507, 616 ), new CharMetrics( 600, 0, 70, -15, 521, 601 ), new CharMetrics( 600, 0, 90, -15, 521, 616 ), new CharMetrics( 600, 0, 55, 0, 494, 601 ), new CharMetrics( 600, 0, 83, -15, 517, 616 ), new CharMetrics( 600, 0, 79, -15, 510, 616 ), new CharMetrics( 600, 0, 191, -15, 407, 425 ), new CharMetrics( 600, 0, 123, -111, 408, 425 ), new CharMetrics( 600, 0, 66, 15, 523, 501 ), new CharMetrics( 600, 0, 71, 118, 529, 398 ), new CharMetrics( 600, 0, 77, 15, 534, 501 ), new CharMetrics( 600, 0, 98, -14, 501, 580 ), new CharMetrics( 600, 0, 16, -15, 584, 616 ), new CharMetrics( 600, 0, -9, 0, 609, 562 ), new CharMetrics( 600, 0, 30, 0, 573, 562 ), new CharMetrics( 600, 0, 22, -18, 560, 580 ), new CharMetrics( 600, 0, 30, 0, 594, 562 ), new CharMetrics( 600, 0, 25, 0, 560, 562 ), new CharMetrics( 600, 0, 39, 0, 570, 562 ), new CharMetrics( 600, 0, 22, -18, 594, 580 ), new CharMetrics( 600, 0, 20, 0, 580, 562 ), new CharMetrics( 600, 0, 77, 0, 523, 562 ), new CharMetrics( 600, 0, 37, -18, 601, 562 ), new CharMetrics( 600, 0, 21, 0, 599, 562 ), new CharMetrics( 600, 0, 39, 0, 578, 562 ), new CharMetrics( 600, 0, -2, 0, 602, 562 ), new CharMetrics( 600, 0, 8, -12, 610, 562 ), new CharMetrics( 600, 0, 22, -18, 578, 580 ), new CharMetrics( 600, 0, 48, 0, 559, 562 ), new CharMetrics( 600, 0, 32, -138, 578, 580 ), new CharMetrics( 600, 0, 24, 0, 599, 562 ), new CharMetrics( 600, 0, 47, -22, 553, 582 ), new CharMetrics( 600, 0, 21, 0, 579, 562 ), new CharMetrics( 600, 0, 4, -18, 596, 562 ), new CharMetrics( 600, 0, -13, 0, 613, 562 ), new CharMetrics( 600, 0, -18, 0, 618, 562 ), new CharMetrics( 600, 0, 12, 0, 588, 562 ), new CharMetrics( 600, 0, 12, 0, 589, 562 ), new CharMetrics( 600, 0, 62, 0, 539, 562 ), new CharMetrics( 600, 0, 245, -102, 475, 616 ), new CharMetrics( 600, 0, 99, -77, 503, 626 ), new CharMetrics( 600, 0, 125, -102, 355, 616 ), new CharMetrics( 600, 0, 108, 250, 492, 616 ), new CharMetrics( 600, 0, 0, -125, 600, -75 ), new CharMetrics( 600, 0, 178, 277, 428, 562 ), new CharMetrics( 600, 0, 35, -15, 570, 454 ), new CharMetrics( 600, 0, 0, -15, 584, 626 ), new CharMetrics( 600, 0, 40, -15, 545, 459 ), new CharMetrics( 600, 0, 20, -15, 591, 626 ), new CharMetrics( 600, 0, 40, -15, 563, 454 ), new CharMetrics( 600, 0, 83, 0, 547, 626 ), new CharMetrics( 600, 0, 30, -146, 580, 454 ), new CharMetrics( 600, 0, 5, 0, 592, 626 ), new CharMetrics( 600, 0, 77, 0, 523, 658 ), new CharMetrics( 600, 0, 63, -146, 440, 658 ), new CharMetrics( 600, 0, 20, 0, 585, 626 ), new CharMetrics( 600, 0, 77, 0, 523, 626 ), new CharMetrics( 600, 0, -22, 0, 626, 454 ), new CharMetrics( 600, 0, 18, 0, 592, 454 ), new CharMetrics( 600, 0, 30, -15, 570, 454 ), new CharMetrics( 600, 0, -1, -142, 570, 454 ), new CharMetrics( 600, 0, 20, -142, 591, 454 ), new CharMetrics( 600, 0, 47, 0, 580, 454 ), new CharMetrics( 600, 0, 68, -17, 535, 459 ), new CharMetrics( 600, 0, 47, -15, 532, 562 ), new CharMetrics( 600, 0, -1, -15, 569, 439 ), new CharMetrics( 600, 0, -1, 0, 601, 439 ), new CharMetrics( 600, 0, -18, 0, 618, 439 ), new CharMetrics( 600, 0, 6, 0, 594, 439 ), new CharMetrics( 600, 0, -4, -142, 601, 439 ), new CharMetrics( 600, 0, 81, 0, 520, 439 ), new CharMetrics( 600, 0, 160, -102, 464, 616 ), new CharMetrics( 600, 0, 255, -250, 345, 750 ), new CharMetrics( 600, 0, 136, -102, 440, 616 ), new CharMetrics( 600, 0, 71, 153, 530, 356 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 77, 0, 523, 439 ), new CharMetrics( 600, 0, 132, 508, 395, 661 ), new CharMetrics( 600, 0, 205, 508, 468, 661 ), new CharMetrics( 600, 0, 103, 483, 497, 657 ), new CharMetrics( 600, 0, 89, 493, 512, 636 ), new CharMetrics( 600, 0, 88, 505, 512, 585 ), new CharMetrics( 600, 0, 83, 468, 517, 631 ), new CharMetrics( 600, 0, 230, 485, 370, 625 ), new CharMetrics( 600, 0, 128, 485, 472, 625 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 198, 481, 402, 678 ), new CharMetrics( 600, 0, 205, -206, 387, 0 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 68, 488, 588, 661 ), new CharMetrics( 600, 0, 169, -199, 367, 0 ), new CharMetrics( 600, 0, 103, 493, 497, 667 ), new CharMetrics( 600, 0, 0, 0, 0, 0 ), new CharMetrics( 600, 0, 202, -146, 398, 449 ), new CharMetrics( 600, 0, 66, -49, 518, 614 ), new CharMetrics( 600, 0, 72, -28, 558, 611 ), new CharMetrics( 600, 0, 54, 49, 546, 517 ), new CharMetrics( 600, 0, 10, 0, 590, 562 ), new CharMetrics( 600, 0, 255, -175, 345, 675 ), new CharMetrics( 600, 0, 83, -70, 517, 580 ), new CharMetrics( 600, 0, 128, 485, 472, 625 ), new CharMetrics( 600, 0, 0, -18, 600, 580 ), new CharMetrics( 600, 0, 147, 196, 453, 580 ), new CharMetrics( 600, 0, 8, 70, 553, 446 ), new CharMetrics( 600, 0, 71, 103, 529, 413 ), new CharMetrics( 600, 0, 100, 203, 500, 313 ), new CharMetrics( 600, 0, 0, -18, 600, 580 ), new CharMetrics( 600, 0, 88, 505, 512, 585 ), new CharMetrics( 600, 0, 86, 243, 474, 616 ), new CharMetrics( 600, 0, 71, 24, 529, 515 ), new CharMetrics( 600, 0, 143, 230, 436, 616 ), new CharMetrics( 600, 0, 138, 222, 433, 616 ), new CharMetrics( 600, 0, 205, 508, 468, 661 ), new CharMetrics( 600, 0, -1, -142, 569, 439 ), new CharMetrics( 600, 0, 6, -70, 576, 580 ), new CharMetrics( 600, 0, 196, 165, 404, 351 ), new CharMetrics( 600, 0, 205, -206, 387, 0 ), new CharMetrics( 600, 0, 153, 230, 447, 616 ), new CharMetrics( 600, 0, 147, 196, 453, 580 ), new CharMetrics( 600, 0, 47, 70, 592, 446 ), new CharMetrics( 600, 0, -56, -60, 656, 661 ), new CharMetrics( 600, 0, -47, -60, 648, 661 ), new CharMetrics( 600, 0, -47, -60, 648, 661 ), new CharMetrics( 600, 0, 99, -146, 502, 449 ), new CharMetrics( 600, 0, -9, 0, 609, 784 ), new CharMetrics( 600, 0, -9, 0, 609, 784 ), new CharMetrics( 600, 0, -9, 0, 609, 780 ), new CharMetrics( 600, 0, -9, 0, 609, 759 ), new CharMetrics( 600, 0, -9, 0, 609, 748 ), new CharMetrics( 600, 0, -9, 0, 609, 801 ), new CharMetrics( 600, 0, -29, 0, 602, 562 ), new CharMetrics( 600, 0, 22, -206, 560, 580 ), new CharMetrics( 600, 0, 25, 0, 560, 784 ), new CharMetrics( 600, 0, 25, 0, 560, 784 ), new CharMetrics( 600, 0, 25, 0, 560, 780 ), new CharMetrics( 600, 0, 25, 0, 560, 748 ), new CharMetrics( 600, 0, 77, 0, 523, 784 ), new CharMetrics( 600, 0, 77, 0, 523, 784 ), new CharMetrics( 600, 0, 77, 0, 523, 780 ), new CharMetrics( 600, 0, 77, 0, 523, 748 ), new CharMetrics( 600, 0, 30, 0, 594, 562 ), new CharMetrics( 600, 0, 8, -12, 610, 759 ), new CharMetrics( 600, 0, 22, -18, 578, 784 ), new CharMetrics( 600, 0, 22, -18, 578, 784 ), new CharMetrics( 600, 0, 22, -18, 578, 780 ), new CharMetrics( 600, 0, 22, -18, 578, 759 ), new CharMetrics( 600, 0, 22, -18, 578, 748 ), new CharMetrics( 600, 0, 81, 39, 520, 478 ), new CharMetrics( 600, 0, 22, -22, 578, 584 ), new CharMetrics( 600, 0, 4, -18, 596, 784 ), new CharMetrics( 600, 0, 4, -18, 596, 784 ), new CharMetrics( 600, 0, 4, -18, 596, 780 ), new CharMetrics( 600, 0, 4, -18, 596, 748 ), new CharMetrics( 600, 0, 12, 0, 589, 784 ), new CharMetrics( 600, 0, 48, 0, 557, 562 ), new CharMetrics( 600, 0, 22, -15, 596, 626 ), new CharMetrics( 600, 0, 35, -15, 570, 661 ), new CharMetrics( 600, 0, 35, -15, 570, 661 ), new CharMetrics( 600, 0, 35, -15, 570, 657 ), new CharMetrics( 600, 0, 35, -15, 570, 636 ), new CharMetrics( 600, 0, 35, -15, 570, 625 ), new CharMetrics( 600, 0, 35, -15, 570, 678 ), new CharMetrics( 600, 0, -4, -15, 601, 454 ), new CharMetrics( 600, 0, 40, -206, 545, 459 ), new CharMetrics( 600, 0, 40, -15, 563, 661 ), new CharMetrics( 600, 0, 40, -15, 563, 661 ), new CharMetrics( 600, 0, 40, -15, 563, 657 ), new CharMetrics( 600, 0, 40, -15, 563, 625 ), new CharMetrics( 600, 0, 77, 0, 523, 661 ), new CharMetrics( 600, 0, 77, 0, 523, 661 ), new CharMetrics( 600, 0, 63, 0, 523, 657 ), new CharMetrics( 600, 0, 77, 0, 523, 625 ), new CharMetrics( 600, 0, 58, -27, 543, 626 ), new CharMetrics( 600, 0, 18, 0, 592, 636 ), new CharMetrics( 600, 0, 30, -15, 570, 661 ), new CharMetrics( 600, 0, 30, -15, 570, 661 ), new CharMetrics( 600, 0, 30, -15, 570, 657 ), new CharMetrics( 600, 0, 30, -15, 570, 636 ), new CharMetrics( 600, 0, 30, -15, 570, 625 ), new CharMetrics( 600, 0, 71, 16, 529, 500 ), new CharMetrics( 600, 0, 30, -24, 570, 463 ), new CharMetrics( 600, 0, -1, -15, 569, 661 ), new CharMetrics( 600, 0, -1, -15, 569, 661 ), new CharMetrics( 600, 0, -1, -15, 569, 657 ), new CharMetrics( 600, 0, -1, -15, 569, 625 ), new CharMetrics( 600, 0, -4, -142, 601, 661 ), new CharMetrics( 600, 0, -14, -142, 570, 626 ), new CharMetrics( 600, 0, -4, -142, 601, 625 )}; MonospaceBold() { super( true, 626, -142, new CharMetrics( 0, 0, -113, -250, 749, 801 ), metrics ); } } doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/0000755000175000017500000000000011632765560022640 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/pom.xml0000644000175000017500000000426011470562366024156 0ustar twernertwerner 4.0.0 doxia-modules org.apache.maven.doxia 1.1.4 ../pom.xml doxia-module-docbook-simple Doxia :: Simplified DocBook Module A Doxia module for Simplified DocBook source documents. org.codehaus.plexus plexus-utils org.codehaus.plexus plexus-maven-plugin src/main/components/components.xml target/generated-resources/plexus/META-INF/plexus/components.xml merge-descriptors doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/0000755000175000017500000000000011632765560023427 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/0000755000175000017500000000000011632765560024406 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/resources/0000755000175000017500000000000011632765560026420 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/resources/book.xml0000644000175000017500000001314010663062216030062 0ustar twernertwerner
Introduction This document aims to help new geotools developers get up to speed and track practices of existing developers in order to keep the project consistent. If you feel something is missing, feel free to contribute a new section.
Design
Geotools Logo Geotools Logo
To do: ExplainKey design structure (core interfaces, data sources, rendering, tools)Design Drivers (Our design goals: modular, derives structure from netbeans, support multiple version of java, ..)Directory structure
Development
Building To do:using antwhat ant checksinsert the "howto-build.html" doc into here
Code Versioning (using CVS) To do:Point to sourceforge CVS howto links.Also point to some HOWTOs for windows users.What is acceptable to commit to CVS, what is not. (Ie, code should compile)Talk about version numbering convention, use of branches, etc (if we decide to do this). To do:
Coding Standards To do:Using Sun's coding standard, need to note any exceptions to it.Note the auto checking of coding standards.Javadocs
Template File To do:Provide a template file.Link it to sections explaining the different parts of the template.Include headers, footers, example logging, example coding style, CVS key tags, sample javadocs.
Logging To do:Talk about log4j, links to
Testing To do:Explain use of junit. Might be a link to another web site.
Documentation To do:Talk about docbook, why we decided to use it (most commonly used format of LDP, converts to multiple formats, tools coming which can support it. Need to mention which version of docbook we are using.Mention tools that can be used.Links to docbook references.Process for updating this document.How to use ant tools to build doc.
Development Tools
Netbeans To do:Where to get it.Aim is to make geotools a module within NetbeansHow to setup getools to fit the multiple directory structureThe extra Netbeans modules that are useful and should be downloaded.
doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/resources/test.xml0000644000175000017500000001411411211670364030110 0ustar twernertwerner ]>
Geotools2 Developer Guide&flo; Cameron Shorter 22 May 2002 Guide to aid geotools2 development.
Introduction This document aims to help new geotools developers get up to speed and track practices of existing developers in order to keep the project consistent. If you feel something is missing, feel free to contribute a new section.
Design
Geotools Logo Geotools Logo
To do: ExplainKey design structure (core interfaces, data sources, rendering, tools)Design Drivers (Our design goals: modular, derives structure from netbeans, support multiple version of java, ..)Directory structure
Development
Building To do:using antwhat ant checksinsert the "howto-build.html" doc into here
Code Versioning (using CVS) To do:Point to sourceforge CVS howto links.Also point to some HOWTOs for windows users.What is acceptable to commit to CVS, what is not. (Ie, code should compile)Talk about version numbering convention, use of branches, etc (if we decide to do this). To do:
Coding Standards To do:Using Sun's coding standard, need to note any exceptions to it.Note the auto checking of coding standards.Javadocs
Template File To do:Provide a template file.Link it to sections explaining the different parts of the template.Include headers, footers, example logging, example coding style, CVS key tags, sample javadocs.
Logging To do:Talk about log4j, links to
Testing To do:Explain use of junit. Might be a link to another web site.
Documentation To do:Talk about docbook, why we decided to use it (most commonly used format of LDP, converts to multiple formats, tools coming which can support it. Need to mention which version of docbook we are using.Mention tools that can be used.Links to docbook references.Process for updating this document.How to use ant tools to build doc.
Development Tools
Netbeans To do:Where to get it.Aim is to make geotools a module within NetbeansHow to setup getools to fit the multiple directory structureThe extra Netbeans modules that are useful and should be downloaded.
doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/resources/sdocbook_full.xml0000644000175000017500000004216211215467777032002 0ustar twernertwerner
Title Or How I Learned to Live citetitle Configuring Menus CorpAuthor Date Assn. articleinfo Abstract Title articleinfo Abstract Content PhD Main Author Sr. D Director of Cooperative Efforts Cooperative Engineering Title super hero. Dr Peter Doe Sr. Spiderman Director of Cooperative Efforts Cooperative Engineering Title super hero. Authorgroup CorpAuthor Dr Authorgroup Author Sr. D Director of Cooperative Efforts Cooperative Engineering authorblurb title He's a super hero in his spare time. Dr Authorgroup Editor Sr. Spiderman Director of Cooperative Efforts Cooperative Engineering authorblurb title He's a super hero in his spare time. Dr Authorgroup OtherCredit Sr. AlterEgo Director of Cooperative Efforts Cooperative Engineering authorblurb title He's a super hero in his spare time. 1996 1997 me Edition Dr Peter Parker Sr. Spiderman Director of Cooperative Efforts Cooperative Engineering Title Peter's a super hero in his spare time. key1 key2 The Eiffel Tower Dr John Doe Sr. Spiderman Director of Cooperative Efforts Cooperative Engineering Title Peter's a super hero in his spare time. 1994 The TeX User's Group beta 15 3 No notice is required. 0.91 11 Dec 1996 ndw Bug fixes 0.90 30 Nov 1996 ndw long write up Electronic Publishing SGML (Computer program language) Abstract Title In brief.
A trivial example of recursive sections. Section title
Sub-section title
Sub-sub-section title
Sub-sub-sub-section title
Sub-sub-sub-sub-section title William Shakespeare Epigraph: What say you? The Assn. of Computing Machinery has published Developing SGML DTDs. In UNIX command ls with the option is used to get a directory listing. The output from the date command is eg Sun Nov 16, 1997 21:03:29. An email address is eg yo@tu.com. The symbolic constants for error numbers are defined in errno.h in /usr/include/sys. This software is provided as is. Execute the command with command filename. This is hosted at helio.com. The name pipipo is traded. The name pipipo is registered. The name pipipo is copyrighted. The name pipipo is serviced. The name pipipo is traded. At the system prompt, enter xyzzy. A Sidebar Sidebar content. A link to an element with an XRefLabel: . A straight link generates the cross-reference text: . Phaser sound effect A sound effect. Italic font. Bold font. Monospaced font. A Real Function real function()Error!
William Shakespeare Blockquote: What say you?
An annual percentage rate of 3.27%The prime rate. will be charged on all balances. List item 1. List item 2.Paragraph contained in list item 2. Sub-list item 1. Sub-list item 2. List item 3. Force end of list: Verbatim text not contained in list item 3 Numbered item 1. Numbered item A. Numbered item B. Numbered item 2. List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]]. Defined term 1of definition list. Defined term 2of definition list.Verbatim text in a box
Figure title Figure caption
Here is an inline image: . Table caption Centeredcell 1,1 Left-alignedcell 1,2 Right-alignedcell 1,3 cell 2,1 cell 2,2 cell 2,3
No grid, no caption: cell cell cell cell header header cell cell Horizontal Span a3a4a5 f1f2f3f4f5 b1b2b3b4 Vertical Span c1 Span Both c4 d1d4d5 a1a2a5 b1b2b3b4b5 c1c2c5 a1b1c1 a2 b2a1b2b1b2c1 b2a2b2b2b2c2 b2a3b2b3b2c3 c2 a3b3c3 Anchor. Link to Anchor. Link to http://www.pixware.fr. Link to showing alternate text. Link to Pixware home page. Upcoming Changes Future versions of this feature may not be backward-compatible.
A Test Bibliography Books The World Wide Web Journal 21. O'Reilly & Associates, Inc. and Winter, 1996. Demonstration Appendix This appendix demonstrates an appendix.
doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/0000755000175000017500000000000011632765560025327 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/0000755000175000017500000000000011632765560026116 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/0000755000175000017500000000000011632765560027337 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/0000755000175000017500000000000011632765560030445 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765560031551 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765560033036 5ustar twernertwerner././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/do0000755000175000017500000000000011632765560033361 5ustar twernertwerner././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocbookUtilsTest.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/do0000644000175000017500000001121711215352012033342 0ustar twernertwernerpackage 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 junit.framework.TestCase; import org.apache.maven.doxia.sink.Sink; /** * Test DocbookUtils. * * @author ltheussl * @version $Id: DocbookUtilsTest.java 784651 2009-06-15 04:54:34Z ltheussl $ */ public class DocbookUtilsTest extends TestCase { /** * Test of doxiaTableFrameAttribute method, of class DocbookUtils. */ public void testDoxiaTableFrameAttribute() { assertEquals( "box", DocbookUtils.doxiaTableFrameAttribute( "all" ) ); assertEquals( "below", DocbookUtils.doxiaTableFrameAttribute( "bottom" ) ); assertEquals( "void", DocbookUtils.doxiaTableFrameAttribute( "none" ) ); assertEquals( "vsides", DocbookUtils.doxiaTableFrameAttribute( "sides" ) ); assertEquals( "above", DocbookUtils.doxiaTableFrameAttribute( "top" ) ); assertEquals( "hsides", DocbookUtils.doxiaTableFrameAttribute( "topbot" ) ); try { DocbookUtils.doxiaTableFrameAttribute( "" ); fail(); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } } /** * Test of doxiaListNumbering method, of class DocbookUtils. */ public void testDoxiaListNumbering() { assertEquals( Sink.NUMBERING_LOWER_ALPHA, DocbookUtils.doxiaListNumbering( SimplifiedDocbookMarkup.LOWERALPHA_STYLE ) ); assertEquals( Sink.NUMBERING_LOWER_ROMAN, DocbookUtils.doxiaListNumbering( SimplifiedDocbookMarkup.LOWERROMAN_STYLE ) ); assertEquals( Sink.NUMBERING_UPPER_ALPHA, DocbookUtils.doxiaListNumbering( SimplifiedDocbookMarkup.UPPERALPHA_STYLE ) ); assertEquals( Sink.NUMBERING_UPPER_ROMAN, DocbookUtils.doxiaListNumbering( SimplifiedDocbookMarkup.UPPERROMAN_STYLE ) ); assertEquals( Sink.NUMBERING_DECIMAL, DocbookUtils.doxiaListNumbering( SimplifiedDocbookMarkup.ARABIC_STYLE ) ); try { DocbookUtils.doxiaListNumbering( "" ); fail(); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } } /** * Test of docbookListNumbering method, of class DocbookUtils. */ public void testDocbookListNumbering() { assertEquals( SimplifiedDocbookMarkup.UPPERALPHA_STYLE, DocbookUtils.docbookListNumbering( Sink.NUMBERING_UPPER_ALPHA ) ); assertEquals( SimplifiedDocbookMarkup.LOWERALPHA_STYLE, DocbookUtils.docbookListNumbering( Sink.NUMBERING_LOWER_ALPHA ) ); assertEquals( SimplifiedDocbookMarkup.UPPERROMAN_STYLE, DocbookUtils.docbookListNumbering( Sink.NUMBERING_UPPER_ROMAN ) ); assertEquals( SimplifiedDocbookMarkup.LOWERROMAN_STYLE, DocbookUtils.docbookListNumbering( Sink.NUMBERING_LOWER_ROMAN ) ); assertEquals( SimplifiedDocbookMarkup.ARABIC_STYLE, DocbookUtils.docbookListNumbering( Sink.NUMBERING_DECIMAL ) ); try { DocbookUtils.docbookListNumbering( -1 ); fail(); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } } /** * Test of trademarkFromClass method, of class DocbookUtils. */ public void testTrademarkFromClass() { assertEquals( '\u00AE', DocbookUtils.trademarkFromClass( "registered" ) ); assertEquals( '\u00A9', DocbookUtils.trademarkFromClass( "copyright" ) ); assertEquals( '\u2120', DocbookUtils.trademarkFromClass( "service" ) ); assertEquals( '\u2122', DocbookUtils.trademarkFromClass( "trade" ) ); try { DocbookUtils.trademarkFromClass( "" ); fail(); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } } } ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookSinkTest.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/do0000644000175000017500000001637111214446323033360 0ustar twernertwernerpackage 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.Writer; import java.util.Locale; import javax.swing.text.MutableAttributeSet; import javax.swing.text.SimpleAttributeSet; import org.apache.maven.doxia.sink.AbstractSinkTest; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkUtils; import org.apache.maven.doxia.util.DoxiaUtils; import org.codehaus.plexus.util.FileUtils; /** * @author Jason van Zyl * @version $Id: DocBookSinkTest.java 784100 2009-06-12 12:40:51Z ltheussl $ */ public class DocBookSinkTest extends AbstractSinkTest { /** {@inheritDoc} */ protected String outputExtension() { return "docbook"; } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new DocBookSink( writer, "UTF-8" ); } /** {@inheritDoc} */ protected boolean isXmlSink() { return true; } /** {@inheritDoc} */ protected String getTitleBlock( String title ) { return "" + title + ""; } /** {@inheritDoc} */ protected String getAuthorBlock( String author ) { return "" + author + ""; } /** {@inheritDoc} */ protected String getDateBlock( String date ) { return "" + date + ""; } /** {@inheritDoc} */ protected String getHeadBlock() { return "
"; } /** {@inheritDoc} */ protected String getBodyBlock() { return "
"; } /** {@inheritDoc} */ protected String getSectionTitleBlock( String title ) { return "" + title + ""; } /** {@inheritDoc} */ protected String getSection1Block( String title ) { return "
" + title + "" + "
"; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return "
" + title + "" + "
"; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { return "
" + title + "" + "
"; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { return "
" + title + "" + "
"; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { return "
" + title + "" + "
"; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return "" + item + "" + ""; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return "" + item + "" + ""; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return "" + definum + "" + "" + definition + "" + "" + ""; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { String format = FileUtils.extension( source ).toUpperCase( Locale.ENGLISH ); return "" + "" + "" + caption + ""; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { // Using the same set ordering than the JVM MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( "frame", "none" ); att.addAttribute( "rowsep", "0" ); att.addAttribute( "colsep", "0" ); return "" + caption + "" + "" + "" + cell + "" + "" + "" + ""; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getVerbatimBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return ""; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { return "" + anchor + ""; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { String linkend = DoxiaUtils.isInternalLink( link ) ? link.substring( 1 ) : link; return "" + text + ""; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return " "; } /** {@inheritDoc} */ protected String getTextBlock( String text ) { // TODO: retreive those from the sink return "~,_=,_-,_+,_*,_[,_],_<,_>,_{,_},_\\"; } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { // TODO return ""; } /** {@inheritDoc} */ protected String getCommentBlock( String text ) { return ""; } } ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookIdentityTest.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/do0000644000175000017500000000273011105652554033356 0ustar twernertwernerpackage 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.Writer; import org.apache.maven.doxia.module.AbstractIdentityTest; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.sink.Sink; /** * Check that piping a full model through a DocBookParser and a DocBookSink * leaves the model unchanged. The test is done in AbstractIdentityTest. */ public class DocBookIdentityTest extends AbstractIdentityTest { /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new DocBookSink( writer, "UTF-8" ); } /** {@inheritDoc} */ protected Parser createParser() { return new DocBookParser(); } } ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/do0000644000175000017500000004447711215432476033375 0ustar twernertwernerpackage 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.io.Reader; import java.io.Writer; import java.util.Iterator; import org.apache.maven.doxia.parser.AbstractParserTest; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; import org.codehaus.plexus.util.IOUtil; /** * @author Lars Trieloff * @version $Id: DocBookParserTest.java 784739 2009-06-15 11:49:18Z ltheussl $ */ public class DocBookParserTest extends AbstractParserTest { /** The parser to test. */ private DocBookParser parser; /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); parser = (DocBookParser) lookup( Parser.ROLE, "doc-book" ); } /** {@inheritDoc} */ protected Parser createParser() { return parser; } /** {@inheritDoc} */ protected String outputExtension() { return "xml"; } /** * Parses the test document test.xml and re-emits it into test.docbook. * * @throws IOException if something goes wrong * @throws ParseException if something goes wrong */ public void testTestDocument() throws IOException, ParseException { Writer writer = null; Reader reader = null; try { writer = getTestWriter( "test", "docbook" ); reader = getTestReader( "test" ); Sink sink = new DocBookSink( writer ); createParser().parse( reader, sink ); writer = getTestWriter( "sdocbook_full", "docbook" ); reader = getTestReader( "sdocbook_full" ); sink = new DocBookSink( writer ); createParser().parse( reader, sink ); } finally { IOUtil.close( reader ); IOUtil.close( writer ); } } /** @throws Exception */ public void testSignificantWhiteSpace() throws Exception { // NOTE significant white space String text = "word word"; SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement el = (SinkEventElement) it.next(); assertEquals( "text", el.getName() ); assertEquals( " ", (String) el.getArgs()[0] ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); // same test with EOL text = "word" + EOL + "word"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); el = (SinkEventElement) it.next(); assertEquals( "text", el.getName() ); assertEquals( EOL, (String) el.getArgs()[0] ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testIds() throws Exception { final String text = "
" + "TitleParagraph
"; final SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "head", event.getName() ); assertEquals( " id=article", event.getArgs()[0].toString() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "section1", event.getName() ); assertEquals( " id=section", event.getArgs()[0].toString() ); event = (SinkEventElement) it.next(); assertEquals( "sectionTitle1", event.getName() ); assertEquals( " id=title", event.getArgs()[0].toString() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "paragraph", event.getName() ); assertEquals( " id=para", event.getArgs()[0].toString() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testFigure() throws Exception { String text = "" + "" + "Figure caption"; final SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "figure", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureGraphics", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureCaption", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureCaption_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figure_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); sink.reset(); text = "
Title" + "" + "text
"; parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figure", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureGraphics", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figure_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testLinks() throws Exception { final String text = "Anchor." + "Link to Anchor." + "Link to url.com."; final SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); final Iterator it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "link", event.getName() ); assertEquals( "#Anchor", event.getArgs()[0].toString() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "link", event.getName() ); assertEquals( "url.com", event.getArgs()[0].toString() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testStyles() throws Exception { final String text = "ItalicBold" + "Monospaced"; final SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); final Iterator it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testLists() throws Exception { String text = "item"; final SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "list", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); text = "item"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "numberedList", event.getName() ); assertEquals( Sink.NUMBERING_UPPER_ALPHA, ( (Integer) event.getArgs()[0] ).intValue() ); assertEquals( "numberedListItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedListItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedList_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); text = "termdefinition" + ""; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "definitionList", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionListItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionListItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionList_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testTables() throws Exception { String text = "" + "" + "head 1head 2" + "12"; final SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "table", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testHead() throws Exception { String text = "
Title" + "CorpAuthorDate" + "Paragraph
"; final SinkEventTestingSink sink = new SinkEventTestingSink(); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "title", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "author", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "author_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "date", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "date_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } } doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/site/0000755000175000017500000000000011632765560024373 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/site/site.xml0000644000175000017500000000167211103330660026045 0ustar twernertwerner doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/0000755000175000017500000000000011632765560024353 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/components/0000755000175000017500000000000011632765560026540 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/components/components.xml0000644000175000017500000000350011066146406031436 0ustar twernertwerner org.apache.maven.doxia.parser.Parser doc-book org.apache.maven.doxia.module.docbook.DocBookParser Parse a <code>Docbook</code> document and emit events into the specified doxia Sink. org.apache.maven.doxia.sink.SinkFactory doc-book org.apache.maven.doxia.module.docbook.DocbookSinkFactory Docbook implementation of the Sink factory. org.apache.maven.doxia.module.site.SiteModule doc-book org.apache.maven.doxia.module.docbook.DocBookSiteModule doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/0000755000175000017500000000000011632765560025274 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/0000755000175000017500000000000011632765560026063 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/0000755000175000017500000000000011632765560027304 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/0000755000175000017500000000000011632765560030412 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765560031516 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765560033003 5ustar twernertwerner././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/doxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000755000175000017500000000000011632765560033326 5ustar twernertwerner././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookUtils.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000644000175000017500000001454011215411026033312 0ustar twernertwernerpackage 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 org.apache.maven.doxia.sink.Sink; /** * Utility methods for Doxia Docbook Parser and Sink. * * @author ltheussl * @version $Id: DocbookUtils.java 784698 2009-06-15 09:19:18Z ltheussl $ * @since 1.1.1 */ public final class DocbookUtils { /** * Translate a given Docbook table frame attribute value to a valid * Doxia table frame attribute value. * *

The input has to be one of "all", "bottom", * "none", "sides", "top" or "topbot", * otherwise an IllegalArgumentException is thrown.

* *

The corresponding output values are "box", "below", * "void", "vsides", "above" and "hsides".

* * @param frame a valid docbook table frame attribute as specified above, * otherwise an IllegalArgumentException is thrown. * @return a valid Doxia table frame attribute as specified above. */ public static String doxiaTableFrameAttribute( final String frame ) { String fr = frame; if ( "all".equals( fr ) ) { fr = "box"; } else if ( "bottom".equals( fr ) ) { fr = "below"; } else if ( "none".equals( fr ) ) { fr = "void"; } else if ( "sides".equals( fr ) ) { fr = "vsides"; } else if ( "top".equals( fr ) ) { fr = "above"; } else if ( "topbot".equals( fr ) ) { fr = "hsides"; } else { throw new IllegalArgumentException( "Not a valid frame attribute: " + fr ); } return fr; } /** * Convert a docbook ordered-list numbering style to a doxia numbering style. * *

The input has to be one of the style constants defined in {@link SimplifiedDocbookMarkup}, * otherwise an IllegalArgumentException is thrown.

* *

The output is one of the numbering constants defined in {@link Sink}.

* @param style a docbook ordered-list numbering style. * @return a doxia numbering style. */ public static int doxiaListNumbering( final String style ) { if ( SimplifiedDocbookMarkup.LOWERALPHA_STYLE.equals( style ) ) { return Sink.NUMBERING_LOWER_ALPHA; } else if ( SimplifiedDocbookMarkup.LOWERROMAN_STYLE.equals( style ) ) { return Sink.NUMBERING_LOWER_ROMAN; } else if ( SimplifiedDocbookMarkup.UPPERALPHA_STYLE.equals( style ) ) { return Sink.NUMBERING_UPPER_ALPHA; } else if ( SimplifiedDocbookMarkup.UPPERROMAN_STYLE.equals( style ) ) { return Sink.NUMBERING_UPPER_ROMAN; } else if ( SimplifiedDocbookMarkup.ARABIC_STYLE.equals( style ) ) { return Sink.NUMBERING_DECIMAL; } else { throw new IllegalArgumentException( "Not a valid numbering style: " + style ); } } /** * Convert a doxia numbering style to a docbook ordered-list numbering style. * *

The input has to be one of the numbering constants defined in {@link Sink}, * otherwise an IllegalArgumentException is thrown.

* *

The output is one of the style constants defined in {@link SimplifiedDocbookMarkup}.

* @param numbering a doxia numbering style. * @return a docbook ordered-list numbering style. */ public static String docbookListNumbering( final int numbering ) { switch ( numbering ) { case Sink.NUMBERING_UPPER_ALPHA: return SimplifiedDocbookMarkup.UPPERALPHA_STYLE; case Sink.NUMBERING_LOWER_ALPHA: return SimplifiedDocbookMarkup.LOWERALPHA_STYLE; case Sink.NUMBERING_UPPER_ROMAN: return SimplifiedDocbookMarkup.UPPERROMAN_STYLE; case Sink.NUMBERING_LOWER_ROMAN: return SimplifiedDocbookMarkup.LOWERROMAN_STYLE; case Sink.NUMBERING_DECIMAL: return SimplifiedDocbookMarkup.ARABIC_STYLE; default: throw new IllegalArgumentException( "Not a valid numbering: " + numbering ); } } /** * Get a trademark character from a class attribute. * *

The input String has to be one of "registered", "copyright", * "service" or "trade" otherwise an IllegalArgumentException is thrown.

* *

The corresponding output is '\u00AE', '\u00A9', * '\u2120' or '\u2122'.

* * @param trade a valid class atribute for the docbook <trademark> tag. * @return the corresponding unicode character. */ public static char trademarkFromClass( final String trade ) { if ( "registered".equals( trade ) ) { return '\u00AE'; } else if ( "copyright".equals( trade ) ) { return '\u00A9'; } else if ( "service".equals( trade ) ) { return '\u2120'; } else if ( "trade".equals( trade ) ) { return '\u2122'; } else { throw new IllegalArgumentException( "Not a trademark class: " + trade ); } } private DocbookUtils() { // utility class } } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookMarkup.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000644000175000017500000002767711206503471033337 0ustar twernertwernerpackage 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 javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.XmlMarkup; /** * List of DocBook markups. * TODO: only use Simplified DocBook elements, * remove full DocBook-only ones. * * @author Vincent Siveton * @version $Id: DocbookMarkup.java 778398 2009-05-25 11:55:37Z ltheussl $ * @since 1.0 * @deprecated This interface is incomplete and will be removed. Use {@link SimplifiedDocbookMarkup} instead. */ public interface DocbookMarkup extends XmlMarkup { /** DocBook V4.4 SGML public id: "-//OASIS//DTD DocBook V4.4//EN" */ String DEFAULT_SGML_PUBLIC_ID = "-//OASIS//DTD DocBook V4.4//EN"; /** DocBook XML V4.4 XML public id: "-//OASIS//DTD DocBook XML V4.4//EN" */ String DEFAULT_XML_PUBLIC_ID = "-//OASIS//DTD DocBook V4.4//EN"; /** DocBook XML V4.4 XML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" */ String DEFAULT_XML_SYSTEM_ID = "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"; /** DocBook XML V4.4 SGML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" */ String DEFAULT_SGML_SYSTEM_ID = "http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd"; // ---------------------------------------------------------------------- // Specific DocBook tags // ---------------------------------------------------------------------- /** DocBook tag for anchor */ Tag ANCHOR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "anchor"; } }; /** DocBook tag for article */ Tag ARTICLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "article"; } }; /** DocBook tag for articleinfo */ Tag ARTICLEINFO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "articleinfo"; } }; /** DocBook tag for book */ Tag BOOK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "book"; } }; /** DocBook tag for bookinfo */ Tag BOOKINFO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bookinfo"; } }; /** DocBook tag for chapter */ Tag CHAPTER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "chapter"; } }; /** DocBook tag for colspec */ Tag COLSPEC_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "colspec"; } }; /** DocBook tag for corpauthor */ Tag CORPAUTHOR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "corpauthor"; } }; /** DocBook tag for date */ Tag DATE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "date"; } }; /** DocBook tag for email */ Tag EMAIL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "email"; } }; /** DocBook tag for entry */ Tag ENTRY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "entry"; } }; /** DocBook tag for figure */ Tag FIGURE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "figure"; } }; /** DocBook tag for formalpara */ Tag FORMALPARA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "formalpara"; } }; /** DocBook tag for imagedata */ Tag IMAGEDATA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "imagedata"; } }; /** DocBook tag for imageobject */ Tag IMAGEOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "imageobject"; } }; /** DocBook tag for info */ Tag INFO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "info"; } }; /** DocBook tag for informalfigure */ Tag INFORMALFIGURE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "informalfigure"; } }; /** DocBook tag for informaltable */ Tag INFORMALTABLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "informaltable"; } }; /** DocBook tag for itemizedlist */ Tag ITEMIZEDLIST_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "itemizedlist"; } }; /** DocBook tag for link */ Tag LINK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "link"; } }; /** DocBook tag for listitem */ Tag LISTITEM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "listitem"; } }; /** DocBook tag for mediaobject */ Tag MEDIAOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "mediaobject"; } }; /** DocBook tag for orderedlist */ Tag ORDEREDLIST_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "orderedlist"; } }; /** DocBook tag for para */ Tag PARA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "para"; } }; /** DocBook tag for programlisting */ Tag PROGRAMLISTING_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "programlisting"; } }; /** DocBook tag for row */ Tag ROW_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "row"; } }; /** DocBook tag for section */ Tag SECTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "section"; } }; /** DocBook tag for simpara */ Tag SIMPARA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "simpara"; } }; /** DocBook tag for tbody */ Tag TBODY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "tbody"; } }; /** DocBook tag for term */ Tag TERM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "term"; } }; /** DocBook tag for tgroup */ Tag TGROUP_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "tgroup"; } }; /** DocBook tag for thead */ Tag THEAD_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "thead"; } }; /** DocBook tag for ulink */ Tag ULINK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "ulink"; } }; /** DocBook tag for url */ Tag URL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "url"; } }; /** DocBook tag for variablelist */ Tag VARIABLELIST_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "variablelist"; } }; /** DocBook tag for varlistentry */ Tag VARLISTENTRY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "varlistentry"; } }; /** DocBook tag for xref */ Tag XREF_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "xref"; } }; // ---------------------------------------------------------------------- // Specific Docbook attributes // ---------------------------------------------------------------------- /** DocBook attribute cols used in tgroup tags */ String COLS_ATTRIBUTE = "cols"; /** DocBook attribute colsep used in informaltable tags */ String COLSEP_ATTRIBUTE = "colsep"; /** DocBook attribute fileref used in orderedlist, imageobject tags */ String FILEREF_ATTRIBUTE = "fileref"; /** DocBook attribute format used in imagedata tags */ String FORMAT_ATTRIBUTE = "format"; /** DocBook attribute frame used in informaltable tags */ String FRAME_ATTRIBUTE = "frame"; /** DocBook attribute linkend used in link tag */ String LINKEND_ATTRIBUTE = "linkend"; /** DocBook attribute numeration used in orderedlist tag */ String NUMERATION_ATTRIBUTE = "numeration"; /** DocBook attribute rowsep used in informaltable tags */ String ROWSEP_ATTRIBUTE = "rowsep"; /** DocBook attribute url used in ulink tags */ String URL_ATTRIBUTE = "url"; // ---------------------------------------------------------------------- // Specific Docbook styles // ---------------------------------------------------------------------- /** Docbook style arabic used in numeration attribute */ String ARABIC_STYLE = "arabic"; /** DocBook style loweralpha used in numeration attribute */ String LOWERALPHA_STYLE = "loweralpha"; /** DocBook style lowerroman used in numeration attribute */ String LOWERROMAN_STYLE = "lowerroman"; /** DocBook style upperalpha used in numeration attribute */ String UPPERALPHA_STYLE = "upperalpha"; /** DocBook style upperroman used in numeration attribute */ String UPPERROMAN_STYLE = "upperroman"; } ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000644000175000017500000011233311244500736033322 0ustar twernertwernerpackage 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.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Parse a Simplified DocBook document * and emit events into the specified doxia Sink. * * @author Jason van Zyl * @version $Id: DocBookParser.java 807168 2009-08-24 12:04:46Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-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 parent = new Stack(); /** * The list of DocBook elements that introduce a new level of hierarchy. */ private static final Collection 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 META_ELEMENTS = new HashSet(); /** * Simplified DocBook elements that occur within <articleinfo> * and that are currently recognized by the parser. */ private static final Collection ARTICLEINFO_ELEMENTS = new HashSet(); /** * The list of DocBook elements that will be rendered verbatim */ private static final Collection VERBATIM_ELEMENTS = new HashSet(); /** * The list of DocBook elements that will be rendered inline and bold */ private static final Collection BOLD_ELEMENTS = new HashSet(); /** * The list of DocBook elements that will be rendered inline and italic */ private static final Collection ITALIC_ELEMENTS = new HashSet(); /** * The list of DocBook elements that will be rendered inline and monospace */ private static final Collection 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 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(); if ( "PB".equals( text.trim() ) ) { sink.pageBreak(); } else if ( "HR".equals( text.trim() ) ) { sink.horizontalRule(); } else if ( "LB".equals( text.trim() ) ) { sink.lineBreak(); } else if ( "anchor_end".equals( text.trim() ) ) { sink.anchor_(); } else { sink.comment( text.trim() ); } } /** {@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_(); } private boolean ignorable( String name ) { return IGNORABLE_ELEMENTS.contains( name ); } /** * Determines if the given element is a parent element. * * @param element the element to determine. * @return true if the given element is a parent element. */ private boolean isParent( String element ) { if ( parent.size() > 0 ) { return parent.peek().equals( element ); } return false; } private boolean linkStartTag( String name, Sink sink, SinkEventAttributeSet attribs ) throws XmlPullParserException { if ( name.equals( SimplifiedDocbookMarkup.ULINK_TAG.toString() ) ) { handleUlinkStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.LINK_TAG.toString() ) ) { handleLinkStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.XREF_TAG.toString() ) ) { handleXrefStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.ANCHOR_TAG.toString() ) ) { handleAnchorStart( sink, attribs ); } else { return false; } return true; } private boolean listStartTags( String name, Sink sink, SinkEventAttributeSet attribs ) { if ( name.equals( SimplifiedDocbookMarkup.ITEMIZEDLIST_TAG.toString() ) ) { handleItemizedListStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.ORDEREDLIST_TAG.toString() ) ) { handleOrderedListStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.LISTITEM_TAG.toString() ) ) { handleListItemStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.VARIABLELIST_TAG.toString() ) ) { handleVariableListStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.VARLISTENTRY_TAG.toString() ) ) { sink.definitionListItem( attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.TERM_TAG.toString() ) ) { sink.definedTerm( attribs ); } else { return false; } return true; } private boolean mediaStartTag( String name, Sink sink, SinkEventAttributeSet attribs ) throws XmlPullParserException { if ( name.equals( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG.toString() ) ) { handleFigureStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.IMAGEOBJECT_TAG.toString() ) || name.equals( SimplifiedDocbookMarkup.FIGURE_TAG.toString() ) ) { parent.push( name ); } else if ( name.equals( SimplifiedDocbookMarkup.IMAGEDATA_TAG.toString() ) ) { handleImageDataStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.CAPTION_TAG.toString() ) ) { handleCaptionStart( sink, attribs ); } else { return false; } return true; } private boolean styleStartTags( String name, Sink sink, SinkEventAttributeSet attribs ) { if ( VERBATIM_ELEMENTS.contains( name ) ) { sink.verbatim( SinkEventAttributeSet.BOXED ); } else if ( BOLD_ELEMENTS.contains( name ) && MONOSPACE_ELEMENTS.contains( name ) ) { sink.bold(); sink.monospaced(); } else if ( ITALIC_ELEMENTS.contains( name ) && MONOSPACE_ELEMENTS.contains( name ) ) { sink.italic(); sink.monospaced(); } else if ( BOLD_ELEMENTS.contains( name ) ) { sink.bold(); } else if ( ITALIC_ELEMENTS.contains( name ) && "bold".equals( attribs.getAttribute( "role" ) ) ) { sink.bold(); isBold = true; } else if ( ITALIC_ELEMENTS.contains( name ) ) { sink.italic(); } else if ( MONOSPACE_ELEMENTS.contains( name ) ) { sink.monospaced(); } else { return false; } return true; } private boolean tableStartTags( String name, Sink sink, SinkEventAttributeSet attribs ) { if ( name.equals( SimplifiedDocbookMarkup.ENTRYTBL_TAG.toString() ) ) { parent.push( name ); ignore = true; // insert empty table cell instead sink.tableCell( (SinkEventAttributeSet) null ); sink.tableCell_(); } else if ( name.equals( SimplifiedDocbookMarkup.TABLE_TAG.toString() ) || name.equals( SimplifiedDocbookMarkup.INFORMALTABLE_TAG.toString() ) ) { handleTableStart( sink, attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.THEAD_TAG.toString() ) || name.equals( SimplifiedDocbookMarkup.TFOOT_TAG.toString() ) || name.equals( SimplifiedDocbookMarkup.TBODY_TAG.toString() ) ) { parent.push( name ); } else if ( name.equals( SimplifiedDocbookMarkup.TGROUP_TAG.toString() ) ) { // this is required by the DTD final int cols = Integer.parseInt( (String) attribs.getAttribute( "cols" ) ); int[] justification = new int[cols]; int justif = Sink.JUSTIFY_LEFT; final Object align = attribs.getAttribute( SinkEventAttributeSet.ALIGN ); if ( align != null ) { final String al = align.toString(); if ( "right".equals( al ) ) { justif = Sink.JUSTIFY_RIGHT; } else if ( "center".equals( al ) ) { justif = Sink.JUSTIFY_CENTER; } } for ( int i = 0; i < justification.length; i++ ) { justification[i] = justif; } boolean grid = false; final Object rowsep = attribs.getAttribute( "rowsep" ); if ( rowsep != null && Integer.parseInt( (String) rowsep ) == 1 ) { grid = true; } final Object colsep = attribs.getAttribute( "colsep" ); if ( colsep != null && Integer.parseInt( (String) colsep ) == 1 ) { grid = true; } sink.tableRows( justification, grid ); } else if ( name.equals( SimplifiedDocbookMarkup.TR_TAG.toString() ) || name.equals( SimplifiedDocbookMarkup.ROW_TAG.toString() ) ) { sink.tableRow( attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.ENTRY_TAG.toString() ) && isParent( SimplifiedDocbookMarkup.THEAD_TAG.toString() ) || name.equals( SimplifiedDocbookMarkup.TH_TAG.toString() ) ) { sink.tableHeaderCell( attribs ); } else if ( name.equals( SimplifiedDocbookMarkup.ENTRY_TAG.toString() ) ) { sink.tableCell( attribs ); } else { return false; } return true; } } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000644000175000017500000012406411244500736033326 0ustar twernertwernerpackage 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.PrintWriter; import java.io.StringWriter; import java.io.Writer; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; import java.util.TreeSet; import javax.swing.text.MutableAttributeSet; import javax.swing.text.SimpleAttributeSet; import org.apache.maven.doxia.sink.AbstractXmlSink; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.StringUtils; /** * Docbook Sink implementation. *
* It uses the Docbook v4.4 DTD * http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd. * * @version $Id: DocBookSink.java 807168 2009-08-24 12:04:46Z vsiveton $ * @since 1.0 */ public class DocBookSink extends AbstractXmlSink implements DocbookMarkup, SimplifiedDocbookMarkup { /** DocBook V4.4 SGML public id: "-//OASIS//DTD DocBook V4.4//EN" * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_SGML_PUBLIC_ID} instead of. */ public static final String DEFAULT_SGML_PUBLIC_ID = DocbookMarkup.DEFAULT_SGML_PUBLIC_ID; /** DocBook XML V4.4 XML public id: "-//OASIS//DTD DocBook XML V4.4//EN" * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_XML_PUBLIC_ID} instead of. */ public static final String DEFAULT_XML_PUBLIC_ID = DocbookMarkup.DEFAULT_XML_PUBLIC_ID; /** DocBook XML V4.4 XML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_XML_SYSTEM_ID} instead of. */ public static final String DEFAULT_XML_SYSTEM_ID = DocbookMarkup.DEFAULT_XML_SYSTEM_ID; /** DocBook XML V4.4 SGML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_SGML_SYSTEM_ID} instead of. */ public static final String DEFAULT_SGML_SYSTEM_ID = DocbookMarkup.DEFAULT_SGML_SYSTEM_ID; /** The output writer. */ private PrintWriter out; /** xmlMode. */ private boolean xmlMode = false; /** styleSheet. */ private String styleSheet = null; /** language. */ private String lang = null; /** publicId. */ private String publicId = null; /** systemId. */ private String systemId = null; /** italicBegin. */ private String italicBeginTag; /** italicEnd. */ private String italicEndTag; /** boldBegin. */ private String boldBeginTag; /** boldEnd. */ private String boldEndTag; /** monospacedBegin. */ private String monospacedBeginTag; /** monospacedEnd. */ private String monospacedEndTag; /** horizontalRule. */ private String horizontalRuleElement; /** pageBreak. */ private String pageBreakElement; /** lineBreak. */ private String lineBreakElement; /** An image source file. */ private String graphicsFileName; /** hasTitle. */ private boolean hasTitle; /** authorDate. */ private boolean authorDateFlag; /** verbatim. */ private boolean verbatimFlag; /** externalLink. */ private boolean externalLinkFlag; /** tableHasCaption. */ private boolean tableHasCaption; /** Used for table rows. */ private PrintWriter savedOut; /** tableRows. */ private String tableRows; /** tableRows writer. */ private StringWriter tableRowsWriter; /** tableHasGrid. */ private boolean tableHasGrid; private boolean skip; private boolean paragraph; private String encoding; /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ private Map warnMessages; /** * Constructor, initialize the Writer. * * @param writer not null writer to write the result. Should be an UTF-8 Writer. * You could use newXmlWriter methods from {@link org.codehaus.plexus.util.WriterFactory}. */ protected DocBookSink( Writer writer ) { this( writer, null ); } /** * Constructor, initialize the Writer and tells which encoding is used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. */ protected DocBookSink( Writer writer, String encoding ) { this.out = new PrintWriter( writer ); this.encoding = encoding; setItalicElement( "" ); setBoldElement( "" ); setMonospacedElement( "" ); setHorizontalRuleElement( "" ); setPageBreakElement( "" ); setLineBreakElement( "" ); } /** * Constructor, initialize the Writer and tells which encoding and languageId are used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. * @param languageId language identifier for the root element as defined by * IETF BCP 47, Tags for the Identification of Languages; * in addition, the empty string may be specified. * @since 1.1 */ protected DocBookSink( Writer writer, String encoding, String languageId ) { this( writer, encoding ); this.lang = languageId; } /** *

escapeSGML

* * @param text The text to escape. * @param xmlMode xmlMode. * @return The escaped text. * @deprecated Use HtmlTools#escapeHTML(String,boolean). */ public static final String escapeSGML( String text, boolean xmlMode ) { return HtmlTools.escapeHTML( text, xmlMode ); } /** * Sets the xml mode. * * @param mode the mode to set. * @deprecated xml mode is not used. */ public void setXMLMode( boolean mode ) { this.xmlMode = mode; } /** * Returns the current xmlMode. * * @return the current xmlMode. * @deprecated xml mode is not used. */ public boolean isXMLMode() { return xmlMode; } /** * Sets the encoding. The encoding specified here must be consistent with then encoding * used in the Writer used by this DocBookSink instance. * * @param enc the encoding to set. */ public void setEncoding( String enc ) { encoding = enc; } /** * Returns the encoding. * * @return the encoding set (can be null). */ public String getEncoding() { return encoding; } /** * Sets the styleSheet. * * @param sheet the styleSheet to set. */ public void setStyleSheet( String sheet ) { this.styleSheet = sheet; } /** * Returns the current styleSheet. * * @return the current styleSheet. */ public String getStyleSheet() { return styleSheet; } /** * Sets the publicId. * * @param id the publicId to set. */ public void setPublicId( String id ) { this.publicId = id; } /** * Returns the current publicId. * * @return the current publicId. */ public String getPublicId() { return publicId; } /** * Sets the systemId. * * @param id the systemId to set. */ public void setSystemId( String id ) { this.systemId = id; } /** * Returns the current systemId. * * @return the current systemId. */ public String getSystemId() { return systemId; } /** * Sets the language. * * @param language the language to set. */ public void setLanguage( String language ) { this.lang = language; } /** * Returns the current language. * * @return the current language. */ public String getLanguage() { return lang; } /** * Sets the current italicBeginTag and constructs the corresponding end tag from it. * * @param tag the tag to set. If tag is null, the empty string is used. */ public void setItalicElement( String tag ) { if ( tag == null ) { tag = ""; } this.italicBeginTag = tag; italicEndTag = makeEndTag( italicBeginTag ); } /** * Constructs the corresponding end tag from the given begin tag. * * @param beginTag the begin tag to set. If null, the empty string is returned. * @return the corresponding end tag. */ private String makeEndTag( String beginTag ) { int length = beginTag.length(); if ( length == 0 ) { return ""; } if ( beginTag.charAt( 0 ) != '<' || beginTag.charAt( length - 1 ) != '>' ) { throw new IllegalArgumentException( "'" + beginTag + "', not a tag" ); } StringTokenizer tokens = new StringTokenizer( beginTag, "<> \t\n\r\f" ); if ( !tokens.hasMoreTokens() ) { throw new IllegalArgumentException( "'" + beginTag + "', invalid tag" ); } return ""; } /** * Returns the current italicBeginTag. * * @return the current italicBeginTag. Defaults to "". */ public String getItalicElement() { return italicBeginTag; } /** * Sets the current boldBeginTag and constructs the corresponding end tag from it. * * @param tag the tag to set. If tag is null, the empty string is used. */ public void setBoldElement( String tag ) { if ( tag == null ) { tag = ""; } this.boldBeginTag = tag; boldEndTag = makeEndTag( boldBeginTag ); } /** * Returns the current boldBeginTag. * * @return the current boldBeginTag. Defaults to "". */ public String getBoldElement() { return boldBeginTag; } /** * Sets the current monospacedBeginTag and constructs the corresponding end tag from it. * * @param tag the tag to set. If tag is null, the empty string is used. */ public void setMonospacedElement( String tag ) { if ( tag == null ) { tag = ""; } this.monospacedBeginTag = tag; monospacedEndTag = makeEndTag( monospacedBeginTag ); } /** * Returns the current monospacedBeginTag. * * @return the current monospacedBeginTag. Defaults to ">". */ public String getMonospacedElement() { return monospacedBeginTag; } /** * Sets the current horizontalRuleElement. * * @param element the element to set. */ public void setHorizontalRuleElement( String element ) { this.horizontalRuleElement = element; } /** * Returns the current horizontalRuleElement. * * @return the current horizontalRuleElement. Defaults to "". */ public String getHorizontalRuleElement() { return horizontalRuleElement; } /** * Sets the current pageBreakElement. * * @param element the element to set. */ public void setPageBreakElement( String element ) { this.pageBreakElement = element; } /** * Returns the current pageBreakElement. * * @return the current pageBreakElement. Defaults to "". */ public String getPageBreakElement() { return pageBreakElement; } /** * Sets the current lineBreakElement. * * @param element the element to set. */ public void setLineBreakElement( String element ) { this.lineBreakElement = element; } /** * Returns the current lineBreakElement. * * @return the current lineBreakElement. Defaults to "". */ public String getLineBreakElement() { return lineBreakElement; } /** * Reset all variables. * * @deprecated since 1.1.2, use {@link #init()} instead of. */ protected void resetState() { init(); } /** {@inheritDoc} */ protected void init() { hasTitle = false; authorDateFlag = false; verbatimFlag = false; externalLinkFlag = false; graphicsFileName = null; tableHasCaption = false; savedOut = null; tableRows = null; tableHasGrid = false; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#DEFAULT_XML_PUBLIC_ID * @see SimplifiedDocbookMarkup#DEFAULT_XML_SYSTEM_ID * @see SimplifiedDocbookMarkup#ARTICLE_TAG */ public void head() { init(); MutableAttributeSet att = writeXmlHeader( "article" ); writeStartTag( SimplifiedDocbookMarkup.ARTICLE_TAG, att ); } /** * writeXmlHeader. * * @param root not null. * @return an attribute set. * @see SimplifiedDocbookMarkup#DEFAULT_XML_PUBLIC_ID * @see SimplifiedDocbookMarkup#DEFAULT_XML_SYSTEM_ID * @see SimplifiedDocbookMarkup#ARTICLE_TAG * @since 1.1 */ protected MutableAttributeSet writeXmlHeader( String root ) { markup( "" ); if ( styleSheet != null ) { markup( "" ); } String pubId; markup( "" ); MutableAttributeSet att = new SimpleAttributeSet(); if ( lang != null ) { att.addAttribute( LANG_ATTRIBUTE, lang ); } return att; } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ARTICLEINFO_TAG */ public void head_() { if ( hasTitle ) { writeEndTag( SimplifiedDocbookMarkup.ARTICLEINFO_TAG ); hasTitle = false; } } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ARTICLEINFO_TAG * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void title() { writeStartTag( SimplifiedDocbookMarkup.ARTICLEINFO_TAG ); writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); hasTitle = true; } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void title_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#CORPAUTHOR_TAG */ public void author() { authorDateFlag = true; writeStartTag( SimplifiedDocbookMarkup.CORPAUTHOR_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#CORPAUTHOR_TAG */ public void author_() { writeEndTag( SimplifiedDocbookMarkup.CORPAUTHOR_TAG ); authorDateFlag = false; } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#DATE_TAG */ public void date() { authorDateFlag = true; writeStartTag( SimplifiedDocbookMarkup.DATE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#DATE_TAG */ public void date_() { writeEndTag( SimplifiedDocbookMarkup.DATE_TAG ); authorDateFlag = false; } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ARTICLE_TAG */ public void body_() { writeEndTag( SimplifiedDocbookMarkup.ARTICLE_TAG ); out.flush(); init(); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section1() { writeStartTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section1_() { writeEndTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section2() { writeStartTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section2_() { writeEndTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section3() { writeStartTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section3_() { writeEndTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section4() { writeStartTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section4_() { writeEndTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section5() { writeStartTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#SECTION_TAG */ public void section5_() { writeEndTag( SimplifiedDocbookMarkup.SECTION_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle() { writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle1() { writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle1_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle2() { writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle2_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle3() { writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle3_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle4() { writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle4_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle5() { writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void sectionTitle5_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ITEMIZEDLIST_TAG */ public void list() { paragraph_(); writeStartTag( SimplifiedDocbookMarkup.ITEMIZEDLIST_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ITEMIZEDLIST_TAG */ public void list_() { writeEndTag( SimplifiedDocbookMarkup.ITEMIZEDLIST_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#LISTITEM_TAG */ public void listItem() { writeStartTag( SimplifiedDocbookMarkup.LISTITEM_TAG ); paragraph(); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#LISTITEM_TAG */ public void listItem_() { paragraph_(); writeEndTag( SimplifiedDocbookMarkup.LISTITEM_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ORDEREDLIST_TAG * @see SimplifiedDocbookMarkup#NUMERATION_ATTRIBUTE */ public void numberedList( int numbering ) { String numeration = DocbookUtils.docbookListNumbering( numbering ); paragraph_(); MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.NUMERATION_ATTRIBUTE, numeration ); writeStartTag( SimplifiedDocbookMarkup.ORDEREDLIST_TAG, att ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ORDEREDLIST_TAG */ public void numberedList_() { writeEndTag( SimplifiedDocbookMarkup.ORDEREDLIST_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#LISTITEM_TAG */ public void numberedListItem() { writeStartTag( SimplifiedDocbookMarkup.LISTITEM_TAG ); paragraph(); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#LISTITEM_TAG */ public void numberedListItem_() { paragraph_(); writeEndTag( SimplifiedDocbookMarkup.LISTITEM_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#VARIABLELIST_TAG */ public void definitionList() { paragraph_(); writeStartTag( SimplifiedDocbookMarkup.VARIABLELIST_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#VARIABLELIST_TAG */ public void definitionList_() { writeEndTag( SimplifiedDocbookMarkup.VARIABLELIST_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#VARLISTENTRY_TAG */ public void definitionListItem() { writeStartTag( SimplifiedDocbookMarkup.VARLISTENTRY_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#VARLISTENTRY_TAG */ public void definitionListItem_() { writeEndTag( SimplifiedDocbookMarkup.VARLISTENTRY_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TERM_TAG */ public void definedTerm() { writeStartTag( SimplifiedDocbookMarkup.TERM_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TERM_TAG */ public void definedTerm_() { writeEndTag( SimplifiedDocbookMarkup.TERM_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#LISTITEM_TAG */ public void definition() { writeStartTag( SimplifiedDocbookMarkup.LISTITEM_TAG ); paragraph(); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#LISTITEM_TAG */ public void definition_() { paragraph_(); writeEndTag( SimplifiedDocbookMarkup.LISTITEM_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#PARA_TAG */ public void paragraph() { if ( !paragraph ) { writeStartTag( SimplifiedDocbookMarkup.PARA_TAG ); paragraph = true; } } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#PARA_TAG */ public void paragraph_() { if ( paragraph ) { writeEndTag( SimplifiedDocbookMarkup.PARA_TAG ); paragraph = false; } } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#PROGRAMLISTING_TAG */ public void verbatim( boolean boxed ) { verbatimFlag = true; paragraph_(); writeStartTag( SimplifiedDocbookMarkup.PROGRAMLISTING_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#PROGRAMLISTING_TAG */ public void verbatim_() { writeEndTag( SimplifiedDocbookMarkup.PROGRAMLISTING_TAG ); verbatimFlag = false; } /** {@inheritDoc} */ public void horizontalRule() { markup( horizontalRuleElement ); } /** {@inheritDoc} */ public void pageBreak() { markup( pageBreakElement ); } /** {@inheritDoc} */ public void figure() { writeStartTag( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG ); } /** {@inheritDoc} */ public void figure_() { writeEndTag( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG ); } /** *

graphicElement

* * @see SimplifiedDocbookMarkup#MEDIAOBJECT_TAG * @see SimplifiedDocbookMarkup#IMAGEOBJECT_TAG * @see SimplifiedDocbookMarkup#IMAGEDATA_TAG * @see SimplifiedDocbookMarkup#FORMAT_ATTRIBUTE * @see SimplifiedDocbookMarkup#FILEREF_ATTRIBUTE * @deprecated do not use! */ protected void graphicElement() { if ( graphicsFileName != null ) { String format = FileUtils.extension( graphicsFileName ).toUpperCase( Locale.ENGLISH ); if ( format.length() == 0 ) { format = "JPEG"; } writeStartTag( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG ); writeStartTag( SimplifiedDocbookMarkup.IMAGEOBJECT_TAG ); MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.FORMAT_ATTRIBUTE, format ); att.addAttribute( SimplifiedDocbookMarkup.FILEREF_ATTRIBUTE, HtmlTools.escapeHTML( graphicsFileName, true ) ); writeSimpleTag( SimplifiedDocbookMarkup.IMAGEDATA_TAG, att ); writeEndTag( SimplifiedDocbookMarkup.IMAGEOBJECT_TAG ); writeEndTag( SimplifiedDocbookMarkup.MEDIAOBJECT_TAG ); graphicsFileName = null; } } /** {@inheritDoc} */ public void figureGraphics( String name ) { String format = FileUtils.extension( name ).toUpperCase( Locale.ENGLISH ); writeStartTag( SimplifiedDocbookMarkup.IMAGEOBJECT_TAG ); MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.FORMAT_ATTRIBUTE, format ); att.addAttribute( SimplifiedDocbookMarkup.FILEREF_ATTRIBUTE, HtmlTools.escapeHTML( name, true ) ); writeSimpleTag( SimplifiedDocbookMarkup.IMAGEDATA_TAG, att ); writeEndTag( SimplifiedDocbookMarkup.IMAGEOBJECT_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#FIGURE_TAG * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void figureCaption() { writeStartTag( SimplifiedDocbookMarkup.CAPTION_TAG ); writeStartTag( SimplifiedDocbookMarkup.PARA_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#FIGURE_TAG * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void figureCaption_() { writeEndTag( SimplifiedDocbookMarkup.PARA_TAG ); writeEndTag( SimplifiedDocbookMarkup.CAPTION_TAG ); } /** {@inheritDoc} */ public void table() { tableHasCaption = false; } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#INFORMALTABLE_TAG * @see SimplifiedDocbookMarkup#FRAME_ATTRIBUTE * @see SimplifiedDocbookMarkup#ROWSEP_ATTRIBUTE * @see SimplifiedDocbookMarkup#COLSEP_ATTRIBUTE * @see SimplifiedDocbookMarkup#TABLE_TAG */ public void table_() { if ( tableHasCaption ) { tableHasCaption = false; // Formal table+title already written to original destination --- out.write( tableRows ); writeEndTag( TABLE_TAG ); } else { String frame = "none"; String sep = "0"; if ( tableHasGrid ) { frame = "all"; sep = "1"; } MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.FRAME_ATTRIBUTE, frame ); att.addAttribute( SimplifiedDocbookMarkup.ROWSEP_ATTRIBUTE, sep ); att.addAttribute( SimplifiedDocbookMarkup.COLSEP_ATTRIBUTE, sep ); writeStartTag( SimplifiedDocbookMarkup.INFORMALTABLE_TAG, att ); out.write( tableRows ); writeEndTag( SimplifiedDocbookMarkup.INFORMALTABLE_TAG ); } tableRows = null; tableHasGrid = false; } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TGROUP_TAG * @see SimplifiedDocbookMarkup#COLS_ATTRIBUTE * @see SimplifiedDocbookMarkup#COLSPEC_TAG */ public void tableRows( int[] justification, boolean grid ) { tableHasGrid = grid; // Divert output to a string --- out.flush(); savedOut = out; tableRowsWriter = new StringWriter(); out = new PrintWriter( tableRowsWriter ); MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.COLS_ATTRIBUTE, String.valueOf( justification.length ) ); writeStartTag( SimplifiedDocbookMarkup.TGROUP_TAG, att ); for ( int i = 0; i < justification.length; ++i ) { String justif; switch ( justification[i] ) { case Sink.JUSTIFY_LEFT: justif = "left"; break; case Sink.JUSTIFY_RIGHT: justif = "right"; break; case Sink.JUSTIFY_CENTER: default: justif = "center"; break; } att = new SimpleAttributeSet(); att.addAttribute( "align", justif ); writeSimpleTag( SimplifiedDocbookMarkup.COLSPEC_TAG, att ); } writeStartTag( SimplifiedDocbookMarkup.TBODY_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TGROUP_TAG * @see SimplifiedDocbookMarkup#TBODY_TAG */ public void tableRows_() { writeEndTag( SimplifiedDocbookMarkup.TBODY_TAG ); writeEndTag( SimplifiedDocbookMarkup.TGROUP_TAG ); // Remember diverted output and restore original destination --- out.flush(); if ( tableRowsWriter == null ) { throw new IllegalArgumentException( "tableRows( int[] justification, boolean grid )" + " was not called before." ); } tableRows = tableRowsWriter.toString(); tableRowsWriter = null; out = savedOut; } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ROW_TAG */ public void tableRow() { writeStartTag( SimplifiedDocbookMarkup.ROW_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ROW_TAG */ public void tableRow_() { writeEndTag( SimplifiedDocbookMarkup.ROW_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ENTRY_TAG */ public void tableCell() { writeStartTag( SimplifiedDocbookMarkup.ENTRY_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ENTRY_TAG */ public void tableCell_() { writeEndTag( SimplifiedDocbookMarkup.ENTRY_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ENTRY_TAG */ public void tableHeaderCell() { writeStartTag( SimplifiedDocbookMarkup.ENTRY_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ENTRY_TAG */ public void tableHeaderCell_() { writeEndTag( SimplifiedDocbookMarkup.ENTRY_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TABLE_TAG * @see SimplifiedDocbookMarkup#FRAME_ATTRIBUTE * @see SimplifiedDocbookMarkup#ROWSEP_ATTRIBUTE * @see SimplifiedDocbookMarkup#COLSEP_ATTRIBUTE * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void tableCaption() { tableHasCaption = true; String frame; int sep; if ( tableHasGrid ) { frame = "all"; sep = 1; } else { frame = "none"; sep = 0; } MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.FRAME_ATTRIBUTE, frame ); att.addAttribute( SimplifiedDocbookMarkup.ROWSEP_ATTRIBUTE, String.valueOf( sep ) ); att.addAttribute( SimplifiedDocbookMarkup.COLSEP_ATTRIBUTE, String.valueOf( sep ) ); writeStartTag( TABLE_TAG, att ); writeStartTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#TITLE_TAG */ public void tableCaption_() { writeEndTag( SimplifiedDocbookMarkup.TITLE_TAG ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ANCHOR_TAG */ public void anchor( String name ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } if ( authorDateFlag ) { return; } String id = name; if ( !DoxiaUtils.isValidId( id ) ) { id = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + id + "'"; logMessage( "modifiedLink", msg ); } MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( ID_ATTRIBUTE, id ); writeSimpleTag( SimplifiedDocbookMarkup.ANCHOR_TAG, att ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ANCHOR_TAG */ public void anchor_() { comment( "anchor_end" ); } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ULINK_TAG * @see SimplifiedDocbookMarkup#URL_ATTRIBUTE * @see SimplifiedDocbookMarkup#LINK_TAG * @see SimplifiedDocbookMarkup#LINKEND_ATTRIBUTE */ public void link( String name ) { if ( name == null ) { throw new NullPointerException( "Link name cannot be null!" ); } if ( DoxiaUtils.isInternalLink( name ) ) { String linkend = name.substring( 1 ); MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.LINKEND_ATTRIBUTE, HtmlTools.escapeHTML( linkend ) ); writeStartTag( SimplifiedDocbookMarkup.LINK_TAG, att ); } else { externalLinkFlag = true; MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.URL_ATTRIBUTE, HtmlTools.escapeHTML( name, true ) ); writeStartTag( SimplifiedDocbookMarkup.ULINK_TAG, att ); } } /** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ULINK_TAG * @see SimplifiedDocbookMarkup#LINK_TAG */ public void link_() { if ( externalLinkFlag ) { writeEndTag( SimplifiedDocbookMarkup.ULINK_TAG ); externalLinkFlag = false; } else { writeEndTag( SimplifiedDocbookMarkup.LINK_TAG ); } } /** {@inheritDoc} */ public void italic() { markup( italicBeginTag ); } /** {@inheritDoc} */ public void italic_() { markup( italicEndTag ); } /** {@inheritDoc} */ public void bold() { markup( boldBeginTag ); } /** {@inheritDoc} */ public void bold_() { markup( boldEndTag ); } /** {@inheritDoc} */ public void monospaced() { if ( !authorDateFlag ) { markup( monospacedBeginTag ); } } /** {@inheritDoc} */ public void monospaced_() { if ( !authorDateFlag ) { markup( monospacedEndTag ); } } /** {@inheritDoc} */ public void lineBreak() { markup( lineBreakElement ); } /** {@inheritDoc} */ public void nonBreakingSpace() { markup( " " ); //markup( " " ); } /** {@inheritDoc} */ public void text( String text ) { if ( verbatimFlag ) { verbatimContent( text ); } else { content( text ); } } /** {@inheritDoc} */ public void comment( String comment ) { if ( StringUtils.isNotEmpty( comment ) && comment.indexOf( "--" ) != -1 ) { String originalComment = comment; // http://www.w3.org/TR/2000/REC-xml-20001006#sec-comments while ( comment.indexOf( "--" ) != -1 ) { comment = StringUtils.replace( comment, "--", "- -" ); } String msg = "Modified invalid comment: '" + originalComment + "' to '" + comment + "'"; logMessage( "modifiedComment", msg ); } StringBuffer buffer = new StringBuffer( comment.length() + 9 ); buffer.append( LESS_THAN ).append( BANG ).append( MINUS ).append( MINUS ).append( SPACE ); buffer.append( comment ); buffer.append( SPACE ).append( MINUS ).append( MINUS ).append( GREATER_THAN ); markup( buffer.toString() ); } /** * {@inheritDoc} * * Unkown events just log a warning message but are ignored otherwise. * @see org.apache.maven.doxia.sink.Sink#unknown(String,Object[],SinkEventAttributes) */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { String msg = "Unknown Sink event: '" + name + "', ignoring!"; logMessage( "unknownEvent", msg ); } // ----------------------------------------------------------------------- /** * Write text to output, preserving white space. * * @param text The text to write. */ protected void markup( String text ) { if ( !skip ) { out.write( text ); } } /** * Write SGML escaped text to output, not preserving white space. * * @param text The text to write. */ protected void content( String text ) { if ( !skip ) { out.write( HtmlTools.escapeHTML( text, true ) ); } } /** * Write SGML escaped text to output, preserving white space. * * @param text The text to write. */ protected void verbatimContent( String text ) { if ( !skip ) { out.write( HtmlTools.escapeHTML( text, true ) ); } } // ----------------------------------------------------------------------- /** {@inheritDoc} */ public void flush() { out.flush(); } /** {@inheritDoc} */ public void close() { out.close(); if ( getLog().isWarnEnabled() && this.warnMessages != null ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } this.warnMessages = null; } } /** {@inheritDoc} */ protected void write( String text ) { markup( unifyEOLs( text ) ); } /** *

Setter for the field skip.

* * @param skip the skip to set. * @since 1.1 */ public void setSkip( boolean skip ) { this.skip = skip; } /** * If debug mode is enabled, log the msg as is, otherwise add unique msg in warnMessages. * * @param key not null * @param msg not null * @see #close() * @since 1.1.1 */ private void logMessage( String key, String msg ) { msg = "[Docbook Sink] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } } ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSiteModule.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000644000175000017500000000261711212745470033326 0ustar twernertwernerpackage 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 org.apache.maven.doxia.module.site.AbstractSiteModule; /** *

DocBookSiteModule class.

* * @author Emmanuel Venisse * @version $Id: DocBookSiteModule.java 782392 2009-06-07 14:14:16Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="docbook" */ public class DocBookSiteModule extends AbstractSiteModule { /** * Default constructor. */ public DocBookSiteModule() { super( "docbook", "xml", "docbook" ); } } ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookSinkFactory.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000644000175000017500000000325111141061207033307 0ustar twernertwernerpackage 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.Writer; import org.apache.maven.doxia.sink.AbstractXmlSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * Docbook implementation of the Sink factory. * * @author Vincent Siveton * @version $Id: DocbookSinkFactory.java 739565 2009-01-31 14:39:03Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="docbook" */ public class DocbookSinkFactory extends AbstractXmlSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { return new DocBookSink( writer, encoding ); } /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding, String languageId ) { return new DocBookSink( writer, encoding, languageId ); } } ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/SimplifiedDocbookMarkup.javadoxia-1.1.4/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/do0000644000175000017500000007223111206503471033321 0ustar twernertwernerpackage 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 javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.XmlMarkup; /** * List of Simplified DocBook markups. * Contains all 119 elements of the * Simplified DocBook DTD v. 1.1. * * @author ltheussl * @version $Id: SimplifiedDocbookMarkup.java 778398 2009-05-25 11:55:37Z ltheussl $ * @since 1.1.1 */ public interface SimplifiedDocbookMarkup extends XmlMarkup { /** DocBook XML V1.1 XML public identifier: "-//OASIS//DTD Simplified DocBook XML V1.1//EN". */ String DEFAULT_XML_PUBLIC_ID = "-//OASIS//DTD Simplified DocBook XML V1.1//EN"; /** DocBook XML V1.1 XML system identifier: "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd". */ String DEFAULT_XML_SYSTEM_ID = "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd"; // ---------------------------------------------------------------------- // 119 Simplified DocBook elements // ---------------------------------------------------------------------- /** DocBook tag for abbrev. */ Tag ABBREV_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "abbrev"; } }; /** DocBook tag for abstract. */ Tag ABSTRACT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "abstract"; } }; /** DocBook tag for acronym. */ Tag ACRONYM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "acronym"; } }; /** DocBook tag for affiliation. */ Tag AFFILIATION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "affiliation"; } }; /** DocBook tag for anchor. */ Tag ANCHOR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "anchor"; } }; /** DocBook tag for appendix. */ Tag APPENDIX_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "appendix"; } }; /** DocBook tag for article. */ Tag ARTICLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "article"; } }; /** DocBook tag for articleinfo. */ Tag ARTICLEINFO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "articleinfo"; } }; /** DocBook tag for attribution. */ Tag ATTRIBUTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "attribution"; } }; /** DocBook tag for audiodata. */ Tag AUDIODATA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "audiodata"; } }; /** DocBook tag for audioobject. */ Tag AUDIOOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "audioobject"; } }; /** DocBook tag for author. */ Tag AUTHOR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "author"; } }; /** DocBook tag for authorblurb. */ Tag AUTHORBLURB_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "authorblurb"; } }; /** DocBook tag for authorgroup. */ Tag AUTHORGROUP_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "authorgroup"; } }; /** DocBook tag for authorinitials. */ Tag AUTHORINITIALS_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "authorinitials"; } }; /** DocBook tag for bibliodiv. */ Tag BIBLIODIV_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bibliodiv"; } }; /** DocBook tag for bibliography. */ Tag BIBLIOGRAPHY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bibliography"; } }; /** DocBook tag for bibliomisc. */ Tag BIBLIOMISC_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bibliomisc"; } }; /** DocBook tag for bibliomixed. */ Tag BIBLIOMIXED_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bibliomixed"; } }; /** DocBook tag for bibliomset. */ Tag BIBLIOMSET_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "bibliomset"; } }; /** DocBook tag for blockquote. */ Tag BLOCKQUOTE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "blockquote"; } }; /** DocBook tag for caption. */ Tag CAPTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "caption"; } }; /** DocBook tag for citetitle. */ Tag CITETITLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "citetitle"; } }; /** DocBook tag for col. */ Tag COL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "col"; } }; /** DocBook tag for colgroup. */ Tag COLGROUP_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "colgroup"; } }; /** DocBook tag for colspec. */ Tag COLSPEC_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "colspec"; } }; /** DocBook tag for command. */ Tag COMMAND_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "command"; } }; /** DocBook tag for computeroutput. */ Tag COMPUTEROUTPUT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "computeroutput"; } }; /** DocBook tag for copyright. */ Tag COPYRIGHT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "copyright"; } }; /** DocBook tag for corpauthor. */ Tag CORPAUTHOR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "corpauthor"; } }; /** DocBook tag for date. */ Tag DATE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "date"; } }; /** DocBook tag for edition. */ Tag EDITION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "edition"; } }; /** DocBook tag for editor. */ Tag EDITOR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "editor"; } }; /** DocBook tag for email. */ Tag EMAIL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "email"; } }; /** DocBook tag for emphasis. */ Tag EMPHASIS_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "emphasis"; } }; /** DocBook tag for entry. */ Tag ENTRY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "entry"; } }; /** DocBook tag for entrytbl. */ Tag ENTRYTBL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "entrytbl"; } }; /** DocBook tag for epigraph. */ Tag EPIGRAPH_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "epigraph"; } }; /** DocBook tag for example. */ Tag EXAMPLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "example"; } }; /** DocBook tag for figure. */ Tag FIGURE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "figure"; } }; /** DocBook tag for filename. */ Tag FILENAME_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "filename"; } }; /** DocBook tag for firstname. */ Tag FIRSTNAME_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "firstname"; } }; /** DocBook tag for footnote. */ Tag FOOTNOTE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "footnote"; } }; /** DocBook tag for footnoteref. */ Tag FOOTNOTEREF_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "footnoteref"; } }; /** DocBook tag for holder. */ Tag HOLDER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "holder"; } }; /** DocBook tag for honorific. */ Tag HONORIFIC_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "honorific"; } }; /** DocBook tag for imagedata. */ Tag IMAGEDATA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "imagedata"; } }; /** DocBook tag for imageobject. */ Tag IMAGEOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "imageobject"; } }; /** DocBook tag for informaltable. */ Tag INFORMALTABLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "informaltable"; } }; /** DocBook tag for inlinemediaobject. */ Tag INLINEMEDIAOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "inlinemediaobject"; } }; /** DocBook tag for issuenum. */ Tag ISSUENUM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "issuenum"; } }; /** DocBook tag for itemizedlist. */ Tag ITEMIZEDLIST_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "itemizedlist"; } }; /** DocBook tag for jobtitle. */ Tag JOBTITLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "jobtitle"; } }; /** DocBook tag for keyword. */ Tag KEYWORD_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "keyword"; } }; /** DocBook tag for keywordset. */ Tag KEYWORDSET_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "keywordset"; } }; /** DocBook tag for legalnotice. */ Tag LEGALNOTICE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "legalnotice"; } }; /** DocBook tag for lineage. */ Tag LINEAGE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "lineage"; } }; /** DocBook tag for lineannotation. */ Tag LINEANNOTATION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "lineannotation"; } }; /** DocBook tag for link. */ Tag LINK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "link"; } }; /** DocBook tag for listitem. */ Tag LISTITEM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "listitem"; } }; /** DocBook tag for literal. */ Tag LITERAL_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "literal"; } }; /** DocBook tag for literallayout. */ Tag LITERALLAYOUT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "literallayout"; } }; /** DocBook tag for mediaobject. */ Tag MEDIAOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "mediaobject"; } }; /** DocBook tag for note. */ Tag NOTE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "note"; } }; /** DocBook tag for objectinfo. */ Tag OBJECTINFO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "objectinfo"; } }; /** DocBook tag for option. */ Tag OPTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "option"; } }; /** DocBook tag for orderedlist. */ Tag ORDEREDLIST_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "orderedlist"; } }; /** DocBook tag for orgname. */ Tag ORGNAME_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "orgname"; } }; /** DocBook tag for othercredit. */ Tag OTHERCREDIT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "othercredit"; } }; /** DocBook tag for othername. */ Tag OTHERNAME_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "othername"; } }; /** DocBook tag for para. */ Tag PARA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "para"; } }; /** DocBook tag for phrase. */ Tag PHRASE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "phrase"; } }; /** DocBook tag for programlisting. */ Tag PROGRAMLISTING_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "programlisting"; } }; /** DocBook tag for pubdate. */ Tag PUBDATE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "pubdate"; } }; /** DocBook tag for publishername. */ Tag PUBLISHERNAME_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "publishername"; } }; /** DocBook tag for quote. */ Tag QUOTE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "quote"; } }; /** DocBook tag for releaseinfo. */ Tag RELEASEINFO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "releaseinfo"; } }; /** DocBook tag for replaceable. */ Tag REPLACEABLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "replaceable"; } }; /** DocBook tag for revdescription. */ Tag REVDESCRIPTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "revdescription"; } }; /** DocBook tag for revhistory. */ Tag REVHISTORY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "revhistory"; } }; /** DocBook tag for revision. */ Tag REVISION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "revision"; } }; /** DocBook tag for revnumber. */ Tag REVNUMBER_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "revnumber"; } }; /** DocBook tag for revremark. */ Tag REVREMARK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "revremark"; } }; /** DocBook tag for row. */ Tag ROW_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "row"; } }; /** DocBook tag for section. */ Tag SECTION_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "section"; } }; /** DocBook tag for sectioninfo. */ Tag SECTIONINFO_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "sectioninfo"; } }; /** DocBook tag for sidebar. */ Tag SIDEBAR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "sidebar"; } }; /** DocBook tag for spanspec. */ Tag SPANSPEC_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "spanspec"; } }; /** DocBook tag for subject. */ Tag SUBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "subject"; } }; /** DocBook tag for subjectset. */ Tag SUBJECTSET_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "subjectset"; } }; /** DocBook tag for subjectterm. */ Tag SUBJECTTERM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "subjectterm"; } }; /** DocBook tag for subscript. */ Tag SUBSCRIPT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "subscript"; } }; /** DocBook tag for subtitle. */ Tag SUBTITLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "subtitle"; } }; /** DocBook tag for superscript. */ Tag SUPERSCRIPT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "superscript"; } }; /** DocBook tag for surname. */ Tag SURNAME_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "surname"; } }; /** DocBook tag for systemitem. */ Tag SYSTEMITEM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "systemitem"; } }; /** DocBook tag for table. */ Tag TABLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "table"; } }; /** DocBook tag for tbody. */ Tag TBODY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "tbody"; } }; /** DocBook tag for td. */ Tag TD_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "td"; } }; /** DocBook tag for term. */ Tag TERM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "term"; } }; /** DocBook tag for textdata. */ Tag TEXTDATA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "textdata"; } }; /** DocBook tag for textobject. */ Tag TEXTOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "textobject"; } }; /** DocBook tag for tfoot. */ Tag TFOOT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "tfoot"; } }; /** DocBook tag for tgroup. */ Tag TGROUP_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "tgroup"; } }; /** DocBook tag for th. */ Tag TH_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "th"; } }; /** DocBook tag for thead. */ Tag THEAD_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "thead"; } }; /** DocBook tag for title. */ Tag TITLE_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "title"; } }; /** DocBook tag for titleabbrev. */ Tag TITLEABBREV_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "titleabbrev"; } }; /** DocBook tag for tr. */ Tag TR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "tr"; } }; /** DocBook tag for trademark. */ Tag TRADEMARK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "trademark"; } }; /** DocBook tag for ulink. */ Tag ULINK_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "ulink"; } }; /** DocBook tag for userinput. */ Tag USERINPUT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "userinput"; } }; /** DocBook tag for variablelist. */ Tag VARIABLELIST_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "variablelist"; } }; /** DocBook tag for varlistentry. */ Tag VARLISTENTRY_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "varlistentry"; } }; /** DocBook tag for videodata. */ Tag VIDEODATA_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "videodata"; } }; /** DocBook tag for videoobject. */ Tag VIDEOOBJECT_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "videoobject"; } }; /** DocBook tag for volumenum. */ Tag VOLUMENUM_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "volumenum"; } }; /** DocBook tag for xref. */ Tag XREF_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "xref"; } }; /** DocBook tag for year. */ Tag YEAR_TAG = new Tag() { /** {@inheritDoc} */ public String toString() { return "year"; } }; // ---------------------------------------------------------------------- // Common Docbook attributes // ---------------------------------------------------------------------- /** Common DocBook attribute id. */ String ID_ATTRIBUTE = "id"; /** Common DocBook attribute lang. */ String LANG_ATTRIBUTE = "lang"; /** Common DocBook attribute remap. */ String REMAP_ATTRIBUTE = "remap"; /** Common DocBook attribute revisionflag. */ String REVISIONFLAG_ATTRIBUTE = "revisionflag"; // ---------------------------------------------------------------------- // Specific Docbook attributes // ---------------------------------------------------------------------- /** DocBook attribute cols used in tgroup tag. */ String COLS_ATTRIBUTE = "cols"; /** DocBook attribute colsep used in informaltable tag. */ String COLSEP_ATTRIBUTE = "colsep"; /** DocBook attribute fileref used in orderedlist, imageobject tag. */ String FILEREF_ATTRIBUTE = "fileref"; /** DocBook attribute format used in imagedata tag. */ String FORMAT_ATTRIBUTE = "format"; /** DocBook attribute frame used in informaltable tag. */ String FRAME_ATTRIBUTE = "frame"; /** DocBook attribute linkend used in link tag. */ String LINKEND_ATTRIBUTE = "linkend"; /** DocBook attribute numeration used in orderedlist tag. */ String NUMERATION_ATTRIBUTE = "numeration"; /** DocBook attribute rowsep used in informaltable tag. */ String ROWSEP_ATTRIBUTE = "rowsep"; /** DocBook attribute url used in ulink tag. */ String URL_ATTRIBUTE = "url"; // ---------------------------------------------------------------------- // Specific Docbook styles // ---------------------------------------------------------------------- /** Docbook style arabic used in numeration attribute. */ String ARABIC_STYLE = "arabic"; /** DocBook style loweralpha used in numeration attribute. */ String LOWERALPHA_STYLE = "loweralpha"; /** DocBook style lowerroman used in numeration attribute. */ String LOWERROMAN_STYLE = "lowerroman"; /** DocBook style upperalpha used in numeration attribute. */ String UPPERALPHA_STYLE = "upperalpha"; /** DocBook style upperroman used in numeration attribute. */ String UPPERROMAN_STYLE = "upperroman"; } doxia-1.1.4/doxia-modules/doxia-module-itext/0000755000175000017500000000000011632765556021073 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/pom.xml0000644000175000017500000000472211470562366022407 0ustar twernertwerner 4.0.0 doxia-modules org.apache.maven.doxia 1.1.4 ../pom.xml doxia-module-itext Doxia :: iText Module A Doxia module for iText source documents. vsiveton Vincent Siveton vsiveton@apache.org Apache Software Foundation Java Developer -5 org.codehaus.plexus plexus-utils com.lowagie itext 1.4 org.apache.maven.plugins maven-surefire-plugin java.awt.headless true doxia-1.1.4/doxia-modules/doxia-module-itext/src/0000755000175000017500000000000011632765556021662 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/0000755000175000017500000000000011632765555022640 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/0000755000175000017500000000000011632765556024653 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/0000755000175000017500000000000011632765556026120 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/Run_Build_Main_Project.png0000644000175000017500000010002010431726002033107 0ustar twernertwerner‰PNG  IHDRrţ)\ů6bKGD˙˙˙ ˝§“ pHYs  šśtIMEŐ "§»ýtEXtCommentCreated with The GIMPďd%n IDATxÚěťohWľ÷ż)Z8fŔ $ą$Đ1-DćjŃĽ.ľ•P‡-ôş-´Î.lă6őöEëvˇ›äÂnÜB[7°Ĺ.l‰ 7D «ĽČ\H‘ V!ĺN †Ä0č@ňĽI–dýýłeűűaźůsţţćśďüΙ™}ž‚B!„ě8Ł/Žbůű$k‚B!d§ 9°Éš „BىBÎĚ٬ B!„ť(ä,‹9B!„)ärŽĂš „BىB®o}`ě¸ŔŇ?uş€ą&ˇ…ěuBŇőŽ@J@U¬u@ĆÁ,R?±˘ !„Bú"äYhy`&«cáŁiÁŤŤPB‹Ĺdľ(ę\Ąxś°éO.˛¦ !„Bú!ää/­×ČeAQś DÚAúóqÄNéć#`ĺ® Ë4Ľ óQ˛čéó?|őIÜ;^3IBdŐöůo3ČÜ·|îý·˘€Ą›YŹíMé”qÜşD*c"qÇÜ1ŤW*ÇňÍl9ßµe“yŔr¬Ü·\1ŤëˇČĘ˝ţ‘n™n-3NÂiŃÖş®b|Ě€qPńějÍÁrMűřJł‹6kd[Ůf0˙M™¬gĎ" pńB B #[D@ ~RÇČóŠWś#‘ľo!ń˙ĚňőÜn]]şšAöˇŐóăËů ś95ŚČław3ę¬K¤ł–oeűf3ťÄ95>‚Ń{×ÎĎ.}ťę©]¶[wtm˛§…śíŁ9 (a ŃŃ´ĂlÇF:#ü.„ăyS˙5‚ŘɦßYÁĘíŕú‹żŞc€~HfĽéÚ©Lć …5_ńč‡=±°úĐDÎE©Úźy`"ťÍaäh‘c:ĆOHŢ3a=ŮYŤţ)‹ôOôĂzy[.çŔr$ô°ý ÷‹Ő0÷YŐ ’Ë9°Ö7:ÝäJ©{ĎFš¦›ü1[^N$`<…(©‘Úö8¤âý×GüÁ\‰Ř‹Ţsoü9ŰGżß‹6ke[ĹČó oĄˇ iźĐPYmíÚú¶‹¸ŔÜďŁy…ČÜ3!Ś>§#~R‡a¨ýkRúď Ě5Žc#q; @2äŻ.RwSpňÂ÷ńłŻŤ ň¬™—Hţh!Ŕ8˘A?DęAĆŁ/6Ónś" y.\G¬ţlB;¨÷¬Ű­»A˝¶Ů{9ť«µ˙í4ÎśR1űŃ5`H…“7ˇLH{éűAH×€ (@@zS®˛ý§b§_ŤáÚíy¨ˇęEş˛_ü„ŽřIú€”@ę‰ůd!ĄÄŤĎĆËç,^žôî`9ůtăĺÇ×ne°°ś†v@Ezů\±ł”°Öl¨CjË4sĘŔäiŁ\ćҹ˷LD#žG7»ćŕŇ7iX–ă+}Bö¶óń°¦xGk‡‚Hܲ‹A i$”@Zř%GĂXřb+wl„ŹĺŽÍOüUžť›ŚźŠ`ęÔ®× ĹřĆÇtLżăH\ú&‰hDGěAÄąOSXľeb|Ě»SMÜÎÂĚY0פ3i^§11ÁČłŚŁžXt‰Äí4 AŃ:Ť`PDR ß&áä%b' ŚÓ1Ž"ţÎ"‚µśőń1Ë×30s b/č8÷Ű·Ň@@ĹĚë(ŠŔü·+pÖmč‡UşŽěOYčŤÖ•ćn®gí€mHGöˇç‹˝ câ¤KWSĐĂwńg_ŤáĚ©(đĹëY¬d¬¦í&`Ýą!rë7VL,}źőÚ§Á9ĆĎ›ąď ňúÁ¦Äč1 1ű  ŢĽ¬Ý¶Y3»}Éw[vËÂwIĽ˙vÓŻD‘ţɆ˘|üyďżßdë­l,ńOńuŚ>†ůČ„6¤#vĚ«źäY\»ž€q4Š3§Ť–öěÇVë}ÎKoůvé¬ ýhŞP!%üŃł˝Ř łKVŮs:›†µ& *ńfłiXą A+mČĽ@섎soz^â•M¬š9  CZ&¬\uŻ6óz ńuŹĽôÖEX¶„ˇŹ XÇ[ś[—‡ľúd + ćšÄęC ąu qHë™ÍLž6°ňىĚ}ş®!ňl¸nśĂGGąbne`­Ű8÷fS/G±řý´pµW®2­ÔÝ"‘(Ţs´eÝ]|o+r0×臕ŞvďôÚ҇LżèˇŕÚő4TEĂhÄ;nţ›Ň™Őrź;®aáű bÇĂ<§ăý×GpćÝ‚BřęŹ ŮłB®ŕ¶ľ›±KëÝśţ¶ ˘c1ÄÇF0s>ŽÔJó——ýi٧#ĐÂ*2đ•×ĺvş®aę•Q,\O×xžĽř&NyÁÜç ,ßN#qGÇżľžÂč±0‚ÂÂĹ«˛Ü©,|—Dęľ…ŕo‚îßčX#Ďé™j>”Іa­-ĂÎéH­hP„„   "(‚ĺW’řŤż–‹_§°řé8f~Ý$N¤Dy-ÎĹ?ŽăâÇ«;˝!Ôę'qŐý„¨ľĐg˙{óOB |ő—)Ä^0°đáś9řK#úď:ν‡qXŮ4Č‹ŕT|5#uß„Şę­ŞdŢĆĄo28÷[sŘH'qŰÄěßVüŐź[§ž+¶éÔ˘÷Á\Yul©Şęë€Ůŕ7úÚL3! ÄĄóqLžŽ`bĚŔěĺ´ő×ě8yOĚ©!QΛ(zťĽÜ”Żzô˘ÍŮĹđáp˶¬µ!ĎÓX=Ufš«Đ´áÖ^ąd{A‡~XÁÂw+U~Ą­Ź<×:_Ë7MĽ˙vgNŤÂz’AxČó”&ng 0ÚľfšŮ*ęÔAiZXR«Ú1ÜÄöJýĂ&[s7‡Ăa/˙©{YV¶łÚeXúaď®dńű$ ®đÚÂEUźTIúA/˝µ’9˘a|,‚řIń“:®ŻŔ|„®l¦\§+Őůng˝kŕĄFąž“włĐ4Ł,ާNŹŕě_RU7^µi…ĂŠŻşK­! Bč›Ú˝Ók«Ň+;1f@).—Yľ•ń¦D+lĚzlCÝŻÁÎ+fĚ5é ä¨NöŞ+ř:XJ ›µ ?? #„vĐ@ęVj@ÇčÉbc "Ł´Ca¤îÚĺÉoü•¬ühbĺGă§jÜ»RËyÓ!—ľL Ułv'»fAVŢťJëô6çC„4ýaŹĽDŽ„aYYh _i\|7 EXľ•ÁÂw)píłéŠ:“›§ÚúRbńű4®|›€>Ś<ŻăĘź&?©cöo˲ő‚áÂŻ˘&ŢҶń±áň“n×nĄMy! ęţpMľęÔ—zSěZ¤Bä+Ţ: rń“zq5k˝P0˝Î<ňĽŽÂß3˛€áŁ^;Ą2Yß¶Ňm›5˛ mą9ĂńXV¦eÝm˛ń{&˛?;0Ž(˙ć†'ŚëŘşź|]»•Ĺą×#Óq¶hg‹ß'€h˙šib«őę ąbbü”řɆżM•ŰÜxVC¬d{·+lĎőę_ ©€kA?(ę¤S.ĺ?zLǵZy T żĄďW0ůň(.ţqŇM ąb5q?©#ąR€Ě $´‘~Dü¤'śÔ@™Ę¦wd3Â<ř›Í×^łţ©´żt=)Š€ťąR“˙Ä' Ąh–ßş“®¬›ÇĘúďäÚZXÎ"ö‚Ž©—Łĺ‡ßżOz6ďn¤5|TĂĘzXTyÝĄD{é˛ç„śëCĹŠŢÉbň•3HŢR7‘}`!ѱr'‹ÔJ úŃ^:Ą!ů?Éňb)?ńo&ŔÜ×Üřw}Óv€+ße0÷»QL˝8ĐĂ FŹkřřłnü?Ó[ű2$0űÎŇ÷˝5/ ߯–ăš‹`ř°倂ř ^:É{YouýĄQ9đ)ŠŠ3§F7ç·Nţk·Ą–Î yׄµ.ˇď<áÎ …ߢµG®˘žĎľĂÄ©(ô°RžöĘ<01÷Y»K®=vlcŤ\ň®‰ůoęż~D¸ń×q¤äŕ<)@?¤"ňśRěSĺöľřž·ĐţĚůe¬®Ů.ý=‹Řżë˝``ńĎ“€bôXpK_&€ŇŇVzŃf­ě˘i[6đRŞ"›Ż6ţŇ;×`Ű^ţ…j4OŻYľň,ßĘbň´Ńâ5łđ}ŞŞ­Ű˛ç&¶ZŻć®f‰hĐĂ ţőő4V~ĘAŢ:°ý9‡ąĎ@1?™źDžUđţ[qGł›nŘę]7WľÍ`îŁ<=аFÎ’Đu ˙Xőž‚.ríV©®üiWţÇŮŹHÜiüJŤ‹ďĹĘ)ČĽ,{XĄR÷L~U»ł™ő×2Î’P;ˇ——%$˙_ň×Ę}Ţ”ńř…ëVĂ´üÖ]łvďćÚZąg•=axA¤2&„ŞW]+çŢŚA?¬#vÜłáŤă öërP'{TČůA @Öş‰•;YŚ<†ůł

‚ČłaDž cĺAW–6¦+×[ĺÖ%’w2ýŰ5 čaň“Ćô§IĚ˝5‚ńSDʏňmŞ|÷Ü«ŹÄFőň“ŢŔwv^BUEŰń…Ă ÂCŢ”eć‰k73˙‡çˇ©őĽŐ®‘Ë> żä¬9ěu‰ĺŰĹ'Źßgő(‡ĹďS˙{BÔ[†őÄŞj}±™FqŐ×Ý™SĂeîÄďć˶ žÁř)S/ǰđŹůžÔ]Ă8ş¸¶‚Á0żĎbîŁĹ¸R‚Ą¦N‹ <$yĂÔ Ĺă„?ű ŽędϱoôĹѧąŕTËă/Ľ„ůŹćĽ©-D"9…˘J  FŽ–™Ăâ7)8ë€`úŘ´ď ŮO2Ĺé3Á w‘Űż€t6m€BÁńÄBy°w1‹ý‚áíĎ[(»Şj”Ó©™´„€jU°öŇĹu!VU~ë–«f›m›Ĺ46ň*„VUކő%´˛đŞ[¶€—ŻÚA˘~=xŤ¬î×z˙ěB1ŻnE^j•ř«WfŔ[p.±·8ePĘuéÇ6zßfvá§-»ĄQ˝4Űď7_WBÚŮr˝Şęć6lU7~lµ™g¸PČAş6&Ć |őÉG":9éVźçŮAÉćDH-–±ůuS/˙BŐëć˝PČmŠł®wô/Ϩ|Đ öëe»ęĆf^ âÜdEŻm˝ý^żálęŰę•·ťşkj‹\[J(ô˛÷Z’á˙ś…ýK°Ü_üď?˝1hâťy¤î;Ň.—·˛ ü¤O…\¦^~ łďĚUůňÂaÝbřXᣠ˛+)$ŻŻŔYX›Bޞ{x˙ÍL˝Ać‰ř» Áv/2őň"Ď+ż¨cůVSç TŁ,ĽŞ…śěÉ !{ßS«7n¦+Ä™wçť[rą˛™4„Pá8˛řî1vÖ„ŕă/Óřřj6dA"¸ß`ĄěEA˙vp˝÷YÎüy(ôžŇ#|{ä.ľ­cb|¦íľúbW`M˛—©‚'{“ňŇ€Rś.­żżWKˇ#„B!Í3¬B!„ 9B!„˛…Ô}Ř!\X`ÍB!„ěD!©;)Ö!„BČĂ©UB!„Jă÷Čń›u„B! =r„B!;”†9éJÖ!„BČÓ‘G.:­úUnŻ÷/©M»Q:ýĘK«ôúUînۦӺí$žNÓ܉t’ż¶ŮmťlUö#;Ĺ&üô?ýJc«ăčE_Ý‹víGYjălî4ííĽţ:ÉËNíŹ÷*őür-ÖČU=ŐęVlsýÇŃ)›ž¨m”Nť|EOD»z"7u'…čhuĺ8Ý:u°•m˝˛ąťŐ릸Ü-Čď]—Y*C­]4=ŢďuâöîZń›ż~^Ż~ňPenŹ®>–­YĐłús·?Ž®Ú˝××z?Ęâ¶wUŹŰŐżąć…ëäw žG.¬ţu107Ű×lŻ„A˝tJáÚżýĘCłr7Ę›ź:ěvđjT?˝¨ă­nËzáĘö­ÝŢ(®~•ĂO>·»~Ű­Ç~¶sŁkµUťÔîktŤűéúi ~Ó­—Ď^”Ąťö­Ś»®óv®…^ä5u'UU/őÂÝÔŁź}ý:±Ď­ľFHwxą:ß±nµF®ŃţĘíĄ˙c'cHŢN–Ťˇô/ˇR\•i”µyIŢN–Źëv `íůí”»vmťtš·fçŐÖŹźv¨ŤŻ“8šQŻě~ŇiV÷µő\W?l˛dʵvĺÇF婞 ÷ËN[Őc·őÓ(ťzmPďmd őÚ¶Ţů­ě©ŢµŮĎ2¶k«Íl¤YśÍ®›FÇőĂ;éOüöÍ꬛<6úŰ‹zlV¶~Ś őÄ—űěW@ú%äíź;Ű$¦üß-ŰmD•EíEŮŞÜÍÎi×nÄOöË6ze“Ť:ďA Ýë´×Xł<řm^ö˝.k«ţ QŢkŹëŵŕ÷ÜÝŇĎôş˙Řα¨_cC+{ôsmQ¸í! T»ä @Ëůńä­Š†m´ŢÇőq|'¸>·űČWOňŃ$Ý–őä¶«‹z‰ŤĹš×»ŰA=·‡źŽćV±ó›×vö5ÉcĎlŇí2źn˙ę·TĆŘXĚ× ~äŁYüô#•vĽ)ŽNú‚-î|ő•Í®…něßíq˝î·{P–†uÖ‹6tűTŹ~öőjlhQďíŽĺ=µ ŇžĽ©ŐĘßN'6Űs ™Ľ•ÜsĺŢ)ĺí$ź˝.[3űŘŞzÜ‹6ş“ëi'µU/ę¬GIŘÔ†9‘AĹ›T lVo˝\#—¸™¨2ćÄÍDO/ŚÄÍDU‰› ÄOĹ›ćĄŰŐÎÇOÇëß‘^ďCogÚ­ň°ŐůŘée„¶ÜÍeŘ-vşěd'•ł6‰ë‰ZU™ż^ÖMłëe§Ú\«2µU®‰höŤľ8útä?çŞ6¦˙9‹ĺoé‘#„Bd°đőĄŞŤ‘@Á-°v!„B^Č}rĆQ©•¬'ßC!„˛x†U@!„˛3iřMUQů¤Ę3ůę$ÇaŃh„6N…\ó ‰ Kß.±Ťh´B'„pj•B!d§đuß!3ř°Ťm€ĐĆ ŮsĐ#G!„B!G!„B¶’@Gg¸M–ľ[bÍöÉW&{ŢFd\Ů´B'„B¤+7.0űÁ,ć>ś«.2ţň8k·,ż\]˙=l#˛»  Ú8mśě=:šZťűpBŞ0,ŘF„6@hă„ě~ťž(ĄäÝĎ ß˝úl#ó{˝âś ¤+`ć Ŕř{‹}É[)M)Ĺ;íŤ4+éGú^ÚAˇ‚Z "<Rúډۙ¦ű-§éšÄřXdËmŔ.}dÁÎK Ö (˘§u”ą3_ţżP3E=9Ý·¶ÉÜ3aYD˛€Čńaháîěaţj±QĆłząîĚ5 Žă ŕŞ"`Ö»čýµ—tsÍ„ĚK (!ZXóĘ Ŕzd!q'é×ă=KÓĚIdÚ0sž÷L€hDCäŘö~®˛ż±ó¤ H©ôĄĎ©ěăĽôA8yĄď}\%Ë9ń÷±řă"Îüű™-¶:˝ąëfOkr~B@JYu7T “Á “62^µ*»FDr)·Ď”;~Pť&Y_”6 Ŕ- yłßü5^]…\ĎÂYKŔş…ŹB=4q0Ţó´·3ĐTŔ˛MmĐéŻĆÁ ˛k…młVdY°­Ŕá>uűŁ€`Ŧ“4R·›ęiRNΕłaY”ŇŘbĺÎ* RBąś‰ńßv–nÖ´`ZD kÝF0 `Ű@J y' ㎑çőž‹bg]bő‘ ǶËb ,ËFÖ4!*ŕJ8˛Đł4Ą Xëž`Ťh=e«9‰Ô} ŠPˇŰÚĎE^˙ߍü:Y@ZůŕvŢFćV˛O}ś\ď'ó&dŢ‚tL¤n¦ú.â&ß[ŔŇ_Î'ă¸tçÎť8·ecQŻÓ›ř[×~g`âoYdŰXý4Šáó^NžĐ÷¬kű=r2/1űá,ć>«®wéţ.·/mT7 ¸Ž×ąüă5,ýyăčŹË~»qŃe~Ž–˙Źżď™MMVw–3Żx2A +:”#“ąŘç!ďzžý´Ů·ć´ €µ^€Ss˘GŐeu»·“®l 0°瀠© ”čů5^p«\%AŐ@ňćbŠ9™w e…Ľ„“wľoC  ęúW” 9 '/»j] zá—†©(ü (np EO€ąf!űČÂřÉ‘®˝€%¬śěCôDÜoĽ}*€ÂŻ€tm DX ÂĘ9]·Ąµ.‘1mDž× ‰*q7|X (4,ÜĚbjL‡=é ;µń…Űą˘´R!Ą s]GzMbĹ”˘Ŕďłž=^6ză™»9_çzň<Ű(¨H|rÖëóÎ_é­űoOÄŔä{ Xřń¦Ç¦1űý,ćƶf&­×é]{ŰÜâߢ=¬~âŤs7-ĚžÖ1|>YŢF!ׄąć BÂs×Ăd°č¨Ť¤H @Z0s:ŚľŠ9Yu×jäM8ą$¬»łH|PďîŢ–be‹Ď|Ł®Dö»bg  C=™\R:0Żë]‰ąÄťĆS©jPÔĆ6Ű@ŁÚ±!„70=đĆeîxßÎ,T Î: – énx‰ÔC:¤ !ˇ*:’7;ŐţtMňÖ ,?Ů(ĄĺH°ěCŢű+]/WÁ€ŕô¤‡U÷‹â©™/Ąá W!Ľ†_ľ•BüdúÁîÄśąć k®Bć˝´% Ĺ|€˘hÁ˘ýýÚOÜň JX…¦H˘¸]ş@Aᢸ[ľcâÜ+ĆöŮxńa‰©“á˘l)‘ss]"mz^Ę…§§}ś~˛Âf rÝ„´˛Â¤Ť”µáŞOBĘâf IDAT\˝¸ÄßśíÜ®ëüŁéősßĐO%‘űŰSŁS˝Ő1—ű% ŮÓô&>ĎâÚŰ&>/zä>‰bř†G®˝ëmŰKb®ă÷Č•î~Ú%z"ş)\ůós~łcĹß,žVyj–Żfń·Ę_;ĺîg9Rdp-HWBJRšpň–ţ<Ą?O”ďđz…#ŐM^) ź™Ó1ůÇkĺÎą'žż2÷r°ÖXŽ ™KE¤ }ô"ĚŰă0ďLA®§ŕä5×őŽE\i USsÝ&ćz©‡ő˝ň>öę:­j+G²ĽA@DOvT AUCđŔĆĎkń ÔCĂP5˝\'¶eÁ^÷ňfű7RJ¨‡tR^ź{dĂüن•łá¬Ű҆€J(Eô`ÚŃ-–µčµ’.–ŢÔëvösO˝JwăćI€°" ‡¡`ßú8HąńämPB 6Dś“3‘ͤÍfşqĄ›ăě÷ô @Ţ„-‹ÓěŠ@ěů†?°ňVĎÓ+yâ®˝m”…Úę'Q¬~…#Ą7Ë&O—=reß0~EQŕ8ŢÝĘě…Y(‡ťS"v2¶i_ňvr“Đ©ÝVy~ĺľFŻĺ(m/;Űtlłtk÷Ő;żUüőĘҬüÍĘÝîëGü¶QyPÍ ČĽĺÝ=şŔu „†ŘI‰‚˝ ¸Ţą+ _yń5çEµĘuŠŢ0 NŢóř”<ńß-tť^:c!(̬ŤwŢǵ;°|[şŘGˇ*±ŤÄ¤+!ng0÷io<ŃŁÁŞ]ţZôŐ¸N븰ó6’w“pňŢ1zXGěx¬(@l8ůÂű>¬őĚ UÓa?6ˇj đ+ *Z•7Ĺv ]çAK@áM~ĐÂFĎXZĎÖMZď6sÖ%FNĐ«UâËZ·‘ľoÂq$îf?Ń™˝Ąîfa9"$;n@ –E·tó‘Ó´ EŃc†îmÎ,^šJHŔ.z Ż#@ň~™ź,hÇ»łź®ű9iBş€úű ¬O#ř· ŢTężŢ5pö[Ó'•îŰ˝^'%–/Ď"ţÎ9$ţ±ěŤ Çu/ťßxďÚgs$”!˝Łô­›†'â\Ůď hÇ/ÁĽ3-2éJë&DH@éř4†?FúÝtç"ţ÷›BR˙:_ľy2×L„‡Â=KŻYšfN–"ÄžW ]OĚĄ?ˇGnóÝąąOć†Q+ÂÚĹĎůµÇt“žźt{?h·Ť¤+€Ľ ä­â9" ˇŞĂ@ ÷OtJW[˝Ň.Ô^çUé Lü­űEî9KÂZspăş…ł$.}¦•˙^úBÇĄ/tĚ~.˙¦Ţ±?†Ř=+súqi«€lńg®`:XëŢ˙ŇÝ>Xɬ”E9©LĘ[Ăeć „ÇĚ5é&RÉ•,·ÓHŢî c.yÚLłü«SęPöcöş{݆˝nŁŕ· /™[üUS †„7·Ő·´®'{"W+ÚT°žT !ý ŠĂóţZkVG^9)˝¶‘RbX× V«<§"€ŤëË-TM_wí‘Ë{8.ŕČŇtĄ÷“ŧXS·WWBS¶ąźsdrEĎ ĺČM"QAŃ»>®ě‰+z¨Pů@†H­Ů€( ůĺ4Çó|Ç˙«ł´SYdżŐ s)¨ĎĎŔş{ęŃ)ČĽ ;og\Šé >ÇČĺ‘®fô±— źž€ţîLµ->H#ݢ˛2˝.©—¦ůÄF6'áä‹řŐ1ňA»ťŽÖČÍ^Ýt7Ô üе^‹¨nEf#JŢşÚżý.O'm$ófq@S˝©'WBP PřĹDäĹ(d.Žy˝@7ťp^”vµ7B„{ŃFÁ•Eqç`ĺ§î=bÖ#oZkâŐa °Z,kńW1č–^{áuÂAÄN·?˝j® ©AO¨­Wč#‡ęOŰxÓ«…mł˱ „@ôh–m!ű(‹ěZćš„*o:đ7@ˇŕ”ĆýŢ*2]Ó;ÎŁŞ—^ĎQ(ţűq®˘M‚P‡J®P´“nlŻxŁ »Ę{łQ÷˘o˝­@ögĆQ jÍSŞJĹtŢę# #ϵW§«Ź¬ !˘l~4Ú^·aYE1ěH"PčÉëO† $ď{‚M×Č<'\@ †®BJ‰ŃHxŰlÜ‘*dŢDvÍ@fMâĆďuŘŇóÄ•ÇĹW4X=ZçM­ ó €c#ţ_S$â˙5ů0…ä˝4˘'TŻúĹDäČ*2ŹbČ™Y¨Cm®E-ޤdE‘ůy±“ÔC/ˇ se™•· \éJhB˝ßFäůF.Ź }>Ý~zĄ»‘ÂZM?hâĆĂĐhP… E(€ôŁ:F>AşU/Mé˝đúúđ~‚»!ćvłg®ă5r~=qťzÓšSOőCÄőKŕŐŠ˝^–§“6ňD•UśB- hŢzˇčžgN‹AŹÄ!ŇYőDW·@ެńŻQŐ@pżµčĄę~hµťE@@‚€,˙-ý nĐ[Śž—€«"űł‰‘Hç űŁGęÁ˛LuÄ[ęa擢”čĂąv®S)%RٲkŮâ/ŠŻeČ®Ů0s pňEĎKĐéUS…ţŠ'BÝŤu[jX:TüĹŽ'â䆷¸S~­ĘŞâĄá=˝,Ú€@o¦ŽS ©ű2÷-d~˛ŕ¬{ aąÎ+'Ęk×ä¬ö˝Ŕ9ËŞhÇÍ7Ë·20sGzk×9ćZ÷ŞE],Ë•¬<ýYâĆ-‰›Y8Ž=,p攎‘gŐíłqWy )Sbő±¬#ĽŠ^­PŹ2VLŇEů-Č€|aCÄ…H%$”ˇ(ý ‚J‘ĂI¤ę<éę‡ÄçS{ăż›Cň¶…BÁŠ?˱Υa×ËĄ¬VĚdV2틸J 8ÂŐ"Ý)8pŠËrli#ceĽ›ĂŚŮťk¦ÍŮĺlL[ÂÉX1wýôjŰŻQ†”r‡4{ľx7´î4=§ŇóTHď뉍Ă-:éMÇTüß2Ž:Ű}Ąëwŕp›lkô·Ů˙í桓6ŞôGŘY`żŇµ ‰ŤWLˇ(DH÷¦śÖÓ€;ÜőT ”N•7PşZIÍ!čÚ€T9ńRů)¸®®ýwGWńÖň¸ lÇř¤‹Ş…Đ«÷b'µâ”TgéĄj}AŐů «·őđő#íÚ€ˇČšYo] 9ęM·¤î›PB±ă#ŢTd7×HM]ÝBµ÷­JdUĽÂ"ď‰J!ś źY—uT(lĂÚiĆM7(¤5őJ¬­ţÂzâ”˝Ăvľ}ÁjWLZ–=¬v•ź¶ëO6t]… ,_Ϣ—0-NÎp¶ă`â¤ă`^YÓe?'ĄS~ ĂzEö®7Łqk=Ë.0wŮTłďvöBjąž•ł`8ä/’?nřŘ©aŔ˘0‘ř:čQ‹7ѶIüÍ,˙m ăoĎ"ţúW0zĚ«çÎŻś˘Ë±,Ş.¤;k—â9ć§ő_=&óŢ”jĆĘ@D÷éUzű>müşłM"î‘]˙:´¶}*ÎşąOç0{~¶n¸<­ÉjV+ž„[ŽńVţ_/ÜlßĚëq\ĽšhxN«ý­â/m»x5ŘX¬*®Ú2ŚěőË@ýµŃ&‰+!Ąĺ‰¦@1 t€˛1éJHgBéî.G:«ž7đI ŘŻbŁ#°Đ0 Dˇ?;g=[yťŐUP1|$ŰV»˘Ă,˝˝Ě- + «Đ»yÍFĹTjęaňWO–źPm n¶Ë˘ĎFˇ)ěĽ mHĺXČd3Ţz2Ei,âş©ź˘nŁ“­0˘ZŮ“Ú)¸Ą‰YéygŠSQ"PšÖ, rę®Ř˛ŽŘ\łŞ<ŁíßĎ X9€ľ%ůN?˛!„XY±`Ţ71T źS k*bÇ5OÄőÚ×Q?çy;Ą[@ön?yßj]ÂH(^…ąË‰ňţ™ w$ćdŢ„”^żšü1…ř«1@J8ë@„˝'‹#Qd‘zࡊčŃ(€Î_}sËźO!ţJńWâH|—Ŕč1§ęá‰*QŐ…zP/Ď·ľÎ=JŻt“×"ÍM"nĐŮąół›î†Ú9µáŘXőÝâĹ«‰*1UÚVy\i{3f*>;SúżňĽ™šĎŇřŤł2Íâ÷oĺy~Ec?Ún…‚… Š‹~‹‚M92 ˇčeoP „…·ľ ® ŮĹ€‘ĽY|ń¦+¬¸Ýâ ¦eŮ&Dq-ťč,=ýY"(ęÜÁI žČrÖ XÍ:0’zs¸«Ď›¦R]@ nÜ­ßWV(.Ŕ—]zEzazX‡&5$ď'a­o ;oAJYőMËŢP)š6 8oĘ5ŘC‰++„˝w»P(M׺…ŤiüŞéüţµĆ^޲źn_ą#8yÖş mHíkľłŹ$Đ ¤ď[HŢ11yJÇK'4¤÷äŞčłn×Ć“·Ěňő'Šmćť)ś}ý ®|±X;3ďL!·–ĂĹĎşxjŢ-xť]Ľ†NyáÇÉBď3a"˘#jŘ@ÖÁbĆÄÔ…k]Ťęń·ř| ±Ób§ $ŻgË×X/E•ż›ćýޤw檉Ĺ×uśąj"űŘFúŚ|Xď^q 9ßw?u¨5~ÄS«c+ŕ߸[Ąë'_ťÄ_ą˝ť˛÷˝Ť\ž¨B@ đ9‘[†ł¦@9‡PtČő śG ă@ sŰëźOŇF@P(E/ 1d@ ÇË*"ä­5‘xJ Ă{‹yŠÖőĽ¶ ?Ű0M g]bęMá˙P{°N¦4$kJŮśż4%¸}6ďI3kÝ‚ÄGăXążR~ú¬ç9°L…©˘°ńšŮĂG‹OŁJGn¬Í«lłĘémWö÷[¨EOšů8çM%»€í˘»O©Ľwý™Źs}rfN´ Đ©°Ö%·MÄG5LśĐĽ<„°eřµńRź & (šĚ]ľ‚©×&01^íP°Ö-,üýć.Ětuł* B®ç{V÷^§ôŰ9(á(ˇAJÓ{< ż¤QeôćSń7řr Ł'UŚžTĺmq9f¶wé-ľ®Wüőţ/ ¶’ Űk"η«tɆĂaärŢş–™wg  )ĺp/i$ζ“íĘS»ď‘뤍V îďÓŢÓŚ§€°8'—‚2Ţ˝O¬("a=t0|ąĽehb(â HÇ„PbĄ«…Ĺ»5 űI™»«0ůfńÓŞçĄ x¬[™ź©T!Ľµ:gƆŰnď~]§Ą8TE…™3a­[PzżÎÄ•EłńŕCIľU>ř1r⥎®‰zâ±ę{śÍRT­•ŧ/ű畳{#ݢMxëEŰKSoŤ©A!`­`;6‚ˇ`_ňť6mh<ˇ¸ř?«č*ĆOjŢ•ănM_ŘÍX´”q0ňĽ^SŻyŻ9Zř{µlęµ L˝6ŮO.˝}gŰĘkěMo 0ő٬÷>€ŘÉofEEěô9á˝˙îá NËw4L]¸Ö3›‹˝9Źä—Óž`fL¤Î§úű.ČJ!—ímzSßXXř­†©o,dŰH]Fô“ŐňţÄŠ‰Ô…á-+ߎőČĺr9\Ľ|3Ĺ÷·Ô†{E/•ŢCnŤ7+„ŞčPT"¤ (‚}˝VUĹ{ÝŹ™sŕŘ6„+Ľk«x yA! (Aú›w™2ë6ŇY ş ś9FP v?Wö´}čyĽć>­qSŻM@+ľÎb5kbq)3“qL˝6±IäµËĆ'¸xëđ.ź…¦…;ë‹+÷ďŻĎ#yŐ[ß—:żµ_;čuz żŐ*ţz˙§.x7ÂŃOVË˙ď5:ÂfŢťŮt7D‹ž·Q@…t-ď g/Żő#"Ą”OłvD7ľ31|LĹĚ…ah‡kßkß[¶s*µ[PC*"G#ČŢ“f†n@?Řź…óvľşŤúŤăx/Ěđ^7˘ iűU(Š‚`Híű4jŁ8 břp…°ÓĚUżŰĐ'aE ˇCUú_—#†@ęľčŃ bŁá-Ił×ý\üd´,ĐĆOĹĘ"t=Śč¨QŢß®7®’č;ő_ŤbäVaŢ_Áâ×K4ś9żŘORŔëg·úU[.÷¨ó/äę Úąµ.ţő"f~O×wÜío#Ż{ŢŠµßuŕî˝ôW˝ľ'¨OÄ"zďŰw ŻÓáĂ>8ÜűüU ±-­źŘ©‰­k‡No7DÆŢQ^†Źj.­­Ú‚rčCAč'[_w=ěçF"#‰ŚÔŤ;"z<Ščńhßʧ C=9Ś‘“Sad· ąĘ;żaäÖŠw?żź© W]\Ů$kw›đŰF„6@mś=&äjď~ęÝ ĹNÄXłŰź6"´Bhă„ě|:úDWí… gđ`ÚˇŤ˛űńĺ‘+¸ÖÔ€Ă6"´B'dďń «€B!„BŽB!„l!-§V—ľ]b- 8l#B ´qB(ä61ůę$khŔaÚˇŤB!WÇqXCŰĐmś তIÖ!dO2rX°O$„ěl!±caÖŮ–ľ]âÔ Ů’÷rm áŐíů0ůę$ŻT˛-$ďĺX „ 9˛»ďN;źBŮ­<Ă* „BŮ™řöČ9ŽĂµJ„=EŘŕ{ !»DČ)ОŁÖ*qm 4bǬ„űBČ Ă©UB!„ĘŔ<ě0sáă–Ç\üä}¶!„BČ  9?Bí컳¸ryŽ­F!„‚ťZýřż†Ďľ;ËV#„BÁ€yä¤ ç~7…3ççËŰ?ť\ŕʧs8{ľ=!7óş÷ŤÎ‹WM·m7Ą<µ›/?ei·ĽťćĄ—őĐişŘ¶„BHżčÚ#·t+7>J⍏’Xş•鉛şŕ‰83gÎśź‡ŕ¸Ý „J‘2h"®$>ÚÉăĹ«‰žŠ–ĘĽ\Ľš¨Ş·Në®›s·Şţ9„BH#şňČ-ÝĘ ů]{˙g09éXÄŔü‡ÓboÍbţĂéŞ}ýR•⨞Ŕ*m«'¸ęťÓ‰·¬t^)ťF"ŻU¸6_őŇő#+óPyžź:«=¦Uš•q׫çŇ>żemćŤőS6?ç5;†Bé7]yäJ"î«?ĹđŐźbUŰ:Âő~ÓĚcęĎ+7ýÁ<¦?/ďë%ďS+qÔH\ÔÍGżimyÚq•y®'V*g˝:«MŁŢąÝ”Ż^ý×+k˝cëµYٞ5j÷vâ&„BZČ5x÷ru­.0˙ĺ.]®Ú~éÂ4ćż\čŘ+×hŕ®ř;|ť3™ZOW«új%HšŐY»ĺŻĚW»ŢĹvÓďVdő3nB!¤şšZŤ˝ "ůŤ7>JVmëć öSŻOµµ˝W§4@·;ď¤)´zÓ–­ŽíGťm·ęg›qJ•BČVŇ•Gnr,‚Ř j•ët}\ďwî“yĚťź†Ö0w~ç>™/ďŰńSý¤[MŃőZč´šúŰNŹR«)áÝÔî„Bȶ ą’«÷G¸Kß,`X€ Ě˝ë˝vdXXúfˇ«5rÍB=qÓJĐÔ®%ëF5{¸˘Aá7OÍÄ\Ą×®ňX?k;IŻQŮZťÓIý7:§Ýum­ę‡OÁBŮ*öŤľ8úôě;ga5ZIÁzb!y;‰ÄőŤ5ýH6ť.-M­–xč„™ #6y®ĺq‰Żç|}Ýa'ěš^ Ái‡VB»şYr@¶‡ä˝F‹MŰÓŹdÝí„˛Ő Ě Ą, ń5?żU |±í`‰8B!„B® ü†ęf1G«ţŮ&„BvĄëfJ•B!„tĆ3¬B!„ťI`3•Ľ—ëza8–B!d·CŹ!„BČ%° 5ńNBH)ţ˝ößóE!„ ąCůc€ 'f‘˝3WţkçŮËI¶ŘżDźţľŚ‘#@ć~Ů‡í ą‘ČHůoé˙ÚýőöŐ;ŻQ„B!{VČ !`çm?°|а ܸóŮGŔą·Ćać€Řh"ĐŮGŻG"#HgŇHgŇUB¬r{íľĘýµ˙B!„tÂŔ®‘KŢ˵<¦ŃKK9ů+V)U˘ĎďCúáSH ( ]ŮQŢ:`•çQÄB!d× ąnľĚPňČ)"® Ő‡O1|tţ÷ńS8{ä!„B]˝FNJ@+Š8MřßÇOńo‡öA uî‘#„Bví í<0˙ő2fßÇDö!ť}аü›¶OźzëĺşY#W˘vş´Ń>B!„ 9”‡‰ÜĂŢGW¨?'  \üË,~yo|ľ˛§»ňóa•˙B!„Bn` Ô›ç Ź@a©wŻÁ9ĹĎsÖc‹@!„ ąAaĺú2FîÎB9=aÄ>1ĺřÄAWB]O!vHßĎÂÎŰmÇ_ňdŤDFęţ_y\íözÇÔ;§Uz~Ňit<}ú˛ĎąĘ5tŔ†g¬Ń´jĺńíxđęťÓ(mB!„ě.vĺ'ş¤+ˇ…€Ůw&ˇ…€™Oˇ…€ážË¬uľF®Ńú¸Vtş˝žŕëE\|‚BˇHD@`ü‚ nˇü7ö‡EDż±]Ó4ZŤ›™Š IDAT!„B(ä‰źŚłe !„˛ëy†U@!„B!G!„B(ä!„B…!„B…!„B${©°oĽµPwűW_LŃ!„B!7(ěŰ·Żh{Z^ą»@+ „B…Ü ‰¸§OźúxŰé‘«÷ą®­Ś«ňś^ć…B!{PČ-ÝĘ ůŤĄë«˝ br,Ňq\É[Y¨ ŘO˛PU6 ĽFž»ťH·"Ś"ŽBŮY ÔĂ%Wb?ŘXş•é8ľJg=ÉBş@âzÉ[ŔňwY,×YĽő>T_ůúÚíµŰ*÷UЧzqÔ;·Qś~ňă'ýVeô{njur,‚ɱŢÄe?ÉB„J6Ëß]+ď«üĐ}ÇŮÎb˙Zˇĺ÷řŇqŤÎog'žÂÚ4Jç7Š«Ńń„Bˇëµď‹{˙˝iÄO{I$®'‹Á)zăýÇŰlŞÓďöfâ§žpň›Víľ^Lß¶łťB![Ë®üÖjí»âĘď‹“Ĺße$2B!„˛‹ŘSßZ=űYi=śŽÄCsŰň±UBĘŹwŹB!rŹß÷ÄB!„ěžaB!„PČB!„ 9B!„B!G!„B!G!„B(ä!„B…!„B…!„Bˇ#„B!r„B!„BŽB!„BŽB!„PČB!„ 9B!„ 9B!„B!G!„B(ä!„B…!„B…!„Bˇ#„B!r„B!{€ß“÷r¬-BČž#ýH¶µťBRČĹŽ…Y[„B!;QČôĘB!„ \#G!„B!G!„B(äŮj×2Ě0Ă 3Ěđ ‡)ä)’Ľ—ĂŇőU†fa†Ţ1á}Ł/Ž>=űÎYG ¤VR°žXHŢN"q=Q>!ýH"v,Üôa‡™×ăĺ˙/^MěřA}ćőř@—ĂOţ­ ĄütšŻĘóšĹŃm:µ¶Î0Ă 3Ě0Ă~¦—téW)ęüśŰ«<ě%ú!Đş©ĂVçöBT¶{~»¶Č;;†fa†wZ¸kŹ\Łş™÷¤ŇcR;H×î«wžźxz!FjÓj”źĘ}őŽkĺ±l”nŁň6Ú×ěüVÇ7:żQ]4I­Ľdť¶q;ĺiV‡ôÄ1Ě0Ă 3Ľ›ÂŰşF®4ŔÖ6íx÷ĹÓŤWŃo~üL÷5óX6K·yo&Ž*ŹŻW‡ÍĽ¬Íâđ#öŰmăNËßNüĽłca†fx§…ňa‡^OÎĽŻúuGłĽâšşz"Şqă§Ü25Ü &OW= Ä0Ă 3Ě0ĂŢO­Vzk:Ýžżťeo$Äü®kŰ Ż´ďôfa†Ţ)á®…\«éĆzâ Wž¦~z±¶Ë{ÖŹkÔ ČM d5·µM!Rr\\O±·9yËČőPÓ™Ń:ŕÔxŮ@ €@€¤AĎČuMŇöâAפżm·í;_j[Núűě×–ö’t¤&LžRîË52íLß| )‡Zgý;źS €ą®Î*µRCěÂ_ş˛C,ĚMß)•÷±Ęó” 8ç*Ď’UNŽ@í÷«!9;ĹbčQŰ~©ŃĆĂ ‘»öíŰ97ŹŰ––T°Űö÷Ř~cNW3¤ŽrFĎĆ 2öçjKS*]ĺ;ćeÚVO9iíÓ¶Sĺ«ŰśďF€@n"±€cî‹pÉůJGÝb·‘SÇlëČRÇR?%MN—ł®îyh+“śs—Śüu±öžSÖm÷”#jmçë3â«çĂżÉCÉůr3yÇ:ßśý>Ë“ĺ–KÉ1sGĺşö‰Ť†»n‡2C‚ÇľĎĺĺwěQĚ®:,9_*Čňc/–ƱÎ ›8áxĚŘg톎vőŮHY©ßSůq c’ŽŻ–c®ĄÓ»Ü˝¸űx!|ł 7Oń«řÔ©Ż9˙Fa´gíŕSGäĆśNbŚtśbGwhÍÜowR÷u`Ő\MŮS˝ŕźZľuěęYřČZ«9r$ zF.µ†âˇÜ5»ö‹ť/µmé<ŕ?nű\KYS€Áo­ĆÖŹ,™ĚłëßSk(Ž˝Ţ¨Ŕke¶ö·xkió,4ăź$Íε«ĂM­S:ĆŚö±cćŚp6§üčú÷Ô1›kş¶Ą#5Â;ć$Đ©´ŚYGąÇl+SŁnTČĄ–ŢYrÇË[lbÓś­$+áĚąÝݶ yjÔ´ëłÇ.––±ë(÷©ŚôPE — „Ö¬ë6Xj©˘śŔ·ą_Î1sÓˇůR·sßr-˝U™ śKĘÚmSŞ äĆZtiA\î-·¶gsF{bK×s…ńü:ĘiÓ© Ľď1 ‹éGäÁo-/ŹŚťŽ©ň5¤ŽŚľĐ×$#r‡RěAő>ť^ę6aÍWóY°fYµý{ě­ŢÜgĄúÜvíJç:ęSOs×o×˱:ĘÍ_łŽrŹŮV§´–.ý=Ů\ov·ĎoĂůłóđđę!<ľ} ÷/ďĂÝ‹»ŹťÇ›m¸ąxÚ(ÔÖ±x \™¦Ň]s~JҦÍś®Á#rcO 14Ś_–KjiźS”µ6Ŕ @®¦ÎŃ„˛ĚÍÇZÚ­6€—räHôŚ\jmĚC9Ë8Ĺö‹ť/µ @ ×"¶¦hÉô%k6Ď p ÜZČĺ‹­°_ŽÉČ@ÜYm šóů¶Ô˘ő¶Ůf›m¶Ůf›m©mÇ4é]mŰŰ^nH=S×¶m‰Ë/ŚÉ3r 5É­ŐĂáÇŘZ—±gĺRź5ęä& ˛šŰÚ¦)9.€@®§ŘŰśĽĺ äz¨i„ĚhpjĽě @ @Ň g亦i{ń kŇß¶ ‚Űö‹ť/µ­$ ˝°ę@®«3K­Ô[}ˇte‡X0X’µoI°Š@nÍöÁbŰ+ąŁąűĄŐÜ´ŚťÎX ~Šĺ'Čí;Ţ® ˇ¦´(¤‚‹1Ö‹’–Üó ]“VąŔ‰r© ŻĆô¤FmšAęůéJK*Č)Igî*§V. ýÖY­Qî2dÇá™;ťĘćcú‘ Őŕ^]^Uh{Á>5É\óYĄşßnÍíśkşĺŐ–î®·›oÖvĺˇůŔ~ią·4ťĘ%TŃÎ ĺÉćzł»}~Îźť‡‡Wáńíc¸yî^Ü}ěĚŢlĂÍĹÓÖ€­¶Ž®ôAy˛ťŔŹČĹFÜćîX—ž–ŔŔ*ąšźŇ´ŢĐ^X*/;äČ4čąŘúM]K 5—GęÚ/vľÔ¶’<KŰۧ˛ŇŔŘy·Bą„®ůáş:ćŘżÇ:ÜÔzś±`°$Ç’*Ď5;ď§Rnä軍Ôhä~Ňٶŕłmş“©FžrÎŮl/=ď ›@[G_[Ç5Ě< \b·’› ľ÷=JĄĄ-:ĄĽ€@nć oͦČ_*jLÇ*ëcäruę:aÁŻĽ@9ӏ̬¦ŕőęňjÖôÜ`\“ŚČvرęűŚĘ5?;őHL[ÚoQ–¦Ąë˙)Ň)ď°nO6×›ÝíóŰpţě<<ĽzŹoĂýËűp÷âîcçřfn.ž¶lµuś}Ó4gNůaücćÝK¬Őŕą1GXĆHÇ’ó@=mVČŐ>‘nmyđRÂúĎ sň˛€@ÓrűąČćz°Ľí<9iűÁ÷SĐľ«NJëŻć|.ˇţ—’Î)żc§”ץćaÉ×Xd ·źÖa˙g]óŃĄÎ?ç#‚¸îvQZ5v~K™Öd­ÓŻĚ™§)ÚRéÚǵM*>fśł/µ8ňŽ}áş&Ť=śęŁkŃó¶é@J'ˇŤí;_*­©ÎĄäb›Ü6Vž9O•éĺÝ6ôaů•vŔCŇ’j‡c±ilJľ9í·$°™;ťąi9KÚuiZr®Ë±61ôZŃ7ď%߇Ňkť ÇY„Íőf÷ĺW_î^˙ěő|±űüÇźď6כݻwď>üůé׏»¦Ë‹Ë]—ć¶Ăżď˙żůßý˙·}¶ôĽ©m±óĹŇ•cĚĎç”gěď]e]rľ±ó’SGĄiéúěĐüĺÔInĄľąő^k:sÓÖ'-CŻ}÷ZŢ]çÍ9fIZ‡\ úÖCIJóťj?S_[ˇVgµ–s˙âÉe›úvĆ”K.ŻUËmÉcßÖšňVe[{;9íĄ†tćŽhĚń‹•Éď_*Ý%ßż>·#ÇLËŘmběŰú]i‰Ő_ŞnKŽ «¸µĘ´A屟kZĂdĎk˙2E{;ťµŐ]ě1‰’ň¬éůµ©ŇRK¦ň«żÜm5_“ˇË÷†|ąŹůđÜ%đ¦×üťI­ő°”tć¤eęŃĚĄ¶łÚŻ!Çŕ%şÚ†ž‡ IÇ^>8Ć/÷ľţ¶ţ‡>Č›{Ű O:Ű>ŰUǬ‹!i»}Ć:¦X=”ć!–Î>ŁÇLgéwlŠvÝöąÜrŰRź¦ë}o‰MË6Q’‡±ÚŮáyJ_tíëE–âÉćzł»}~Îźť‡‡Wáńíc¸yî^Ü}lŔo¶áćâéj…úuÉšÚŔRŰŞďXĺ0ĆůŐ%ĚÇ3r‘ ‘_câX{ýŤ}­Óá„9ŘS«Ą´‡%·[ßąă”ÁÚ_pµłÖ*€@Iž‘Ëťáp{㎽ÖcßýÇ©żt˘}0Y ×Őą¤ćJÍ1ÔŐˇĺĚÎ]2ˇĄ˛p1v™ĺ¶‰S{#nH»@ '`é ¸ĎÚ}9űĄŐÜ´ŚťÎ®}rFcsĎ—:fŞŽÖ\P] [ď°¶[Im3‡§n—Ž*Ž‘–Üó•ŽlĄę®ä|±cö)żSŞ8Z — jLOjĄ”L‘ź®´¤‚Ž’t–¦{Šr‰-u¶öz€*ą%,\]pÖôL×Üéśâ|±Ń+őŔ)3ýH…jpŻ.ŻŞ ´çţ˝`@í&‘k>;´ď„‡tĚ5Ý‚jKw×Ű…Í7k»ňĐ|€ľ´\Ź[šÎŇşrľÜú=|žîÔëžl®7»Űç·áüŮyxxőß>†ű—÷áîĹÝÇÎĺÍ6Ü\F= #xtuü©Ńȶ…ŕ›‹­çŽ6öIgŰSęś]ŁR9#®©5h›ÁMŰľ© n)e 'ȵuĽµu”}FŹÚF‰Ř­äćě}GsRii j†ÖON~úsHţj+kX} — "ÖlŠüĄ’f34-]ç«iµc•5śD 7÷č‚Ăyηö+#pÔÄô#3«)x˝şĽŞ"=Ső~(°v“ŚČv ±uLKžŰ:üűÜÁĹá-ĘŇ´t=€?E:ÇÜ˝¸űŘY˝Ů†›‹§­[mYß4Í™Ç×ŰÔ3K4xDnĚŹ1ұä<°üŕČŐ>‘nmy(†U—µú`n^vČ `ú@n?Ů\z·ť'' s?~ęľwŐIiýŐśĎ%Ô˙RŇ9ĺwě”ň*Ó]Ă`UÜ~š…ýź9tÍG—:˙śSŚâşŰEiýŐŘq,eš‘µN‡2gžŽ9auŰżK ÎćČĂŘÇśł_!Ά|ibŤĽk×Ă©>ş!o›¤tRŘŘ~±óĄŇšę\J.*±Éfcĺ™ó÷T™ŽQŢmA–_i<$-©v8f@›Ć¦äűÓ~K›ąÓ™›–ĂăĆÚuę\9ĺ’ĘCŰwąíĽ©su}˙Ríł¤]—¦%çşkc桴͗¦Ąô{”SÖ9×Ö1ňas˝Ů}ůŐ—»×?{˝űâ'_ě>˙ńç»Íőf÷îÝ»~úőă®éňârץąíđďű˙oţw˙˙mź-=oj[ě|±tĺóó9ĺű{WY—śoěĽäÔQiZş>;49u’[G©ďCn˝×šÎÜ´őIËĐëCßý†–w×ysŽY’Ö!ׂľő0v†´ů1ľÇc|f¬ë_É÷ťÓtV[`YÓđ]#JSĄcŞ%Č—»Şĺ¶ä±okMy«˛­˝LqŰ'gdęŘéĚEă;+“!ßżTşKľ9ő7EZĆnc㎴ަÉ*Ig*cç·V9b{ěçšÖ0ŮóÚ LŃ^ĆNgmu{L˘¤élűlWýł.†¤eěöëbőPš‡X:űŚ3ťĄß±)ÚuŰçr_ČmK}GŠş^ZčsK|hZ†´‰9ň0´Ž¦¸ľÄĘşôE‡!yç´=Ů\ov·ĎoĂůłóđđę!<ľ} ÷/ďĂÝ‹»ŹŤćÍ6Ü\<]íŻPż.YSXj[ő«ŁĆ8żş„ůxF.r!ň AkŻż±ŻuÚ śp ç{jµ”ö°ävë;wś2Xű .°vÖZČ  iĐ3rąS#nĎ]C1uܱ×zě»ß”r×U]ł–ŔĚ\W§›šK(5ĎUWGź3#vÉ„–5%e3w:¦Ě›IŤ`Ć@nÍb“3Ć‚ĘćÄ9ŁŠm ď?“»¦fźónëú÷ś´¦Ö lhFŢ`á\l˝ĂZ:úˇ#Rmł|ÇŔŘ(fÎhUßó ©źŘ­ńÔŠ‚7Xx — "jIÇ ˛ µŞS”[źó•–u×1‡–°@n WOń˘ÁÜÁÍçK­ˇ8v™íL?2Đ’ÎżşĽňr,Ř$#rmîw˝ÝšHĚ}Ű.¶ţ`ółҿ çĎÎĂĂ«‡đřö1ÜżĽw/î>v¸o¶áćâik°S[gÜ7Mn˙…Eל˛Á#r±·ą€ĄçáÔ8`Ć@®¦Ŕ§4-‚·eל2/;äČ0m ·ź‡¬ů úáż7··}6gżŘůRŰró0×÷쟯\ŹYÖ]ç®­ţ—’Î)żc§”WyčßźAÍżµÚ5?Üţ ł^gęxmű4˙žłiźt Ů7uÜS}°˙S‹«¬—2ŤĘZ§{™3OS”aî1K×S®©\jHsIźäzÍjąµ7ä¶/óţß۶çlk»84˝ďZ3µďâó±ăĆň—“–>ů•K[Ţ'}Ó[.c^ÄbÇL•IWť§ęaĚňś*ťąi9Kgßó)—fYtýź<~ľë©säî;ßuÖ§\b猥ł4MCʶ«¬Kęo é,­Űścöi ]iň}Î-ďľß•!y,IËz(ÉCźëjI†´Ť1®­§|˝f:ŐŤČëÖ[ÎŻđňŢgI°ćqűäoH=tť/7O%çł\†ä=ç¶úÔĎŕôM8f:sŐ—Ôíu7¤}¦ŇÝ÷»2ä¶×Đ´ŚÝ&Úň0ôZPr­ăšť{ľś6 ×kVrku®‹sßô´=w·VµNč|jĎfL‘×)ĘsětÖVDZÇJĘ3vrnSĄĺTŰnéůƸ\Żi2ýČÂxłvúô–ľÁśsA«ĺíĽ%¤3'-SŹfÖÚÖŹŃqŽý:ňŤňŕ—ΦnT±‡§ű\4§ÎŤ s·Ą-¶=wŰĐÎe¬Ž¦OţĆĘ[׾ĄÎNQ.StL±t¦ęˇäű;^Mé,­ŰŇzĎÍCŰ˱}şňŘu+rHąő˝%>4-CÚDIú\“Ć®÷) ŚŮ,őzÍtžl®7»Űç·áüŮyxxőß>†ű—÷áîĹÝÇŠzł 7O«ůeXăŻŐ5ĺŃPůzËl©u«MÖQcś_]ún0®ł1Q Qůš‡–ýr!uÁçő7öµG„ń ‘ŕxĽě @ €@@ €@‘?PIDAT€@9r9räräČ Č @ p"ÎJwĽşĽúäﯿ~m›m¶Ůfۉlęđds˝ŮÝ>ż çĎÎĂĂ«‡đřö1ÜżĽw/î>~yßlĂÍĹSĄP·VräČäČ Č°,gc°9řˇÔ¬ŕműćÎ$Ţwň!é,9@ő\sy—ľNI@4ô<}÷/9ŔŘÜZX¨łÚtxË2wÔëőׯ?ě7ÇHŮÜçXD Wí÷›ë¶çÜçhZÝ­ŐĂѲ5ž`µŔ©¨úąęś ÄÔ#Ŕęą9¦#š+ťcrk@ €@€@99fPĽ˛Cl™*ŰlłÍ6ŰÖ˝ ¨Ă“Íőfwűü6ś?;ŻÂăŰÇp˙ň>Ü˝¸űřĺ}ł 7O•@EÜZČ @  @ €@@ Ŕ˛ś ŮůpÖďZfüîJÓŐĺŐ¨i,Éű±fI;ﵟwŞôŐžźcÔMłMŁ}ä¨ébëśĆNçţx±Ž,•ŽąęńËeŠş.=ć~ż1Ň4őŹ%m`â@.÷—úaŕ»řv2mEWŇő™ÔČYÉůćčč˙žJcIúcűîŰ·Ăď:^Nýuť+•ʶ}Sĺ™j©€/•ζ`żíĽ©suŐSěCŰ`ßvÖçZ0F™0q 7ô—tłÓHuĚ]ťw¬Ărľc”Qź Ą­\úł+čé›ĆÜ@µ•äµO:cűäÔKW îÚžsś¶ö9ÖÚíl蔾eŔÄ\ÎHXNG›úő>fzç:_ÉFęóĄť]Î~Íş,mSÖßtŽ€ió©twµĎˇéo –¦hg]ůzť`Â[«SŚfÍ}ˇźâ|}G4Öd ůÍ]2b5G0ZK˝ă™Q€59ęô#sw(5µ—KiZćÎCęÖů\uWS˝uÝŢnţézĆÔ÷ ~“=#×ő«»ůŔtnçĐöŮ)˝ĎqľĂŃťŇr™:ďĄuÔőLWßňŚÝ~Ë=ßí¬íYľŘ>]ůčş=´lĆŞűÜm%ĺYZf|ôds˝ŮÝ>ż çĎÎĂĂ«‡đřö1ÜżĽw/î>^@ßlĂÍĹÓÖ€íÔ/®§PKÉŁö8]ů)[€: ‘+}x ťŢ©äM+ äNą_sŢ—š7çtĺ§lęd­U9’=#WăÔ±ő<Ç^b«OŢc/Gxţ(ŻĽÇ*§¶ş(].­ćď²©Ą¬O­ĚrŻ5ĽE\s›«|Jë6gÍéŘ1˝%Îl\m_ŕÔÚŤcę»ĆgMë¶.±“ŰňŠ­ę°ä·™KÖR]Ú5˘ö2Ë˝NÔP¦khóSÔíĐőŠMĽÍě\nśÓ°˙Ţö«%6ÚÖő™ÔŻĆ’óănjRŐś˛é“Ź®rÉą0uýâ,ůu;wg+Ż!k©ŽÝćsÓZŇů~w¦n÷©Ľ—–KÎ~K,łśöĐ•Ž1ÖîS6©5uťčű: 6FÝĆöË9fłl¦ľn™jJ 7ŮQ[cŽu†±_89@ßóÍQfążc)ęáXŁ:su]AÁÔAeß6¸¤QŘľ?¦Ćřnćě·D©6Ř8”^ĎJ÷‹}ŹbmąĎ¤Ô±cś’1Ę \çŤ4Ęovś]żĆľ8ÎuľÜ_UCËsŞzčsŻő×^ęů”cĄ'· ¦ęv)eťjg%m°kż%•Ůś×—cě—úaš;‚”sŚĄÔmi`5F™!K~QÇŠüçţ2ÖtľŇň¬íéĄ]LŹ}ś˘Mś˛S.łŇĽ–ě7ä{«ŁS ¶ÇşÎ».¬ß÷ji´¬˙ţŐĺŐču>Ĺ1×Đćű–KÎmČĄ•µ2;ÍďA×-ú9ę6¶_꯿~ýᏌ>Îćř"uÝŢčóüŐÜĂĺ5ť/•Ž®ˇő)Ň_ZcýB=F= ą™˘ÍĎQ·s\ƨŁ1ŔŻ­ĚjąžŤą_WP“ű2J,-S\—Jë6¶ßíeŚ2›ŁŹc:O6×›ÝíóŰpţě<<ĽzŹoĂýËűp÷âîcĺľŮ†›‹§­ čÔ+^¨eŤ2;ÍňP·Ôŕlچ|Š‘ĽŰ%.¤Ęe¦naŃÜ)7b_`ő ¬Qf§[&ę–ZXk@ €@€@99räräČäČ  á¬tǫ˫Oţţúëד&ôđ|Sź ` ŤČ˝ţúő‡?ÍŔnlűóä–kw6Őc#h]ŁyW—Wź|¶ů÷ÔąşÎY:z¸ßĎ °Ú@.€ţ=78ëc?"ŘvÜ)ΰř@.6bŐu«łyvę kČů€ŔjąŘ([,*ą}:F:ç:ŔF™~dŠ—jxyáęňĘK@µF{Ůáđ9µ¶Ŕîpô®íß›aßŕ°ëęÜÓ¤TȵDÍ ,wż>ÇČ˝e;Fŕ&čjfe9r9Ş2ĘĘ!Ôó†gl˝Ő1ÓŘ7ﱩTĽ›WŢc•S[]ô9v[Zjü. )›ZĘúË `¶@®¶‹W¬łźb}×T€Öuţ)‚ʵv"SMČ<ö´4}ŰCíÁňmjÍÎÔëHLČĺvŔ]»®ż·ýĘŤŤ¶u}&5RRrľ9Ę,6âÓ8ä”Mź|t•K¬ţbeY:r1w€+ŻŇö0E›ĎMkßún~w¦n÷©Ľ—–KÎ~K-3€Éąˇłć…8Őć¬ů úžoŽ2ËýĄë<¦¨‡µŚPt]AÁÔAeß6¸¤€ˇďŹ©1ľ›9űä"Ł(CFłšgׯé1Ó;çůrG†–çTőłOßms‹Ąĺ·Gű¶ÁTÝ.Ą¬Sí¬¤ ví·¤28j ׼(ŽőKxî mMç+-Ď9G× m´§Ö HÝÖq]8¦ŁN?˛äĂé_W—WŁ×ůÇ\C›ď[.9·!—VÖ5”ŔÔ&{F®ëWpó!ä>o}–>¸_úË˝–óĄŇŃuËhŠô—ÖßmiŽiÚň4´ž˘ÍĎQ·s\ƨŁ>/',ĄĚr=Ů\ov·ĎoĂůłóđđę!<ľ} ÷/ďĂÝ‹»Ź«7Űpsń´őÂxę/e ”5Ç2xDîTŤş-,°PÖ,:;勺M=(kŽÍZ«9räräČäČ @  @ €@@ €@ gCvľşĽúđ˙Żż~ÝúďÍíW—W˙䳇ۺö‹ť/µ­$ÍĎô9ćPcžŻ´\€•r]ÁAWĐ–¨äSͿǂÁ’<ôŮ>¶1Ď7¤\€•rkŐ |b#ŽmŁŻż~ýásműĆFÇ< Ő>čč­ë XćNcß@*\Őv>@ 7iUłTŔ´ĎG3?Ąů+= ›$`[ęčQŰózk:° ¦9B(Ć0ÉÜa {żď3d5=?×L÷”S”Ě}>ŕ„ąX€{f¬¶i@ĆĘăyâŔ‰rµLy1ävelšąň6ŐůÜĆ\«ĄŚ•ě·äI€k­#`\^vČ `Ú@n?'ZŰÔÍ?‡ŰšźÍŮ/vľÔ¶śô—Ľ04]űĎ­Ć"şŇT[Z—’Î)ŰĂ)ĺuIy¨=o§ÔÎĆČË~Şo_śŰÇőŮž:_×>]Nµí´üÖj×üpűÂëZOµďKm«´M]Ň·ÂbÇš÷±Ęsjµ˝±”9ňÖ:—ßśyš˘ sŹ™ş¦,ˇm-ą žJ;# 8Ű~¸~wlÚ°Ň´ĺ|Çú~®ýĄżł@ď‹ü©Bş¦k‰óđ Ű·ëK—sA‰-Ö'=SLG;fWąĄĘ$UŢ%ąÓ™›–Ř…¶O»Î)—TÚ~ě´ť·´ ĆŽ™S^c¦%Uż©6QR÷Çú®hgyuTňCżmĐ„đýć±ú¸*m®7»/żúr÷úgŻw_üä‹Ýç?ţ|·ąŢěŢ˝{÷áĎOż~ÜµąĽ¸ÜĹ´mß˙[óżű˙?ü;V׹Sij~vČůbçJ}ľíś±ýšűö9fN9ôŮ~xžŘ¶±rŹ•CWątµłÔ~µ§37m}Ň2´­÷ÝohyÇÚ`I›;-Cęˇ$Çü®hgă^sÇj«9}M*}Űjě|]}îĐţvÎ>®FŐŤČsţ¶9ĺôYž¬ĎŻ˝±žHgźžŘűŘ·*ş–*›˛^ú>0W:sG Çl%u7di˝Ň6xŚ[b©´ŚÝ&jhÚٰďć\ׂˇ·dűŚ&§Î;öÝX×—“şµ:ןáËšëiŠ/ŮÁýŘé¬íâ»ÝSRž5µÁ©Ň˛–IǵłeÔkěy·ľ/ŢőX¨±Ý-©ŹËaú‘"÷5ł$ ĄoVĄľđµäo éĚIËÔŁ™Kř‘˛ÄkHŤmP;›îúŮĚďÔmřđEĂ?µ–yiźł&gS©c öiC†ÎsÓÚö@éŽ%sŽ‹Gę-ć®üµĄłätîC°5Ął´M”¶—Ü<´=ôۧ+ŹCÚ`×1űŢŽš–!m˘$s·AíěuńK5©ľ1U·ĄöÔŹ`”ŢVžŞŻĄŹ›Ú“Íőfwűü6ś?;ŻÂăŰÇp˙ň>Ü˝¸űé7Űpsń´š_·5ţâ^rţŹ]f¦‘îS(‡1Î_s]jgřîÇŮ4GÝ÷—Ŕ)5Đ’_@sţúÄqŠő7öCďÚ ”}˙Öţ˝4"ŔńxŮ@ €@€¤A/;äNáp¸=w ľÔqÇZ“ŕ$ą® )5çQj.¤® 16§WÉbÄKćÖ*€@._léýrFÖâÎjKМϷĄ–c˛Í6ŰlłÍ6ŰlKm;¦I—čjŰŢörCÎ:‚©gärÓ°ž‘X¨In­?ĆÖbŤ=+—ú¬Q7@ 7XŐÜÖ6…HÉqr=ĹFÜćä-W@ ×CM#dFë€Săe9’=#×5HŰ‹]“ţ¶Mܶ_ě|©m9éo;WI:S“÷Mc*­9%÷-·>ő»mH›đü#LČu$©N8Ö9—®ě rÓź4 2JöĚôY-٤ú¤S@ărkőHúL†\jHĐÔďě'Ý1]Łu‡ź›ÚV‹8 úćJcWąÄŇ’J§•9`\*h9ÖůjĄšű™±ś[¤miÉŮŚăh·V縵¸F5•[,-ęVČťş9FÖZ°n“ÜZ= bĎLő &šź+Ęy¬ą-•żśé9ú¤?vĽTąÄ¶çćńp[ÉÔ#Cë¶ô¸°vO6×›ÝíóŰpţě<<ĽzŹoĂýËűp÷âîcÇůfn.ž¶µuŞŢĆNĹ๹ߦLĄ@ —ˇ¦‘/ŁpŔ©ń˛€@Iž‘Ëťşâp{ó­ŇĂżÇö‹ť/µ @ עk~¸¶ ­-xË9^*lžŕ¸µ Ë[ŃáęňęĂşťŐ– 9źo+]nĘ6ŰlłÍ6Űlł­“.ŃŐ¶˝íĺ†Ô3umŰJžżXĎČ,Ô$·V‡ck±Ćž•K}Ö¨ ›@,Čjnk›B¤ä¸ąžb#nsň–+ 롦2ŁuŔ©ń˛€@Iž‘뚤íĹ®IŰ&nŰ/vľÔ¶TÚcçÓ”Ó§Ô2r­3_/˝\`ô@®«ŁN­ÔëKWv©ó”tÖ%űôMcźóŐÄ z`AÜšĄF۶O1"•{ľ®QĘýdĘ}F1űN+34Ë]ß.–‡ÜýöiíĘc,ďkq@ ×[W`‘ę´çâşFíb鏭-;EyĄFů÷mŢĆ:*Ů'ř- S·âKGp»Ž»ŐoÄ\FвtK™śxěçKĂÔňkS”giş,€@.ô[guiA\ęĹŹµÍCŽ—óücmef„€c3ýťé©/{fŮ7j7ÉÜa{pĽĎ¨ÜÜ·µRçëÚŢ–§1ź“+˙mé:˘VzĽŘ~±ăöŮ–›–ćKmmy®6)O6×›ÝíóŰpţě<<ĽzŹoĂýËűp÷âîc‡őfn.ž¶vŔµufnw§bđ\ßi*¦ ŕr™j}ŕxŮ@ €@€¤AĎČĄÖ"=”ł4TlżŘůRŰrŇ;ýů©Ź3¦±WÚ>§Îkî˛a}Ë-ö+9îXkÉN•ή:ěsťŘoŇSyČ)ĎśŐJ<ç Ů\ov_~őĺîőĎ^ďľřÉ»Ďüůns˝Ů˝{÷îĂźź~ý¸ksyqą‹iŰ~yqůÉżwýęX]źMĄ©ôłS+-µçXežŰ^ĆJăľ]ÇÚüĐĽ÷ů~ä|nHMťÎŇďxÎńǬ‡ÜňśŞ¬΄˛ýGsˇď3j8ä×}ÎhäŘŁ=©×±Fr¸{Ô˘+˙©Ľ§FuRŁŃs·ßÔŇg‡m9wdjŽ‘Ł%Ě٧mfŚ¶Ô§L†´í±Ú}Î1‡NwŇ7±gňbۦJ'pzžl®7»Űç·áüŮyxxőß>†ű—÷áîĹÝNj̛m¸ąx:ęAŤŁK2xDnÎ) úübČEÔ4ňe85^vČ  iĐ3rąSnO-7Őµ_ě|©m9éŹ÷ŘKňL±LUMRSWôÉ{¬=ĺ´A8™@®+ I-‘“Zë˛$)]<ŐO±¬7l§ žcëÓŔąµ b3Ů~¦kż1¶Ăsć¦őđßúěËcŰ9şÎ9GŢs‚ţ1Ž 5:ĘZ«±5ç^˝!6ű¬Łďý™{1ěś‘ĘýżĹF¬ÚŇy¸ß±ęˇ´ŽŃ–ŕ$ąT·„óĄžÓš2řMŤŠŤ]69áĺ™ Fs¸!Ç\F`˛6mÄÚ‚ß%P&śĎČ NŠđ®[ăSŤHć΂=NÉ$#rmÇw˝ÝšŰé7?[k'ÜuësŞô¶ť/ç\5•gIúcĺZZ&°4O6×›ÝíóŰpţě<<ĽzŹoĂýËűp÷âîc'řfn.žfw¤ÇdÚ‰Ó)gu Ŕ©<"q›»SgľrÄŔÂąš:Rťúi•łú/;äČaĐ3r]ÓW´˝xł4TlżŘůRŰr-şćńj ÚÚ‚·śăĄŔć9N[«ą|±öK<Y;«-As>ß[ĆÉ6ŰlłÍ6Űlł-gŰ1MşDWŰö¶—RĎÔµm+yţ`M<#°P“ÜZ=~Ś­Í{V.őYŁn€@n± «ą­m ‘’ăäzŠŤ¸ÍÉ[®€@®‡šFČŚÖ§ĆËŔbyČä8žâgäRłwý˝íÖHî„Ŕmç’ÖśI†cçmŰË_NąuĄ3·Ěše=ôŮÁcżĚ2ĺ”35M›ŕúĺ?W>מo€ęąTđ–Ú§¤-ŮwHgÝgĄ‰®răxÇęĐĆ^=chťŹ}ľ‚„XľĆĘ—äTó 0k wĚ‹üÔř!AפFşFĘR˙ž3Š9FŮ枯k”µ«Ťĺî;4Pmž»o›ĎůŤĺŻOÝNŘݧ\Ru?Çwŕdą%¬´ë`¦ ‚ÚĘ%––T:k)ëXÇ»ÍŰ/¶ďéLŤňî«5Ŕ(]łxČZÇ]lj=V!@8r ·„N­ŮqϑƜŰymiÉٶVK™V"–ÎZę(µśÝeťűXE3]–Ý8b ·45ݦIŤťŇhEŰčNÍmh)m˝«|kťČŰ@‹ś~dŽ ~s´ w§ëęňj´vŃlckr|gĆ7É3r±[&ÍÎ)¶˝k[ź-vĽÔ­ťŘöÜ<n+™z¤o‡ßçáő±‚Śćsp}Ëł-0ó9ą±ňޖα¦wikߥĎwöió©zČ­Űś2k NÇn›§ćÉćzł»}~Îźť‡‡Wáńíc¸yî^Ü}ĽŔľŮ†›‹§JëĸŐEmmP›řÔ™" Ë1Ţř…}Ŕ¦Ýä!í NÖZx9räräČäČ @  @ @±łÜŢ˙ß_(-€ĄrWżů™’¨Ś[« •}kőO˙Ű_*­7żó»F*€erűŕ…î˙ćŻĂÍĹÓđţý{…Ť[« u6ĆAţă߼küË6|ű]ŰďB˙Âűmď¶Űö˙öŹţúůo©€cr!„đĺżůePömáý7۰ýfŢ}Âűw߆ź˙Ýűđíöł°Ýn?|ţżü­çËŞäţňŐĎ;·}˙űź…ď‡B8Ţţv«ôjä~ôĂ_ďőůŰ˙ősĄPC 7¶?úý|ř˙?ýó;5Đ0é[«_ý§?(âţôĎď>ü9 ęú€c’« ä~ţ.Ě}ţéźDw¨Ě5¬ýß›˙mţ[×~9ǨÍŮGŘO-Ňć÷ţđGá«?i™űăŃ3łřšŕáżµmĎ=ŔşąďBx˙Íţ/ßDýęO~ţőż˙!lĂďýá…°ýyŘ~ó¶ßü<„ďŢ…/_ţ‡Ÿ͒I°F#>#× âľ aű.Ľs¶÷¶ß<†BřěW+„Ď~=Ü\~ńâGj Đxo­~÷mřdf¸ďއíwŰp÷?ţÉGđĂó°ýgżňIđ·×v[3v›ÓË €@n '˙îăň_ţFŰícŰwá÷~˙|Ü6lżŰ†°}Âö1z¬ćË ±—Ú>۶«ďqVČýôů§“˙âEá›Ç°Ýľwń—ţý˙ęćĂH]ř‡o“Á\îö¶@/÷X}ްş@®éé˙,üŐź˙(üŕ‡çáć_üÖ‡˙ĺ‹Űľ{î˙Ď6<ýáź©€šą}0wy™a® Ψ + ćĆ÷Ŕ2ő‘»˙›żVbK än~çwĂÍĹS%°´@îę7? ďßżWb•đŚŔBuŽČýŃ}­t–Čý÷ß(€%rž‡¨›gäräČäČ0s wóŰ7źü9ü÷ÜýÇřLé1JŹť›×’2;ʵ«®§Hó\í¤ö:`e\!ÜżĽ˙đçđßr÷]˘’t/5ŻÇ,ł)żÔľ7ż}38Í}÷ży/`łBřŃ~Bř¸$×ůŻöď$÷ťŘţ˙÷ÔaçÖě,;±f'ضÎż÷éÔSikć©O€[&mÇč{®Tž·ĺ¤!7}}Ę,vüśĎŽbžŁíÍ|—ks´ČýŰůiGýWGNRť[ŞÓkŰ?ç˙sžśŽ·o>KĎ›{ŚŘçRÇŰ5ąNiŮć–SNŢšźß§»k$8uŚÜö6w;iËô äŢómďQŠŘČQN§ëŔRťţÇę0§>oWą”ÜźSnĐ6$ßKj'Đ;{÷÷ŰŁtp%Ł:Řu•KWČi]·YŕT|/„¶ŰO˙Ł#Ë”o˝ÖrŢc-ąoěŽŐjŕXíöţńÖęvöçܢMuěűýşčďsŢ>DzOé1bźë*—Ň@*·\JŇŢ•ľĂ¸TZÚę}_·±Űý±[ůą/gŚÝNú<ËMO6×›]řŤŰO˙ő˙}î^Ü)ť#¨˝#_k q¬| Üâ—#rŤąď+—Y;ňC:őă8ĆŰŁ‚8†z˛ąŢě~ńkđÉ?>ýű˙aD rg!„ľSË äÎŔ"ąĎ>ű•O˙őď Ŕ"ąď¦ ČýĘgźFr߆~đĂ(€Úąď˙ę§Ü÷/˙¸×Aţ÷}¸˙‹?PšsrźŤpku{„Ő!N>űçż6<’Űnrsú˙|}" Ť†µIEND®B`‚doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/Context_Menu.png0000644000175000017500000005343410431726002031222 0ustar twernertwerner‰PNG  IHDRôôËÖߊ pHYs ‰ ‰7ÉË­tIMEŐ &ÓĚ#DtEXtCommentCreated with The GIMPďd%n IDATxÚěťohWľţź,Z8f  RČ\¨L ‘ą…Z$/˘K˘Ň µé…:lˇë´°Mva›lá6n_´nşin“,lă¶Ä… qá†*°aĺů!R¤@ŠUHąh`1Ě@:Đü^Ś$Kăi4ٲý|ŔXóďüźóśď÷ś™Ůŕ!„˛­‰MžÄŇW–!„˛ťLK˛$!„í.čzŐdIB!Ű]Đ :!„˛í˝jY, B!d» z˝ÖűÄě3‹˙ÔŇôÉ„€ąfA@ÚÎ9"H ¨Š€±h µŻ‚â÷,hB!dč‚nÉzĎË ďť_ß)eL8ˇŘ€¬5ÄÝVç Wpęó,iB!dŘ‚.ę=‡^ů ‘®C8’ű4hOç=®!±Đď+·MşÔtč÷« Ë?HřpůśsľÎţąY—ű/~YFů®8sç^ËoT ˙hn§… T×$Šeů[ú¶©Ľf>–nTZévçMÖò°r×@aElř—C•;U,üŁÔ3^7g˙T€ŐŁ®5MĹÔ±Rű§]=°°äŞź@qPg~íb3ë .~QFąâ´g8˙VB T[DL wTĂÄÓI$'#UK˘t×@ţ˙é­űąß˛účó2*÷ŚČĎoĄ;.pâř8ŇO& ĆŁÄZ“(U ,ݬ ­Í„ svj“˙žpîť,|ôY1ŇvŮoŮŤŇ˝EšŹ­¸Ď&@J"‰ĚdÉýI–‰RY pµŚ©§5ĚţfŮŁYśz}+ËEŔ~Ç &mP(;nü&Ĺr ú ™H GŰďĆę=U PĄÓëđťŽRĄŠ‰ ¤i:žBáŽăáöŞÄŇ÷”ľ7 í×ZűŞU †%ˇ%hűśżôÁ$ć/• ŃY!ŐŞcmýć+¬TPĽSFęÉt×x ßV:¶—ňy¤žÎ@4UÉ]O¨8÷Ę$ ßč€-‘=śÂąW'qňOyî˙(ę¬W»Ř,&žVpĺf É˝IäŽ$Ń^lý¶ő-ó1ůßgŘëd˘|G‡0ů”†ÜQ ©”Šą˙)AĘŕťţŔ‚e™Č/(Pö+‹âí"¬š|ţÜËH?©@Ö$ ßHHB{"Žâw¤¤†Ňfú SÄŇO%ZŰ© VБܧEVŹý–ݨŢ[»ŰBp“k€rż>…ÇUĚ˝w bĚB|L…UÓˇÄtHsĄ»qH;S€t\ń˛˙Uô§^ĘâÚňE¨cť KÚ˛^î†ÜŃ´˝RĹďt\üGRJ|}iŞuÍ•Źgśí} g?\‰Îµ›e,,•|\EiéL㦑0P÷Ş=ăpDJÁ™_O ąWqÖH'ž…ë%躳ذ™–ĹL¦’Đö)°j _UP¸íX—éIĚľ‚¶Ob€eI”ú·— \ř˛€‹‹E!0ý« \x{ © 2Ďı´lu ”ÚĎm˘Şj×z“~ő"Ô±öV8S.>×MŐb^Áôo/BU\ůx“‡4LNbţó Ô1Ń5źÖY·v¤.Ł˘ş&1yHC<ćÔŰôQ –%ˇ(bCťöJש™4r‡5¬Ü©bţoN{I&\~; 8ůNĆš Ôž´UoË1ĺą üÇˡTŃ!ĆL¤’řúŇ)h Ď=ÇÂŤ*DL´ây˙Ż+(6<Í}sꬠ\1ś{aź‚ÄŢ$ôµ:„”Ȥ“:ćÜ'˘QŽó_7ÔOÝÎLĄ;ě”ëŮŹ‹0ÖĽë0}ŔiĂĎ˝~ĄŠU(¨H>®Â|hŕÚ˙ž¨Í´Ęôz“i§LŰńëźÜd'ťAźU“0- mź‚çŽj(ܶZ÷®W\Í2RvÚ*¦Źg1ůTÂłŢű˝·ôTE2Ľ˙é Še§®OOaćůT+ĎÍk—nęȤOĺ…Źľ(Á0¬@ń“¦ X—Tśł“OÄ‘żi {, ±7‰xLB‰eL<‡ÔÁţ¶„•[&S­$üKďFSÇÓ=>…ë®N¤ŢÔ1 §^Jò$>ú˘€LZCöY qÇ™‹Xş©cę3rÍ/W W č,”Ę%Nă™>–ĆÄ“)¤:Ë’Č/—$˝ăÇEÄ!%°đeVM"{$…ÉCćä^ż‚xLm%}ęX K×ËĐ« ˛Ďj8óë4ň7K@LĹŮWŇP‹_®ŔZ3ˇíW‘Ň4TľŻ@Ű—ę]höĆrN>žDr݆Ę=Ç"Î>«aúh }^„–XŐź~)‹Ç3@Ěé®\Ż`Ąlt­7!ăÖy!P]“řzEÇâW§~|®Ip¬‹ň]§ł×öM@×%&™t ŐwňkÝó:hťukéĎ®ËAY¸ZŔąßćpęĹ Jß›P÷˙šÇąßć6´ő^m,˙OąĂ&źJ@żŻ#ąWCöS>…o*¸v=ŹÔÁ N<źęŮž´U/2O9ń--—QŞčЦˇ R…oť¶—=’ÂÜ'…Žö\Ş”`<P•őp+•ŚjŰŔFš5ě g^uĽF+ßęXŐ«?€4tŐÎ^íě+YäkĐď[xîµó0L‰”6¸‡÷¨ş&‘H\ţ`+eú‰Ő{Şkâ‰ddmfćůVľŐQľ«CÓ’H?™đ süŕ„Ź 7Ňpł cÍÄ™Ws}!+_- ™č´ŇŰă*Ţ."ťÎŕÜ«“=Ëîüg°ň]ú Ú~ĄŁŢĂŢ[Ú^§^Éb2ĄŕÚőT%‰É´ÖvĘŁT^mőÉŮg’XřŞŚě3 ¤źŇpî• śx#ʏúc :€şÝ{tc6çĂ­:>YD™cYäŽMŕě›9Wʸřń"*߯bňů4’ e żĂ [.AÓ’}q ×K.KÔ oú¸Ó)Ě˙5ŹĄĺň·4üëłYLJ . ś˙\¶×ÂŐŠw ÄGü±ő,ý”†ôSí^ bL ĹQ—* eKË% ¨Ź«řzĹ@qqŠ"  ł¶ž÷‹źç1)ŹäV˙÷ EB_“ÎŰŚŞýG‰k·tF°ëĘŻY.~űŞŤyŹÄ^¦i ŃćRK$$Ö=y°j Ë€2ćÝyËPĽSAŐ”Hi ŇOi}!@bájĹ7ŤĘXł-IÄă*ę¶„ŮY+c¦4‘č‘×Aë¬[»T—ťĆ»ťóűłďä{Öתn đŤŽ©ci¤S–# ‹…AoÖ_Żt•ľŻ˘rßBjż‚Ü‘$ eŮęüţQ„sĽ>AÚs ¶ęQMĎ‚Q5!ĆX|˝í=l´=EůÓĆ:–mwăö‰çS 볌Sď,@ńxőzęăëíůüÓĐö'PţľŠéWĎĂ”€¦Ą€w_4w©sŻM´¦¦- ůeóź®ŕüç+µ™f™~YŔ܇KN} ăÖ9Ď0˝Ň¨íSjx®Ý(ÁŞg^uîÝÔ“JËă×ÂÁĘîâUçşd2‰ŐüąŽz{o% śú5=ś>ÎCŮ+ ís,ěkůTu=ţůOóXřGů§Sř×głĐö)PfMí«ýîr—{€9˛ĆJvýžDr_Ć%U Ĺ•$!‘  ¦".â­GŮ‚†ďćügE\ůp gťŮ RR˘5Wwţż§pţż§:˙^âwť+÷ŐÇ’˘łÂçţ˛„‹/@¸üçYdźMaáÝ8ńć×@,X™×pćĺRű• ť˝¬¶·đďęPU "–ě¨Y3ńŃeśůu óXŹ'ż¬cî“•`ĺg{”sŰ>íqµaŤX€-;Îm–CGy=®AúŚx3//B׋Bbq|ôf3ϧ1},…ąŹóH>î=§gŐQWÇD+m˘á°jrCş<ç;#¨3żv1ľ?Ńł.Ým¨9—Ů1÷«Ż"™ďmĄ˙ŁŚěł´ý ®®ttţím}â©ŢéZşˇăÜoÓ8q|ĆĂ2{ĎI~ą őńTß÷L·¶ Ź2hN$÷ŞâőčŇöšýƶfoÜN$śôďT Ć’­v枦Őö;ŁÓ+_P·…S6:ú¤Ž5(ßUńÜkW Ć$&$1u,ŤÜŃrG5,\_~µ™V™®t¦Ű/LŻ{ŕą#©V9nWL¦Z¸Ůç'púĎĹŽ¸;®DB TvĹb, !´ őöŢj÷ŇLKAiLŁ.Ý,;®ň¶6fühB}, łoó č‚Ĺ/Dś‚.<¶Ölh•Šíéq¤Ňq$÷ĄPĽ™‡Ó0y4‹ě1éÉ’O$PĽm¶fĐđŰYůVÇĘ·:¦Ž»fŮRÖQ­:n˛Ź>ÍŁčšŰ«<0 ŰGk±ć<ţĆt±$Äc č?xHHŔ0*H>ž Çů72PĄ›e,\-BÄ€k—Nµ•™ÜĐIąËCJ‰+_•páË<´˝ŔÄÓ.Ľ=ÜQ sź,AĘŢ Kę?KW¸Í}SÇĆ[+cŻÝ,9sÝ®sĹXęc Wş<ĘKÄť©—dşm°§´Yďäc äŽj ÷zĆZ˝Ńq:7uúi őż—!dăťz*–+ŰĘ uć×.‚ŐĺĆôŤç`ĺže·ˇŤßŃQůÁBꀂ‹_|í <Úzt]»YÁ™WŇHŇpşŃή|U b˘˙{¦K[ő*ÂŠŽ©ă)䎦1ţe±Uç©'“Č6ŰŢr[ŰłťňWÇTŔ6 íńtn7Óź9¤áÚ?Ťő´Ĺ:‹_­`ć…Iś˙ďH;ŹÂŠá+ć;Şˇ°R‡¬ ľ5Qú®€ÜQG@ŐXĺöo…j3ë´ř/7Ţ{Ýú§ćńćý¤(fů‚+ýiżä!ĄđŤ+hŮI[z¦±˝üĂÜ[ KdźŐ0űB¦µHúĘW§ÍŰëqŤLbĺ; ZBtxá¤DńďjA·ąÝ¨x«‚™O ° o\Aĺ;é´†•[WŠĐ¦ńÜń$ ˙[hM¦ Ł@óź•ńőżkö#\¸ZĆüď&1űbB”aI@K(|&‰÷/ńő˙Óťą±˝sŻOŁt×™[řjµc>v|żĺqągťx w*NGj‹Ł˝T'ŽOnLŻGúÝűŠ‹'P¸­ĂX“H6F˘°ëˇú/â1ŃŰBo+çÓ/e1}<-ˇ´ÜˇĺďtĚ_Ę;Łf÷ąÇÖçĐ ·u\üÂű±µä^Ż˙g Ĺ練Öˇ=ˇ"ý”ҸA‹­ú>˙GgAÖ‰7—°úŔD<&đŃß+Čţ»†ěł)\ůÓ â<”lŕŁO @LéŮV˘¨ł^í˘k]úx-ÔÇÓď—müą×ŻÁ4ťô 5Ő=ľnéŞŐ±tł‚™çSlÜ3 _;꺯öÜĄ­z•Áüçe¤ÓIh ˙úěVľŻBÎĺ×3̦`ŃZÓU…˙Wüąý3•0u,……ë†o\AË®[˝ro­Ü1Z…śĹrŲˇj÷Ę™WłĐökČ>ă´áőóRÁÚŻMA„:gŢgMÇĘ­ &žN@˙Aľł á,Z©Ü1=’Ańfú?Ď]ůÁÄŇ˛Ž©Ł]T‹×WaŐLĚ>?Ů'!bŤç’ďę(Ý)? Ě˙µ3ŻL ýdé'Xů®Š ‹ĎůŘęšDáVsź\g8N}XŔük:žFć™.|YlŤ¦űaőľ…ě¤ÖZ)ět€_ìI¨Şč;ĽDBAbŻăĘ.§ăÚŤ2.ţñŘÜ–¸{˝r¨˙TEÜukKËŤЇĎĂŢŻâĘWE\ü{B¸žJđłb• <÷Ćć^N#Óť•ouĚ]ZrVE«˝˙EQg~í"ŞşěµGľ¦ëĘ GĐg1śaXmó“AĘ&,–UÇĽv §^Đ;Úx¦;Öś:*cö­+6ZmoîăćßČ } ϧqá‹"ć˙íÇâŤUTM§ţ+…ĚSÄ!§Ă×ďWPw=ă~íź:„(ŕüł=EýŁ/ĘČ<­ µ? Eq_[ůVÇüĄ%-¨jr(mĆ/ĚxĽóľ;q|ĽĺŃ™ţÝĹV[wÖośŔÔńf_Čbá#);ß0¸·âń®|UÁü&aÄcŠ«Lň>–FbŻ@ů»*fßYhś'‚µßŘŐ‚ľgňđäŁj|¶ç‰ągźĂĹ÷ć—§¤ÓiLĘ@Q%t1CŻâĘEXk€`Ú±Sd>,7ÜŞâq§˛Íźt@Zö@˝n9˘ŃZHâTŞx,‰xL8ÇkZަZń¸śą€ńd‡EÜ_˘1odt¤×3_®}¦©7âXO«ÉŽüú–—H¶Ř3o1']îλśJVÓ|˝f˝‘V»-­1µcŕ•gŔY$2»áĘŚ)­˛ Ň6˘Żłőv¤.ĹŻ\şš®ş-!ÍJ«\Uucö*› mµ›§¨^ŻBÚ&¦ŹĄpůYX–Dfć"¤ÝyťÓšm^@Ś©ŤsŘAŹ9ôŽUđvŰ>;xaٰß/ŹteŽdZÁ_ĽŐ¨Ô¶0ZaÚe°™7WŢěpĺş!,{Ň»M×m4óŕn]ĎzźŘŃÝ+AÓ7Ěű5H:Ú…Ń}0ÄĽuë"+?{ëèޣľ×‡‘»÷ö@ĺ¸ ĺď̡ÇâťtĐÝŽu;•@xĹÓÜv˙VşĺŰ/mAĘpĐNĚŻ|˘(ăÍ®KŻíöúuď÷ kXů’έ.ß~ËqőěwŻö*÷1ż{~ńxŐ×=ę׼ęÖëú^íÉëŢfűm«ÝÚH·0»Ý7~ç Ł †éO‚öÝĘl4úýŹ˘»ĺmPmđwą÷ {4»ATž?(˘żYŕîĘé•ďn×ô k'¤ ‡Ő6˘j“~7ń(Đď}:Ś{¬[‚ÖA”ýGÔyíŐřĄÝ}^÷BĐkwJ?u˙±•Z…6Älř.mčéď/Ül Üo>Đp~ě€ű¤+’tt‰·g9Ů= \˛Ç˛ÝËÝQÎý†¤!ßl4ä iíçX—4FÖ&íÓiŻ|›yĚËš#F:şĄ!H?ŇŢŽ7„¦/Řäţ P_Ůí^¤ýۇużA^|Ë,Š:´‡TŽAŽ…Đ†_ŽË˝ýo»“=–ĹnŁpł°ëň˝]ň&ťQç­[űجrÜŤmt;—ÓvŞ«(ʬFs`ŕŢŢĺč8ŰcU<Ę9ôüŤ|G¦ň7ň‘PţFľ#ŽüŤJ>3×±Ó¸=ŹĄ«K*BČ.&w<7°ńC6ʍ.?»řúësĎçĽG¨×‡_é[wŻ4lv:¶{ŢFˇ.wrvJ;Ý íd;ĺÓťŽüőüH˝˘=}Q–M·űe;µą=“‡'MüjľcgéźsXú’:!„˛­,ô…Ď>ęŘ™ŢÔí:K‡BŮV‚ţÁ ¤¦P\)Âxhěşgˇ !„í?źJ!„ě Ý UQąşq„™yi–e±ŽŘŘŰ8é.číJF‹Ĺ/YGll„mśt@—;!„˛,tŰö;Ő» Öa lă´Đ !„BA'„BČ u…ÝeŔâŐE–l„ĚĽ8y‘]pgł ¶q ş›ŽŻĽŘŔÜ;swŢ{»ÁÔ Slp°ôŐR Żě„©#˛ł` lă»»Ť‡rąĎż;ŃöAvŁë° ¶qZčÁFJRrÄ?ęŁŮ€u¤Ąµ]‡´ôj 0őÇ+CI[3N)㍑÷zśí #~'î8ÄŢ4âÉ,DbbLj]ä—Ë]ŹVŇ’JSÇŇ›Ţa•űĚšÄřţ$EDZFÖťx#úĎÎi;m#uLZÝ”ďč0 "HYGú™q$µ‡‹źç‘ťL!ő¤Ö*;ý˲P·UHí×čŐ—´ýY“@ PĆ$I'ŻŚűň·Ę8őJ.˛8őŞDůž ˝ęXÓ"dŇI¤-ďçÚűł–tÚ—T†Ňç´÷qN| €8¬š2´>®ďć$„€”˛ctÔÜ&ŁA:J˝d´ß"HW‹Đ—O`éĎ'†&ęťqéµHiŇě: 7†÷MÔK«kXň0nf “Pź†Ř—‹<®ürI0L ©úÜük@j_•ő-k˝¨Ü7`UX6€ýɡPâ𣍂{őßPľ:ô‹ĄhU FŐ„aXPš}l,Ž•[«¨K -T«:¦~=®Ľtşa@Äâ0ÖLÄcf٤ ·*HĐ0ń´ýŕhMbőľË4[˘ †a˘˘ë1°%,ÝG¸¤ kÎŔa2ťD¶a9ŻV%Šw (B…¶Oli?—~ĺ˙ÖÓkUi@ÖŞ€ 5ĺ›…!őq°ť?YÓ!k¤ĄŁxُzŰBY“{wóďĚ{n{]Cďč†RGžáHŔ¶śF`濯ańOÓúĂpD˝ňĺş0”Č´~ç^ĚEÖŽfg:ošł/:Łt±7…„˘A90Y]yď"äíSíůáY„f0Öę°}Oć`Ľ3Żöŕíd 6ŕ#ĆŹU $UĘüŻ˙,<ňcAJôó×Př<‹ěŻĂu¸˛fAĘ:ę5 «fˇtׄ:& ĆEt–ż˘ÄQŻJX59P}hɸ#?Ő1ţ„ŠúĎ€bǻް ô*÷ LťŘ+ĐňöT-Tîé¨C¸#ćżtŽ©ę?Ň6X %Łj \—ĆšDY7‘~: mŻčůńýq‘ÄÂŤ fŹiĐ"’ľ0l_X®6$V…”*ô5 Ą+ş~_qÚăÇ©h,ő=î'ÇÓ…şŠü§ť>ďÍ ›oˇŔü;ócÂqă4¶ÉhŞŽ¤H @Đ«RCuŮ1ŠMŐtXŐŚŰsČ_ÄXtŁů…Ĺl«Ĺ—żP[˘rµqĂ*ăPĎ"™žlRZĐŻk‰zţ–ż‹]ŤęqźŇŘâ6ŕ×a[&„p:čTÖąuËiKuH@:‹ť¤śĂʧsĐ«•Öy38ŹştÚcćřYä˙úrżýşďř 7ż†ńÖJh)(â-k5çż´ťTĹc€‰É¤>oh˛ÖŚ¨Ű€NĹ/Ý,"w4mß`˘®?°PŃW!kNÜuF:D @cđ"âŤö÷s4–ůŇ-JBERDcż´ş ‘_şĄăĚ‹©­kăŤEułGŤA`J‰Şčk%ÝńZ,¬X‘öqÚŃmŤß€\Ó!Ť ¤°i˘h¬»îňźŘuä^ťŰAďwÄź9’éŘ.Ţ*úžçwĚNĐ0š×¸Ďď–&÷±^ńů…ďuMűţ ů¨)¬#KŞ€¬:bÖt IV-‰Ĺ?M·Î[úˉČDÝ’ę«@J ¨UˇWµÖ "2OŔw¤-‘H– Y-6:¤Uu?}Ůy2CŐ¦aŐ’ˇE=«ÓĹ^ĽWGRŤC_«C_Đ3ÄűÔ·®, èB@ÄD$­:ířFWvᓳPĆ’Č˝:i›µ*¤Čů~cN]`é/ÓúõţĘAJ$ŽŁţ“ŮPp zßDÝvzÁxKôó¦o IDATľc"VGµ6¸w­ŢfĹĆc˘5°h¬!±MHů[%Ě>ź ]ľR•ĘŞăú¶$’Š€[÷>VęXĘX<!oyś, ˝jáÄͬŘëRÖĽX ˙(!Ulm?×¶J^ÚëhŠ€–Ś5D2óęă ĺúJý¸¸ÖîXU•ra&˙ú~lMQX–“Ůą·ć ĆDkŰď÷÷Ő3G2öeŹf7\ç>Ţ~ŤW×dŹf7„Ű-M^ióJW·đ˝Ňč•Çćń ů‰şŽZťkM@Ö ç´ë€mA$˛G%ęć*`;×®|— ”–@zMtÚ¤¶Ő°Ž X5ÇlŠzîw ÇW* ˝bâë[çpí\ľl¤&ˇ*Ůő Ä,¤-!–Ë˙0‹"s0ŢŃÁËź֢ە˛ŚifÍDávVÍ9GKhČ>“m‘ «VGâ±8Ć÷'Łi^aŘRJä^ťĂŇ_ć{uRZČ›…´KŇBaŮ8 ZBHlđ‹Ô×{Ćć|÷ qµ=m­ILIAŰŻv°±f˘tWwľ*v»‚Ü‘pí­x»Ă’cŮgRHŇôűtÝ€ŤÁosŽp9q*cfĂ3Ź­{! w«(o ůĚ`ígŕ~Nšâ6 ţľ ăĂ4ţí-Ç#ôŻ7R8ýĄŽSG•ÁëÝ«Ź“KĎ!÷úä˙±ähÂ3šĎ/ˇżvi€„˛W ßşeY˙`soÍyn‡ˇ]Á-ú~9HÝŁBżu$mÔ–h¬17*Ť…:í˘٨ÚŤE9Mď@˝ŃÉ;Ť¸Ý:Ď2;°¨W ńK‰Ňm§ß’ĐöiĐčĐöiNžÝ.ćjú˝ŠË•Čň\ú±îkĹ5W¸oUX)Ż´ÄôŞŽbąäă*şe °L@Ź™¨ŰňgÇę•ŇqéfŹNôm1ŔŇ;'[ű¦Ţśo¸ŢMä~} ůK!i¶ŽOVŰČZFC`Ô¤ü,Á±ödÇÍHŰ@MŮ+`<´:]@ŰçXr…•2ŚdMëŰJ—Đ8¶‰§µŽ8šhëţj"cŃ´7łć,Płl@ŘN\˛MYŚ5‰âň*`K$•-îçl ĺ*Ysj×°ä†Á‚"âЬŹkYć5c˝˛Ú@ń{@áÓS°,g~?÷›3ˇÇŹ}3÷Ö܆ŃQaDÝ‚ĄvíAh¦Ůýß«\˘Žżß:’5ݶę<×iK@(J ÔŇ‘>ś¬ć!Y8cünĆZRšťŢH‘@ö°#&`[Xů~p ٸ/!m`úĄq ¶ÚČ«čs»aQ´nĆ8˛Ďk}ÇĄŻy¸ŘáN<á݉ďŐ×­Ă-h†e@ĚÁ Ó@ĺ~•č$Tˇ8‹«~ ÔëNX€xĚqLjÉţËHJgjgę­óNŮH˛fu éŁőţîg™_őźM@ęvŔ sř˛%Řf‡5·^öĂy¸Ę,W~Đ‘:„ęZŐ®Ś­·‹Őű&žęŻLWďŻ{-eŁ_Ű\3aÎCÝj¸ţcőH›ß'P¸ë<®¦%sč1g*l Rš )%&Ó‰-kă–T!k:*R(?řú÷LéXćMA?˙bFD¶‹ărŻCÖ,@ÖËDî7ł$rż™…ĽWDáN ™#ŞÓý¤#}`ĺűYTő Ô˝}¶s{€ęě×2w»ž›ŰAĹÔ}^T"Ü-śa ˝Wą #® uä«! €c ĄaÁŽiHîËA®U ­Ue"&Zsdˇ¨éťŢf‡Ş¦iˇ@ZV$]¬iՑܧ6ćă€oýoué6 kőF§Ż˘ňŽŮWĂ&š.ö˘^GÝ#ŽŻ[ćő!̡÷sźJ)Q¬a5¤ÍĚš„)%DL Ţ,żÓYkOhŽ…Ů· ×KĄ1p“¶¤Dîżfś§,¤ę& ËeÔëĆú9¶^Đî0©ŠŇř:ĐđQ-O,– ĎýK7Š})ëşëmŢ$čSĐ«†ŃY¶®Ö¶tłs‘¦áL4ÎłücŽ`Ë«÷ ÄĄD6­BKŚď×0ń¤şumÜ@Í@Q×0y@"sP¸Řůź‹(a¶p1+Ŕcš#lëŹ&‰˝1Í™ç\+öř`bŽĆ"¸6Ä’MUGÜ6© }äąÖŞŮAHĄ§źłg®ĎV`ZNč,ćYďäVď dŹ&®Ęh\ěî.4•wî‹đ±µ~Ű@JKˇ˘WśuB`âŕ„3ą«CČ>3ŐĎ "˝u)!k&ň—Ţ÷LIµÜň+ßI¤×ëhŔ2Ş×›ĎŁaő»ÜÓćoöĹl_ý…ńĐjy‹Ěšě;NłÍul´„:Pzú¸|oBÓTČŔŇő ę5 Ý0aU-h Ó˛0}TCj_Ź:ŘĎIiµV·÷*¨Üv´&5™CÜíi˛ůŹťGÎćŢ8®Ź[+èHYäO ß®/~Îl ůĎňȰŽ1˛Nú~ő«µfaţĂyßíľ-Ô›…Ö_s{3h‰yČăýä/ް†ZG­Őí ­¶˙& 4˛î˘¶%¤µ:p:ĄµęxQoďTaBŚŤ#®ť@ęŮ)H©d9ĹEăâ0MĆŹŤ˙`šqÔŠŁţ“ ó'ćC€m˙ŕĎË6]ěňgg@RĽWoýUŞu荿čěÂpm ódŮtéidÓYÔí:Š•"3 *đóĐ9 Č*r33ČMM!űźYd5‰ě‘”łP¨fŤ9Çô2ŇűĎÁ eTo­j–óéBÄ€ŇĺšßôFgŮ„)O UsÓŇ]şoB"Žř@ąl@ż«#)$´1 ó”‚ĚÓILiůHôsfĂ˝^Gĺvç?8‡óś~§ńÓzdó_lo {ßőRÓkM1Ď˝”Eî… 2Gâ€H8k•Ň)dĹ{@qYEĽ– ]&áćĐßśŰ0:ę%žn‘ëWt›ÂŘOíç7·_&]íię~p»]7ýÖě:ęuq4‡4„[9pjÝí@()$„3˙ [‡„:Ť…Ť8Řń6ëXŘŤKIµ‡B4ćÚE¸ř´'¸đéKÔëŽŘZku¬V,čßKĚľ:1@´ÁéiÚŢřú#=Ťçť›‹˛ä€VRm@KhHĘ$ w 0ÖÖ;7łf@JŮńÎěH˝f6„Ý~–ŤdcqdămŔúc]ÄÚ6Ŕs†Ťu»)î /MË+%|ü*ŃÓ`!Đzž:´ű€Uł`¬™HîU‡šîĘ} Ë’O”î(ÜŇ1s\ĂsG’¨KgĄ»Ă-»~Űxá¦Ţş˙€ło˝ŹłŻĎâô+'páoWZëŇÎľ>‹ę*Î_`A®]w:łqí›j:c,«!ś×ĎŠ´†LĘ*®”uĚľu-TtáçĐŁ!ż,=hŚĘĽÄŞô łáNě=Ď;˙yľu®—ČşĂ<˙y~ĂąAĹ;ŔzĹŮÜ>˙y~Ă1÷ţf~ĽĘ#ĘlO1śąIé+bńÓىę¬ ”ý9E\+Ăşź‡Ř7Ä‹yî·ÎM’˙ë, MÔÄ…óÂKBěMAIäZ-T()1g.JÚý÷©”óV°–ëŢvDĹ4ýş.a­IĚľŞ!ń5‚y´fŤ&•8*Ő` ޢ\éŢwP—ukDL 7™ĂĘÝÔe=úžřgçím…Ľ÷}–IÖQ·-q”ďgŁ‹·aĺK«ń¦»ÎÚ§=Zk †‡”úŹUg‘ś 6{EoĚyW€ţcu¨‚®W%tłí ĆšD~YGn2‰é#I' cŘ4‚¶ńfź·tÔ%PÂů,őüÇ0űň4¦§:Ű™±f`áď×0˙ÖŮŚr­Šě“šóîŻçˇ$2PDŇńJşKş‰äă΀áĘ˙®"­©:štî{sú°mËNŤ9VđěËÎ#˛ ď´Šg_žĆěËÓűŕ|Ăú?ÝWZ›í¶xiÎiă˛4ľŮçĎ@ŚĄśççď- nU°t+‰Ů·®…ns}Ź?«Ő*Î|gß8ëą~b>čą›•¦­¤ß:ňę07t¶ iU ĆRŽŰ»­3ďÁ„D"±‚äľ RÇRN‡+Ňáz ĐÔa|c ´bB{REfRAî?5$޶.öHîÓŘşub¬€ĆźG<˝0HËl ćkąnŻŔb8e#ŰÜęŇY g»¬Ű±8TE˘Şc â">Ô{UUśÇDőŞË4!lęůpUQQŻ™ E‰#őřpÓ.k@yÍD©b@SÇ‹ŃîçZ–÷»Ž<˙a§Ďľ<ŤdÂ9¶ZŃqe1Ź39Ěľ<˝AěűeýŐ®śEo źF2™@öx61GŘ®ěěg7ŚŽČhyĹTHŰĆĆ;]“d0!Ą\_ýŠ8ľľŞcüŠłoŤ#ąßýž¬hŮJű m@S‘>FY/CÄRZĘyůÎ(Ţ­vÔQă¬Còś9{畨ɽIÇT(Š‚ř:t÷ş_‹c|ő„]Żzľč¨ E  tJŞÄ‡žě‰”@ń®…ĚÁ8˛“‰M‰3ę~.w4Óę©ăŮ–€¦%™LµŽ÷kť·“yÝ{ˇ^Şş ýî ®|¶ ‰o^ŘÔ÷ck­ŃŃ*Î˙Ďyśý=Ĺ|čŘ[_GN3ߌ5Bń`‘~ô?îÇQ†›‰lZ‹ľ~7ń>ß7Žń}ăŃ§Ż˝“{m~SË'{|zóę!ě°SÄ1žŇBĄeü`ăÍą×Mȇ¶7íh|óË.Â~n"=‰ô„gŘńX™g2Č<“ZţÔ˝ăPŹŽcâčldqô=&MěK ú 1úýŮŽíŽB®ŚćkQwAë° Â6ľsčÝ5ňeŹdŮÚ¶ uDŘaßYü"ĚEîc'1z°ŽŰa§…ľş]gËqXG„m€°Ťďn~Á" „B(č„BzşÜż\d)Ť8¬#Â6@ŘĆIWAźyi†%4â°ŽŰa'=ݲ,–ĐĂ:"l„mśôô&Ąű’%EŮ•LěěÉÎtČJ°´Č–°řĺ"]ndK(Ü©ö%ô„l AďŐ¸ &tąBHwřŘ!„˛Ű,t˛űXĽ4ęş™Ć'/}ňúçXř„BAFöP˘ca·o÷ç~ía_ţŰl_ן|m!pÚ!„8ěj—{áN‹×Wą˝IeôŹBČúŮWr„łĚ[-†Ă¬Zĺ„Qd 9ô™cidźU;Ä|ćX:txuŰů;óÁEĚży Z"‰ů7k˝ylŘâ¶™BÔšD·jZ·ô¸áŤú€‡BvĽ…ŢőÂ7…Öď°%żĽ‚ń¤l`ţŤS€ Ś'żXŔĚKYé˝ć’ÝâÚÍë7Vh»ĹŃM”¤%Č´A·ytżňéG$»•c·ň SÖ~×ô#ŕ˝Ę†Ö:!dÔŘ3yxňŃé×O#u0…âJĆC…ĺň××;ŞŇ}ŮŐŤŢtą7Ç…áě[ď#;s¦çyůĎć˝-n»}T–âč”{żu±x}•IČ6âüď&hˇ)ëȶ{_ëę¶ČÉöD 2%„líkľ(čC‚ďh§ŹJy‡­˲X¨„í-č´N!„­…ßC'„Bhˇ‡Âťę@ϲřzB‚ÂEq„Zč„BŮąú Lżž‡RJß˙×.ńőť„BhˇŹ4B\|7‹…r(Ü,tüź# !kžlŮŁŮ@ű!ÝWô‚iŞş••y”îŐďŢGé>0÷qßÍâÄŢ„ť!ĽŻ(裌¦iř·'öŔüéJ?˛ä^˝†ęCŕÄe‘:2‡ÂM :Ů: Ë…®ťOöh¶ă¸űÜ^Ű„PÔ)č;]×ń?>‚úŘč?Ŕ‰§ <ć|˘őĘçóXřtg˙\aë'#Ů!– ľ˘ßpćµ)čU ;™@©nqÜDzĄr©ëďnŰM!oţ&ÄKě !Ľv„ ůZšßËcšşüH¨€”€Ş™§÷ t虜 •¶v‘{]Ř0Čî±Ň !ó!čĽé­iˇ+mb^—Ŕę˝G?¸˙÷ă#X1>ľFFOÔ˝¶Ű÷űmÂ{iwß ;ŇĺŢ´Đ+€¤ŇůoIŕ˙~|„{b ăQh ť¨;÷>żŽ)čy„𾢠ďšúĹĎ–0÷úţ#˝ĄĘ#$ŕß’{đč‘3źÖBoź÷v»ŃýŽB!ôúÜď§ ŚĄĘ#(.1OiÝďßü9EźB˝‹…~âÍ%€´eë˙ÔożĆsŻ­ďO&’l„B(čŁĘ•ʇ·j5!„Q„źO%„B(č„Bb,Bçä{|d†BAŹś˙xsqĂ‚8÷˙}8ĂÚ'‘qůmľíŤľ)č‘#bWŢ™‚´Ł$Ç:˙ĎýĎ[5‰˲X„-cg~mÍ–6pᦎâJřü’?,ˇxßó+ďLáą·(ę„B(č#oˇ5 iW1ýŕ<Đ€ň5¤ą\Éc§ůš@B!ôQG;¨AÔŞ®^€Ř7î|ˇ€úCÚ^óľ€+ź^ŔÉż®ěŞĘn--?ŰJ!ô‘'—R Ţ8±€HhŔ yűRcV㵯€ńŁÁ@!„‚>Ь\_ÂÄí9(Ďź…He‘82 ĺ™i})Ôm u­ě> t·łf†¶r'ŇžżŰĎsď÷:Çëš^ń‰Çď|B!;“µĘ}ĺ«h Ŕ^ Ö­+1¦BJ°ř yë °/ě3)”ËĺPńL¤'Z_Vk˙ÝNű+b›ç Óë|żc~áö7Ů\Úżu˙ěcóş¨Öý–zŘô†ŤŹ˛Ă˝p§Ú»8”čŘÖ4:‹5˝µOZÝęuŰůÚZÝ®‡J[ĐŻĄy‰|űŔ}­źEFiťŹ6íÂDč¶Z űMoŻ08 d ş[¬řťc•/ŢR @·śőp‰1Ŕ’ŽgžŘŇ‹W`J ‹-ýnKşßÂfÇMFĎ‚o Xs»]ÔšżýÎu‹_»•íw¬_Á앆^ iőĘ?!d ú ,,.âĘ;3¨T„˛.ću ¬Ź0žÜŐ‡ŹB[č„ SĚݢÝ5/áóLżßAâÄrîµ&­~ů'„ěAo>‡~áłEś}}Ó©=ř×˝GH*Ŕřă{đčŃ#” ×BwĎ«7­f?w»űü Öşß5~q“ŃłÂ{Y¨ÝđJŻóü±ßů{÷5şŃ !ô®H["9Ě˝>äđ/ý’cťbvÝoţĽ×â´°ű˝„?а(đ[‹—{: ‘ô»vP+wÖ1-nB(č,ô©·ŹĹQ·ë­˙Ů?\Ać÷ëű“É$[Ůraß,w2]ׄPĐ·_0Ĺš%ŰRÔŰőkĹú]6ĽAňÔcŕ>Ż×~FŮe‚NȨ x·}Aćş» e}†f˙f…KťB†@Ô/Ä!„PĐ ![…śÍá,B!„‚N!„`WąÜOľ¶ŕą˙ňßfŮ!„PĐG‘={öř÷ŁŽí•Ű l„B(čŁ*ćŹ= ,ô[iˇGůZÖ0aů+!„ zß,Ţ,ŁđŤ‰Ĺë«Č>«bćX:tX…›¨Ź§`>¬@US°Ačý,ůíČ bL1'„íËH-ŠkŠyKż1±xł:Ľv17V m ˝‚ÂM`éjKWĂ[ÂÍżö}íÇşťëgQ{…áu­_AŇ$ţ^y z>!„]jˇ7ĹüňŰ΋(NľW@á…o:źcmď…ůĐ±Đ Ł‚âňEĎsÎýńćŢ<Ťů/s?KÖK ĂşŔ›âčţršŰ’šž~ÓŇo>Í7!„$č…˙N=”čiˇFęcŽ»}ţŤ `é‹ Č˝0 iKŔŮŹ‹} ťź`E!bAżÄ4=^‰öA†;|ZçÁónő0ß7÷‹łźx†Oˇ wvĎŞ(|câä{…Ž}açŃ Łán7*މłŞßś %şZˇ\ď¶Ľ‡żqD‘¦ÝDqŽB€ýÂ+Ě~˙śB†ÇH͡ĎK#ű¬‰€Ş:sčĘcˇCÎÜ˙•Ó0M=´%Má"òÜÝŰ^ßMo?Öü §űzż0˝¶˝âu_ďţOŮázSÔŹW{şÓ`>¬@ŚĄ`YŽ…ľtőZëXűo@ë˲mő~D?Şyew¸Ăłö‹ĂĎ;±iÚ‰â=¨Ĺę¶zĂŠz7ë˝›ßËÓŕu>?JČ.ô¨p?Žv{Ţéěň× ČËÂjXçů{ý Ý űĚÁ÷šKďçz÷vP±Ť"ŻÄ›~]îQ{z}®5¬WBAŹŻ—ĘĚ˝y¬đn^ ňîDŚz„ zON_jΗkČßÓ·,[-śÝ¬w2 2Nˇ ďh‚>gNČf ¶ŰőÝľ?@‡ą¦ź0»Yá~çőÚO«ž :!;‚n‚ć7·ÝmÎ;Č|xTű7+\Bť˛IBť˛Í 2úü‚E@!„ĐBßVś|mÁs˙V~ťBˇ wÁď;ç—˙ÖůiďľzIDATŚúĘí¶B!ôQsŻ—Ëř ýVZč›őŠÔA>ĄJ!dôą9ôĹ›e,^_ĹÉ÷ XĽY(¬ÂÍ Ęw˙żĘß:o‘k˙%ýŘKĐë)ć„B }čb^řĆ\äoLĺĐ_\Swľ¶¦Ş)Ť˙ůëŃü`Kj`át[˝îרvű8‹×'GÝÖłßkYÝáú]ďf·ôő{>!„ z§EÝóËo;ĎĽž|Ż€Â7& ßt>2Ó<Ţ óaęăÎ÷Đ‹Ë=Ď9÷ÇS{ótŕ7ÉusWw Vs/!íć2űŤö~Ó6„Bv‘ ţ;Učů‰Ő¦«Ź9–řüŔŇ{aŇvľÖröăb_äkiQáĺF+ŢAăhßĎâ'„BA÷%ű¬ŠÂ7&NľWčŘÖĺn w»QŮpL…PýćlßáF!¨Q|Â4H˝Îńs§Gu>éŇŢ]ď]ßĚOŞúĹ&ľt† úá^źGDĚ@Uť9te¬1W.Ťő÷?BĄŇ´ĚĹ–ú ŚBHxAÝj!lŹ?lzý–:„ěPAoŠú̱hÂ2V Ćš ŕ€Ą«×ZÇÚZ_–u/ëŮ-¸ýžß<Ďďzż0ĂĽ;Žćő~aůťO†'d^ďQ÷űZ3ě°ď^÷»ľW|ÝŇęu}s›˘NČô¨p?o~{ŢéDň× ČËÂ2ťo˘çďőgşż›ůVy7 łh-Š<‘á‹űď^˘:űľ[xÝÂô‹×ë|~J• z Ľž/ź{ó4 wweű=GF_ÔűŮT$ý¬îAÝč„ úĐ9}IoüŇż§oY:6KPXűdô b Gî0ŇJˇ GJĐçĚ Ů ¦»™BA'd‰z/ëÖ}^űzűţaüŇ6­îýŘBA'dŰ‹zýAĎôÚ0ű7+\Bť2Â>Gˇ BF 9!ŁÇ/X„BťB!tB!„PĐ !„BA'„B(č„Bˇ B!„‚N!„ :![Oöh¶ăŻ}˙vIŻ|… «ŰuAâ¤üřůW˛ťá›âŮ"1ÜÉo[k˙´k|FQía„-ßAżĎ7čZč„PĚ{ZňA¬ŕćv/K5ěőXÁ~q±ĘŤÓË Ň-˙ÝĘŢëz÷BhˇB|Ĺżýw7kÔďš Ö¬ßő^çőŇA-Ö~âě'Ś Ö|Đrhć“:ˇ Bú˛l{í**^ߍ~]îQ—S{śşŃ ˇ B"!ő8¨ĺżSËiĂ$dXpť-ží.˘¦?Š9xB-tBFRÔýćş˝\Éîýýş¶Ă\ß~MŻA‰×z?×rMży÷Ëwвwď§UO¶Š=“‡'ť~ý4RS(®a<4PX. =ß:©t_"{(ÁŇ"Ä“ďpůí,,Ëbals(Č;źłź”pţw´Đ !d§ y7kť :!„l(äd'ŔEq„BťB!tB!„PĐ !„BA'„B(č„Bˇ B!„‚N!„vřbB¶ ďrßyvşŁŽ#ĘoµGQ|Ý,ˇ ˛ÍĹ|Ô:ńÝ ,Qç±=¬°aú˝vHşÜ AQÉÍn°›Ű^Çúą¦ůŰýµ5/«Ó/®niö ×kŰëüaë–Ç~Ë»—ĺîUÝâéUćîëýňChˇBFPđÝâďw,č5~VĄ×§?»……µ4®nźyí'Ť˝ňd;ě -h¸AëÔ/?„‚NAQď%‚\ÓŹŐ=HşŰEÇK|FÝş âIń:wP7:!tBv€UV‚^ă¶ü˘łßpĂśżTÂ$»Ρ˛"@+ŚÖ*!´Đ Ůá˘î>Äbëç÷ą~óčý¦#h¸AĎ÷KC77÷0Ë-Ęúö‹ÇďĽ^űiŐŘ3yxňŃé×O#u0…âJĆC…ĺň×ó­“J÷%˛‡,-B<8ů^—ßβ¬]iASLX†Ű‰łź”pţw´Đ !¤)BĂ´hY†„PĐ !›EeHF.Š#„B(č„Bˇ B!„‚N!„ :!„BA'„BťB!tB!„´Ă˲Éx}btĂç+I ˇ BzĐ.”ĂÎ(Âô›Ţ ˛ąĐĺNČ[ď5˙‡ů¬¨ßőÍínqw‹×}˝ű?!„:!¤‹ĺĆ v_Ók»WĽÝ>‹J ť :!»ĘďGř‚žŰí›áQy!tBv=íî0Ăő0 !ŃÁ9tB¶XŘýDť1!„:!ŰPÔ Ë…ď&öĂPřYá~çőÚO«ž :!;ZŔ»í ň»—řF±łÂ%„PĐ !C ÝC@ˇ Bv2úpQ!„BA'„BťB!tB!„PĐ !„ :!„B(č„Bˇ B!¤ľX†M¤Ű»ŮŁ~ˇ‹;®°áóťě;Źłź”pţw÷÷ «÷őíÇű ›PĐ YÚ…1 ˇěFń ú uFSĚ{‰w?âîw^ ] ďeÉ7÷7Źą˙÷ką»ăq‡ďgé;}d4DßËúŽÂ @hˇ˛kÄĽiŃúýn·śĂZŔîëzmovúČÖÄ‚ďwp@q§ ˛+EÝMXqôűÖů nt˛}-聆ö+ÚÝćĘýćÉŰçĹNA'd×ŃíűâýŠú0¬cZÜŰ_ÔĂZíýŁ€SĐ !]Ä”nl2~–5ˇ B† Řnk¸›ë< ÷‹7čy˝ös2–ąŰbîćvt˝y=­őÍcĎäáÉG§_?ŤÔÁŠ+E – Č_Ď·N*Ý—ČJ°´ńŕä{\~; ˲vdţ(Čd§lhˇBv4M‹›bNť˛Ťˇ˛˝ŕ‹e!„ :!„B(č„Bˇ B!„‚N!„PĐ !„BA'„BťB!íđĹ2„l2îĎŹŽň \˘H+_KťË(\/ˇĄBA'„D`·‹iS\Ű߯î·ĎëZwÍ}~˘DĚ»}ťÍmŮ{ă` :!;VĚ˝DĽ›Č¶‹ş[ŕ» ý¬i·´y r!„‚NČŽ±Ä»áužűŰčA⥼B(č„lk6Ó2u[Ĺ»)ď„ě&řŘ!ÄStŁZă„ĐB'd׋hT–¬;Ü óčÝć㻥ŐoˇŢ0óHˇ ˛%ÂÝď±~ćĎ{ť4-aÓÚ+=qB†]î„BťB!tB!„PĐ !„BA'„B(č„BřŘ!pň=>ŠEˇ ˛íąü6ßFßtBv–e±![çĐ !„ :!„B(č„Bˇ B!„‚N!„PĐ !áÉͶţ §źýýžÓ-ݤ}Đ|B(脌„– ­żAĹĎ}<¨X†ý.y{ÚĂ ó ßDç`€ :!ŰĆrw‹× Ö°—EíOXËÝ/ý˝âîŻűú(Ę :!$ü,ŰvË˝yĽiÉvłhŰĎo†ƢöŠ?¬çÁËŃmzŔë/OFň d·Â7Ų…˘î¦aYžA *’íaµ_C7:!tB(ęb/Ë9*áFiq28tą˛-~B-tBČčć˛ö:T¬ýŽűÍMoÖ Łßôąó¶<ˇ B†.taDyý^çuső+ĂÎ7!tBŮDď™ :!dC!'dxpQ!„BA'„BťB!tB!„PĐ !„ :!„B(č„Bˇ B!¤ľX†-âÚŐk­ßÓ/NoIĽĂŽűÚŐk‘„ďNTy‰*ť„PĐ Ů…bŢ. ›-(›÷fä)ŠĽ ’NȨ@—;![,ćMAi·6›żŻ]˝¶Á őŰßëš~Ň×-N÷qżtřýöşľW|a˝~quKs?ir˙Ź"í„ĐB'd ß˝ŽE§—€Eá™:ľ^^nnü ijmĄ·… :!#N7Qđ¸ BŇmţ~Veyđ°Ö¸;üAÝč䑢N(č„Ĺľźë˝„kł…(ŞĽŚZš(ędłá:![ Ć^s®[Ńů{ĄeëuÖývť‡S¶„ĐB'd›wö˝\ŃnWr”ŹĽµ[“~a·ď÷:ÇďXŘr$ĚAĘ“čpPa^­¦ĂíR· ĚňŘÂíëö“łßpű˛-ÔA ĂA†µť Ăś>]÷Ůeż±ţe¨ sčpđęB1ś#oSůď{č@OˇžĘCTÇ*nŽŻ­ÁD!<×ń:°GǪ۰_ě´đőşmú8ÖÔx©~MŻ«ęA ĂâC=çőÜ~ąďu37t‡čŔş~-čŔŚr7Ĺ€@: Đ€'nŠś]şI č°xWžÔNľ:¬Ân·ó!“1‡č€@:¬†»Üad9ë Żő­VĄjK ą>ŽyźżÓÉÔsÉfX ‡qŮN˝—»M¬_Ýëą•{¸}Ó15í7Ü>üPˇĂěĂĽ¬BĂŠ4ő^]ĺ\¶Ëp,ĎÝg—Ęą©Ý´ßX˙ň¸Uč ĐavÁ] «ş*6ŐŻí6]¶Ď9ć}/Ł«ZŤ¶ ~źăŮ·ĎűňC‡‰]• ¨ĐaEˇľ˝ŮľřÜĘ9Ľ!­MĺŰeź}Ś—ę×ôşŞâ^ťľ;ý~ţáĽ8y}RÜ~˝-ľ=Ű›mqýĺúąÓÝýc±ysěÓ‚łËmqu±±ÚZĚÔ>~ľ+>ýöV…Đ5Čű¨ţLHĂđÜč€@:t@ č0ˇÔb,c,ŇR®‹^ţôý7:ÔÇ Čr}Vzł:t C5ť{"еň.·‰í/6fî~ĂíĂţx–;L şhőßjV«ŕśUĘŞ}ş¬jÖ´ĎÔ©ýĆú[:8¨«śëŞńrĽŘď]+|@ =~}†Ř/0,sč0j@…+¬¨Ă9őđŇxÝüt_Usîx©~MŻ;‘« ńś~mĆŘw»ÜĐj\@ (+n X0Aóĺ¦8č€@:đ$ű¦¸íß˙ú´`Éţöçź|Rđ‡Ź—Ü@ sŕÁ20‘pÉŃ1ÚŇ×>=‹čw÷Ź>)č9X§ Äę~»Çľk§;€ +ôÍ›cźDüńĺźŢ-µĘYąmřLőp̶ˇY7nΉ@ęďáöe[¨Ă„^E±Űí|b0rő^×î3Űě7µ]Ó±Y:fčŔôbaX ʦŔ¬[g}ź“@ źĚqL _[kptt¤­ťÝÎ ż!*Z—łA Sc·Űź~˙S[;ŮŢ'|«?©÷b7šĄŢâˇi_ażÜ×~˝:}wúýüĂyqňú¤¸ýz[<|{(¶7ŰâúËős§»űÇbóć8ú?ŻÔ˙pÖöýÖŁŁŁţ~mí˛ýńó]qu±ĺ¦Ńśůń±ľĎîJKôńó]ńé··*ôş˙¸ű¬ ćr,*uíÜöڞc\&®Đëľş†u›Żá¤žl•7vbĐö;˝*sí6íłËíh: B´BoŞ¸Ëź¶Ős¸ĺOÓ¸eźXh§ŽˇúľĘ\{¬9t€ŮVč©j˝©Jo[­çŽ[·M—‡r¨Dµç0‡¨Đ'«Đ›*ํ›˘Őžű: Bďő.÷şgLçVóusńąăöUˇ«DµÍˇ ý +ôÔł›«‹2T_Ż Ôę¶mÇŤőërw®JTŰ:pú¦üşŚJTŰ:¨ĐŞBď;ŔÇz*–J]Ű: B_1•¨¶9tPˇ/ŐÖ2*smíÜvî•§ŞÜ+OC]Ąęzá7>ÚŚUWąÇö3wżáö©ăfšŞ=l—żü|—ě—ű^Ó¸±qşě[…Ţ`·Ű×]űÄŕ…ă^GËyVB¬OŰ'/v©ś›ÚMű­ű Ş }ś ąK•^Ý&Ü>÷˝şqËP.ď˛oZúŃŃQńë/żúÄ ¬°/‡ź×îÚ§ËXŐ`Ý÷2:ëőşľ]ß ßo ţ.ă t`ú“„Ś Í Ű>Çęűo`Y•ú”ÇK3sč01—›™óŃ*t e§*ŮŘă‹cŐo¬O8ť3VŰŞ;gĽ¦ăk:n†ëđrwů^j;U-ý5¸đxTëi­,ĽäÁ2®4¬ý$ ˘KĽ)Íe®6sčŔ‚ ňuŰç.vĆĺ¦8č€@:đÄMqĐłK7†ďęÂsËÁÉ·@‡U8ôËÓ2‡č€@:¬†»ÜadŐőŔ‹â˙ĹMş.?jŮRÚ ×;ołČJÎňŁűŚŹ@‡E‰°Pf¬0c}s!>>—Üa†•{ůűćýćEE_}=öt ó°ş®ľVݨĐ»^bęôUQǿϪ«®ĆS—Ú]‚g.A_Wń§úVßsB Đaµ„5k{!>>sč°’JrŘ\¸@fTÝ—7Ä…•~ěĆ:ÁO,Ô«?^ťľ;ý~ţáĽ8y}RÜ~˝-ľ=Ű›mqýĺúąÓÝýc±ysěÓ‚łËmqu±±Ú,Ŕšoň3‡#JUĘćÔ "¸ˇCt@ OÜ=8»tł Đań®.<¸ś| tX–¦d: ĐtX wąĂČÂ×ć¶`Klťu@…Dlo¶Ď?©%Uť`\ąoŢo~ٲo޸]Ý6Őv*ŕ›Ćźú„xâ’;Ě,Ô«r›vÎď9íÔńÔŤ t8čjĽ(~ĽÄÝ6$ëú§*ç¶űŤSNučpĐĆÂľö‘G¨ĂĽCö {sč BZfX ×]şŻŰ.·ŇNŤ“;6 ĐaŐ!ÝÇë]ŢËŮGاÍ8Ŕt\rĚ­Ň: Đt8dľ¶=8»t ĐaŃ®.<)m­¶˙[Ľýů§ŻßÝ?F_‡)ąäč€@:t@ č Đt@ €@: Đł˙ôÂnäüIEND®B`‚doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/figure.png0000644000175000017500000004236710755765536030126 0ustar twernertwerner‰PNG  IHDRóbâ51­bKGD˙˙˙ ˝§“ pHYs  šśtIMEŐ ÁŚżtEXtCommentCreated with The GIMPďd%n IDATxÚíÝmhW˘>đ'‹Ž@p@d–:¦…ĘÜ@-šŃ% QÉ…ÚôB¶ĐuZŘ:»°M¶po?´nşIîĆYhë¶Ř… qá†(°a•ů#R¤@‚UHŮ Ô0‚f ‚9ü?Ś$K˛^Fo~‰źDoórΙyćśiöx """Ú±Bc/ŹaéŰ4K‚h§†9ŘŽdIíä07 6K‚h'‡ąe±gNDD´ŁĂĽŕ8, ""˘ťćn±ý‡˙©ĂĐĚU -*`Ż9ž˙¤TEŔZô(` ç‘ůMDD4Đ0w¤ŰöŤąĽŽů§„ן€ţT<@KÁî)Ą÷ ţřKšha.·?gžŚR@»" mX‡ţB‰ă:˘C€ůXľcĂ2M hÂ|X€,őřLľř8éż_g˙ś†teÍósßä»g^ąóoÇ‹7ň0˛7̧ k™ś‰ÔmsÇT^y=–nä+Ë]żn˛XŽĺ{ŇË&ŕˇy9”,ß-`ţٶó­wöOi8męZ×UŚ3` +~»Zu°TW?ćŮCť5k›Yg0÷uąĽßžEHŕÂą„@Wm};!äQŁ/h*ţЉě= ©˙gV¶çNËęâW9äX}eąĂ'ŹŹ ö\"âwHś5‰lŢÂŇÍüŔÚL7ÓśĹŘDýmçGżĚôµ]vZvŰiŰb°lcهŔ…ŐK@; Ávldsé+ /čúő(G~gË·2€lú5—ôa ťó‡îË2ą,ĚU@‹j¦Łđc剂(ŠR;ÚpßD6_Ŕčˇ(b/ę?n }ׄőhgUbö‡<˛?XĐč•ç –#ˇGčĂţ_ě†ŮËYHÔVHˇŕŔZ[ßđŇËydîć`<k9ßô÷ůšÇK©ŚâĺDŞŻŹý*Îż9„€ôw&ŕI$^6pţ­1śúS v€mżuÖ®]l–Ń,ÜĚBŇ<˘ˇşŘ:më[äŮßĹňW"wׄ0öĽŽäQ†ˇbćł2řÎŔ\uŕ86R·Ň(CÁĘ"s'§(żćŤQÄžS ‹éď-„5čűĂČÜĎĂ8h ¤Ít:M=­<6*XůŃ„6¬÷­;-»íşmíŢžy€ ĚZDHţj'Ź«ůđ*DÄA8˘Â)šPB&¤=Šě˝0¤g@† $ýáwŮůŐňÓŻ'pőÖÔHmŁ’ž¬L/yDGň¨}H@J sßÄÜ?ňRâúĺńĘg>ťôŹd:8űÉúä\˝™ĂüRÚ>ŮĄ3Ą FÂZµˇ©mçᔂ3ż…6¤ř×H>óײ0M˙ÂÂň˛,ŢČcĚĐ +pŠóß摾ă÷*c‡4L˝j@V€ŕ8ŮŽĽ«Ë.}“ĆÜbBLür—ţ8ă ‚řá0–n95IŐď-SUµe˝I LĽ55R˝± ˙4K“ĎMŐKAžÇÄoć Ş >ťÂŘ‹:Ć_Ö0űUjD´\Ď^ë¬U»R—ýRX“{QG8ä×ŰÄQŽ#ˇ(bCť¶[®éÉ’/ëXľ[Ŕěg~{Ń4_ü18ő~ Öš Ôž´ŐĆ=FĂrřĎ7."›7!" F ×/OCŹ*xĺpó7 !Q™ĎG[F¦4Q~nćŻËČĺ-[VŇ`®ąR"Ó0~ĚßND©gżÎl¨×ÎŚHľě—ëŮO3°Ö×aě ß†_ygŮĽ U(phűTŘŹ,\ýż3=µ™J™^Ëc,ć—iµfű§z‰1˙€Ď)JŘŽ„>¬ŕ•Ł:ŇwśĘ¶Űh^ĺ2Rvú~Ç{>Ú°Ţ;ݶĚUŞ˘@‰}ľŚLÎŻë“Ç Lž0*ë\ţěŇMń?˛“_upńë,,Ë 4†yi(¶Mńß­í#uÓBâXbHC8$ˇ„âТŻŔ8ĹügKXľm#zȨ4î ÓŻéáÝČaüx SÇG1­nRšŢř1ÓŻÇŕ8żN#Ó‘xIGX„qć“ –nš?汦nĺa,«˛ą,żáL‹aô9Ć!˙€Áq$R·˛4„Eűy„C€"Â˙& §(‘8b`ěEłŃ8’ď, R+‹>~ĚŔҵĚ‚‚ÄK:Îü*†ÔÍ,RqöÍE`î›e8k6ô* ]Gţ‡<ôaŁ}ˇyËYۧAŇ‘ŕ÷„/é8jŕâWčŃőŁůÓŻ'pňxů;„…ky,笖ő&`Ýľ! k×—M,~›÷ë§ÉgŚ~Ż"wĎßŃëĂŁ0M‰±xĚ@áýÂzëuíµÎZµ‹ŘˇW×eŻćݤqţ7ILżGöŠ"đŃßR8˙›ä†¶Ţ®ŤĄţi"ů˛Ž±çŁ0šĐ†t$^ôË'ý]WŻĄ`Šăä Łm{ŇV‰?ďĎoéVŮĽ ýP ŞP!%ţŢo{‰#fţš®iĎŮ|ÖŞ€Ş¬O7źĎÂ*TÔH˛(8˘ăĚ[ţhŃň÷&VĚFE!-VˇvŻvöÍ’/ë0:xĺí °l CE¸Á¨QaM"řâă),ç,«+,Ö$Ä~­omfň„ĺďMäî™Đu ±ç˘ §9rh´I—–áfÖšŤ3o%1őj ßÎC‹ÖöΫ畹“A,Çů·ĆÚ–Ý…?Lbů~ćŞý€RSďÝn[ú‚é73\˝–…Şh‹éĄSM)ds+•}râ°†ůosHŽ"öĽŽóoŽâä»)„…´?ŢőaîzíŹjěňůoÇĹü_—á"~,ä±Qś}/‰Ěrsź."˙Ă ĆNÄ EUä tú5˝Ż[Y躆©×Ć0-[×ő§7qÜß!Ěţ-…Ą[Y¤nëř×—S{1а°pá+YiXóWŇČÜłţyá˝ëWěy±ç«G @š‡+U¤s&–nea?˛ îSq}ŮBfq Š"  »¸ľîs_Ą0{9mżŽ•˙;„E‘0פdíVÁ‚ů“ÄŐŰ&,+ xn ň+—Kłç ĄsŃ!¶m!Z5ŚŤ*®ŹŢÁ)Z° J¤ńŽ[ĚÝ< ¶„ˇ+=ŻcęU€Äü•|ÓeT"ĺ¶$«p= »tD­Dli#Úf]{­łVí"P]6ŘaĚP{>ęýTŰúZ1-¤ż31~,†ář°® órýµ[®ěä:0(HŃÎÉĘŽţ?Ú¤=j« Ę <˘`l Ż·˝GĄ¶§(°o¬c Ů ín||ň„Qęuć0ýţ<„P‡áş.Ô}ëíů»ĐD‘űˇ€‰·.Ŕ–€®@¨ńľhćrçß­śŽ*µ4¤n™ý|ľZî­Í”Ëô›4f>YňëaX·Ď7śfŁeÔ‡Ą„«7˛pŠŔ™·üm×xN©ŚĽ4›×üÇÁĘnîŠ˙9MÓ°’:_SďÝn[ŃhÓż/Ŕ§)(Cú°ßłľšĘBU×ç?űy ó˙Č ő‚}9}XŞŘ°‹jGíwł8'VşbÝ| ˇ Ga­.Á.čČ,kP„„  ¤",Â•Ż«ť~˝ _f°đÉ8Îţ*ľ! ¤DĺÜÜ…˙Ç…˙ŻmřC™űµWč«{5Q[Ů3YÂÜßÓP#_üy ‰— Ěp'ß»„‚Í#ţ:ÎĽ‘„q@ٰŁŔ©úu˝Ě=ŞŞC„´šEżÎáĚŻ Ěţ~}>©[&fţş¬üĽĺ\őśľO-őBŔ“5ď-—CMyíÓ!›éĆßX„if „„¸ř^“'b8f`ćÓ´}ŤĎá9E?ĐŐ¨,›(Ť8EąaąžßěCť5k#˘m벾 •Ď]Öśë5W i#í{ç˙Č!ń’ý€‚ů+Ë5;ţę¶>ú|űĺZşaâüob8y| ÖŁ˘CţIęVę>Łăm¦U[E2(ź"ІTášzڶh{ĺýƶćm|ŤúËźą›‡h•vVZV?ŕ™.|›†ë ż.<Ôě“j®9ą_Ŕ+o/@D$Fj?Cň¨äQó×–a>DOm¦R¦ËµËÝlšŤ¶WŽ•rNßÉCÓŚĘÜÔ‰Qśţs¦ćŕ»~^Ѩ¨ě2Ë&DDú†zďvŰŞť™8f@)ť:]ş™ó‡Ç«Úő“ uŻ»®0WÍ_đns7Đ›Ąňy ú #0bahĂ27SPC:ĆŽ&8¦ 6f@ŰEćŽ]i”A§_mů{Ëß›?^w–'!Ą‹BÁ»řy ™şsyůU ˛ú(-T>ożq9DDŘ…ů€—€ŘÁ(,+mźhŢŤCQ–nć0%®^ž®*3ąaU_RJ,|›ĹĄoRЇ€Ńt\úă$’GuĚüu R¶żÄ}"!ę¦[~nüŘHĺ Ř«7łţąíş÷Šuo´ną”—ű§[´XŐžRŐk· ÷F‘<Ş—†Ô °ÖÜŇNÓß c/čp˙ž.Fůő”Éĺ·•^ë¬Y»V——o$9Ëʵ-» mü®‰üŹŚ ćľľî5hëA–ëęÍ<ÎĽCěE§KíláŰ4ťo3-ÚjŁ2H/›?n y4†‘o2•:7žÓ(·˝[UmĎóË_Ť¨€gA ćSű¸Ľüńu\ý§µľlˇÚđ_üv“ŻŽáÂ˙LBz)¤—­¦AÉŁ:ŇË.dQ ý˝Ťěý4’GýđTC.rŐ?ŞŐU›Y?8 ˙|ă¶×j˙T~˝Ľ=)Š€ť»T·ü1ż¤ Ąh:Ż e'=Ůp«Ëż›mk~)ŹÄK:¦^ŤW.^ř6í·yo}^#‡4,ßw GEÍč›”člţ»6Ě˝Aî•*ÝÉcňµ“Hß27żo!Ó±|;ŹĚrúˇ^9®!ýéĘÉÓ ÓßNŔě—9\˙}Ăó—®ä0űŰ1L˝–€98ĐŁ Ćkřčr×˙źéź ygŮ{ţ9°ůoWjÎżŽСěS|ÉźOúnŢ߉zÁćQ˝óS'ŹŹm\ŢË_˙\fń$ŇwLXkZéŕ<˛ŕţ\ í{ćUĺ|úő&ŽÇˇG•ĘhŮË)˙hąţ˝ÇÖĎ™§ďűşńWÓ´!ë˙;ŽĚýśG.ôý*bĎ+ĄŤ3S©ď đ/ľ:ůŢVVm„C˙žGâ?t$^2°đ§I@„1öbđ€‹ź§Ň¶­ôŁÎÚµ‹–uŮd´BÝ۸˝h㯼s¶í/żPŤÖókµ\EK7óMw3‹Ě} —ţ8ŽKLâô‡)¤n7˙şŐ…?$*®É˘¬Ś´H dîšpź¨˝µ™&ĺ×všĺ°>˘WNQĄ˙_ňIőkţéńcćŻYMç´ěZŐ{/ŰÖň]«2’…a\&gB¨zͶrć­ô:‡ý6Ľţ>#XűővyˇFŕźçY3±|;ŹŃ˘0Ôű$ü Tňw-$ŽÄ‘ą™‡ůcďß×Î˙hcé–‰ńهĄŻ­Ŕ)Ú:1Š©×Ć BĄďß3‘˝›žĚţ-3oŽ"ö\±ç˘Xľ_ŔĄĹtĂóŻ…5‰ôífţz(ő4Ěcú“4fßĹřń⇠\ú&S9ŠîÄĘC‰1˝rE°żó»»(ˇŞ˘ăéEŁ ˘Cţđu«7rű‡ßS«ďן3Ď?ÜÇ„ëŢöšÄŇ­Ň•Î/–ľďú°€…o3ű{BÔ}ű@ZŔ „ň?ZxĺÝ%ĚĽCĽ8Ëß›ąĽä_ý¬¶żĐŻuÖ¬]ô«.;Ą¶Yď ËµpĂsŔżđͲŞó‘Aʦ[Žăâ?ßľŠéWu$Ź–ľł*ź.Ęaęܤ‡JŰ›ů4ŤŮwăŚâä‰.}ťÁěď-ç±xcŰĆô?ŻCĽčďě͇y¸ußażúOB¤qቶ~ńëâ/(0hP˙+jËß›˝Ľë‘UŐŇfšM3®ÝîN©ŚäLüv®ŇÖýë5Nbü¸©W˙Ç\_Ę®é4zضÂá(ľÍcö÷cĄie„CJ]™¤0q,†č@î~SďĎ—Ţ'‚µßصaľgěĺ±§…đTŰ7&_zsÎúĂś ‹Ĺ0úbŠ*aZ€ )=Xf _gŕ¬I €yčǦ/ý(WJŐűm?6élx\×ńŁrŃ_ˇb݆pHřŻ-T† BŞjTćS7€ ÖjzÂťÍC”ÎY5ËŰp˝ęžłmł4ŹőeB«Yߦĺ%´Jř6\·ż\ő;ŠĆĺŕW˛şWo: `»ĄeőŞ–5¤Ö4ZgŔżI>¶Ż4|R*e¤môżÎÖŰEşěUłriőzĐĺr= iç+媪ë°]Ůi«­F\·éŮ8fŕ‹Ź§ŕ8ńÉ9HŻös~;(·yQKëŘz»i´üBŐ.»ë6Lłá(Éc™Q}ńYH@ěŐ+íŞ—6Ót[h2Í m˘4zÓčużálŘ·5ZßNĘ®e[ěbŰR"ad—üݬŤüröăpeńďú4ńÎ2÷HiWÖ·ş‚ĚźaŢĆÔ«Ż`ćťŮš>}4* qŚĽGô‚ürékËpÖÄz!wćDôě8˙Ö(¦^‹!wßDňÝÂ,”]hęŐQÄ^P|YÇŇͦޛ‡PŤJřÖ†ąěËA3‡Ů›¸~#[Đţxa(2Čç˛B…ăČŇw“ąÁđŃçY|ôU6¤+Ţk°PvăAÝob€ç˙ŢĹŮ?-!eW÷˘·´g~á7:&ĆĎv;‹Ź®¸,i˘Ý¬ęt íN•Ód!Ą4tŢřő~ťÎbŃŽň3Ăś¶PĂ ŕ˘î`ąú˛-ć۶śĽ6Óęˇ\Ç­ËÝ뢜;ťFF|łÔ.k'ݵXĆľµIŻÇĺôWľĺuLK:'8ĺhµ Aö#ŐíxĂ4şŮlňţ Đľ˛Ő¶ĐKű÷ú<Ť~ď·ű°.Mˬuč ¨ĽÖa6ü đ‡Ů«˙vşÄ±v›ôÍô®[ľÝ,gż×­UűجrÜŤmt'—ÓNŞ«~”Yyĺ‚úÇŰ˝ýöĐĆďç9óÔŤTÍ Ąn¤úZ8©©šy¤n¤<žlą,˝.Cőtšť/k¶Ţőźm5­n–)č˛tZÇÝLŁ•äńdĂiµšOĐznµĚýn“ŐËÓÍrýL7Ş?_ÝÎ:-Ç^–#Č2Ô×AŁĎT—w«Ď×oăíÚm?Î 7ۆ®c«íˇ“í¸Óë46Ł vł? şž­Ę¬_ËŮÍu'­Ę1Čzw“ {Ć^{Şž©yŇş3‹Ą+K ăĚrÖ#k×}×™h'ă-P‰ž…žy#Ş˘ň*ĆmlňőI8ŽĂ:b` ¶qj ÔÉ×'YJŰĚâ7‹¬#¶¶b§ ł=ë=s;ö>Ó» ëŘmś=s"""bŃuő ŻĹc‹WY˛}4ůÚdßëvÁ–Í6@lă ój5wkń€™÷g0űÁlăÇ%㯎ł±őÁŇ·KîÔMŃł…m€ŘĆwoďj}öYŞ›łp±ý°Žm€ŘĆŮ3o„$%Źô·űQlŔ:2żŐ«>†ôĚ‚˙ĂÂ@–­¶Ké Úp=/®^éú€ľW@î ÚáŢÚOĎű9iCz€ú»¬ObřĹ9$č_ď8ýŤ‰éŁJďőŢh'%–>ťAňť3HýcÉτú?źźű!őň, eHďxţ÷ĚÇÁěÇł97ÓđńVŞüfáŘË4[lťÖ‘ôP,ő@CĄsˇ" Qş(§:Đűv4í‰Ň8ĺQ·´÷puŻ<őשž˝`IźKdďŘ8}NBÖa®šĐ‡uťë‡• y dnĺű¶Îٟܦ˝·ň•ě[Ő–sË• ł`"“Ë@ۧ#o:P"€cfȆëIČ'~oWJ7qt´ăž2,˝ŞňÜř{łĄávÉ_M#uyňçvĺő±—UŔł{ę%Ł.ަO¤6^©YsÍ‚ěĎiŹŞ4eHŔzäÔ„ą€>ě÷ŕŇË9X«dQď¸w.%`®ú#kŁ/č5ó(÷<+ŰWů2Ôźöfý‹Ńž?/Y•,ÖšDćÖ ŕIhĘďç<ą_ók×rä†E„!„Ó·}\ĄG^´Ö+«Şd~°¤?ź†ăřçó“ż>ÓŐqcÇfÎÍl8* ŠŤB°Üłí$ «ß?€~)Ż[ýżŤÖĄßóď´ŽdŃôC-¤úßŰô$ ĹBîc±—ă…D4˙Řľ‡ ±¨AJ»vTBD‘xŮ Hđ,˙Đ{ĎŘz(!=`âő ´RZWQä^©'QŮĂHśĐ;ž—ąÖ`X˝4ÝŃýŤw ™îzŻp Ú€ĺXB ~(˶G~5sUBŠ!ŐĎ×ő§%˝ţ`¤®u^FRú§sĆĎ]đËFÚEpÔĺ‹ëűş'*âżÜ'6 MHĎĐË9{Y k»¦·^öů• ś˙Ń„qHZwőşYo+-Ś>ßY™®<\­P”ŤcŮöš ËňO+¸Ni¸?äöĺ«q#Ăé{ţWŇôhéśyČ?@ …CW!ĄÄX,şemÜ‘*dŃD~Ő@nUâúďtŘŇď‘—ĂüÂk¬>ő[üav˛čŇÉ_OHţz ňAé»YÄŹ¨ţ~豉ŘÁä&P0óP‡:kç]We§=ňúáćfĂěÍ‚µ:…â ‚|P!ߨ\1Ż uä«!JŤ €ß J©çѡ '!×ňÎ „2•sb])šµŁĺť©jŇ @:N_vݶăBVKç}Ă€®ü[Ůť{€,şĄľŠüŹ&¦Ţęţ@˘<¬ž1]¸ ÖÂđőą;€sćťl§RJdň?BĄXó»(aK —Ë/äď¨őýşßłě8Ě]ż‡R:h“ž¤Dňż'ýoSH ¸6Ň·rp]ký=žÓ}?©=XRĄî.Púu)b&g5|~éFSŻ'ę¶A·jÉ: ó‚eŐ–m]k[şY{A¦ÓÇË-EĐřßŐŹřa-W%VXK‰DL…9 cô9uëÚ¸'€˘…Ś©cě Dü¨ _˙_-ҧó„?Ňäˇňí ”ęYZ9?ČŁadRÉ_'€ˇ8`±i,Ý(Ŕ8ÜYĆuüŐ4eHłV: zŻtT´ć´üL»inxo“ϦËßlđžÄ±„˙ş`~A?d=Z˝Ďkóo»rčdş©Łę~‰ťöę(Y«X˙ú‘ŠCDt˙ĽćZđFz r”.x«€VNt„= bG^©\Ű #¦řű8OńĎíy lÇßůůî¬ďŕVî $ŽjĄáÉţ «×ď>Ťh¸öą>~5­Ó6`čňfŢżN@ŚőDî™P"‰ĂŁP› ýv±Ľ®”E©Ë5>>bT†â—ż4ÄfÖë¨Ç2rÝň÷~Qęí× I÷¸~SŻ%:Ú_XŹśĘ(‘]”ĎÓ®.¶,zTíiy::hůÁ†®«!Ąky¸E Ó˛áčQŰq0qT‡1܇Ż3ö¸ź“Ň©\Ĺn=Č#ÇĎc,‰pý“Ě~ę­lćÝéîöqk9X †cA>¶ţ~ýBçÄńŔâ0‘ú2…ř!Ăđ;R]ÔIÇ?çę¬9ýd¶éăÍP áNŁó(€ôkZ­ŁĘUě ťŞm@č!e}XÚ“ÎJĎË)ťTŕQĆôę*lČÂúI/ŤCJł§SX„1r0 !ŰVaýTú×l; ÷qîcöcö#€ý@ď߇-«Ë'ţÁHć[ůË\Ążţő»kńçâHÄŠ!KŔő\dň dAUĐ<Č»>“€, 99‰äř8˙•@â—cH1ü‹‚Š6P:Ç;Cě€?bĐKą•«—eÍůs!ÂĄ?@Y7ż9ĚU«¶lş)O X{Ó–;űІDá@.gÁĽgBz?Ż ţ‚†‰#Ą ßű9»4¤î"'Ť źÇ…ŹĎĂĽ›†xĽ^qĹÂě§s•×ˡŢq˝Íҵ%~'_O ůjń#a@Dýk“b⇀Ě sKE¸ďj^Ýť3ofĂQQ»ŕlŘĂ® »FŻU‡`Ł÷dWk}ýăłU?QXţü…ŻR–+HČWľü˙FÓ¨_Ţęĺ¬^®úĺďE§uĎ…ëZŁt!H)´•ÓëCí„b *üóÝđLHč]/cúFéÇ<‰pUŻXxĄŤJ1*…B”έ‹îć§?§@„E#| ×őÖYs±’w`ţ 1őÖDűź ť …׿¶Sú>sů,Ůcď¨m@ŹęФ†ô˝4¬µő›]´ Ą¬ů ěľ„yŃ.…ş <‘ĄÇŇ…Ą_ÖżşŐ‡ąVÜů‡Ś®WöŇčLe4J4Oéżrř Ę÷Ą»ňŕXk6´!u Ëť(áŘ€¶_ {ĎBú¶‰Éă:^9˘Á•ţíB ¶ě:măé›feűΞűgß™Âé7OâŇg •ëbÎľ3…Âj.÷pń­çú;»´ OEŃÇÉC˙'eELGܰĽ…ś‰©sW;žU÷çĚKGAÍ Ż:Ş´QčVżŢ, [˝çě›É óh4ßvŻŐ/słpm´LŤ^kôůęĎ´Zľ~ą¶ rŔ?)ý`EH ňwt˘°gUr ˇčk98SĂă@¨ű OţĆß@R›¤ @Xř?ć"CÄ%š¬´Pˇ˙Ü“ô:ßC†˙k_•ázĎŰĚm¦„ł&1ő–ŽčŻÔ>ś7+׾¦„‘/»¸­źW´wܸ҅µfA„’cI,ß[†+Ýţ7Î'ţݞĄSŤ ăš ×s„‘{ŘÇ ^K˝{锾†Y_gŐ§:*× Ž”ćO˙‚8°=ôöł»!˙·Ěź  sł aÚ.ôý*¬5‰Ô-É1 G4"Ř4AŰxyźs&\ ¸űý[KĎ~z SoL`bĽ¶ťYkć˙~łçÎöÔaP!× H<§ű_µýŐ,”hŠĐüGÇB đ8 7’G·×„tü=óh4ŠBÁ?™öÝłP†”Ęă~jĐ[i«–©Óď™wSGË÷Ť&ÇůY˙*çă@Tś„SČ@ Dßľs^>€]ę©ĂŠYŠ”ˇQˇáJ˘«ůjQ?$ť˘„ýČEîŽÄĘ}aLľEň„ę÷ÖB~ ÷ÚS®VoÚ‹ţ໓ÇF:®ďAm§ĺi¨Š ł`ÂZł ( \¸ýv~l!~X/}kÁżÎőü ăÜňĹqoÍuµMllgµżçŤĐĆ‘Ô\;!JWe®wn;öú|KmÂż~¤ły á_s"B@XXk.lÇF8ČrgMÚ>˙`aá˙VÓUŚŐü-ÇŰś}a/Y´s0ń{żSoř_ť˙{moxęŤ L˝1™Ź/”zý§;ZÖr»Í\žńŰ8€ÄAéŻgEEâÄá?ţÁ<\'ŹĄŰ¦Î]íŞÍu|ÜY(páÓ 8űîنŹűĄ“Đܬ€ÝnýŞŁF;Ë ; φtňĂę®ÚöŞń„D4ş m8ăáďlE¬»k0W]XßYČ.ŰĐźSSü/Zé}mÁ°z_¶ÓĐzŻÄZłŚěA8Ô˙PŽ]:ó{É®·~3ŠÁ”Ť¬J—ţ…o^]Ż6†ŞčPT"˘ ,ÂÝVUĹ˙*¨YpŕŘ6„'şúţ·Ş¨p‹6ÂB@QÂ0ö vŮeČ­ŮČć-č*pňxa±˝÷s•÷~Ďwö“Ú źzcZÔm%oba1…““IL˝1±!č;µţs­ü Üć?= M‹"q<ŃsŁŰÝŘŮwĎn8*˘íĄďuR!= ŚÔGö(Č„”rý*÷®„qýЉ‘Uś=7í@ýď_ő×V«÷ÚԊءrf"$`č†˙Ă:ąW¨©ŁŇŹŞŚăřçčüź9Ő†4˝*EA8˘|H˝Ů8 cä@nTiţQ;QE ˇCUÂ_ěQC sĎAüP‰±č¦ĚłßűąäŃx%¤ÇŹ'*AşE|̨ĽŢiŻĽZüťĆĺ…÷–±đĺ" 'ß[či¨ăݦUŽŠV ¸đżpöw ň󶾎ü&6˛×5Ř ÷6Ó‹˙[˙•“Á®D"¦÷ż~7q;ÁČđH˙—Żz÷ö즖OâřÄćŐC·‡ś"ŚCďjYFi)źkÝ„őЇÂĐŹ†7żěú¸źŤŤb46ÚpÚáPńĂqÄǶ~ęĐÔŁ#=:Ő—yt|,Ž˘°Z: úÝŮšÇ5śßž?uş­#b b6t~ÎĽî(¨ŃQQâH‚-m ©#b bvü¬›ŐwŰëŘmś=ó®ç˛Őls¬#b ¶ńÝëg,"""†9mˇ¶Ăě‹ß,˛”¶9Ö± Ű8ĂĽ©É×'YBŰëŘmśZ†ąă8,ˇmŽuDlÄ6Nm‡Ůł%K‰v­Ń÷µç~‘v\@âĹ(KжÄâ7‹bŁ-“ľ[č(䉶u·kÔDÄ!6"˘ÖřŐ4""˘ÝŇ3§ÝgńňLWź›,Ýňońňő.?˙ źaŢ^âĹhÍ©Ýţ¸]0wrP=í/>›ęčó§ŢžĽlDDä۵Ăěé»,^[áăM*ë DD´Éa~öÍdÍ_/ÓŮ “'Fj®ÔßíŹwÔČĘŃDÍ_őóŤţODÄ0oáÂW©Ę_·ˇ|á«Ô–°‡ŢY˝|}ńňLÍ_đĎ_oů¸Łş»•®üU?GDÄ0ďrŔÖ÷Ř›őâ=nŇőźŻ˙·Ý|jzvě‘×<î$ČËźýâł/*çÔôđËÁÝěß~őŘŰőć[őň‰ćuZî±×?nŐ‹Ż~_ý@őç«{ôŐ=űFďcŹĽ=ň^T_Ą^ŕť^$×mČ—{ńőCńŤzřDD»*Ě«{ÁŐáŮëĐy/CöA?ËůHŔőLß\ý×ÎľřlŞë ß:íQ7zo}¸íĘ0Ň Ţěivč졷ďˇwúő´ÖµCę§ŢžďzZťö¨›˝źND»>Ě·«vÎygçĚűč͆ÖűyÎĽ—:1̆kŁ!ůVď ú|Yy°ŢÝ÷ĚëýÔۧ:‚/±—‡Ö«oVX7ú*[ůŹç̉h§Ú3öňŘÓÓqČ@f9ë‘…ô­4R×ü Ě>”˙E®vÁ;Hü%¸ću»xy¦aŹĽü™úóíé»,^žÁź}Qú˙őŽĎ‰×¦O#y<É-•¶Döˇlz TŢ5ŤveĎĽYoełGŢ]˝´üő6""öĚ·{äíë´Ű«Ř«{ćÝ}ľ¶gN´U˘F‚=sbÓłqĐÓíÇV~ž¨Ňw sÚx T Ş;őóDD»ÁĎXDDD» gî8Ď]Ń®5řŰô …ą˘(|}rǬԩyŕAŰËd(ěD<ÍCĎTďDAďF4hť~őŹhG†ůŮsµ}Ď…ŹĎł¶¶sĎĽ]Xź~w—>ťeŤŐŮvWłô—ů¦ŹOż;Ă#""Ú®=séŔ™ßNáä{s•ç>™<ŕŇ'ł8ý^ga^ľKőĎĹ6zn«Őß8¦—őëć=ýX–~–C·óÝŽuKD´í{ć‹7s8őa§>Lcńf®/>uÎrł`Nľ7 Ŕńz‰ ÷8ßĘëdű}ůęe©ľ]ýťę:ťćv,÷ť˛|DDí™/ŢĚ!ýť]yě˙?‡Éc±®ć>†x{sL׼6č^qŁP­ďŐ7 ÝFźé¦×\}›×FÓú¸]Ď:čÍmÝ^¶Ń}â[­ĐyVO»Q9—_ ş®­Fe‚¬[ϵzŃŽč™—ü‹?&*ߡ­÷ŽyţßôűszßďťOż?‡é÷ç*Ż BąÚ. ›LŁ`i:›ŃĂoŐcow/ůúŢjő{«:•Yý<}¶—őkTţŤÖµŃ{ŐYłukVďťL›hG„yÓŻ»-fĐŰcJű|ĎM×<ńÜ4ć>źďşwŢlç]żóďfÜě3۱gôvłÍz›ť”Y§ë_˝\ťŽ2t:˙^vÓ&"ęV×Ă쉗T¤żłk~m-ń’ÚÓ]®¦Ţśęčů~÷h;Ýď¤áÔFCŘíŢ;2Űę dťqxťv\Ď|ňX ‰—Ôš ďö|9¸ž˙wćă9Ěľ7 =Şaö˝iśůx®ňÚV`»^}ż¦_’»vĂŔ[ŮłlwzŕYŞw"˘mćĺ@oô˙®x‹_ĎcD€Ěľë%mDXüzľ§sć­B˘QŔµ µúsË˝„`« î: • ËÔ*Đ«{ďŐď r­@7ók¶ní>ÓMů7űL§çąŰ•ŻŽ'˘­°gěĺ±§§ß9 ăĚrÖ# é[i¤®ů;¨ěCŮrčĽ<ĚŢËŤ$Ξű‰É3mß—úr6ĐŻŔťú0˝c›ť˝ÁíSí¶‚ZĽ¶Â­ěP黌žĎ>” ź'Ú*ŰâGc¤t‘ú’?ŐZÝ;î68¨˙ANDÄ0€żąľ1Đi{•?넞é0çđ!{ćÁ{HĂ|‹¤ďzú®:ŔŃ""Ú]~Ć" ""bĎ|[™x'!¤”M˙˝z™ß&""†ů¶%„ŔÜ ŔŚ#3Čßž­ük™OÓ¬u""z¦<“Ă춨ęä—g‘}î„ěC?Čç>Hŕä» t""bĎ|ŰŇużŘżöă§ČţČ"|ë* Ź€“˙ť€qd¦ôÓ°ĽHŽŘ3ß–LÓÄżz uď?ŔÉ×ơěőołşđŐ,ć?źĹŮ?çYűDDÄ0ߎ¤”P#Ŕ©§8ő_{ ]ŕä/÷ ţ<0˙÷%Śr÷ Č?č<ĚGcŁ•Ë˙Ż˝ŃkŤ>×lDDD»>Ě…°‹€¶XH?ET®ß~ŠüCŕĚŰă0 @b, ęî& ٱQdsYdsŮš0®~ľţµę×ë˙ODDÔ«myÎ<}·Đö=Í~X¦Ü3—O€¨ H ¨ a˛žBJ@QéÉ®–­Ű®ţśžů0ďĺŕĘ=sĄ*Č] ¬1Ě›ôĚOľ·ž¬ü;ţ›ëxĺíő絨ĆÚ'""†ův´đéŕ~ŮŤ=i""ÚŽx T"""†91̉¨kĎÜ9ó˙|oqĂĹoő˙ţë“IÖ<1Ě·+XxҬ" Ej˙ťůß%Ö:=Sž˝_€ó$¤\şi"łśľ: íÇ%dúAľđţ8^9Ç@'""†ů¶î™[E@ó X˝Du w±¨D2™„vě4ҷҬy""boWú!˘XŔDáÄđ˙#íÔSЇ.üů>ż„S[ŢU]»V""bo[ICză ÄQH"ŞňÎU§ôS®€ő“ĹÚ'""†ůvł|m Łwf ś8 a$=2ĺđİדP×2H Ů{yŘE»ëŢíhl´á˙«ßW˙|Ł÷4úL»ů™Oł÷ѳ陹š}ůŰyč«i`H‡s{ "*¤´GTČŰ Ŕp‰Ărą\WóŤŤVîVý˙jŐ?űZ~Oi6zł×šM·ÓyĂ| Ňw mß“x1ZóX_-]Ô¶fVž“Îơt×+ÝçÜs»Z¶ w=kđŐá_˙Ůf=én½r""†ů–«ę ˘żő{ă‹w# Ží[48Ňđřţ=Čľ¶[áPx`Ë_ßîô ałçMDD;Ű3wÜüâ"´H)ČŔ)÷Ä%°b=Ũ¶Z¤űž9Ă|ŔĘß3żôĺ" L{ŕ–zć#Ú<}úrŔ=óęsęŐ=äfCěŐďď¤'ßč3ÍćMDDĎ®gîç\Ą'ˇE€™w&ˇE€™OˇE€‘}~çV»?gŢě|y» Ńş}ľQč÷cZĽ(Žaľí{ćăçć…áznĺßÄď˙Ýú󚦱ö‰aľ]˙xśµJDD» ďgNDDÄ0'"""†91̉ćDDD´#…vËŠžz{ľáó_|6ĹV@DD óífĎž=M‚űiÍăĺ;ólDDÄ0ߎAţôéÓŔ!ż•=ó~ޢ´›iąĄ*1Ě;˛x3‡ôw6Ż­ ń’ŠÉc±®§•ľ™‡şĎ€ý(U5`CČ7ëÁďD˝1śhçÚ6Ŕ•ĽĆßŮXĽ™ëzzŐAn=ĘCz@ęZé›ŔŇ•<–®tß®żąIőMMęźovó”úžpŁi4úlłiYž óo·ŽAßODD»°g^ň/ţśú0Ťôw6ŇߥkŢW~˝ű‘ß3·¬<2·ćľçü¦1óŢiĚ~r)p7ëÁ6 Çn‡˝ËÁXţłtĐĺétY:]Ź^×›ž‘0úw €Ä‹Ń¶=sËĘCÝë±Ďľ,}} ÉW§ = 8űi¦ŁkVý° w6 ŇîuyDT`ÔOź˝r""†9/©HgăÔ‡éšçş=onYĄ!v+żá5qp @ỳ]nŻ˝Ď^>_ßăÄü;ťG?–‰ş·mΙO‹!ń’Ú— UőĎ™+żgiůđđ"ň7&`Űf×=h†±gŢ$ĐŁű m‡Đ°ĺ!"Çď™/]ąZy­ú˙€ŢQʶ:Đ; ü~ťG®źî ÎQ7›GłQ‰ÍX&""Ú!aŢ/ő_9;˙‡i$OřÎĄ®Ą‘<–€Sę•§tr˝>äś{»sçť|ľţqĐ íÇşŃćxć~›ýéÓ§ţ˛ôG.Ř“&"bĎ|G8}ą|~\Gęąe˱ա٪×NDD óm+č÷ȉv"Ţ•aNDDD s"""bíV»ćjöSoĎ7|~+ďgNDDÄ0o˘Ů}Ężř¬ö~ćËwćŮaľĽňC1B~+{ć›őc-˝Ü•¶żmuÎ|ńf‹×VpęĂ4oćzšVúfą»Ążrߣń/Ăm˝Ţ¸%čçäDDě™4ČÓßŮëaüť ×őťÓÔ}ţ]ÓTŐ€Uú7u-!Ę7_1zÍúŢnůµF·mt˙ďú÷Ő÷šë§×lš}ľŮ4[-_§ď'""†y]x_üŃż!Ę©ÓHg#ý]şć}ĺ×۱ĺˇîóďgžą5×đ=ç˙0Ť™÷Nţ…¸VCÔ­B0Hoą]¶&ďöëť.o·ëGDD»$̇ţÝ´˝Mj9ČŐ˝~|öÝ8`éëKHľ:éůw]9űi¦Łđ r׳~i4tŢmpťGőô›őô‰aŢPâ%éďlśú0]ó\·Ăě–Ub·ň^§ ľ;Űńtű¦ý¸ ii´{Oł!ô~˝ź6Ç‘ŁčCIDAT¶ąnňX ‰—Ôľ9¨ŞÎ\‰”ÎŤKË˙€‡‘ż1ŰîîîiŐç©·ĘvX""bĎĽa OëĎ´ěGyHůb7`éĘŐĘkŐ˙ôŽzÔízÍÍÂ6čűËďköůfÓěfÄ ~ĺĎ7›Vł÷ĂĽďężO~ţÓHžđ/śK]K#y,§Ô+O=č¬7Üëó­0Č˝Ć[…g7¨őcťhk=sżÍ^˙]ňĘ÷Éeéo—ŤŤ˛'MDÄžůÎvúrůü¸ŽÔsË–cłÂ4H/źć;FĐď‘íDĽ*ĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉ćDDDÄ0'"""†91̉ćDDDÄ0'""˘Íó˙y“](Éó´IEND®B`‚doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/Refreshed_Context_Menu.png0000644000175000017500000005414610431726002033212 0ustar twernertwerner‰PNG  IHDRôwëś pHYs ‰ ‰7ÉË­tIMEŐ jĆ tEXtCommentCreated with The GIMPďd%n IDATxÚěťohWľţź,Z8f  RČ\¨L ‘ą…Z4/¬K˘’ µé…:lˇ×ia›ěÂ6ŮÂmÜľhÝ.tÓ.Ü&YŘĆ-l‰ â Q`Ă*/ňC.¤X«˛¨a1Ě@:Đü^Ś$Kăi¤ٲý|ŔXóďüýÎyÎ÷ś33{<!„B¶5±ńƱřM%A!„lgAÓ’, B!d» ş^1Y„BČvtĂ ‡N!„l{AŻXK‚BŮî‚^«v?1űśŔÂ?4¤4}U"™0×,HŰ9GÄ)U0Ö-¤ö•QüžM!„ \Đ-Yëzb©¬aţ“âë; Ś'Őş¸ŰJý<ŕ2N~tŽ%M!„ ZĐĺOÝçĐË?ˇ.Ň5GrźíٲG5$öúC`éŽ Cתýa˛îů .}”sΗŔ™? k˛m˙…ŻK(Ý3gîěŔÂŤ2ôÍ ń4±ĘšD±¤#[ß6•×ČÇâŤr3ÝîĽÉ*`X–î(,é€ ˙r¨łt·‚ůż/wŤ×Í™?`u©kMS1y$…Ô>ű«U ‹®ú g:ół‹Í¬3¸đU Ą˛cĎ"&pîť,„@_¶> @nBĂŘłI$'#Kbůžü˙Ó›÷sŻeőÉ—%”‘źßLw\ŕřŃQ¤źN@Ś8N‰µ&±\6°xł<0›é'Ě™É1Ś˙{Âąw~°đÉĹHí˛×˛¦{‹4[ pźŤ€”D™ń,’ű“0-Ë%•"0¤žŐ0óßcČNdqňÍ%,Ý*v°đŰn0hű€BÉĆoP,-C_’‰d p´ýŽh¬<ĐQ±EQÚGîëX.W0v0ô! “GS(ÜŐa<Ú^•¸ü}ËßĐökÍ}•ŠĂ’Đ ´}Î_ú`s—!Ń^!•Šcmýć+,•QĽ[BęétÇx ߕ۶óy¤žÍ@4TÉ]O©8űÚ8 ßę€-‘}!…łŻŹăÄó0Ü˙QÔY7»Ř,ĆžUpůć2’{“ČN˘µŘzµő-óąßeŘëd˘tW‡0ţچ܄†TJĹě˙.CĘ૵jÁ˛Läo(Pö+‹âť"¬Ş|ţě«cH?­@V% ßHHB{*Žâý2RR±™^Ă1ô3‰ćvꀂ•t$÷i‘ŐcŻe7¬÷ÖîöĐÜdĆ F€ÜŻOâřQł\…±QaUu(1ŇĂň˝8¤ť‚Ś)@L:Cń˛÷Uô'_Éâę­ PGÚ KÚ˛^î°†ÜD Ú^)â}ţ^†”×/N6Żąüé´ÓŁ}háĚÇë/Ńązł„ůĹe$źT±Ľxş~ÓH«&Ô˝j×8‘Rpú×cHîUśő҉gţÚ2tÝYlŘHËÂŤ2ĆSIhűXU‰ůoĘ(ÜqĽËôÁ$f^JAۧ1Ŕ˛$–{č·– ś˙ş€ E!0ő«1św© 2ĎűxËjë(µžŰ@UŐŽő&%0őú¨#­7¬p¦\|®›šĐęb^ĆÔo.@U\ţtă‡4LľÄÜ—e¨#˘c>ĂÖY'»R—QQY“?¤!sęmjBeI(ŠŘP§ÝŇur:ŤÜ –îV0÷WÇ^’I—ŢÍNĽ—‡±&Ůs[őöSŽŰŔĽú –Ë:Ä‚±T×/ž„–PđâsqĚߨ@ÄD3ž˙˛„b}$˘±oöł%”ʆs/ěSŘ›„ľV™t“GśűDÔËqî«â†ú©ŮŔéÉr/8ĺzćÓ"Ś5ď:LplřĹ7/`ą¬C j’OŞ0¸ú§CŮLłLŻ•1žvĘ´żöÉMvÜéôYU Ó’Đö)xqBCáŽŐĽw˝âj”q˛ÓžR1u4‹ńgžőŢ뽥ŻZPĘđáçK(–śş>~4…éc©fž×.ŢÔ‘I;#<ĺU ź|µ ðĹO‚`Q\RqÎN>Gţ¦ě‘,ÄŢ$â1 %–A2ń"R˙ë"–n›HL5 …o˸z-ŹÔÁ ŽKuµç ¶ęEć'ľĹ[%,—uhÓP… )ÂwŽíe§0űYˇÍž—ËË0VTe=ÜryFĄĄc#MČŞ@ö°†ÓŻ;ŁFKßéXŃ+=€4t•öVíĚkYä^Đ ?´đâç`)m qŹŃŁĘšD"!péŁ,• č«+ TÖ$ÄSÉČlfúX Kßé(ÝÓˇiI¤źNx†9zpĚGĐëi¸Y‚±fâôë9ĚĽ”Áĺoć‘L´{é­qď‘Ngpöőń®ewîÓXş_ľjAŰŻ´Ő{ż÷–¶WÁÉײO)¸zmŞ’ÄxZ«O;ĺ±\Zi¶ÉŮç’˙¦„ěs ¤źŃpöµ1+ʏÚc :€šÝ˝wc6ćĂ­ć?[D ™#Y䎌áĚŰ9—J¸đéĘ߯`üXɄЂ†ßć…ÝZ†¦%1óň8ćŻ-»ď‘Ř«Ŕ4 $Z†Ô ‰ő‘ż?ó^ľk}­č ßę<’F:e9˘°PhôFýuK×ň÷”ZHíW;śDˇ$›Ť˙üß‹#ΨO{d«eĐY0*&Ä‹ŻŰŢŁşí) Ěź6Ö±„ô°ÝŤŰÇŹĄęŢg 'ß›‡ âń8jµÔ'×íůÜ[SĐö'Púľ‚©×ĎÁ”€¦Ą€w[4{±łoŚ5§¦ę–†ü-sź/áÜ—Kál¦Q¦_0űń˘Sø}Ö3LŻ4jű¤ę# Wo,ĂŞ§_wîÝÔÓJsĆ/®ůŹ‚•Ý…+ÎuÉd+ůłmőŢuH$pň×@ö…điĘ^mźăa_Í/CU×ăźű<Źůż‘6…~1mźU1aVŐžěw—ą#«Żd×H$÷%`¬.¬h(.%ˇ‰äˇ1qo>Ę4|7çľ(âňÇ“8óëĚ‘’Íąşs˙3‰s˙3Ůnü{Š÷ŰWî«O$!D{…ĎţyţV€:"péO3Č>źÂüűÇqüíë@,X™×púŐRű• Ť˝¬–·đďéPU "–l«Y5ńÉW%śţu sż_Ź'KÇěgKÁĘĎö(ç–}Ú“jݱ[¶ťŰ(‡¶ňzRôéńf^]€®!„Äâřäí¦ŹĄ1u$…ŮOóH>é=§gUQWGD3m˘>*`Uĺ†tyÎwFPg~v1ş?ѵ.Ý6ÔËl›űŐWLŽv÷Ň˙^Böy Ú~óW–Ú˙V[{¦{şoč8ű›4އń¨„Ä^gä$«őÉTĎ÷L'[…G4¦ ’{Uń¶zLt°˝Fű°ÁÖěŤŰ‰„“ţâÝ2ÄH˛igîiZmżÓ;˝üM5[8uaŁ­Mj[rż‚߸ 1"1v ‰É#iä&RČMhż¶ý!BŮLłL—ÚÓí¦×=đâáTłś wĘH&SÍNÜ̱1śúS±­îŽ+‘P•]qI‡IBmC˝÷{oµŽŇLIA©OŁ.Ţ,9Cĺ-6fühB}" łoĐWĹ/Dś‚.<¶Ö0´rŮ€öě(Ré8’űR(ŢĚCŤiźČ"{DAz<…äS ďMĂ ~+KßéXúNÇäQ×Â,[BĘ*gě“Ďó(şćöĘ«dko-ÖÇß1’„x"ýGĎé FÉ'Sâ8÷VŠ"°xł„ů+EpőâÉ–2“)wyH)qů›eś˙:m/0ö¬†óďN#7ˇaöłEHŮ}aIíg á ·±oňČhseěŐ›ËÎ\·ë\1’„úD•.Źňqgę%™néě)-Ţ»ůDą ­>Ľ^±V«7śÎMť~VCío%YĂčA§žŠĄr`[ [g~v¬.7¦o47Ă(u-» 6~WGů © .|uÝé yŘzt]˝YĆé×ŇHŇpŞng—ż)1Ńű=ÓÁV˝Ę °¤cňh ą‰4Fż.6ë<őtنíÝj±=Ű)uDlÚ>áOűv#ý™C®ţĂXO[¬˝°đͦ_Çą˙™†´ó(,ľbą …ĄdU đť‰ĺűä&Uc5”Z_ĽŐ—ͬwĐâżÜxďujźÇ÷“˘Ąó®ô§!ţś‡”Â7® e'mé™ĆÖňďçŢš_,#űĽ†™—2ÍEŇ—ż)86oŻÇ5z0‰Ąű´„h…“˝Ĺż«Ý ćv˝â­2¦_>ŽÂ- xă2Ę÷ ¤Ó–n—Q\*B;Ć‹G“(ü_ˇ9™$üŤĚ}QÂő×6ěG 8Ą„ąßŽcćĺ,„(Á’€–P0ţ\^,âú˙Óťą±˝łoNaůž3'6˙ÍJŰ|ěč~ Ę“ rĎ;ńî–ť†ÔGk¨(*Žß^Źô»÷ŽŁpG‡±&‘¬÷DaÖ#µ_ Äc˘»‡ŢRΧ^ÉbęhZBi‡–îë»wzÍîsŹ¬Ďˇîč¸đ•÷ckÉ˝×˙wĹűXŹjĐžR‘~F©ß Ĺf}źűł ëřŰ‹XY5Ź |ň·2˛˙®!ű| —˙8 8Ć%řäóSşÚJuÖÍ.:֥Ϩ…údzăýŔĆ_|ó*LÓIżPSťăë”®j ‹7Ë>–Âxýž™˙¦ŘV×=Ůs[ő*ą/KH§“Đ ţůĹI,}_śyâPţˇ‚ą‹y žžŇŇO+8űF©ĺ wŻűćü×%Ěý~ÓÇĆ‘H&P1$4MĹüßWś§&Sv7—QĽoŕü»“8˙n§>Č#Ű˙Q¬sČ6łÉŞlޏH ďę¨ý¬†łźňëfC°kÍéŞÂ˙+CţÜzĚ™J<’Âü5Ă7® eשŢĂÜ[KwŤćBÎbąbI‡Pµ¶{ĺôëYhű5dźslxýĽT0űµ)čPGŕĚű¬éXş]ĆŘł č?hŔ} ΢•ň]ŮĂo–ˇ˙ţyîň&oéśŘ8DµpmVŐÄ̱1ĚĽ<«?—|OÇňÝđłŔÜ_Š8ýÚŇO'~:Ąűś_(xÎÇVÖ$ ·Kýě*P÷8ÄqňăćŢĂäŃ42ĎĄpţëbł7Ý +-dǵćJa§Ľł*ˇŞ˘ç𠉽ÎPv龎«7J¸đwÇcs{âî9ôň öSq×y`®I,ŢŞŻ€>Töa—ż)âÂß ÂőT‚4€ź%(˙`ŕĹ·1űj™şč,}§cö⢳*Zíľř/Š:󳋨ę˛WÔ.ůš®Ë7AśĹp†aA´ĚO)›~±¬ţ㍫8ů’†ÜDý™îXcꨄ™w.CÚhÚŢě§Ě˝•Aú@ÇŹĄqţ«"ć~źíÇÂŤTL'˙+…Ě3Ä!§Á×–Qs=ă~ő:„(ŕܲ]Eý“ŻJČ<« µ? Eq_[úNÇÜĹEŹ,¨jr 6ăf<Ţ~ß?:ÚŃ™úí…¦­;ë7Žcňh 3/e1˙÷ ‘”ťo!î­x<Ëß”1÷űńzXEńâ*“<¦Ž¤‘Ř+Pş_ÁĚ{óőóD0űŤ‰]-č{Ć_\‰Ďt=1÷ü‹¸đÁś3ä©étc‡2PT ÝdLÁŘAŔĐ+¸üUÖš ‡vädŕ™ŹJőaU ń¸SŮćO: ­ ű VłŃh.$q*U<‘D<&śăUÍႀަšń¸s! âÉ6ʏ·8D}ŢČhKŻgľ\űLSŻÇ±žV!’můő-/‘l °gŢbNşÜŤ…w98•¬>ˇů޵zZí–´ĆÔ¶N€Wžga’üÉěúPfLi–eŰľÎÖí"H]†ĹŻ\:š®š-!Írł\Uucv+› ¶Úi¤¨V«@Ú&¦Ž¤péŁX–Dfú¤Ý~ťc ›#j=ŹťďŻô UóL{­V٦çhÉONšŃş -& žĐšvĆf|ďź07ŘD}Çë¸ÓnXÚ6ŻüöRvm±Ź{K‰cyŃyśmôWł0Š7Ű‹ýĂŃ ©7/ xĎ‚”f3ż­u$~ zAźyéEĚľ9×ćŰ'Z*ŃC$*(/Q¸¶kM¬tŹ‚NŮ9ś}} 3/§QşŻ#÷VqĘ.dćĄ1¤źU{AĂâÍfŢž‡PSMntIÇ™Cî¸~cąE¤ťžxe¨TŠ(—–!„ Ë’őg—yÓB€?_Ƈ_iBÖ$âO¤X(»±c÷›4`;ďĂ8óÇË@LŮőŢô–zčç~ŁajňLĎ\úë|xĄĆ’&d7Ó25Cv'Í)łRF÷>ŐÔťB!Ű’_°!„ :!„B†ĎEq‰Ú‚¤s«Ë·×rd=űÝ«ÝĘÄ}ĚďŇ6 Ň‚Ćë•Î(ňŇKý¶†żU÷y/÷Bi-Ţ.¶•‹×vr r, mpXG„6@hăôĐő”¤dŹŘ{łëH˙Fką&i č•`ň—’¶FśRĆë=ďő8[DüNÜq˝iÄ“YÄÄ2ĐşČß*u0QoŹHŻ-AJ`×P¸1¸o ¤^Y\+ĂZÍø™HŚC}j b_.ň¸ň·JHŞ€aIŐçć_Rűâ(ŻÖ¶ĚşQ~hŔ4*°lű“ Ä Ź7 î•CéĘŇ//GۨX0*& Ă‚Ňhccq,Ý^AMJh  RŃ1ůë™ţĘK7 D,cÍD<&`Öë@J p»ŚÔ cĎjŃwŽÖ$Vę°Lł)Ş`&ĘşS[Â’Ń}„KÚ€±ćtĆÓIdëžóJE˘xĎ€"ThűÄ–¶sé×ţµž^« H˛ZlŔ¬š(Ý, ¨Ť“€íüÉŞY5 -ĹĹ-đĐ[ČŞÄěűł{oÎsŰ뾡Hy†#ŰrŚŔô˙\ŧ0ůűÁzůëua(ýiţνś‹ĚŽf¦Űoš3/;˝t±7…„˘A90 YY‚ůŕäť“íŘŕ«R—XRŞĐ×4,ŻJ,é@ř]ٱÇOSŃxę7.xÜOÎHj*ňťrÚĽ·Ďoľ‡sďÍAŚg§ľM†‹ľęHZ€4€¤˝˘!5PQ—m˝ŘTU‡U)Ŕ¸3‹ü@ŚD×›ź_Č6-ľô•Řĺ+őV…údÉô`›Ň‚~M %ęůŰţCějPźŠű”ĆŰ€_m™Âi SxçÖmÇ–j€t;I9‹ĄĎgˇWĘÍó¦5éŘcćčä˙ň"rżąŢs|…›×!DĽąZJĘxÓ[FŐů/m'Uń`Eâ2©OÄë"Z¬6âj6 „Sń‹7‹ČMd í 'ęúŞ…˛ľYuâ–¨AÔÓ!bꝯŰßĎŃxć‹· ( IE@őýŇjHÔE~ń¶ŽÓ/§¶ÎĆë‹ęf&őN`J‰ŠčkËş3j1żdEÚĆiÇ[Śß€\Ó!Ť2¤°i˘h¬Ýĺżü°kČ˝>»9‚ŢkŹ?s8Ó¶]Ľ]ěxŽ×ńÖsüŽ7Îi=îwM§4ąŹő“&w:ĽöÉs(S XG–TYqĬ1,$uXŐ$ţ8ŐË8Ś U…;XUç-ˇ!ű\¶.D&¬j ‰'âÝźŚĆĽÂ°%¤”Č˝>‹Ĺ?Ď"÷ú4¤´92i;ž ¤…Â-#t´„Ř0.R[oóÝaâjy6ÚZ“;ś‚¶_macÍÄň=ÝůŞŘť2r‡űł·âť2 KBŚdźK!ą7ŢěHĐĐuRÔ;osŽp9q*#f}d […@ (Ü« ô˝äsáě't;'MqHPW‚ńq˙öŽ3"ôĎ·R8őµŽ“Jřz÷jă¤Ä⧳Ƚyůż/:šđśćÄóKGčŻ^ś ˇěŐúŠżgݲ,Ě}4‡Ůwf=·{Ĺ-ćľCfÎq‡äš0é‹"üAĐkI[Őş'«ĎŤŠD}ˇN«¨GÖ«¶E}QNct Voä#nőÎóźÍ„őŠ!!~)±|ÇÄ©w$´}ôUÚ>ÍÉł{ąR†ţ …â­rdy^ţ±ćëĹ5V¸o• ,•–šbzEG±TDňI eÝ‚2X& ÇLÔl ůłăőJé éf'Ćzö`ń˝Í}“oĎŐ‡ŢMä~}ů‹ i6ŹŹż ¶Ę[F]`Ô¤ü,Á±ëţdŰÍHKGMŮ+`<˛Ú]@Űçxr…ĄŚU˛ŞőěĄK č«ÎŰŘłZ[ ´y5:‘±hěͬ: Ô,¶—lQcM˘xk°%’Ę·s¶…RȬ9µkXrCgAqaEÖĆ5=óޱ^Y-PüŢPřü$,Ë™ßĎý÷éľűŹ=3űÎě†ŢQXlxŻ[!’A;˝ŇđŢÝ˙7#߽֑¬ęްĹTçąN[BPR@L ö“Žô ČJ"‘…ÓÇq3V“Ňl€„ d_pDŇl K߇÷Ť‡Ň¦^b+őĽŠv1·ëEófŚ#{Lë9.}Íc˝îŘSŢŤhńAmÝ;Ü0,Bdf`ĘË(Ż–ˇŻJ¨BqWý¨Őś°ń„30©%{/#)ť©ťÉwÎ9e#MČŞ Ô€üĹOÖŰ»źUd~Ô~6©CÚ5aćđeS°Í6on˝ěĹ š@ů©I¨®UíĘČş]¬<40öLoeşňp}ÔBQ6Žk›k& Ă™b¨Yőˇ˙X-’ÇćF÷ î9Ź«i‰úzĚé¤ HĆ€”¦BJ‰ńtbËlÜ’*dUGy5…ŇŞÄőßi0Ąă™7ýÜËIů.Î{ ˛j˛X&r˙=@"÷ß3Š(Ü]Fć°ę´C?éHXAéa˝ uoŹvn‡x—{Ł7…p6ö{ ŢVŠů „Ţ-úĘwĐ:rÄŐ¨{ፆ͙oЎ¤OfˇĄs1i­8â¶1¨ęëŁUŁ)zBM!ţ„µ>ľ‰5­EÔçă€oţoüŐ츳h©*[EůcéţĹ#s0ŽŚoĘ…đńâôG-Ă“[d ‘-–‹(Ż–ë ˝¨?Î#Q^5ˇ˙XCĹŞÁŞ–tÚ(í©ŤŢ`°¸jőUh¨őőr˙5ŤÜdŮ\Ů çyüZͨźc:Ł9ýňs{‡IU¨Š¨ŻvŹ×m@,šiĄbÉ@ńžŇ=Ąď XkŽR,z<ŞdUk-ŁI˝ŹBT Ł˝l],Ţ,AŻX°,鬉Xł W,č«áŐKÄM Ă‚QŚ*PţAâúMůeX–-!pü¨†±§Ő­łq[UE]bĺGé!ŔÎ˙äHD ł…3âdŁůÔŞ5 Z[óDĹĽ„˛7E;ޏ’AzEŹ•ńŃyčmĂFJÓ0gß®÷ŽÖ¬Ž×@öH…›Ď…?öŰÁÓ$üľŻ ’–NçŮ]ţwúÝkú©ŁV˙Ä,Ohhô°UH¬?š$öf F4gžsm°G› ^úö•¤Ő6: m±dCŐ·M@*H~±ąj6 ©´â¨Ş­8s}¶Ór@g1ĎúMľrO ;‘¬UF3ÄînBR‰xűľ[ëŐRZ e˝ě¬cÇ(ŢÓˇŚdźę7 ÜGzkRBVMä/~čÝ™>śjË/}+$‘>P\ŻŁeT«5ž FÝëw O‡ĚßĚËŮžÚ ă‘Ő-2«˛ç8Í–ˇcð %ÔPéé©ăň˝ MS!c‹×ʨU%tĂ„Uq„Ü´,LMhHí‹ŕQÇíś”Vsu»ń ŚňÇaKŤçwŹ4ŮŔÜ§Ž°Îľu˛ż6n­Łb e?(|·Ţ™Ël ů/ňȰŻîLőY'={čÖš…ąŹç|·=oΆpÝŇUš 7 ›ž˙~ę¨ůŇiŇjůoB)ëCÔ¶¬{é!ÝZqFQomTaBŚŚ"®GęůIH©#Ě]qÇčÇ 3MĆŹő˙`šqÔ~ŠŁö“ ó'ć#€mřçeCěňg§CŇđĘ‹j(WjĐë@´Ź­őj™§3ȦłHL#›Î˘f×P,Uż÷Ý™“€¬ 7=ŤÜä$˛˙™EöWăČN9 …ަ3j } „ôţ˘ă턳Ö\Ő,ŰćÓ…×˙!¤kh~sĐWŤö˛é§< &`TĚMK÷ňCqÄGJ%ú=I!ˇŤ™gdžMbęp]̇˘ťsĘFÚ5”ďp8÷ŃYčw ?­×AF10÷é…ćń†°÷\/U˝ľÖÄóÜ+Yä^Ę s8„łV)ťBć P|o©W3}—IsčoĎnčĐ ^y‹ŕą÷»EµőśĆďn"Ůíż4íMS·ŽCиZGv µš8ę‹Cę­8 ˇ¬/J áĚĂÖ!ˇőťĆÂŤú l‰x‹w,ěúŤĄ¤šĂÔBÔçÚEńiO+qáŃÓ—¨Ő±µÖjX)[Đż—y}"D´aÝ´˝ńőGzęĎ;7eÉ^R6 %4$e…{k덛Y5 Ąl{gv$‚^5ëÂn?Ëz˛ľ8˛ţ¶@`ý±®bméŕ9ÝĆšÝ÷ÚúôNŰ4Ďŕß‚Ů`!Đ|žşďáoVŐ‚±f"ąWhşË%,H>%°|Ď@á¶ŽéŁ^<śDM:+Ý…lŮőjă…›zóţÎĽó!ÎĽ9SŻÇůż^n®CH8óć *«ś»bA®]sł~훪:#,« !ś×ĎŠ´†LĘĘ.—tĚĽsµŻčúžmô†ü pyuÝ0Ď}™oţó詳~ĽéN×t‹3lš 7 meĐZŤý­ĺŇzîXD˝ŮnuÔnx qEL s;QY„µŞ@ŮźP4ȵ¬‡y}“@¬1ĎýĆąIň™¤‰€¸p^ř"cI˝)(‰\ÓB…’‚q梤Ý{ů¤RÎ[ÁšC÷¶#*¦ č?Đu kMbću ‰˙P#GkÔhR‰Ł\ ¶ŕ-Ę•î=Ű€š¬ÁX3 bąń–î-ˇ&kŃ·Ä?;oo+ä˝ďˇL˛†šmŁô0Âő%u/_ZőG4ÝuÖ:íaËÁľk˝Ţ±Ń¬8‹älŔ´î˝1ç]úŹ• ş^‘ĐÍ´§Tků[:răILN:iÁ¦ÔĆmŢŃQ“@í)çłÔsźžÇĚ«Sšl·3cÍŔüß®bîť3ˇśr­‚ěÓšóîŻç $2PDŇy´L ¦?-Ł6RFEź=?‡žH$P©8ügŢ:eŻŇÜÖJ€ÓĎĽ–kż®C?«ďI÷š¦ľ‡±\á÷úz?u´t?ĺÓß_vV?â8¬Jbo €ě™ôFgfÝc‡T—Q©PöŽAěM; K‡P˛}Ĺ›L8BiU%ĚG5”îH¬Ü·Ŕôë 䎩Ž×s¤8¬ÇÜ:ÄîëM g.ďř‘Ńžë{P÷i# UQˇWtkEA µč‡ 2yN«?Íŕ,«ŮÎbąZ}<d_żĐ1ŻÁí¬ýýßm1AŰZ Q_­=¸űÝ´Ěőxë6á¬'é-N!ś5("Ä…€±Vi™ŹÄÓFé&’O:†Ë˙·‚´¦br"éÜ9śŞJ‹JNŽ8^đĚ«Î#˛ók÷Šg^ťÂĚ«Sýč\Ýű?ŐSZv[Ľ8ëŘ8€ě …ŻfEEöŘi‘”óüüyÔ¬2o'1óÎŐľm®çţgĄRÁąOĎáĚ[g<·»±Pű[˝×(Ď ĂfĹ–^ëČ«ÁÜĐ`Ř&¤U†I9ĂŢ-ŤaXĽ;‰Ä’űĘHI9 ®H÷gč1@_­ÁřÖŔň’ íi™qą˙ÔL`0^Ř ±GrźĆÖ˝cÍ0úÔ(â±č…AZf˝3çxË5{ý)Ů2¬.ťĹp¶Ë»‰CU4(Ş 1˘ .â˝WUĹyLTŻX°LÂ}=®**jUq! (q¤žlÚe(­™X.ĐTŕřŃâb¸Űą¦çýľăĎ}Ü.ć3ŻN!™pŽ­”u\^Čăřt3ŻNmű^Yµ«gŃ›Ŕü§§L&=šŤDĚŃoSvć­3zGd¸ĽŽb*¤m#ŁíC“! Ň™R®Ż~ď‹8®_Ń1zHĹ™wF‘Üď~OV´lĺ{XPGT¤¦QŇK1”–r^ľ3Š÷*muTëŔ°,gÎ^ŔyL-ą7 ń„ EQQ>Ľî×ÇGâÝG-ˇ@×+ž/:ęFB¨@ ťŇ *ń'{,%PĽg!s0ŽěxbS⌺ťËMdšB=y4ŰsĐ´2ă©ćń^˝óV2oz/ÔKUV ß[Âĺ/$qüíˡGz~l­Ů;Z­ŕÜ˙žĂ™ßQĚŽ˝őuäŮčf¬ňhĂEúÉ˙şGl&˛i-úúÝÄűttß(F÷ŤFźľÖFM-źěѩͫ‡~»ť"ŽŃ”ÖWZF&1Ú{Ý„|h{ăĐ&â›_v¶scé1ŚĄÇ<ĂŽÇâČ<—AćąĚŔň§î…:1቙ČâčąOšŘ—@eµŢúÝ™¶í¶B.çkQwAëСŤďzźCwő†ĽzGŮĂYZۤŽm€Úř΢ŻWżş ŚŤÄđÁ:"´B§‡ľš]Łĺ 9¬#B ´ńÝÍ/X„BťB!C@×!÷…ŻXJCëĐmśtôéW¦YBCëĐmśtt˲XBCëĐmśtôË%KО+Ű/Ř&’ť#č=”`i‘-aáëą‘-ˇp·Ň“в-˝›q2H8äF!ťáck„BČnóĐÉîcáâl_×M×?¸pńzź×żČÂ'„ z0˛‡mÓ»}»›8÷Ň h űŇ_gzşţÄóÓF!ÄaWąîV°pm…Ű›TÖA˙!„l źy-×ö&ś­`úŘhŰ ţÝľ˝­FX&˛m­ű˝~B˝ çľĚ7˙úćs_ć·¬3@O˝7O˝1Żľpq¶í/řő×;n÷Tw· ÍżÖ}„BAŹ†Čş=w?oŢkŰK¨Ý×»˙w‹§ÍĂŁg޶݋7®˝ô×KÍ9ö ž~CĽýţGĺąwóę;yű„BA÷߆çîŢîäÍ·žçî ´^ßęŮ·zř^çŃ3ŹÎ3CëęőVďuá\żBßđćÝĂň^ž>!„ě:Aoő†[4ě0záű ×Ň3 čYĎFftîGŇ.ýu¦ďĹp˝zÖ^çşžBv­ ń†7;Ě^DťžzwO˝×G×:wÚ‡×OĽ1ßwX˝zÖ~çSÔ !ô!¦›¨Ó3ďm= Q÷fŹr=L瀢Nˇ ÷ °^ĂóťÎ şżA8č‰÷÷ş[ÔOĽq˘§ářĆp{c˝u{łŰë1·ĆçĐ !Ű•=ă/Ś?>őć)¤¦P\*Âxd p«€üµu!\~(ţć®nâ;HřĆ8˙ş]¸8ëé™7®qĎżîV°pq—ţz©ţűzĎsäîk*ĺrGsĽ[ɦłüPú~>•_[#»ÚC÷ň­szćýyę ±ĺ[Ţ!„ú–CĎĽ{ťö»ş˝ŐCďďúvť­ ‘ĘŇC't˛ł:>ýŽ|lĺő„„Ąp·BA'Ű~>•Öíz=!„ě~Á" „Bv‘‡nYç2 !»ŠDŠď% ;PĐEÁô+ÓŰ&c¦%[çűwlGČv‚Cî„BČnňĐÍ™w>ězÎąŹÎ˛Ć!„aô ‚}ę­Yś˙t޵F!„¸Ę!÷˙<ď»}ę­YÖ!„2Ě‚.m6pú·38ţö…ćßŮßĎ6pţăŢ˝sżŻ­őű­ő(ńúĐL<ő“ż~Ó6ßĂ!„PĐ[X¸Y‰ 8ńA 7K‘úĚ;zĹű$ËŽ¦ń1oýć{/iŠę˝÷î4DQ>Ý®mÄąuŔN!„‚ŢAĚ ßšÍí·f(Q—6 \x˙$ćß? Ô_x˙¤ă˝o˘§Ü­ŕĺŐ6¶»yĽ^Łńú¬_ü~i‰b4˘5ÝÂwç×ëÚ~׫.üňtż;mAĘ·×8 !d+ µ(®!ć—Ţu^ľpâ ßš>Ňg€uŃ>ůţ…殓ď9ż/Ľw˛ďt6ÄŇýßËă ňĺ·ÖsÜçw:6HOżźă­ĺŃmź_xݶĂć§Sx~eíőŰ+_ýÔńf×/!„lŠ ű ˝ĎËş˝tCÚŔü—óřäť“8ýŃş¨ňÎI\ř|3ŻÍ T»u‚x˝ĂÔŔś BE~[ăń‹·—đşudzíäE6!„l;AĎ>Ż˘đ­‰Úö…y[–źhZĚ[˝®°b2,ënçőS>[-†¬zĺ„a$Ôúô‘4˛Ď«mb>}$Ýwx5Űů;ýŃĚ˝}Z"‰ą·o˝qlĐâ¶™BÔ›#‚[µ­SzÜ‹đ†˝ĂC!;ŢCozáŰBów(l‰…Ż/c4){ë$`ŁI…Żć1ýJ8/˝Ű\˛[\; ÇúÍÁ÷+´ťâč$ĘAŇdÚ Ó<ş_ůô"’ťĘ±SůőSÖ~×ô"ŕÝĘflňśçu ×VŘŞě0zÜO†“sżŰńyÜ3ţÂřăSožBę` ĹĄ"ŚG · Č_[oÄ–ĘŽĂčŤ!÷Ćâ¸~8ó·ČNźîz^ţ‹ą@o‹ŰnU §8<ĺ¤.®­„˛wBČćqâ®ôˇyő«”5äżŘ˝Żuu{äd{t˘,ËbAB(č­đíňa)oÖ!d× :‡ !„­…ßC'„B衆ÂÝJ¨gŮ„ľžNp5;!„:!„Bv‡‡–©7óB@Jéű˙ęEľľ“lى, · ]÷BÂÝWôĐwB\x?‹ůŹr(Ü,´ýź{+ !kžlIăCá}EAďÓTuĘKsX~Tîĺ‡Ŕě§\x?‹ăo±WG6—­BÇĆ';‘m;î>·Ű6!u úŽCÓ4üŰS{`ţôË?˛ ä^żŠĘ#ŕře‘:<‹ÂM :®©p«ŕ+úŤăl¸ˇ¨ď*A×u˙úń1Ô'ö@˙Žż< ĺ ç­—żśĂüçs8ó§2ď24^şŰCďv.ç !;^ĐĄ”PG€KůÇ8ńź{ kŔń_íAć`ţo‹;”îUP~Đ» ŹĄÇš˙żÝÇ˝Žy]çŮ˝bßř#„ô~˙PĐw BU ůpąđ ¸~ű1ĘÓoLBŻŮńD¬żĹqcé1,—–±\ZnäÖýîc­ÇÝż ˝tBĹ<,CűŘZŻĄů˝<¦áˇËź„ H ¨ yv–<†”€˘Ň–}Ą­_!n˝ŽbΨÓđzŁjě÷Ű&„÷ď…ˇô0ozkxčJ‹×$°ňŕ1FîÁż~| K˘oť(÷>ż†)čy„đľÚÝěč9t)d]Ě“ `ŮŔż~|Ś{j’#ý{č„B=ôM áˇ_řbłoNâ?Ň{°\~Ś„ü[r?vćÓĂ̡7pŁű#„B(č}zčłż›„2,—Cq‰yr@sč~ÇüćĎ)ú„B(č<ôăo/BĤ-›˙'s/ľ±ľ?™HŇ!„PЇ•Ëźî‘ zÔ„B†~>•Bˇ‡NČîĺÄ|d†BA'dŰsé]ľíŤvľ)čĺ?Ţ^ذ Îý˙źOÓĘIh,Ëb!B(čBÄ.ż7 iFHŽ´˙źýßEÖÂć{§ÓĎ»Őűůľą_ś˝Ä4|B=Ľđß­8 ͡DWÝ0ĘPźp†ŰçŢĘż:ŹÜK3¶śů´Ř“Đů V"ô‹hA<á°éńęH´v2ÜáÓ;ďb·Ä9 ö Ł_aűýsvŮ…‚ž}^Eá['>(´íëwÝ0ęĂíFyĂ1q`@ĺŰ3}‰nX/4ĚőnĎ{ń÷GiÚ­ž»źčvóĘĂĆé~ßşß(‚W˝„Ţ}}c›˘NČ.tG¸×çŃĂ.ŠSUg]q%ęőýp÷ynďŮž_ü®÷ łSúz=źB˝ÝŁ®‹ůĄwťZśř €Â·& ß¶?Ű8Ţ óQę“Î÷Đ‹·.xžsö'1űö©Ŕo’ë4\ÝIxÍÝ„´Óyżźsí5˝ýćŹBČ.ôŔ·]?±Úső Çź{+XüęW. ç~‚ňŤ)f_]kť·Ţ*†! d0B–ťČnđ¨űĽöű]Ó‹çîľľ[|ťŇęu˝ű?!d{č Qź>MXćŁ2ÄHc°xĺjóXëo@ëÉłîć=ű nĐóçů]ďf?#î8×ű…ĺw>Śř·ţîä]ű]Óo‡ŁŰv·x˝Îç§T Ůe‚îçÍĎţá$rÇĎ ­€Ü‘,¬şwžĐ›Wv' ň­ňNÚϢµ(ňD˘ő^öIżož‡F'„PĐ‚×óĺłoźäî®lżGŕČđÄŽ*ÜA¤•BA(§.6ćË5äč[–ŽÍÔ Ţ>Ů<ćp3!„‚Aź3'dТŢÍ»uź×:‡î^´6¨‚_úM«{?;6„PĐ Ůö˘dĐóÂ^ŰĎţÍ —BA'„ €†ÇMA&„‚NŮĆPČ n~Á" „B(č„Bˇ B!„‚N!„ :!„BA'„BťB!tB!„PРٲٶżÖýŰ%ýÝňŐOXť® gňăç_ÉNoŠ#dĹp'żm­őÓ®AňEY´†Ńoů†ý<ß GčˇB1ďęÉń‚ŰÝ<Ő~ŻăűĹÄ+§×(H§üw*{ŻëÝ˙ ˇ‡Nń˙ÖßťĽQżk‚zł~×{ť×MHĂz¬˝ÄŮKAĽů ĺĐČ'=tBA'„ôäŮvŰTTÂ^߉^‡ÜŁ.§Ö8ĂŁBA'„DBď1¬çżSËiĂ$d3ŕ:!›$<Ű]Dæ?Š9xB=tB†RÔýćş˝†’Ýű{ÚîçúÖkşuJĽćĐ{ą>Ě5˝ćÝ/ßAËŢ˝ź^=öŚż0ţřÔ›§:Bq©ă‘­ň×ňÍ“–Jd%XZ„Ô9ńA—ŢͲ,Ć6‡‚Ľó9óŮ2ÎývŚ:!„ěT!ďä­BA'„m…śě4¸(ŽBˇ B!„‚N!„ :!„B(č„BťB!tB!„PĐ !„Ň _,CČ&ä]îŰ!NwÔqDů­ö(ꏯ›%tB¶ą[#ľ„%ę<¶†ŐoŘaż×ÎÎń‚Cî„ ‰¨d'˛<Ŕƶױ^®iüvmÍËëô‹«Sš˝ÂőÚö:ĐÇ:ĺ±×ňîćą{•E§xş•ąűzżüBť!|·řű zŤźWéőéĎNaFá­Ť«Óg^{Ic·<Ůî·Ó4Ü uę—B(č„ ˇ¨wÁ0×ôâu‡Iw«čx‰Ď°{—AFRĽÎ ;ŚNťŕ•÷+AŻq{~Q„Ůk¸ýśżXÂ$»Ρ˛I"@/ŚŢ*!ôĐ Ůá˘î>Äcëĺ÷ą~ó车#h¸AĎ÷KC§aîA–[”őíŹßyÝöÓ«'nöŚż0ţřÔ›§:Bq©ă‘­ň×ňÍ“–Jd%XZ„Ô9ńA—ŢͲ¬]éASLX†Ű‰3ź-ăÜoÇčˇBHC„éѲ ˇ B6ŠË 7\G!„PĐ !„BA'„BťB!tB!„‚N!„ :!„B(č„Bi…/–!dđúÄč0†ĎW’BA'„tˇU(!śQ„ö›Ţě ˛upČť!óŢÝ_#küď糢~×7¶;ĹÝ)^÷őî˙„z脞o?^°űšnŰÝâíôYTzč„PĐ ŮUžx/ÂôÜNß Źjô€BA'd×Óęá2üa“28‡NČ»ź¨Ó#&„ĐC'dŠzáVˇMŕ;‰ý :~^¸ßyÝöÓ«'„‚NČŽđNű‚üî&ľQě߬p !tBČh! „PĐ !;h˛˝ŕ˘8B!„‚N!„ :!„B(č„Bˇ B!tB!„PĐ !„BA'„BH+|± !¦Ó»ŮŁ~ˇ‹;®~Ăç;Ůwg>[ƹߎŢß-¬VÜ×·ď5lBA'dhiĆ(„˛[QÄöęě §wď^ÄÝďĽ~:$8äNČxń^ž|căűŻž»;wř~žţ ÓG†Cô˝Ľď(F=tBvŤ7˛µńŕ{íPÜ)č„ěJQwÓŻ8ú}ë<ě0:ŮľžwCX{íNsĺ~óä­áÓc§ ˛ëčô}ń^E}Ţ1=îí/ęýzí˝Ł€SĐ !Ä”ĂŘ$ ~ž5ˇ B Řno¸ÓĐyďoĐóşígd8(ŕŇ»YX–µ#óGA&;˝cCť˛ŁixÜsB(č„m …śí _,C!„PĐ !„BA'„BťB!tB!„‚N!„ :!„B(č„Bi…/–!dp~t_ŕEZůęXB(č„ěX†Aŕş -… :!$ʏULâÚú~uż}^׺Ălěóí bŢéëlnĎŢë; „PРٱbî%âťD¶UÔÝß©cöł¦ťŇću,Čy„ :!;Ćď„×yîoىoňNˇ ˛­ŮLĎÔí寮˛[áck„¦čF!ţôĆ ˇ‡NČ®ѨmÚďµ­ű[ů[ôB(č„ě8ş}‡Ľß0{éPôÚ '!„‚NE}q÷3šŔˇuB¶śC'd D˝W(¬„zč„ ­‚Üę-»ŢďXŽ€_X~űýF ÜçsŢś :!ÄC¨ű=ć÷;HX~ÂÝKš(ę„PĐ !C>r@±&„‚N١#„íĹB!tB!„PĐ !„BA'„BĹŇ''>ŕ‚2BťmĎĄwůö6BŘů¦ ˛#°,‹…@ 8‡N!„PĐ !„BA'„BťB!tB!„‚NéŤěD¶ů6ś^ö÷zN§t‡I{Ř|B(č„ …nšaĹĎ}<¨XöűuµÖ´÷+ĚaľěĆÎ!tB¶Ťçް—GíOżž»_ú»ĹÝ)^÷őQ”!tBH$řy¶­ž{ăxĂ“íäѶžßŁŹÚ+ţ~GĽF":Mxťă5’¤<!|S!›.ęna”ç$Ü "ŮVë5F'„‚NE=Qěć9G%śH#=nB˘…Cî„ě0ŹźBť2 : Y{ *Ö~Çýć¦7«“ŃkúÜůî·<ˇ B.týrý^çuęT:ťoBť˛‰ŁdB(č„m …śÍ‹â!„ :!„B(č„Bˇ B!„‚N!„PĐ !„BA'„BťB!­đĹ2„l"WŻ\mţžzyjKâtÜWŻ\Ť$|żp˘ĘKTé$„‚NČ.óVŮlA٬¸7#OQä%L:Ů Ă‡Ü Ů1oJ«·Ůř}őĘŐ ^¨ßţn×ô’ľNqşŹűĄĂď·×őÝâëwÂ/®Niî%Mî˙Q¤ťzč„ě`áň»Ű±¨âô°(F&˘ŽŻŰ(H§aü iú˙íÝŻoÜHŕ ;x¤ , ‹TŇý/ŢĂAUĘBBËßŕc/Š´Ç–˛Őˇ‡ĺ¤’…a}A뼮ë±Ç?Ö뵟GŠ.cŹÇÎJ׏ż¶×S<ŰçŐč0quˇ ¸Ô ©»żËŞ2ĺ>x×jĽ<~ßËč}ţFˇŽ@z‡}›í«‚kě ęo™Ú1 uöÉ=t)ŔŞîąîă˙ŞcéS˝î˘ş?ÔűĐ]>[PˇĂ˙cßt)ş|)yČŻĽ«ÉŘŘĹĺU}bëş~}Ćěó™§SŐňŞ«*töĺčâýĹ·«ŹWáôÝixúň^ľľ„ě1 ë‡ő[§ÍókXťťř´ŕ‡ËŰ,Ü߬Âv»´*ťrĚír˛ËăËq}· ź?ť«Đć¤x:0¸©Ě\P3WŠt@ : Đy± ŚhőaőS;{Ěޖ翏˝ď.ăěúX“ó}aq˙]ʧĎßŕd:,*Ě‹Őty»Řş|yŰŔĚŹ­Ľ}Ý~Rö[Ţ>o uč°Čđ/¶caҧë>»ě·ŞęÂ:,^](–ď‘·©üű^F:0P¨§„ň.Şc7LŻ­Á!<Őń:Đ#„«ŞŰrżŞĐĘËë¶âXcăĹú5-WŐ@‡ő”ĺ©ýR×u35tw5. Đčúµ8@ "ČaÚ<č€@ľóPttyë!1@ ĂÁ»żń¦6pň-Đa¶Ű­÷Đ@ č€@€Ůđ”;Ś eôąłůĎA Ă¬CíPBncîów:€t.ąĂDŞárEś·cëR·©ęW·<µr/oßtLMű-o_ţ/ B‡É‡y^…–+ŇŘşşĘ9oçá˙žşĎ.•sS»iżUýóăVˇ@‡Éw1¬ęŞŘXż¶ŰtŮ>ĺű^F:¬b5Ú&¸SŞú>ÇÓ·Ď.ö ´ç:ě!ŘU©€ fęŮcöKŔ§VÎĺŇÚTľ]ö9Äx±~MËUőĐěčâýĹ·«ŹWáôÝixúň^ľľ„ě1 ë‡ő[§ÍókXťťř´ŕ‡ËŰ,Ü̶߬–@ ło×w›đůÓą  kQýŘ#AăňPt@ č0ÉOąg˙ăÓ€CôóßóIAÁź>`b\r¤MĆ2Ć$-ůĽčůĎĐ Đaѡ>f@ć“Ŕô™éÍč0mI÷Đ7ĎŻ>)9ô‹óťĂ´ŞÝ%póqĘŰÇfMKÝoyűĽm’@ ‡̶>ü·S…[ Ѧ)PS°Ř§K`¦ś,TŤŰoUS ÂÄ=„`ŞHŘŞXEܦňďRŐ·Ý/0Ń@¦řCôŮĹ~ńx(öTmôkkGŰCV¶yŘç?ĺKău÷§ű~%-ĺRöŰ´č{łÝnĂç˙G[»˛=D—ŰůO›1bŰ´ŮwęxMýę–»stńţâŰŐÇ«púî4<}y /__Bö…őĂú­Óćů5¬ÎN*Š‹=¤ÓőŢ©^Ž<>>ţéď×^vűúnîoV‹xP´ë×â`*®ď6áó§sz›˙á‡Đ÷Ť]]ÖS™jw©Ěç ĄZfTˇ×}/µÖußuŤ˝Ľ˘jŚ”eMË«^¬ˇ2×nj/©Bú‚*ô”łű.ĹäŰtź®ČUˇ;†âz•ą¶JX|…«Ö›Şô¶Őzę¸uŰtył–ĘT{©÷ĐA…®BOŞ€§6nŚĘT[e,¦B/VÍMďyn[ˇ·w¨ ]eŞí:¨ĐYˇ×˝ř˘ĚMZܶí¸Uýş|%NeŞ­RQˇŹiźßQW™j»‡*ôEUčCxźęzH*Sm•9 B?`*Sí!ďˇÇŢ«°ëă!öiRTčÓfúÔ„Ę\[;Ö>”@¬{P´ËN`zLÎ#H ´Ř¬iĹ?‹ëbýÚVîUăÖGą_ÓßQţ/ B‡ĹţP/Drż±íšŽÍđ0±@ßn·aý×Ú'!„NFÝ[l:ŐŘűbŐxy¬ľ—Ń ôăăăđÇżţđ‰A!»=¬jsŐ±Š¦Ĺ=t)PwQŃşś ´®ĐáC˝8C`ě˛xˇvÝ.Ź1¶ŻXż¦ĺN<@ ĂlB}ču]÷ŮvůXăgŚŞ·<1 Đ«ú1öL‡‡â@ č€@t@ E^,#˝Ă=e»]ĽŘĄëńŚu| ëúnóöűçOçŁď{ě} t`§ŠÁ7dvkăé;źş“ůŞ0ŹKî°§p/WÉ««Ć)VË}ňß»ŚUWąWí§jĚÔý–·Ź7ű©ÚËíü÷ë»M´_꺦q«Ćé˛oTč0 Ĺj5VąVő©š–4e¬6•sS»iżUýM§:n…ÜĄJ/nSŢ>u]ݸy(çżwŮ7&ęCôé2V1Xű^Fgˇ^×·ëşňú¦ŕď2ľ@ö.%HűÎUŢe¬ˇ˙«RßçńŇŽ{č°§j\ř1îG«Đ–!«dËÉU…}¬Oů~tĘXm«î”ńšŽŻé¸Ů}X—/wçëb÷±cŐň®żW>ŐzšŁ‹÷ß®>^…Ów§áéËSxůú˛Ç,¬Öoť6ĎŻauvâÓ‚.ołpł ŰíÖ•<Ë“€XâCiKyN…tľÚ ĚA LĎ[ź§ŘŮĹ€@: Đ€ď<]Ţz0 čpđîoĽ·ś| t…ĄżX÷Đ@ č€@€Ůđ”;Ś 8x˙źÜ¤ëô٦-Ą­ň|çm&YI™~´Ďřt8(U,”+ĚÇß\ď—Kî0‘Ę=˙}őaőKE_\^µş†yąş..+WݨĐ_u9ľ|‰]¨3TE]řCVítu5»Ôî€@t@ ßůÚttyë5@ ĂA»żń¦´%Čţţ'ś˙ţŰ/Ë7ĎŻ•Ëaź\rt@ : Đtč€@: Đ@ č€@t@ : Đtč€@:î¨%†«{~NIEND®B`‚doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/Run_Clean_Main_Project.png0000644000175000017500000005725310431726002033115 0ustar twernertwerner‰PNG  IHDRXôáPSÔbKGD˙˙˙ ˝§“ pHYs  šśtIMEŐ  ’UýtEXtCommentCreated with The GIMPďd%n IDATxÚěťohWľţź-3ŕ‚Č\¨L ‘¸Z4/˘‹/D%jÓÔa ˝n m˛ ۸›xű˘u»ĐMra7nˇ­Řb¶Ä…ŞŔ†U^ä"R¤@‚UHąa1Ě@s ů˝I–dýI#[‰źűĚźsÎśó=gžůž3göxB!„ˇńDZň]†%A!„”ŔË–, B!„ –Q´X„B!A ,Ó¤‹B!$PU´m–!„BHË)u>0yX`ů:˘ş€±.ˇE¬ BŇőŽ!@J@UĚ @ŹŃ}dbAB!d— ,[:Ět,~x@xsŁ”áĹâ˛T[®R>NXÂÉŹĎł¤ !„˛»–üĄó¬Â/(‹&B„ˇíÓˇ?źBňŽČ(`ÜVoY0 (0î!Ëž1?ńŔ—§Ľă%0űç ¤#ë¶/|“GţŽéűâν•,_+Ŕx`mI§Š 7$˛yé›ĆcSy•ëXąV¨ć»ńÚd 0m«wLdV ŔEër(łz»Ĺżç:¦ŰČěź2°;Ôµ®«ś"şOńějÝĆJCýřJłŹ:keŰYg°đuů‚gĎ"$pţlB '[DH uTGüy Ĺ»˘-‘»c"ýżFµ=w[V.çQ¸g~|5ßaÇĆ{61â=$Úą‚‰•ë…ŮL/qÎLĆ1ţŻŻíülăÂWŮ@í˛Ű˛¦¶EČP ,ËGż?”†ÄxÚ –m!—Č|›F€čó:fţ3ŽäŃ$NľłŠŐYŔő]‡'}É{ĂŽ˛ůŚu@‹hľâŃx7ńµ{Š6 (JÝţü]ąBńÄé<Eć¶óáăU‰ąź ČýdB? W·‹6L[BŹ(Đ÷yżŘA óźć Q_!Ţ scł3̬˝ťGôŮXŰt3?ęÂ+é4˘Ď' **ˇ±>ö«8÷ú82?€+‘|1ŠsoŽăŤ?Ąaů菨łNv±]ÄźW°t=mTCę†ÚbëÖÖw\\ŤĚ˙>ȨwůŰ$€ńçt¤ŽęFUĚý%)ýwĆş ۶ľ‘ @őWŮ[YŘ%áűřą×â=«@–$2?š>ŁAßFönŃg˘±™nă!Řs‘j8úŚ‚µź hűôŔę±Ű˛Ö¶EČđx°|tzć F€ÔoOâÄ1s^±Qa— (!ŇŠ#w' éF!C ’ŢСěţ-Ĺ“Ż&qĺĆÔ‘ú†.]YŤ/uDGęhú¨€”@ö®…ż ĄÄ÷źNVĎYş8í=ńÝ·1űÉ梪W®ç±¸’ö´ŠÜĘér'&a®[PGŐŽix˘AÁéßơŤ*Ţ|4饳x5Ăđ^¨äeůZăQ ú>vIbń»2·<ďKě †™—ŁĐ÷)@°m‰\O¨µĺ—ľÉ`a9 !¦ţ=ŽKśDô‰Ăa¬Ü°ë„kí±TUm[oRSo.@©í@…7DÜ⼩ŁzY\0őöTUÁŇĹŚŇ1ů˘†ů˨#˘íuö[gíěÂO]EqCbüŽpČ«·©Ł:l[BQÄ–:픯“Ó1¤^Ô±z»ůĎ={Ń4_ţ1 xăý4Ě éËžýŘjsĎJÔW.đoŻ]@®`@Ś(G5|˙éIč/cńZ"$Şé|ôŮ*˛eO]eŰÜ_W‘/^[ا 2ŞÁŘp ¤D"¦arÂk'˘\Žó_g·ÔŹă§'ŁH˝č•ëěĹ,ĚŤću{Ćłá—ŢY@®`@ ÚÓ*¬‡&®üĎéľl¦Z¦W ŹyeZK«ţ©‘ä¸'Âí’„eKčűĽtTGć–]m»ÍŇŞ”±ź˛Ó÷«:–Äřs‘¦őŢmŰ2Öm¨Šeřč‹Udó^]ź8Ĺôńhőš+ç®\7yĐÂşŤ _ç`š¶Żô Nĺc’»¦xGkűĂH_7‘śHBŚj‡$”PZä%DF°řů VoZŚV;?ń×yB®ĺ1y,†™cq,^mčÔËńMNč8ůj ¶-qáë 1Ét„E§?ÉbĺşÉ ďÉ.}ŁŁhÂX·‘ËçxŤyj"†řłQDz"ζ%Ň7r4„Eç4Â!@aH ,~“]’H‰büŽůH©w–©Ő¬OND±r5ٍ ů‚ŽÓżŤ!}=„TĚľ˘,|ł {Ă‚~@ET×Qř©}_´sˇą[ËY{Z6ŞŁpĎó%_Đ1u4Š —łĐ#›O˝§^Mâıň:饫¬ćͶő&`Ţ<!Š߯Xţ®ŕŐO‹s˘ĎxOßů;ŢÍW߇aHڱ(Šď§ÖŰ_kżuÖÎ.b_ň]—ý˛řmçŢNáä+ ä~˛ (}–Ćą·S[l˝“ŤĄ˙a ő˘Žńç"0îĐFu$yĺ“ůˇ€+WÓLŕÄńhG{öc«ÍH<祷r#Ź\Á€~0U¨ČüčŮ^ňHsÍÔŮs®ą. *›ń 9š)-Č’@ňŽÓoz^ŐŐ ¬EŚŚ@šĚb}Ż6űz©u÷mĽôÖy–DTŹ#ÜÄ»ZÜDľüx«yĆşÄÚ=Ĺ ±_ Ěf¦ŹG±úŁüş®!öl¤iścă-V9×ó07,ś~3…™—XúnZ¤Ţ‹U›VöV±XçŢďXvçß›ĆęÝ"ŚuúĄ®Ţ{m[ú¨‚“Ż'1UpĺjŞ˘a<ć·đuąüZµONÖ°ř]ÉĂÄžÓqîő8NĽ›FX_ý1!C'°·łú·*ó©l‹]„ÄD©‰8fϤ]Ícáâ2 ?­aüx ZDE~ăŻóRÜČA×5ĚĽ2ŽĹ«ąOŤßÔ1Ż“ž˙,Ť•9¤oęřçW3?AX8YVűâ·dď˙&ŚđŢÍ/öśŽŘsµ^:bD |ĄáH™Ľ•9XM¨O«ř~ŐDvyŠ"  «´yí —Ó˙4 mżŽµ˙9 „E‘06¤÷ęfŃ„ń@âĘM¦™\ÇWůUĘĄŐ¶byś62ŞŔ˛LDj†"‘Í‘Ř%¦mBi~3•% {»€˘%ŐÄžÓ1ór€Äâ·…–yTF*¶$«p\ «ü䩌XŇB¤Ăµö[gíěÂW]6éÄ?¨ź6ó~şc}­&2?ś!µ˝›ôr¦N`UęŻSľr?Q¸o#z@Aę†L^VoĆ‹ĎBŚx^Q?öěËV›”AĹóf-"Ţ´˝‡eŰSXżl­c ŮÄv·†OŹ–˝3yś|B(‡ĂpęÓ›ö|ţÝ)č"Č˙TÄÔ›çaI@ף@¨y_4÷içŢŠW‡ŇË–†ô ó_¬âüĺŐţl¦R¦ßd0÷ÉŠWĂĽy®iśÍň¨ďS-{Ú®\ËÁ.§ßôÚnôYĄęˇl•ÖâÇţĘná[ďWWď˝¶­H$‚“ż’/F‹i(Łú>Ďu%ťŞn¦?˙E‹Ď"ý|˙üjú>ŞbÁ*©]Ů/!C4DŘů@Q~Sи'ˇí‹Ŕ\_UÔ‘]Ő  m€P€Š°W—nđ#çżĘbé“IĚţ6±E4H‰ę\Źó˙5‰ó˙5Yߍ dďÖż©îŐ D}śűď,ü-uDŕË?Ď ůB‹śŔ‰3ß!i$ţUÇé×RP¶Ü|Ĺ`׬’ź˝c@UuVW˛dáÂ×yśţmóŘL'}ĂŔÜ_Wý•źŰ¤śk¶éO«ĺ§upeݱ•r¨+ݧuČO„‰×–aYˇˇ0.śIaúx SQĚ]LC{şůś»ä‰,uDTó&Ę^3»$·ä«AÔY+»;éX—Ť6äyćę‡| c š6ÖŮ‹ő÷<’/čĐ(Xüvµîf\këńç:çkĺšsoÇpâŘ8̇yDF=ĎbúFęÓŃ®ŰL;[E“2¨ ojŁ*€p]=FÚŘ^ĄŘbkîÖp$âĺ?{»1˘Uí¬qšŹ~Ŕ{ZXú.Ç^]¸¨ë“jÉÝ-⥷– F$âĎhś!u4ŠÔQ‹WWaÜG_6S-ÓŐú|·ŠłYxéH´ZΙ[hZ´*ŞgŽÇqęĎŮş˘Ć´"ĹWŮeW  Bč[ę˝×¶UëĹśšB)OűXąž÷†öjlĚ|`AÝ«Á*…kFOŚué ć]ť ›Ŕr|,%P(ĐźC4†¶/Šěő4ÔŽńŁI$'ÄĆŁĐöG˝eU; żńײúŁŐ LkhíJHé XôÜúľH#Ű07¤°nBÖ>Í„*óŔ¶ćCŚh{#0x=i =ő•ĆůwP•ëy,~›…W>=YSfrËMٱ<¤”Xú.‡KߤˇŹńçu\úă4RGuĚýuRvž(ęü*!â­l›ś«ľytĺz€Ř’1˘AÝiČW“ňao¨X‹ŐoĄĆ»eBîŤ uT/an8ĺ™×ÉĆž×áü-!Śôę)›/ř¶•~묕]ř«Ë­ůK-Â4óËn‹Ťß6PřŮFô _ď Ö&¶î'_W®púőb‡tś*ŰŮŇw"$şo3mlµYdV L‹"u4†±o˛Ő:Ź>«!Y±˝5¶çz寎¨€kBß'š¤S®ä?qHÇ•›y Ő ˛ĺďV1ýň8Î˙×4¤›FfŐl)® uTGfŐ, d~´»›Aę¨'hÔ|íBĚ=Ů̦`˙fkŰk×?UöWÚ“˘XůK ůŹAüwRŠ–iů-;éʦy¬-˙^ÚÖâJÉtĚĽś¨ľô´ô]Ćływ3­±VďÚĐ#˘ÎK-%şKźˇX®qĺ–˘]Ŕô+'ądŻ-ˇp×D,¦cőfŮŐ,ô1ĽtLCć2ŐÉ8~âß*€ůŻňřţ_ő-Ű.}›ÇüďĆ1óJBäaK@Ź(?¬áŁOłřţ onŨŔÜ;SČÝńćT,~·VŤkj"†±:”§¤^đŇÉÜ.x76×_µ7$EQqâŘřÖü6Éă¶ěň dn07$´ň“\Ŕ~hÂůŤ@8$:{°jĘůÔ«ILK@Ź(Őá›ü]󟦽§ĘĆc'6ç`enXřşů2 Ú¨Ŕ÷™DönöCú~±ç”r‡™­Ö÷ů÷Ľ Ö'ά`mÝB8$páo$˙UGň…(–ţ4 0ĆE¸đE)m%:ëdm벅WO}:¶µ˝ř°ń—ŢąËňň/ÔhűôÚĺ«ä`ĺzÓÇŁ/·™Ĺď˛uuÝ•=·±Őfe09ŹXLQđĎŻNbő§"ŕÍ3 …ź‹˙4 ”ó“˙ŮFěYçŢJ!z°°ĺAŞY»ąôMóÇôńqD´Ц„®«Xüűš÷Vj™+×sČŢ5q鏓¸ôÇN}FúfëĄÎż—¬NN—%YőHJ dop~Uűł™ĺ×1Ί€:˘W‡×3˙[€üµvź7ô99ĹâUłeZ~Ë®]˝÷Ó¶Vo›UŹ[Ţä÷lŢ€Pőş¶rúÍ$ô:’‡=Ţ<.ęĎ~]ŢÔÉ ,?¨#†ąa`őfńç#0~Ö»6$ĽI¨…Ű&’GČ^/Ŕřą˙ő¤ ?[Xąa`ňčV—úňŐ5Ř% 3Çăye"T^éŽÜí<đ«ŔügYś~=ŽŘłÄžŤ`őn—–7‡Âjçó7$27óűë ě‘ń“ĆÉO2+ŽÉc1$Gqé›lőiłÖîŰHŽëŐ7±ĽŇ÷°JŞ*şŽ/Qő†Ţňw \ą–ÇÂß=ŹF٧ŞqVáŕüRD¸á8°6$Vn”ß0;T^Źç~Kße±đ· „hxëSšŔŻ ~6ńŇ»+{-†DY¬ţh`îÓď­3µódţ ꬕ]U—ݢv¸nżůZşć ,Ŕ›Ünš6DÍü?eÓ+¶íŕßŢş‚“/ëH-Ż)Uî]Ň7ň9»é˘j{s37Ř3ś8ĂĄŻł˙C˛mË×ÖP´,śüQ$žÓ!y7`ă~NĂ[Wţa@ Îż—ě(˛.|ťGâyŃĹ[®aőGóź®Ŕ|hCUµŘL«8ĂáúvwâŘXŐă9ő»…Ş­Ŕâ'0y,Š™—“XüűB e×2Ž>ÚV8ÁŇwĚ˙aĽW€@8¤4”IS1DFňw‹y±|śđgż!Á»:öŚż8ţ¨žéx`ę…—°đáĽ7DٱX ńC (Ş„a2¤ ~0Ť"–ľÎÂŢ‹Đ'NúÎő0_Ň{ŤĎúŤ˝e;8ŽíÝÄ«C˝F&öj‡„·żd˘ęN ¨j´šNĂŕ DX«óu—†(Ď;0ëňŰôş¶Y–QNc3ŻBhu×۲Ľ„VDMŻ-ä嫱ón^^%«{ő–Ţ2Ë)çŐ­ÉkH­eÍ®đ&Ë_LŔ-˝„”jYú±ŤŕëlÓ.üÔeż´*—vűýćËq%¤U¨–«Şn­ĂNeăÇVŰyR§éZšâËŹg`ۉéH·ţ<Ď*6/ FÔň5¶o7Íň/T˝iާ¸%ΦŢÄ_Ľ<Łv‚yH@ěŐ«vŐŹÍ´l -âÜbe/głý^żaoéŰš]o7e×Ö{h[ĘHąoů†±źőK¸Ú_üß?Ľ{ĐÔ; Čޱ!ĄU˝ŢÚ:đ“>!ŹťŔšyů%Ě˝3_çűŠDôhc‡TPXÍ"suö†Ř4ü.!äÉáÜ›qĚĽCţ®Ô»i„Áŕndćĺ8bĎ+H˝¨cĺz3g!ÔhUŐ ,Č !;Ťď!ÂďŻĺjD“÷¤Z\ŠĹ, ů„Pa۲Ľv;QBđŃ9|t9H Ň‘PvŁĐ~;¸Ţz|łZB ˝Mä‰Ç·ëüŰ:¦&g»NŕËĎgńŃ·KšÝLÍP2ŮťT‡řCJyŘŻůţ †â yl!„BńÇS,B!„ ,B!„ˇ¦é$÷łČ’!„B R`@öf–ĄC!„Ň"$„B Öë`ń›N„B!=A!„BHŔ´ô`IW˛t!„Bz 'VbŽď×çvů $mŇíXNn‡¸ú(—äD˛}ą»=”s·qřé®—;żyíf_›<f“nźůtWľ•kLN$}Í1D>ÚĺÁO?RkÇ[âčĄ/ŘćţŔW_Ů®-ôc˙nŔqÝop--Ë,:tTŽ~öuočPîÝŢ˵‰'ś§o°ö÷¸“śHĚ\Ďěşë~\®·—|}míěc»Ęq7Účă\NŹS]Qf•8*‚Ł1Ěűéop0´UU9+}-]gdéké@ 6}-]—FúZ©c©¶yé7µń´šŃęşĎmW/yň›—n븗8Ú‘:–jW»tüÖs»<m“µůé%ź~Ďé…Úókí¬Űrě'~ňĐXÍΩ-ďvç7¶ńNvÄŁVmŘď5¶kÝ´ănçým‡ öŇźř˝ÎveT>{™ÇŘ®ý\w÷†fçůą7מdżż›Ř3ţâř#íđ\ÝFóÖ>čÁ(˛«YM®yA!„ŇO±!„B‚ĄĺňÍ!fúŐiضÍ:˘ ĐmśÇI`Ő8.–żYfŃh„6NČĂ!BB!„€ń÷™g®1ü°Žm€ĐĆ čÁ"„BˇŔ"„BnB=ťá¶ Xţv™% ÓŻL^Gd´lÚˇŤ2Ü«îËŮ.0÷ţć?o.3ůň$K7Vľ[ńőĺň^ę€ó+ ] …QÂ0‹vßuiŰ…{D7T˘ŮĽÄá¨g;Ř9_ĽQ,KRŞ06täÖ%V üľŕŮăĹh0ž¬k MÚ“ç †Ł"ýń)ŻĎ;s)Xqőßž¸€é÷±řăśś8‰ąďć0?±=#OA§wĺí(ŕ–˙–íaícďľ1ÍÄÜqcg2ŐmŹť ćßź‡žŰą&ĂEOu$m@š@HŇ„QԨȒuOyŃ’»ykéo1ÜSýâr˛jńůŻŔ•(|[n¤ĘÔ§“Đbó€kAJĆU˝/‘•ľŮzHP ęţp‹ŇŘahuÓ¶-á 9Eđ^ĺozß–sęnš:Ó€t7˝*ę~ŇÂP™kKHë~Ř!sý{®ľi&Ąĺ™pŐ›„’÷Wş^®Â!Ŕ¤‡U÷†Ë˘Ć,UŇđĄ^ĹŻ\Ď"u4}_"ËX·Q0Ö K^ÚD9"ϵ@TTĐŻÁ<®Ý7 ]OL5ÎŇv°öł‰Ä!}çlĽ«‹'âÄ‘ú ÍŢ̶Ü׸żU<íŽiăńAç©YüÍΩÝîçzújÚ>ëČ–* ‹ž¸¨¸±Ą»¤aůOSuODA‰,[Ş[žšĄ´RFQŻŠşŔ‰±Oưvfm`âÂ,™§Wń\U=XŘô`Í~gxŁ!`účŘP¬®—iP¶íßÜŮ9Q ·:'s#łEdT¶5îKM6]– y4Ywlm­Ň®śÓ,Î óÔjc“G“-ËĆĎő]GŐ›]I@–LďiËu׆’G%k p˝sWďF}ĺĹ× ¶$ę}6®]ö™°Kž‡¤"˛Rż[ě;˝\ŢDX ßß<‡+7` ř¦"lǡ*ÉÍÄ ¤+!nä1˙I0C‰áş®üµěMiW˝–q?6`•,dne`—ĽcôŽäádYX°K"{Ă; f­nÄŞ¦Ăz`@ŐŕW@U´:ďe;}çAŹH@‘-~Cgłg¬Ě—ę'­šµ™ě ‰ř‘(ôjť(27,äî°mé[¤ŽôfoŮ[¶„HŽB WĹštăľ Ă0!EYܡ›<\żŮ|9!Şń^…ŰňD®D¸Ż´úîç¤ ěyŰ~ź‡ůI ˙rÖüç»QśúĆŔÉŁJ˙őŢ¬Ź“+çzç4Ň_ńî ‡u/ťßxÂëʧó$”Q˝§ôÍkѲ¸˛Qř6 íđ7g Ĺć!] cĂ€Bŕdę$Ć>CîÝ\ďu˙ű­/ź¨Y¨>Ôë"Ł‘ŔŇk—¦Q”°¤„ÉçH×Yąâ;&°ş^¦Á¶mĚ<ß2ÜŤ"Şßóű‰ËOž‚t[GŇ@ÉJfyP˘«c@(ř7ě¤+Ę“lËŢ3i•o ^§˛ü§©Ş+ý×ţ'7M sÝĆ÷WMś:+qáS­ú÷Âç:.|®cî“Hő7óŽ‰Ô±DČ ěšsäL…ňĎŘp`ŘĚ ďéîś ¬ćW«â Ś˘l>ëÍ2ŠPFĽ›¤±n!w×@6o łZ@úF™=tĎ”aTµ"GŤŔz`ĂÚ0amX°6®ęą*{tP;_d×-@8Č|q¶í ăĄţł·‰áÚ± ßhĹ,ÔçgaŢ: őŕ dÉ€UňF(Ş/ 5žBübĽ/ďą>ńôăSĐßť­·ň Ň-{íjÓë“fi-ŠvÉwę×?‡ť˘§!Âąłs[ž-˘*ž˘A›~…]§<7ţmL{b­Ű:’%Ł|ŁQ˝ue\ B‰!ç±Ĺ4D$éµÎ~:Ç’)­zď$„ ů˘Ç•eŃecő§ţ=Hć} éSŻŽˇµňµ–57ĂęMÁ€Fňx÷óEŚŤ&C‚ĺxăű›Łdď9›Ţ“°Ó6!„@â`¦e˘pż€ÂzĆş„*o˛ôoDZ+}3Ä^o E×zźSŁę•e śę ő XS'a¨Łaĺ”í¤Ű+?@@ÂŞóvl–˝Xo+PřŮ@ô µá­ÁÚáµµű&âĎuW¦k÷ÍM l}UŐÚ°`še‘j—‡*CN ËDhŠŠB¨éT§xŐ‹Háňd3mż˛c6nK˛d °E~]âűß밤繪óŻh0Ĺô†Č’í©LŰBę?gH¤ţsň^™Ű9$ލ^?ô‹Ř3kČßO˘h Žv9×±üđżź@ţçE$ŹjP÷żG«%łdB¸ҕЄkŻ…Řó1Ä/Ć‘;“ë>˝ĘSÂ"ZC?hŕű{ßC{Z*T(B Ô˙ Ž\?§YšŇ›–x}}dŻ€ănЬťđdőü-Â^Ľ€řHŞÚ'$óÓŐýłg?ęIdÉ’áMî—ž¸J˝š¤„˝‘Dġ1 ČŢpOEâ`@ďKĤŢ\ÄĘg3H˝’Bę•Ňߦ1~Č®›4_'vúPęĹ…Îí<Pz•‡ŻinW;Hos°ÎĚmyzđ#h…G7"¨"Tş=żń˙ÚóúÍS§řýÄŰîĽ~躎\Žc"ŚňdϲRž9 ˇčŐ§kˇDŢü)¸dyćZyA?W"\{CuË7%Z•SB”çj‰ŢŇÓźU ¢ÉŹ„ăxâÇŢp°V°aü$1óćX_]· ş€>Ţ|ş+Ż·ä”'^Ë>˝AŘ€ѡI ™;›7|«dBJY÷Í·`¨3[…•7tPzĘÁíÉx§2ěč:›ĂŃuĂŇ˙J…'Ľi%˝LpŻóľ°K6Ě k ĂqŤů6Ě"DČâ´l‰xT‡~ŔűŤčů38Ď\7ŞíO”…Óě;38őú \ú|©*Bbfß™Aq˝óźöńłëxťUnCűf€’ČŰ.@rYĹt$˘P°±”70söJ_wőÔŰ‹H6äń(’ÇŁČ\-TŰXbÇßĂăN0靸l`éu'.(<°{?Žřőń‹¸ęËü;=-äÖ%âű„/ńŕW\´:®•‡¨]ĽAä©—řĎ_N#·."Şş­ŁúŽŔ¤'v‡Ľ›Ź(®Ŕ^W HA(:äFöý4ÄľI Ô»¸J˝íuZéĎfiyë" Ąě5Ó FŁP"©Ş… % 1âÍe=x˘QoŐîęPŁë=ő[`ülÁ0$ě ‰™7uDţS@ `FĺV©)aŠţ&°kJxçlŢ›?ㆠHŤ§°zgµú6Pŕ,°Z é¨ÂŮ\ÎB81şüv ´ĺćÜŻÚ:«¦uĺŔ‚”ƢçáqËEź4 yk•ŠXćƦ¸’ĺyzŢŰ‹ž×W ¸Üz±ńJźł 8ű§ó/aćµ)LM&®ŃÄâß®`ţěl_‘*äFÉguoŮ™ßÎC‰$  RŢëą!ř%g¤ O˝¤Ţ\Dú‹ŚU1~TVv@\ …ŕŇ[z]Żůëý_Rˇ5,âĘ·ŔŞu-F"‹ŢĽ‰ŮwgˇŚ*Őp»ó*¬ýelöőTťéDíqcôśnyę&Ď~Ë?č:ްz7Úây8ç˝]v °‹YŃ(ÜzHeq«ěŃ‚”r(–L(ŁqŃ'ělBIö”® —źn$¬‡ň·$ÖîÚ `úÍRÇUĎ«ň¤Qż%?C‚BxsANLŚu]ß°Ú8TE…Q4`nPśŕç1¸˛,,6'ĽWdUí„˙ř‘—zjÍD]Ý÷ęB[=Ѝ›‹'Ębp^,˶6Ó-Ű„7±»4Ey’ąyoě™,ŰBx$<|›f±NliŁjŮs5XŹ_6Ëy'Gpo_P6n~ŕyć?©W3ŻMA+żöżV0°´śĆ‰éf^›Ú"ľşeóS86Ľy^‹OAÓ"HKD\Uű÷׹ěÍËžÉnkťŢâoµšżŢ˙ŮłŢjâăµę˙ĂBOMböÝŮ-Od¸ĽŽB*¤kzĎŔĹô#›oöDßk`ěŠŮłcĐ4®c,;9$ŘŻ ¨#*bcČŢ›?Q= }ß`&L[Ąú:4¶í-Ä)ŕ-Ë Ťj{U(Š‚đşíˇŇ‡GÂ;†Q`ĹúµŮ|QŠEu¨ĘŕËRßiÚP~čű4„ĹŽts}ős©Ł‰Şpš<–¬Š+ĐőăŃęţn˝Wµ$Ţiľ„D´¸ăÎ*–ľZ áÄ™ĄÁx^B^?›ÝćşŮv17dâĘżŔjr3-®qţ/ç1ű{Š«ăî|yÍ~l;ćü6ą1ö—č…żčÍ='"ÓŻßml§cűĆ0¶o,řüŐ?’ÜÖňI›Úľzčő1@„1Ő{ĘËŘA c•ą;ŰpęHęÁđö—]€ý\<G<ow8Fâp‰Ă‰]ź::őčâGg†ÂţČN ¬Ú'Ą}×ËO żź­ ×}!ĂŇÝ!üÖˇ B'dHVăÓBł§‡ä‘$KvńSG„6@mśÁŃÓ§r =|°Žm€ĐĆ Ů9|y°×aI 9¬#B ´qB†‡§X„B!X„B!CMÇ!Âĺo–YJCëĐmśÇH`Mż:ÍrXG„6@hă„!„Bőˇ(JÝĐÓn%vfĎĚÖĹýĺç_vuţo˝á;o„BČ0˛«‡mŰĆů/®0ĽMeí÷G!„ěz•<š¬űőĎN0űćEař1¤•íµúźByldndŞż^oh™™gôduçÉŞĚ«š=3[÷ëöüVá^m/["„B†F`µ=ÍĽ ÍĽ]ÍÂÍ„SăůŤ;ĄS =WőánÄQĺÜ/?˙˛:GËŹ'¬Vś5ű¤íµÚçÇ®!„ˇX•›V­wˇ6ÜÎŰU{\Ł8kôX4ţmu\3čąęÍsŐµćkăëv"|żöŘÉ®!„XµO˙A ŐôăMčf¨’ž«©®Ç#„BV7tP§ŢťĂĄ‹ó¬5B!„ 5C9DřŃ/¶ źzw޵F!„ ,żH€ śţÝ NśY¨ţÎýapKźtz}=ŐŐöídöőTőÄ5őr}˝ćˇßë†8!„ˇXË×óxăĂ Ţř0ĺëů@DÖĚŮ€Q4'Î,@°Ý`nĆĂ"®Î_NWÝäéüĺô@ňDůt:·’ćNÔE!„ÇB`-_Ď#óU g~°úYŇ$€…Nbń“@ů˙…NzŢ­Ţx˝8ťDY3ŻO%ÜÉ#TŤ˘Éoú­ň„·®ö:Ĺßx˝ÍÎíE5«‹V×çw{cŢü”o·iB!úšä^W_ţŃ[ŚďŤ3Čü`az˘ÇË"ęä ŐM'ß÷ţ_x˙dĎů¬—Ćżµűۉźv©ńřvű%ŰĄŃnmytÚÖ*ľNá~ݧ]|­ĘşŮ˙Í®«—:Ţîú%„˛ VKáŐbqľN‹0JXĽĽ gOâôÇ›"ëÂŮ“Xřb3ŻĎ T¨teíŽo&Fv?ŔŻđâzkÓi•n7ńu–ÝŠî â&„BúXÉTd~°đƇ™şmý¬fÝJD Z\Őz%ú˝ą ~ĹS§ăz)źť'¬z­!„t˘Ż9XÓ1$_PëÄŐôD¬çř×űťţxógNBŹh?ăył*ű-6¶Sř´1AŠ’ťšPŢ.?Ť“ę‡]€B!ÝŇ÷áôD ™2Ő˙ű•Xţf cš\`ţÝ“€ ŚiË_/búŐţĽXťć"5ŠťvĂG­ćpő*|ÚĄŃN$ůÉ‹źaÎvó°Z•O7˘Ą]9¶+ż^ĘşŐ9ÝŞNeÓOÝByňŮ3ţâřŁSďśBô`ŮŐ,̇&272H_ÝĽqäî˶Ă~•!ÂĘd÷^=ű’Ó§;—ţjŢ×jîŹŰGZéIžrď§.ř±ç'‹Ěí"âÄ–íąű˛évB©04źĘ‘ŇAú«ÝűśFʎ¨%„BŐ7üĆ …Ő°”7ëBČP¬~† !„Bž4žbB!„Kh3•ą]ě{˛0'B!d§ ‹B!$`BOâEM˝“†RĘ–Ż|ĘĎťB!„Ë7B,|\ zd…›óŐżV »aÍB!d`<±C„– ¨ęVç‘»ď~„Ü}O\-|ĉw)˛!„2žH–®ëř—ý{`ýňąźYRo^Ań!pâ˙%=2¸Ŕĺ%!„V?s°*4űµÚG!„ ¬ÇšŠkî÷“PF€\á”qĄ hV«}­ć_Q„B!XŹBś8ł®¬ţť|ű{ĽôÖćv-˘Ń!„B凥‹[ˇť'B!„tâ)!„B!„B!„BČn≜őog–·LpoüűĎO¦Yű„BˇŔň‹ ,˝? éf ĐFę˙Îýe…5O!„ńd®äîJH¸tÝ@v5\>íçdď{âjéýIĽt–"‹B!Xľ!áy¬Ü"¦ÖĎČ_A,"‘JĄ MśBćF†µO!„ ,żčuRSĹKűĆĽŹPNC8˙çKXúâŢřluWUvíg|j˙'„BVGRQęµÓâDDFTČ[W±ËźÉĚ&-€B!XťX˝ş‚ř­9(Çg!˘IDŽĚ@9<±/ Ç•P7˛Hîrw °JV×ńW…ő°UŤŔáŐĘÓő8ŇŻ8˘¸"„B‚a¨&ąWÄUU ý`aůzľçřjĹ•ů°éé«d®+ß°ňmoń6űŔr퇕€źF‚÷IDAT··ú€sŁÇ¨YÍÎm§źüřIżÓ5ú=žBŮ­ •«"®ľücđƇd~°ů!Sw\e'¬‡žË4 ČŢXhzĚą÷NbîĚ)ĚrÉ·¸jĺéi&Xz˛«•Ę˙µřMŁźáżnŻŁßë&„B(°vZÝ.’‡"mŹ«+uŻ7<8˙n°ňő%¤^žt%`öb¶+áŃJ@!*jăhźOQżůi&ějE_cüô^B!C(°’/¨Čü`áŤ3uŰzť‡ešĺáAł°eźxf@ń‡ŮžDPż^š~ÎoôL "ýnÓ"O„BČ“ÂPÍÁšž!ů‚¸Uőć`)#ž Ňô~p˙ צ`YFOq7ş#„B†ppz"†ČÓĹŽĂ~° F˘°mϵňí•ęľÚ˙Ýwśµ˘ĘĎĽ¤nŽďUÜ bÎS«4Zyď¶#O„BÖÓ¸üÂą÷N"uÜ›źľšAj" »ě˝JßëNxô»ÝĎ®Ns±ş9ż1ěWüq­„BČnä‰üáŁGʶü˛ü#[=N„BHpěŞožú´2ßJGúž±cůŘi!ÓλE!„ ,ßř]çŠB!¤_žbB!„P`B!„P`B!„P`B!„žŮUoľńÖbÓí_~>CK „BV'ÝSŹę«·i„BˇŔň#®Ş‹‹ú^;éÁÚ®>?Ć̵Ż!„Á1ts°–Żç±|u o|Áňő|_qe®ż]ţű#˙ÍWxúýx´ßó)®!„Á2T¬ĺëyd~°6Ň€<¦'b=ŧ>…ő°UŤÂ,˙M_-@Ę Ł} ™FŻPe_íöV¦ѫԸ­v{łskămu~«8ŰĺŻŰă !„2Ä«"®ľüŁ÷Qć7>Ě ó…Ě™şă*ű;a=,@}: Ó, {cˇé1çŢ;‰ą3§|ŻôŢnx­ť0éDE$µ6í†řšťď7ÝnňŰëőB!XCNćv<i{\E\©{=OŐü» ŔĘ×—zyŇőľü<{1Ű• i%,!6š űő*¦ü¦Q+Ź!„B•|AEć o|©ŰÖëˇi–‡Í–}â™Ĺf»Ž7ă÷üVÇřÍC§cZ ˙uy1Ě0Ă 3D¸oV«gíöĆc*áf^ŻĆ}ÍÎóO"ˇ1­Vů©Ý×ě¸NľVé¶şŢVűÚťßéřVç·*‹VÂĄUůw›ßveî'Oí솞+†fa†ŢŃ9X•›^3ÁŃŤ7¬U<ýxáüć§ťńăák—nyo'ÔjŹoV†íĽ’íâč%ýv×Ô(Şü䩝€¤çŠa†fáA‡‡r’ű ćáÔţú‰Ł]^‡qÎV3Ń׍ŕđsÝĚ{ł´ť§éăcuo0Ě0Ă 3Ěp·á]ńa­×Ł×›pżçďäµ·#~çMíÔ57+óíĘźÄfa†î'üÔ nŕíćĽ<“ÚwjÂ|»tűÉS?"k·Á'/†fa†âÁŞÜ¨+żVCR~‡«ZĹŐm<˝^C»ü÷’F»ňń›n;ŹŤźüŐ–O§Ľ4‹·“ČkWţíâítNă1ÝäÉŹŕ§çŠa†fáA„[+H/Γ°ŽŻx®«—´ů6 Ă 3Ě0Ăý„ą’;Ůvj8˛WaÇ'1†fa†ű ť‹ť„O^ 3Ě0Ă ¦Ŕ"„B B!„P`B!„ 7ˇn.2,1B!„ Öô«Ó,1B!„pB!„‹B!„‹B!„‹B!„P`B!„ ˇADŹĹ«˙çň9–2!„Bvń`ĺň9 +B!„ěZúň`ŐzŞ*ÂŞŰójĎi_<G.ź«ÓV«í„B!ŹŤŔŞž~Ď« 7M­Ží5}B!„ˇXýĐč©ň»Żť ˘Ř"„BČ®X­ÄP3Ź!„BČăĆłLC<§ #„BČPĐł«vÂyí¶~Îk¶Źs­!„˛k–AŐj/s©·w B!„ě\ÉťB!„‹B!„‹B!„‹B!„P`B!„ }‹°Óˇ­>qÓřů›VçµKŻÓ>ż×ĐíąAâg9ŠÝĽdĹătí˝Úâăţv×C·é «ť´ë+‡˝R]9®ŰsŰťÓMZŤńusSň{ ÍDo§ĽtÚתcouŽźzň[nť„Ľ[i–n?uŘmýtsłoőyŞF{Tţ;]W/őŢŞőSž˝¶‡VÇř)O?u4ľ®Űrë¶ŹěŐv yěqüŃŇňŇŁÜ­ÜŁKąôčÜĎ=qü‘eYŐß?óćŁfÄŵŁŮţʶƿ•˙kíâj•v§<5;ľ]>ýÄŰěŘV×ç7~ňÔéĽfeŰKą´ËW»4ş9ĎO~úŮŢkőbOA奻íĆ^üÔßvá7/íâéĄüŰmď6/~ÎëÇ^şé;Ző“~ú¬^éµýőÚGöZG„4\.`-pśő5ĎŇ-]źŁ _38ç~>rĐőč¸dŔšŹÝ5ä5˝Xˇ1(Këü[‰óÁăK5GzÍP–zlłôT©ëŢzîĄÇYŰ•z˝ŘyäęzŹż‰ž:«Ý®őbcŢÖx´¸{řňđçńŰăt˙é~zy}™Ţ~˝MĎ?ž§§ďOoP?O_?<ħȫ˛=óůëµđ~ö>Ž˘»kÉŻÝ/qWl€®ňiýŚŹíűľ°KŔéćwŐńŐÎ[ë:{G`-B @Ŕ¸”®1Xą5Ćn•®1Ű.µż\ŮŃŘ˝ěűsémŽrnGÜ'Ŕ%VěF›[2$b?Ď­1¶ôz|Ń9ę¬ö5GzŤvśG©€S,ÂźňCźösS*”LąĐ»Î]mŹŕ|j„ŘĎsŻ9_ó0tąŃ%XëôĄ˝¶Ąçž;ż‘Ž€ÁVn ŚÖއQzbç–š0±$8µ„«–Á’Ƕˇ…xs˝Ś±ßÝz~«Ö}ĄÎ'7fíµ>Ňq0HŔĘ”3‹=^É-RHçŰ•Ľfi`ě=żžk;Ň{"u~­çľĆů­qś `-µnŢŃÂUíăšy}…Ö¸+ '±qkr˙ůĺ®­ă¸Ó4¬qßşAĺKgg??€+ZĄë¶±H ­ ąÇ]#ˇůXŁPŹBé`ćšńJ5ŹcÇŮsŤj®Ó–×·ő8Kël~mĎ~śüż»‡/ż=N÷źî§—×—éí×Űôüăyzúţô÷ćüó÷ôőóÇ`>ÚŤYcˇN˝Ô+ŔŢş{°FůJ·G,ëŐĺ‘SSř8\Ŕ©ŃŇ€ŞKď ő 0 Ü, ŕRşĆ`•®wv[ž[š#¶]ją2€Ă¬XÉ­e–úšwËÚyó}ěÉ#B€3¬Ôěŕďˆč‰ŽęĂh´ĺř©ÜbËĘ”)S¦L™2eą˛U—Ę •‡µçĆl…ĘZĆwlÁ,€…­ňđ¶-µ\j,VîwőR— X©đ3/ MµĐňş§ X©Ş-ůÖ!pŠ€5RŹ’Ţ-`ąXŔĄtŤÁŠM›p›L44ńhh»Ôţre-ç°ô6{Řă8MĄ |‹06żU(L…BUÉëĺ‚Ů|źKśCÉďŹţÍĹ=Žó(uC¬3«]w(´]ÍG·“©Ćzčbu”ăv Xď t.,ěŮx·®ięiK­Ë8˙wéţŹrś `íč ŤuęńXެfüQŹŘ1`Ő¬Cx45ăČ'śŹiâźý#čŔA¬ŇuRˇkz±ćż»öcŞĐ±•ě3µ]¨¬w ÓQެÂIiYhŞ…–×ÝúŚv@[Žźj]öE™2eĘ”)S¦,eŐĄrBĺˇAíą1[ˇ˛–ń][0 `a«<"ĽíFK­U‹•ű]˝TŔĄV*üĚËBS-´Ľ.ŔiVއjKľuś"`ŤÔ٤w …Ap)]c°bÓ&„śÇ& M<Ú.µż\YîŘSű\ŇšÓLśa‚Ő3MkÂ[«Kl~«T#“j|ZgrO…´Ü~ZĂ–mjʱfGnĚ}ëBr=tˇňÚµŠjŽ#·żXŻŢű$­5˝~KLżQB{g*8çÎŻf»÷ó‰ŐÍ(S–pŃ€kđsŤâÖá*ÖË•:ţÔÚ‹kÔW.śÜn;ŰŰ‹WJ·¸FĄ×ŻgÍËŘëäu `íę źţŹŇŔ.9mŹŢ›ÜňIk\‡Ň9! @ŔÚ-Hť± őxŚjÉ0TňČrísŤË€Ë,ĆŠ-!eŤÇŽG­;¬ŐTC]Ó‹•{´´ÜţbĺˇsZrÖRç:ÎĄë´ôőJß/ą 3j•×”•žĂ|đ»pmw_ţ<~{śî?ÝO/Ż/ÓŰŻ·éůÇóôôýéoăńó÷ôőóÇ`7Z…ů‡€˝u÷`ŤňŐt=Ŕ)ÖH=Ez­€QX‹@Ŕ°.Ąk Vn­ľ[%K´¤¶Kí/WVrü©×mßU»Ý’KŐ囝k/˛˝Ç˛Ką5{Ţź©ż±%ę±ç5s_véů; ÝCJďďe=«äę%uîąu+{®!p※)äÖ|KÝl[×k].wSk˝éýfyôé.zÖZl ~Ąď…ÚE°C۵ľfě8c«ô5S ÖxÖąž pSőRşľghźX—”ë-›O,YÚkŇúi¸¤÷®ĄÇ!Őëˇ\˛goéók=˙ÜąçáQ¦ ‰ŐYĎqĆŢďˇ ^çA°vGř©sĎŐ `­"ułŮú±Nlą†!öé4µ]îŰűɸ¦ËőެŃÄź5ÎŻ§gd͆pÉGÎG›Ů«żŰ5çć[ň˝±Ç#lŕ䫦áu-Ű•,żSÚăRÚHÖôâěyŤÖ8żŃ{z¸˘üsÖ/Źc3MĂÉń­öSű8r‰GG ä{„«ÚkÔúšóJK‘‘>€ĄzcçľV˝Ç±JÖüĆ롨ą‰ćŻ1Őô^ŶťŹ9i­Ď\±f}oq~±q:%ĺµßÎË}ůˇ¦>sń{^ďö8{Ć`ĄĆ=•Ţ jŻáŇőŇzRç^Z/G˝źiw_ţ<~{śî?ÝO/Ż/ÓŰŻ·éůÇóôôýéď˙ĎßÓ×Ďý„=ZoŔRş{°ÖüĆNĎ'L€C¬Ł|«`KąXŔĄtŤÁ*ý őmynY”Řv©ýĺĘJŽ?őş{/ŤŃłpń‘”Ě&^şÜPn­Ĺ+Ô' X± [Ş"·\KČh]Ż.×°.ŮđŽ¶ đHÁjé€f)öäa˘±ŽÍ†ýţłPůívK©Ű}–ëíĎj¶Kťch±}ÖĎ’u·ŞOčµËZ„©ĄR¶ž­=5ŰwŞž?Úܫ礤gďö±YÉŁÚůĎŽBbÇżĺ{ v Xąđu„ý•ô¸¬Js˝HK×MI`[óúĄÎ=bk‚'ś"`ťµa ő ť-”iĆ`Č(A*÷w­Ľ’@+0‚Uz°B˘cŹpJăůďŽÚ8Ćá­uĽą) ŽPźĄď—špŐR'°”»‡/ż=N÷źî§—×—éí×Űôüăyzúţô·qúů{úúů㢽k6ÖÓkÔłk Ŕ¨ş{°jzÖnlŮ®ž…+X)`ŤÔŔilŻUĎ®7#3Č@Ŕ°.Ąk Věkţˇç%K´¤¶Kí/Wp€ 3±0 U%Ż— fó}ěÉ#B€3¬Ô îďK­č‰ŽęĂh´ĺř©Ôr*Ę”)S¦L™2e%e!«.•* jĎŤŮ •µŚďŘ‚1X [ĺám7ZjíşÔX¬ÜďęĄ.°Rág^šjˇĺuN°R=T[ň­Cŕk¤%˝[Ŕ( r†˘7°°ÖÖ<+7Űiěߡî˙҉FCűę9Ö’ÉKSű •ĄÎݤŢbÇYZgóşî›¶÷—Öśšc´IiĎ2InéyŚň€ˇV.Tĺ¶iiLZ¶íi´jf–ŹŐËŻ·W#´ôlů˝×|éýŤ®®fɧ X{Ţ׾)÷„ˇ3H…«y őÂ…~^Ňë·DÝ–î/Ö+{Ź•nŰR×µ!«´74u5×ďökÎ=w}·ř{8TŔ:ÂĚę©Fa‹ŢůDޱcÉç(uťj SŹ+SŰĄÖ«\ă8s˝b·Ű¦ąî Z×íěYď3ö:©!‚ `56bG¸‘ný(˘ä±TčXJĘÎę(ŹČRÇąŐcÓy Ź…Ô-ßשă˛Ä `ťÜHŹ"r=,Wúäę)ů=´fh«ąî©8ŁN¬G ¸ŠCNÓ°ĹM:5&¦eĽ ×еď‹˙çß˙űo´`Ô®l•1X©ÇóOë©ňXYM#”z˝Üă‹Tyé9Ţ–µLŃPk4/>çă¬jë3X—‡µÔą‡Žs„é+rďÍ\]—^ż’z™żĆ(ő°µ»‡/ż=N÷źî§—×—éí×Űôüăyzúţô÷¦řó÷ôőóGµuÁ "[żĎĽď€3ř  Ůă\+Xyo— Yŕ˝PÇZ„€ŕ `X€€ ` `X€€ `XX€€€€ `XX€€€€ `X€€ ` `X€€ ` `X€€€€ `XX€€€€ `XX€€ ` `ŚăżŤł«tëIEND®B`‚doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/Refresh_Project.png0000644000175000017500000007201610431726002031673 0ustar twernertwerner‰PNG  IHDRZXş“Há pHYs  šśtIMEŐ 0s3>€tEXtCommentCreated with The GIMPďd%n IDATxÚěťohWľţź-3ŕ‚Č\č"sµh^D_J.Ô¦?¨Ăşn m˛ ۸›zű˘u»ĐMra·ĐÖ l± [â U`Ă*/r‘ )R Á*¤ějA 3Pt ż#É’¬?#idËÉó!ťůsţ~çĚ3ßsćh€‡ „B!n+ߦY„B!A -°Éš „B„Đ2 6k‚B!dB˲čŃ"„BĐ*8k‚B!dB«Tě|`âŔň?tş€ą.ˇEě BŇőŽ!@J@U¬ @ŹĆľ<2?˛˘ !„ň -G–:ËëX|˙€đćF(áĹâ˛X]®R>NX©Ďł¦ !„ňx -ůKç9Zů_PO%†¶O‡ţL‰ă:˘#€yX˝eĂ2M hÂĽ_€,{ĘüÄ_|ôŽ—Ŕě_Ň%Y·}áërw,ß…{çő8`ůZćĎö–t޸@aC"“3‘şiîšĆ«”cĺZľšďƲÉ"`9VďXHŻš€‹ÖőPfőv‹ĎvL·‘Ů?§áthk]W19aŔاxvµî`Ąˇ}|ĄŮG›µ˛‹íl3Xř*‡\Ţłg8.!Đ“­"$<¦cě QĹ+HÁ‘Čޱú?łz=w[W.çżg~|5ßa“ÇG{* ńť ‰lŢÂĘőüŔl¦—8g&Ç0ţďQďÚůÉÁ…/3Úe·u7L×!C-´lýßŘ!(A‰jŹ' Đ`;6˛9ô7 ĎčůÝÇ8őć*Vod×_üuźô}@:ç GVČä˛0×-ŞůŠG?ŕÝĚ×î™(8€˘(uűswMdóŚŠ"vXÇäqéŰ&¬»«ł?ć‘ýŃ‚~@Żn+XŽ„U ďó>±Cć?ÉB˘ľA ÖĆf§^Í#s;ă©XŰtÓ?äëÂ+©ŚgâµĐŘűUĽóĘ8Ňß›€+‘xÎŔ;ŻŤăŐ?§`űč—hłNv±]Ś=Ł`ézÚ†äQ µŐÖ­­ď¸ČŠĚ˙!ŽčWÜmŔřÓ:’Çt†Šążf!Ą˙ÎŔ\wŕ86R7Ň(#ţę"s+§(|?÷ňbO)E‰ôÂŚôýadîća4b3ÝĆ)B±§ŁŐ°qPÁÚO&´}z`íŘmÝ ëµEČđy´|t~Ö "@ň·§pň¸Šą÷Ż@D„#*ś˘ %dBÚcČŢ CşdHBŇR”ÝżŐxꥮÜX€©żŕĄ+«ń%ŹęH3 ŹH dîšXř{RJ|÷ÉdőśĄ‹ÓŢŕ}łm.Îzĺz‹+YhOŞČ®ś)wfÖş uDí†'śůí´Ĺ›Ż&˝tŻfašŢK•Ľ,_ËcÜĐ ďSŕ%żÍ#}ËóĆÄiyÁ€ľOB€ăHd»xb­­¸ôu Ë!0őźc¸ô§IÄŹ„±rĂ©°µÇVPUµm»I L˝¶5RŰ‘ oč¸ĹySÇô˛ČĘcęŤ¨Ş‚Ą‹3?¬cň9 ó—óP#˘m9űmłvvá§-˘°!1~XG8äµŰÔ1Ž#ˇ(bK›vĘשé’ĎéX˝]Ŕügž˝hš‚/ţ”Ľún Ö†ôeĎ~lµą§ĹđD– üÇËÍ›c††ď>9=Şŕů#a,^+@„D5ť>]E¦ěą«l›űxąĽĺ] űDG4%)Źiśđ®Q®ÇůŻ2[Ú§äg& $źóęuöbÖFó6Śôlřů7Í›P…‚íIö Wţ÷L_6S­Ó«yŚÇĽ:­ĄU˙ÔHbÜăNQÂv$ô} ž?¦#}Ë©^»ÍŇŞÔ±źşÓ÷«:žŔřÓѦíŢíµe®;PJřŕóUdr^[ź!Ă-´|L†×ďhm©ë  ᄊC‹>ăP‹ź­`ő¦Ťč!ŁÚńř‰żÎ3r-‡Éă1ĚĂâՆνß䄎S/Ĺŕ8ľJ#Ó‘xVGX„qćŁ V®›śđžôR7ň0 ĚuŮ\€wQOMÄ0ö”ă'ćG"u# @CXtN#†”Ŕâ×i8E‰ÄQă‡uĚGăHľą„pH­f}rÂŔĘŐĚ‚‚Äł:Îü6†Ôő,R1űJ Š"°đő*ś ú†®#˙cú>ŁsĄą[ëY{R6˘#Ďó %žŐ1uĚŔ…ËčŃͧŕÓ/%pňxyťőŇŐ§cüé(Ěű&´‰Ă^ý¤żĎăĘŐŚCqś†pokaC"řâìć,ëk÷,6$Ä~-0›™>a`őą;&t]Cě©hÓ8GŤµZĺ<\ĎÁÚ°qćµ$f^céŰEhŃzŻVmZ™[ÄbqĽóÚxÇş;˙ö4Vď`®;Đ(uíŢ뵥Ź(8őJㆂ+WłP ă1︅ŻRČćÖŞ}râ†ĹosH‰"ö´Žw^ĂÉ·R á«?&dh…VÉíü4`Wć[9%,~Ľâ $'Ć0{6‰Ěj —‘˙q ă'bТ*rđť×âFş®aćĹq,^Í6xnĽř¦Ž{ťőü§)¬ÜČ"uSÇ?żśÁřá(ÂÂÂů˲zŃ/~“F掅đoÂďÝěřbOë=]ëµs "*á+Ť’T‘ΙXą‘…ýŔ‚ú¤ŠďV-d–g (ް‹›e_¸śÂü')hűu¬ýď (Š„ą!˝'R° Ěź%®Ü4aYiŔ-ůŞżJ˝´ÚV(ŹßFGض…hÍĐ@4Ş ş9"§hÁr,(‘ć7UY2·ó(؆® ö´Ž™ ‹ßä[ćQ‰TlI"VQr%ěň“¨°ĄŤh‡˛öŰfíěÂW[6éĚß«ź?6ónŞc{­™Ňß›ś!f8ŢÍz9]'´*í×)_Ů Čßw`P<Ş!ť“Ő›ňâß3ĎKęÇž}Ůj“:¨x⬂ Q BáMŰ{P¶=EýËÖ6–Mlwkřä Łě­ÉáÔ»‹BA8F©T‚úä¦=źk ú(r?0őÚyŘĐu5ď‹ć>Éŕť×ÇŞCěeKCꆉůĎWqţňj6S©ÓŻÓűhĹk„aÝ|§iśÍň¨ďS`”=oW®eá3Ży×®ń”RőX¶JkńCu·đŤwž¦iXK˝S×î˝^[Ńh§~ $ž3€‹)(#ú>Ď#u%•…Şn¦?˙y ‹Ď őŚ~9}źU±aŐ®ě—!:ě| (żYhŢ“ĐöEa­ŻŔ.čȬjP„„  ¤",ÂŐ%üĆßČů/3XúhłżŤoR˘:äüOâüOÖwJ#™»őoRŞ{5Q!ÎýĎ ţ–†řâ/3HŃ$ťúp%˙ńĂ:®üĂÚĚ[¨^-»ŠéĆqţż§!ÝŇ«VK‘Éc:Ň«%Ȣ@úŮ»i$ŹyÂF •«]Đą'›ŮÎáßl˝öÚőO•ý•ëIQěÜĄ†üÇ ţ')EË´üÖťteÓ<ÖÖ/×ÖâJ‰guĚĽŻľµômÚływ3­ŃCVď:ĐŁ˘Îk-%şKźˇZ®‘ĺ–/H'ŹéO"}Č\[Bţ®…XLÇęÍ<2«č‡bxţ¸†ô˙¦«“uüÄżU8ó_ćđÝżë[¶#\ú&‡ůߏcćĹ„ČÁ‘€U0~DĂźdđÝ˙™ŢÜ‹ą7§˝ăÍąXüv­×ÔD Łt(O*H>륓ľť÷np®ż4joLŠ˘âäńń­ům’˙Ćm™ĺ“Hß2amHhĺ'7¸€óŔBé7áčěŃŞ©çÓ/%0u<=ŞT‡urwMĚ’ňž2ŹťŘśŁ•ľebá«ćË;h#ßýu™»8JĐ÷«=­”;ÎLµ˝ĎżíMÄ>yvkë6Â! Ë#ńď:ĎXúó4 Â?\ŕÂçi ¤t´• Ú¬“]´mË^>őÉŘÖëŇŤ?˙ćض—ˇíÓk—Żb +×ó>a`Ľ|Í,~›©kë®ěąŤ­6«ůË9Äbô¨‚~y «? oRČ˙TŔü') śźÜObO)xçő$ŚCů-TÍ®›K_ç0˙ÇqLźGT‹˘`I躊ſŻyo±–ąr=‹Ě] —ţ4‰KJâôű)¤n¶^˛ŕüۉę$vY”UĄ”@涉үj6Ó˘ţ:ĆYRGőę°{ú˙ňżÖîó†D'' ,^µZ¦ĺ·îÚµ{?×Öęm«ę‹Â›$źÉ™Ş^w­śy-ý€ŽÄφ7Ź3üŮŻË›:Rˇĺ5aX&Voć1öLćO:pׄ7Y5ŰBâh™ëy?őżUţ'+7LLŰęj_ľş§hcćÄf^‡•×Uşc"{;ü*0˙ig^Cě©(bOE±z·€KË›Cdµó} é›9Ě}|({hü¤qęŁ4ć_ĂäńâG \ú:S}ú솵űăzőÍ-ďĆôě˘„ŞŠ®ă‹FDGĽ!ąÜ]W®ĺ°đwĎĂŃčąjśŁ•ż”~) ÜpŘ+7Ęo¤.Żçsż€Ąo3Xř[B4Ľ%*-ŕW „ň?Yxţ­Ě˝CĽ,V01÷ÉŠ÷–šÚyŇmÖĘ.‚jËnQ;”Űoľ–®yB đ&Á[–Q3˙ĹOÝôŠă”đŻ_Á©t$ʕפ*÷.©9Ěś[‚tQµ˝ą‹iĚżGě`'OÄpé« ć˙h›Ćňµ5l§ţźřÓ:ÄaďFlŢĎŁÔ°Fו"Ťóo':Š­ _ĺFq@˘xË<¬ţ`bţ“X¨Ş6›ig8\Ýť<>Ző€Ný~ˇjë°řŢIL70óB‹_¤îZĆŃǵG±ômó/Ç• ) u’ÂÔD ŃÜÝfŢ],'üŮoHđ®N†Ž=ăĎŤ?,„g:|öy,Ľ?ď Ý(@,ĂŘá8U´R0v°Ě–ľĘŔŮ‹Đ'NůÎý WŇ{ˇý‹ HgËv(•ďf^ť@ę]lb݆pHxű‹Şîµ€ŞŐtĄ! ÂZť©»4Dy^‚U—ߦĺjŘfŰf9ŤÍĽ ˇŐ•·e} ­*Śš–-ä嫱o^^#«{ő–Ţ3»TΫ[“×Z'Κ•đ&$Ë_,Ŕ-É„”j]ú±ŤŕŰlÓ.ü´eż´Ş—vűýć«äJH;_­WUÝÚ†ťęĆŹ­¶ó¬–JH×ĆÔ„/>śăHħ Ýúó<;¨ŘĽ€¨ĺ2¶żnšĺ_¨zÓĽ—J…-q6ő.ţâĺµŃCbŻ^µ«~l¦ĺµĐ"Î-6Qöz6ŰďőΖľ­Yy»©»¶¶ŘõĄDÂČ®xË>Śţçě_ÂŐţâ_˙đîASo. sÇ”vµĽµmŕ'}Bv­ĐšyáyĚ˝9_ç ‹Ft#ŽŃĂqD)ČŻfľş gCl^] -BČŁĂ;ŻŤaćĹrwM$ßJ! ŢGf^CěÉçt¬\Ďaćě"„jT…Q˝Đ’<Đ2,ř:üîZ¶Fř¦Äš&äq¦f™<žT‡ţCJy8°ůţ †č ŮuB‹B!„tǬB!„ -B!„]EÓÉđŃŇ"k†B!dB 273¬B!„>ŕĐ!!„BČ€h˝Ž˙3ŠB!¤/čŃ"„B-=ZŇ•¬B!„>čÉŁŹ×}j·7ű$Ťi·JgPyé”Ţ ĘÝoŰôZ·˝ÄÓkš»‘^ňď×6ű­“íjĂAäa·Ř„źţgPilwAôŐA´ë ĘŇg«pŻiďäő×K^vk<¬„@4ókuŁU÷V˘[łÍőGŻly#˛U:Mň?ďëŤĘĚÍ âăőqTăt›ÔÁv^TÍĘćöVŻ[âr·!ż»t^`Ą ŤvŃöxż×‰ܵâ7Ľ^ýäˇÎ.Ü€®–­]Xýą;G_íôµ>˛¸ťĂ}ŐăNőonŹyá<íŔđ*ýLĐýÇNŢ‹uočdŹ~®- «„V8TďŇ*ÇgÓ×k*ľŐ|×Çń˝ŕúÜî#_äŁMşëÉíWő’H´Żw·‡zî6?Áőră7ŻÝěk“ÇŔlŇí3źîŕę·RĆÄDÂ×”AäŁ]üô#µvĽ%Ž^ú‚mî|ő•í®…~ěß 8Ž űíĘҲ΂hCw@őčg_P÷†őŢí˝ŰČüVŻ9' é 0ůöŇ@ňVISĘpůIu3ÍZ‘ľ—vb$†°–€NAD”¶EęF®í~Ë)Aş€¦„19Űvđ… äď[°‹Ł4(Š´Žr7ŞżK C@ńc§Ö6ąŰ&,ËR–;2 -Úź=,\N!1nŔxJŻÖťąnÁq”\@UŚz=°żö’.`®›E „%˘@‹j^YX÷-¤nćpę•d`iš‰Ü=fÁó>‰Źi;ŢĎŐö7vQt)•ô9µ}ś—ž §¨ ĽŹ«eĺ/'1ůö–~XÂÉ?ąm÷źíNoţŞ…ąÚŁ!´„RÖ=MTÂd8čĄŤŚ—¬Ú® ±B捓ՋtÔ§ Ä6V!Ą HpKH_Ün/­Anäᬧ`]ŹCDǡؗ <­ÔŤ4°l@S[tĘ€±/ŚüziÇl ůűl«Çp`@ÚŢ8 \ł©ô ‹ĚőEÄ'fMĘ)8° 6,ËRą÷…ÂX˝ą†’”ĐŁ@ˇ`bň·˝Ą›7-– ĂÚ° Řĺ6HßĚĂ8¨cě=pŃęlH¬Ý7áŘvUě€eŮČ›&DH\ G–KSş€µá şń†DŮÓ´VČܱ ú>±Łý\ě•mć×ÉŇ‚,°‹6r×Óęă$ŕzY4!‹¤c"s-3p‘5ýö"–˙r8–Ä…›pćč™m»ťŢÔÇy\ů˝©ŹóČ˙lcíŁ8FĎzu8}TZ±Őő:Z˛(1÷Ţćßťonvé˙)q mÔ4 ¸Ž×ůţď+Xţó&˙8±•˙zó˘ČýŻţNľ ĚŽf¦ë;łŮ˝Ű¸1Ut(§! «°ď-@Ţň<'ú s`Íi—k٧|O ×—ŐíßNú˛7nëç4U_ă%·^`ŐV ¤Ż-"ŃŁŘ’ER–P*J8EŮ;6Ô€Š¨ŻE ŁTpОŻöе°w˙Ą„Ńý*JżŠÜRŮ“"`®[Čß·0yl¬o/Z«ŕ Ď„D B„=‘őoź  ô+ ]…U° NßmimHäL±g4č#˘N|Ť ‹×ň™ĐˇGE }aŻ6ľxŁP–>*¤TančČ®K¬š@řC޳NjF0ž­k M®'Ď3Ś’ŠÔ‡§˝>ďěĄ`EÖ˙x" ¦ß^ÄâWpjâćľťĂüÄöŚDťŢ•7 Ŕ-—íaíCďľ1ÍÂÜ ŁgÓŐm»ÖŁóďÎCD„çŽ.‡ÉpŃSI€´`t[˛î©Ď(šp iX·ćú‘ŕž~—U‹Ď}Ą®Dţ›ňĹŞŚB}2-6¸6¤t`^Őű[©›­‡ Ő0 î·¨Ť¶V7RdžŢŤÓŔ›•»éýw]©î橣d™î¦—EÝŻCş@Ş˘#}m ‰ăÝG¤Ż!ÂŐ7Ó¤T  W˝K(zßŇőr N =¬ş7\7%Čb% OX á5üĘő ’ÇâĐ÷ő'¶Ěuys ˛čĄ-Q‚(çC„”EĄ—íď×`Íăʦ>-{´>ŚcôܦG ®Ľĺm&±Őű­.žăGë śą™iążq_«8Z?ŻŰ^9Ż]šŤűý¦Ő)ţNůóSîľ.qźmäHOdTÜŰŇ„SÔ°ü空'¤ Ä–#Ő-OŃR:@±ł WĹ]`žł»¤+Ť XŽ YČ”Ež éäáÜOÁĽá˝)«ęSpŠZĎb+uł~¨0sŻM ĂÜ(ÁÜčÓs9Ŕë´e[9–U€€‰@p @XŐ¶x°lˆş_ÜRµNlksą±%Ą„vhĄ_첲 ÷mo.X¨ěI "TžW‘ˇ Ĺ> ę–ĹdŮ뉪ŕ(ĎQtmH©›YĚś÷\żRůüš7„çHhŠ€lzë,§5R‚ "°ŞmćH'Źz˘¸Ňf›˘Ňqóg ©bgűąš·Ą»ůp#B@TĐŁ€µ@Dvł>Rnľ9V€†ąˇNÁD>—B@Ż“Ě«ş÷đZYG˘ [–‡‘Ä3 Ś~4еłkVŃ <˝Š'«ęѦGkö[Ó%ÓÇF‡Jlu˝Ľ˘(pĎçÎÍADD5ÜęśôŤô±QŮ–8–¨Ű_»Żî‰´a[âX˘ĺ˛•핸›Ű.O~Ójł˛$Ž%ZÖM«r7dUozEY´Ľ®Ń-®!4$ŽI”ě5ŔőÎ]˝křĘ‹ŻmQÔűp\§ěM˛ŕ=ŹIEl%żŘwzŮś…°0ó6ľ»ů®Ü€%ŕëŠŔ‡Ş$6O3®„¸‘ĂüGÁ<Ç…ënĽňײwĄAdőZÇýŘ€]´‘ľ•†SôŽŃŁ:Ge`Ă)–ÝĆč-0h%LTM‡ýł US€_UŃ꼶Sę;zTnń#–6{ĆĘ|Ş~ŇŞYŰÉŮ;j@? Ö‰#kĂFöŽ Çqş•Gňhoö–ą•‡ĺH@âm$\mŇĚűLÓ‚e‘‡ţmÎ^šJDŔ.{Ň¡MŻB@úNą-hGúłźľű9iCş€ú‡¬Źbř·sŢPá?ß2púk§Ž)ý·{ł>NJ¬\śCňÍ3Hý}Ĺ»'Ń˝t~ă °+źĚPFôžŇ·®e‘ĺ ˙ŤíČ7g Ĺć!] sĂ„!p*y ŁŤ"űV¶w‘ý‡­/©¨]¨>Üë&˘#ŃŔŇk—¦Y°Ą„‰gH×[Ů÷Ćv\hu˝Ľă8˙pľex;hg­¶·.A¤Tü Ű6’®Š&P´Ęs´(„b ¬ŽˇŕßČ“®(OĆ-{Ó¤]ľ‘zťËňź§Ş­ÔÇýO‚.XÖşď®Z8}NâÂ'ZőűÂg:.|¦cîŁhő3ó¦…äń(DȬĚŮźKČZ%äËsŁÓ)ÁÚđ~Kwçl`5·ZY`Ldro‘Y€0×mdďšČäL¤WóHÝČ"}Ł‡Žłâ©2Íę§Vě¨#QŘ?;°7,Ř6ě ĎűTrűĽ]ń¶„US F„7vőŹś®'ę‘“5mŞŚXę…€€ľOĹá {XëVu¬[o–ąnCJ‰Q]~@­óډ6Ż/·T7<Ű·G«čMLw\Ŕ‘•á8ď#Ëo!fn¬®„¦ěp?ç:ČJ07Ľ:¶ąEÄ)" !‚ë㪞¬˛‡µö…@fÝD éĎOÁqĽá˝äďz›@®Ď#˙µYČ@}fÖ­3PÍ@MŘEoĢú€’ăIŚ]ëË›®O<ýÄô·fë…fůE é–˝xµéőIł4Í6ň §č‰<5$ÇuŚ˝›ĹNÓÓĐáÜąą-O˝ —ŠGh'ĹK;1Ő•˛5~7¦=rwŰF˛h–o8Ş·.Ť+ˇ@((ýb"ö\˛‚&Ľ«´źN˛¨AJ»Ţ› !˘HôOPéŃň­'˛„ h!ŔĐUH)1‹îŤ;R…,šČŻČ­K|÷¶ôôZ¤)ä 6Ô˝*J0m §XBjŐÜńáĂ®—wPF8姇łĺ§‰ §í9H }=ÝĽłt;„ŃyŰř{=ÇO^Úçvřn÷»Ű<ôŇFµĎóvŘ«C ňDŞBbó~1‡čŢĘFpGűę’Ň©ó¦I@H«¨-„] bGźŻľĹÔ×µóž¨ŕ*Ţ\Wíx7&é˘n˘ěÚÄ1­<äŇ[zŮźKŤľ”úüDĂőŰ\ޡ[0ty3ďÍKc‡Ľá„ĚJD qdĚjëçi¨‹°[Ş÷^Ő‰ š%ŠžčÂŮô9őYGĄ’¬“7ىP˙ĺ›y1ŃUa=pŞŢU»Ř˝¨´k†Ŕ,ËUűĘOW‚ňGş®B†V®ćQ*J– §ŕ@Ź ŘŽ©c:Ś}, Ňg?'ĄS}ŰĐş—Gţ–÷pkŚ'nôĚşŔüEoľŃÜ[˝-+7r°  Ç‚üĹBú‡Í—žÇGĂDęËâ‡ě÷Űc›$_[ÄĘÇ3|cÉWfşĽńĂ^ť8ż8p~uŕ”]vUŃs.Ű[»”Ď1?jľ´“,zC†9+ý§Wë-ű¨őrR[DÖ»c;ľÜT×-gĂÁüGó;;×4ÜÔ3T4ýzźŠÇO\AĄ•ľž4ßjŁębzŇňDM¨:DHŮjseŮ«ŐßS‚tÖ“˘´YýÔOŁ«ÖkU#z…ÔNÉ­ f›0×­:Ďb÷-ĺsBVÁ oKľł÷mH„ˇFVW-wLÄ á§蚊ÄÍYCŃĎys.Ą[BţVç?|ÇRď_ŔX$Yí⊅ů‹©ęţŮsô$¶dŃ„”^żšţ!äK @J89@D18ňČÜpOEüP@ďKË$_[Äʧ3HľDňĹ$Rߤ0~Ř©›\_'zúPęĹ…Î×y( ô*aŇÜ"˛†€ŢćhťťŰň4áGŘ4 Z!Ҹ=±SoĺwcüÍňäW uŠßOĽíÎ뇮ŰČ-ˇT˛FyRhYP)OmЍđćWÁ5!űčĐÓ×Ę şáÚ«[ľé(FUV QžË%zKOJ‹&O@Ą’'‚śŤÖňĚ%f^íkBě–ÁĐG›O{ĺ!łRy‚¶ěÓ«„ čQšÔľ“†µ±yă·‹¤”u˙) µ˘f«Ŕ‚[*‹`\zUáíÉůRĺĺ·ň2BĹë" ›ă #oÚI/áëĽqś˘kÆ6˘4ßůűŽ hű˛w,¤oš>®ăůŁJŇ{óP X«vkăéëfőúe5űć Nżr—>[ŞŠ‘€Ů7gPX/ŕü'}Ľőě–ĽÎŔ._Cűf€˘‰hD‡ăä!„÷7@"¦#nŘ@ŢÁRÎÄĚą+}ÝŐ“o,"őé ' $NH_ÍWݱ EŹż‡ćť`Ň;yŮÄŇ+:N^6‘˙ŮFöÝ1Ś˝Wď°‰¬ž…–履ƯČhu\+AÖ.Ţ ňÔKüµŰíĺꦍŕ:€ôDBáw…8ë ”IE‡ÜČÁąź‚Ř7 „zYÉ7ĽÎ+őé mo]%ˇ”˝hÄ%š¬Z¨P 7×Aöŕi0 ođę¤ëyl0˛ašΆÄĚk:˘żP§QąejJů‚ż‰î•ůZ;bđ޲6,@r<‰Ő;«Ő·‡÷hą€Ýb¨GĄÍe0d€ŻŞ•ß&”Ny)“Ć6«ľ­ÎURJ?ĽˇR°]ô÷WI!o­3óçÂ@…–Y0íôý*¬ ‰Ô Éq SG5/l~mĽŇçŕś‰’Jű§ó/aćĺ)LMÖ?x[˙vóçfűzP!7 H<Ą{ËŐüvJ4EhŇô^ç )Ŕ/Y”"yÁü…LňµE¤>źÁř1ăÇT`eDVÁ„™.˝ĄWôšoďwEPU×°‰,ßB«ÖĺŤFQ(xó*fßš…2˘TĂŤç¬ÚÇ;EËcf_Iâüĺ˛ëţ:?ÇŤú|áĄ1O•ó’Ç“H]Ků^ߤO«tkÓiWÝ®Łĺ·ŤjY˝k´x>ÎzoŁ˘â$śBbÄ ‚[O©,ň`—=\0b…˘ed b$ć <Ç„P=Ą«EĂĺ§ űA ą[kw„0ýZÉŞçĺy©_“źˇB!Ľą"''F»nďAŘ@mŞ˘Â,°6,(Š‚JÁĎspeY`lNŚŻČ«ÚĆŽ>ßÓ5ŃLÜŐý^h«‡usőDůíąÁyµlÇŢL·lŢ|ĹîŇ›ă(B@XX%ŘŽŤp$<|gMÚ“ž[úß5Ät“Ç4ďĘŕ| l–sNE<ŻŃĚËŢ22‹«÷"ÍĽ<…™—§0÷áů˛·ětWyMĽć qe>™óŢ 8¨#ýŐ ¨Hś81Ľőżî-˘ää±rSĂĚą+Ů\ⵤ??ĺ -fÎDćlf°káŐ ­|°éÍ|eań·fľ˛˙ŮFćÜ(ân.‚šZ5‘97şmĺG«P(ŕüĹó-Ż_Ńn%VüšZÎ_NůΓßc× ˝URĺĽó—S=ĹŃo] ŞŤ;„¶ąkC:yá ßŐܤúĄąČ“FWˇíËĂ0Ľˇőv…s˝ë{ ŮUúS*âă ’˙ĄC‹b0^‹*ěÇ{kĂň†0şáĐnŘ o–j˝]ąM× JoĽŰŕ Š„ˇ*:U…(‹0‰ŞxË©ŽmC¸Â»¶z§T´Š†ńä`ó.‹@nĂF6oAW“ÇŁoß”¶ľlÜzĎóÍT/˛f^ž‚V^.`-obi9…“ÓIĚĽ<µE„uËć_ě8đć ,^< M‹"q<1‘Uíß_Y@ú˛7ż,s6ł­mtz‹żŐjľ˝ß™sŢjüõęďa٧[Ěě[ł[ž&Čpx…TH×ň&¨-®éGäI)7ßFě‰0ľűĆÄčałçFˇh\;Xvr¨°_P#*b‡bșޛB†n@ß7‰Őv±ľŤŤăx z xMŁŤh{U(Š‚pDř0a«8 cô@Ą¨Ó,ÔŻí擨"P€@ĚС*ŻË1C sÇAüP‰ń趤t?—<Ż ¨É㉪Č]Ź">nT÷wëÍŞ%ţfóETŤÂĚ;«Xúr€†“g—㉠yýlf›ŰfŰEÝŠ,˙B«ÉMµ°^ŔůżžÇě(˛Ž»ómä]ţŁŰ17¸É ˛żD/üUoîI‰|űnău:şoŁűFĎ_íŤúhb[ë'q|jűÚˇ×Çƨˇ÷”—ŃCF+s{¶ˇúHú±đö×]€ýÜXl c±±¦q‡CaÄŹÄ?XůÔ‘Q¨ÇF1vlf(ěŹě´ĐŞ}rÚEa˝üôđ‡ŮşpťńçÓ¬ÝÂoÚ!´qB†Lh5>=4{šHM°fw?mDh„ĐĆ !„BˇµKQĄnHęq%zfĎÎÖĹýĹg_tuţ«Żżę;o„BČ0óX:Žóź_ax›ęÚď‡BˇĐ*“8–¨űôĎN0űÚEaxŇĘöZý&„BvťĐ€ôŤtőÓëŤ-}#˝c"Ťž­î<[•yWłggë>Ýžß*Ü«íaK„BČĐ ­vâ§™·ˇ™÷«Y¸™€j<żń»S:µĐ“UîF$UÎýâł/Şs¸üxĆjEZłď mŻŐ>?vE!„ µĐŞÜĽj˝ µávŢŻÚăEZŁŁń»ŐqÍ '«7OV?ÔN¬ŻŤŻŰ óýÚc'»"„B†FhŐz‚ÂéÇ»ĐÍ&=YS]y˘‚ ń-Ć/>ű˘çIđÝz˘šŰĎ7!„2pˇ5o@żqvsó¤g«łg+Ču­EŰ«ŻżşmvŇęxŠ-B!C+´†•N7Oz˛ş›Ł„Řj5\¤ÇlPöB!„ µĐŞÜČš 3¶;Îďö ~Ňčąęe­F±őęëŻv%’*çW† kĂŰmÝÚ !„Ň-{ĆźxúÍÓ0Ȭf`=°ľ‘FęjŞzPöľDâpt ‹IîäMŽ+Ä·^…}öělSOVĺśĆů]Žă`öělUHŐţöKă9©k)$Ź'yµ’m'{_bě€đ˝ťBŮńˇĂađ$ĐłŐ˝g«"‚¸Ş;!„Ňšˇńhíôduţ?Á^çNŐz´ú9đLż4Í+•ěéŰV!„B‹lŻ ÝmçB!;ŬB!„ÁŕŰŁĺ8çĘB+˘×U#„l“ĐReWÍ•áÜ ˛$GY ŹěG!ý¡CB!„14“ágĎ}ĐńóľĂ#„B…V/tR§ßšĂĄ‹ól5B!„ě †rčđ˙Yl>ýÖ[ŤB!ZÝ"].pć÷38yvˇúyçŹ3€ \ú¨{oÖě+É®¶o'łŻ$«ź ĘÔKůzÍCżĺ†8!„ˇZË×sxőý4^}?Ťĺëą@ÄÖĚą€Y°'Ď.@pÜ`nĘĂ"˛Î_NU?ÝäéüĺÔ@ňDýt:·’ćN´Ĺ!„]%´–ŻçţŢ®†ÓßŰ}‰-éŔÂ{§°řŢ) ü{á˝Sž·k€7ŕFŻN'qÖĚ T wňUÄFŁxň›~«ĽὫ-C§řËŰěÜ^„Pł¶hU>żŰóć§~»M“Bi¤ŻÉđ‘őĹźĽEý^}?Ťô÷6¦'zڰ,¦N˝·PÝtę]ď÷»§zÎgEÄ4~×îo'‚Ú ĄĆăŰí”Hl—F»ýµőŃi[«ř:…ű-O»řZŐułßÍĘŐKowűByŚ…VKÖb‘żN‹9JXĽĽ çNá̇›bëÂąSXř|3ŻĚ T°tgíŽo&Jv?BŔŻ ˘Ľµé´J·›ř: ĚnĹwPqB!­Äł*ŇßŰxőýtݶ~VÇn%¦-˛j˝ýŢ䇿"ŞÓq˝ÔĎN‹”A¶˝X„BüŇ×­é‰ĎŞu"kz"Ös|%×űśůpógOAŹj?ëy·*ű-:¶Sµ3AŠ“ťšxŢ.?Ť“ď‡]B!˝Ň÷ĐáôD éďÓŐß}áJ,˝„QM.0˙Ö)ŔF5ĺŻ1ýR^­Ns•EO»aĄVsĽz@íŇh'–üäĹĎđg»yZ­ę§ńŇ®ŰŐ_/uÝęśn„U§şé§í !„<>ěnüáé7OĂ8d łšőŔBúF©«›7ě}Ův8°2tX™ß łç>@búLÇăR_ÎűZ~·ý,=+ĂSďý´˙TúŃ"}»€±bËöě}Ůt;!„424Á#e ©/ßż×iô`Š[B!ZÁ˙0¤Ŕ–úf;B*ˇŐĎ!!„BȣʬB!„ÁĆLĄoúžTĚIÉ„BŮičŃ"„BˇG±PSo¦ „€”˛ĺ÷•Oř7*„BˇĐę!ŢK.`ťCţć|őŰ.sÓlyB!„ śGvčĐvUÝüę<˛÷Âݽ…÷8ůĹ!„BË#éŃŇu˙¶ě_"ű ‹@ňµ+(<NţżŚŁs€ \–‚B!ă‘ôh™¦‰ýüęŢ=0$€“/NBŮ HXş<ŹĹĎç1ű—<-€B!ZÝ Ą„ľH=Ä«˙µ˛śüĎ=? ,ţmcÜťň÷şZc±±ęwĺwăţfűšť×*B!„Ph -BŘE@Ű ,Ą"ŞßÝ|ü}ŕĚë“0 @b< ęíOaÇbcČć˛Čć˛uB©v{ăľÚýŤż !„ňh2´s´Ň· Źiµ(iĹŁ%˘* % *@ü™=ČŢ{)E¤+{Ę[Ż©ö<Š,B!„BkÇčge÷ŠGK©Y% ¬Ý{ŃC{𯟑čŮŁE!„â‡GzŽ–”€VYš8.đŻźâßöďéÝŁE!„â‡GvÁR»,|ą‚ą7'ń±=Čć"Ş˙¦íÁÇŢ|­~ćhUhlµŹB!ZŹŹÖÜ&ˇD€lţ!”‘Ą hŽV«}­ćgQŚB!Z» !Nž] HWVż'ßřĎżľą]‹j´B!„PhuĂŇĹÁ­řN!„Büň«€B!„B‹B!„B‹B!„<˘s´ţăěň–‰đŤß˙ühš­O!„ ­n!Ąw'!]Ŕ*Z¤ţ{îŻ+lyB!„ śGsexWBşŔĄë&2«9ŕňIh?­ sßYKďNâůs[„BˇĐęžË-`jý<ŐÜĢÉdÚÄi¤o¤Ůú„BˇĐęýQ,`Şp bߨ÷§‡ÔźRĐGÎ˙ĺ–>ż„W?]}¬»öďjB!„BË7ICzí Ä1H"ŞňÖ§ü÷;€őłE „B…–_VŻ®`ěÖ”łFŃŁ3PŽLAě3Pr%ÔŤ ű€ěť<ě˘ÝuüOĐXl¬éďÚă·7;¦Ů9ťŇó“N«ă !„˛}ô-ŔvŇŁŐěďx¶3v3&x IDAT®Ć? ćŠń„BČ#,´–ŻçţŢĆňŐ5$žU1=ë9®ôő<Ô' ŘňPU¶°VžŻÝHż"‰"‹B –ˇš _YUˇô˝Ťĺëąžă«YÖ<¤ ¤®ć‘ľ¬|“ÇĘ7˝ĹŰ쏜k˙Ŕąq{«?Šnô 5‹ŁŮą­âô“?éw*Łßă !„ÇťˇňhUDÖJ^}?Ťô÷6Ňߧ뎫ěď„ýŔóhYV™ MŹyçíS;{ó]ň-˛Zy~š —^‡ň*˘Ąň»żiô3,Řm9ú-7!„Bˇ5,‚ěv8m{\Ed©{˝aĂů·â€•Ż.!ů ¤+ł3] VB"qQG»řüxŽúÍO3W+ţă§7‹Bbˇ•xVEú{Żľź®ŰÖë<-Ë*Zů-űÄÁ…ďg{Cýzmú9żŃS5ô»M#<B!ŹC5Gkz"†Äłj " TŐ›ŁĄD<ʤĺ}ŕţäŻMÁ¶Ížân6¤G!„RËĐ NOÄ}˛ĐqXĐö|řpË Ë˛EřŃE!„Ďcő_‡§?©ĚÇŇ‘şgîX>vZĐ´óvB!„B«kü®“E!„O° !„B(´!„B(´!„B…!„BČŔx¬Ţ:|őőŦۿřl†–@!„ -ż4.Xş)ŞÖ…Wo-Ň !„BˇŐŤČŞ.RęC€í¤Gk» müÓg®ťE!„ žˇ›Łµ|=‡ĺ«kxőý4–ŻçúŠ+}=ŹÜíň÷@î4_1~Hč÷OŞýžO‘E!„lCĺŃZľžCú{{S(}oČaz"ÖS|ę“ěy¨Ş«üťşš‡•?š6ú4Ť^˘ĘľÚí­NŁ—©q[íöfçÖĆŰęüVq¶Ë_·ÇB!d­ŠČúâOŢź?żú~éďm¤żO×WŮß űAę“,+ŹĚŤ…¦ÇĽóö)Ěť=í{ĺřvĂníJ'*b©ťŔi7ô×ě|żév“ß^ËG!„PhíŇ· €ÄáhŰă*"KÝëy®ćߊVľş„ä 3®÷Ół3] “Vc˘ŁŮp`Ż˘Ęoµń·ňB!d— ­Äł*ŇßŰxőýtݶ^‡-«i2Ě0Ă o_¸oŹV«híöĆc*áf^°Ć}ÍÎóObˇ1­Vů©Ý×ĘűŇ.Ź­ŇmUŢVűÚťßéřVç·Ş‹V7ůVőß,/ŤuŐ*ěÇ>ş©÷v6ÖIđůµ?ő×Écç·ŤüÚ<ź,fa†·?ĽŁs´*7f7nĽc­âéÇ+ç7?íÄŚŹ_»tČ{;ÁV{|ł:lçĄl‡1Ţč©jVÇ~ěŁ]űôÚ¦~ęą]}tăĺí&ď­ÚČoţůdÉ0Ă 3Ľýᡜ ô0Ńě+ÉşO?q´Ëë0o59ÝŠ‹ni2Ě0Ă o_ř‰ ní†ÓšÝĽňÔ Ň ´SާA䩱ő¨íÇíe‰fđÉ’a†fxűĂOy#«|ZyücµŠ«Űxz-C»ü÷’F»úń›n§a«Nů«­źNyio'±×i®S˝őSÇ­Îmg“˝ ażńuş&:ĺ˝Óv?5ôd1Ě0Ă ď|8°u´‚ôęY2Ě0Ă oB‹B!d@pčB!„B‹B!dwęćŕB>Í#„B„Đš~iš5F!„âB!„PhB!„PhB!„ -B!„ -B!„ ­n‹ŤU?LcÖ|B!$8B;•đXl Ů\ö±­ř Ëţ¸×%!„ňH ­Ę ľâť©˝Ů×zlZmovL/q6îk·ßŻ i—Ź ĘŢ© ~ËWŮŢ)M 1B!d— ­f‚Łv[łpŁ  "ÎNťnŽíćĽ^ËŢL8őZľJúR„BČ#(´š‰fBbq6ŠťĆóÚ şvÇu/­ňŮŹh  0B!d ­íĽÁ·‹ł•7h7‰Š"B!äŃ‚Ë;´áQx3pĐouB!¤5ńh5ĺU¶ *ΠÓj–¦ß8; cöRľNőŮkš„B,{ĆźxúÍÓ0Čü˙öîÇjd°‘X č nv¤ŽXę ŮÄ-0@ęlš¬ Fb¶@Ö)ŮyŁÎëżëŰö)ŰĎ#ˇ{c»ľl˙\®Sőőqxúń4<|yî?ß˙~p˙5Ľ{óęPłôsŘ`˙^*‚u·˙‚WA´ŽjíÁüŔţ  Đh0̰ÖáłŘň2—ŰSKÍ„ö‹ť/µ-7ĄűÎ)çWGţĄâ–ň~í=,yţµëˇô|˝¶“Ř˝˛çň<Âőz­ëvÍóů•ű†­PI­Ń—Z»/§ˇŚ˙;¬íĄńůBÉmÂşkˇ×6¸•zŻm[ż¦÷ňßkŔËN­=Ëí±K-6]şolź’sŤŹWł vIzrÓ’Ú BűäÔSnąĄúś¶2uŢ–:,­ź’üÔOµ—ĄŇźĘWM˝‡®Ł–ň¬˝B˙&§śO·§óĎź?˙űó÷żOç)o߼=ÇLmţ»ń˙>˙˙Ë?±c…ÎťJÓÔżŹĄ3ç¸S˙6”żÜtä¤)µßTŮÖ”K,]±s”ě—“ž–żŻ­Łšö4WZJÚmI{É©‡Üë"7-±ăÔ”ěďKÓ’ł_K{)ąw„î“9÷¬Zµ×mm=ÔŢ[KŽYSsŢkÚDë=«ôÂzşëŃşÖ§‰©7ا—Ôg™Ëĺs–Î{îÚĄź’By§&×ZBh*—o…kľ®Ů^jęd©´,QÖK]G5×Ckůdžf¬uß­Í_í1kî/±{Hë8Üšz_j}ŮšűţtXóŕ_#=Săľr>żÉŇ7zÝßýz8Ňő>×˝5tYŞ~bÇu˙â’éb­`pAçVĆ:´–ő5ŢČCeÜC™÷Ôv§ĆŞ]nŰÂuv´Đ­>ÔÓň^.}Ĺn–ôj-ńy)ÖĄ<•¶ńC!ö&–“‡Ąß|Ć'縠Ry ]Şk?tÜk}Ž\«íĆĘş¶M,Ń^¶T¦­ĺ9WZz @K®÷Ú{Á÷Öµ§é)ÍCÍđ˝bűńât{:ß˝żn^ß Ź_‡§OĂĂ—‡áţóýď ˙ţkx÷ćUô†ĐŰ› ë—͞ʾ÷Ľ¬‘ľ#]KîŔRš{´ćţ©qk:¸Ţ[ŢžĘěeĄ˝thőt#öP¸~™ěˇ¶’‡µyćZ¨c0<€@ @ ŔĐ8F+÷çú—ŰcëxĹö‹ť/µ `sV(¨‰-kűűX”Zh5¬\O‡{ ´błN?/  g Řş—˝%hÍńU± młÍ6ŰlłÍ6Űr¶Ĺ,şĎÔö©Áď©1]SŰjƬÉ-€…,ňéđ˛{-¶v\l¬VęßęµhĹ‚ ń¶©)jŽ °»@+Öcµ&żRvhőÔä· čŤÁđ-Că­Đt SÓC“’NM`:µ_ě|©m9é/Ůo*í5éHMčş¤Ü `{Đ2­GiľZʡµ=­]¦sĄĎ$Á Zˇ‡Ij¦÷ŘŤąvfřX°–›ţŇF*ďs•瑵„k•gÍ* × pž÷ë!@¤-ř˙óß­=,SűĄzë.'l í[úđw*-©`tężcűÍ9HKĺô>Í<źk*M©t„Ę-vĚ9ĘtŞžrŇZҶSĺ«ŰśëÁ‹ pŘ@+¬}“¬9_mŻUě3ięSšÔ1[ę§&ŕČ ÂrÖµś3Se’sîšžłĐ?ÖŢsĘz* ^˛Gję|%=v±zľüď–<Ôś@ŹÖŢ@ŻuS.Y~(·\jŽ™Ű«Ú'Ö›píşm 4Z‚»Ňqa9Çť»0T‡5çKa-/c±4Îu>€ÝZĄA× 4ć{×Ú[T˛KY·ÔďQ^žhm-đŘë1÷ňPš»<{,ľdťúűž^źCZ㱡zIŻÖÔ•ąÓ:ţăxů\Ž-sęÁűś3÷±zŻÍ{n:K{¦bÇ ĺ#UÖ׸&ZʬtżÚ<„ĆÄ-ŃZĽ8ÝžÎwď×7Ăă×ÇáéÇÓđđĺa¸˙|˙űFőý×đîÍ«MĽUýMwĎů׋ˇ=kŔÖ4÷hÍůsý9ŇqÄŃQŢŢ÷ř9Źľď+W ´zş ő†|´|{đŞgmŘk´Z Ťc´Rk]Ę]Ă,´_ě|©m[gřĽíS]çš±áţ®/ő¸^9¸~h…*<µI¬a†ţ>µ†ŮÜëýąíŁĚć>ć^ęví|¸&¶[^ęn˝{Lγъ* ´~ëzűHMĹ3UCë:zĄ=„ă)Bź:ćxMĹ©t¤zH眤6¶t*ąĺVrĚŇ2Ëm/±öjŁ©zŞÍ_ęšH-¦]Úc‹ÖOí[Óv[óPÓÎjz6ŽŢćSÇ,mó%÷ňÜ<ä”5uş=ť?ýőéüíźoçŹ~<řăĂůt{:˙üůóż?˙űtžňöÍŰsĚÔöçż˙ďó˙żü;VčÜ©4­!7 㼧ţ]iŢrŽ™J˸.Rő;fîżťJkM˝ĆÚH,żµí®ö5eÖÚÎsňQR·ą×}I٦Ňş.BíĄ¶=¶¶—śë·öţVrŻ9j›Ď©ëŇ6_ÚŽ[ž™=>ă(Ó]ŹÖŢ#řP·oj)’ŘgŘPůĺ3§>JşŞc˙¶e‘ć5ŰYm×|í1kĘ,V·­“Ř^.4G樧’<Ô. TŰvSyŻ)Ďšk,g¨Ł¶ůT›¨igµ÷A|:\5 :ZcŚ}ŞuˇŹË«ö:¦@ůş]ŞMÔÔíRu°÷ID×|«ŢçŞmŢ}ĺŢac‚µÓ^~\°… Ü[l?őŞ uu¬6Żľą¦—K7ęŘŔÔ’Ŕ!ő¬ç€čň­kęsĹÔß§şĎK>ŹŹ;çx`hm•ÔS/ő›ĘC,ťˇµąeză/­ŰµËĄ¶Ţ×®óX»ž+-űŤ{hrď!­ĺv„6 ?wűląV¶ôś#ß‹Óíé|÷ţn¸y}3<~}ž~< _†űĎ÷ż+űűŻáÝ›W“ ż·†ŕ§ČĘT[@ű`­z6U )/ç¨ô"o]ĂË•ĺ–/ę^Ú'Ú5űlKkµ#ϸZ=ݨÜ4•Ą6öŔő~Ť¶¤ýn—Áđ-Că­ÜYz/·Ç‡Ží;_jŔć­PP ަ‚«śăĄ´ń9zŕÓ!Ŕž­ŘlăĎËgč™¶îeo Z{†ÝĐąmłÍ6ŰlłÍ6Űr¶Ĺ,şĎÔö©Áď©1]SŰjƬÉ-€…,ňéđ˛{-¶Ö\l¬VęßęµhĹ‚ ń¶©)jŽ °»@+Öcµ&żRvhőÔä· čŤÁđ-Că­Đt SÓC“’NM`:µ_ě|©m9é/ŮďZ¶<ëÓľöt"¦/Ů“'+h´B„ÔLď± ŻvfřX°–›ţŢo[¸Yí妺v><ڶ[^ęn˝ű–˛ćÖnćSSXÄzórö™ş…öMőä…ÎwąďóżÉąIĺ3”żśžÇŇc––uNy‡ňKSM›ČÍ_č|µí%Tç±)YbűÖ´ůÖ<Ô´łÚŢí#·ůÔ1kî©{]ζ©6ˇç—Í9ݞΟţútţöĎ·óÇ??ž?üńá|ş=ťţüůßźż˙}:Oyűćí9fjűóߍ˙÷ů˙_ţ‰+tîTšJŽy™Žq:CűŤÓKOîůRĺ:_,]©rÉ9fi˝Ôł¦¬KÚAI;Şmą×Ĺśí3Ô–Bmˇ¤×ÖCi›o˝ţµů¶Ľ×¶ůŇvÜňLŢuףµöJęíčůďRo]ąyH}Ú ťŻµĚJ–;jÍĂÜǬ)ëŘ’M­cójÚÄRę®Ů^ÖnóµeÚ/UďGnóą«rĚu6Á4>®Pőp±ŐŢ8jö‹}ŠŮ’%‚á’±y5ÇĽ<ÎRÁ|ÉŇSGŞ÷µŻ•ŇńźÚüţ_¨ášLď°€¨Ňä-¶ź¶Ş uu¬6Żľa9/—ľhcoKzµbÝâ×x‹uŇކ>Ç,ŮĂ2ÜĽfŢ[ĘĺňMĽ¦ĚÖžşŁ45źďÖĚĂÔąçČCË~ă𩞩=ßŃŰ|l0üÜíłĺZéé9ą^śnOç»÷wĂÍë›áńëăđôăixřň0Üľ˙Ýż˙Ţ˝y5ya÷ÖĐŻť¦ž~ě§Ńh/¬]ĎÚG÷rŽ‹¨‡7 ]ßóľá˘˝h/ĚŃ–´#Z zş€zI‹2a«´ő®-Áü †h´ÇhĺÎB|ą=¶8tlżŘůRŰjň°„-ţúfíA­Ńî‹_ś­[®ŘY şCAUÎM§d¶äńü*ˇ`­&.ëçĂCy»ĺĄîÖ»ÇäÜ?ý vhíý![Ń~ę&šłÂ|í1CŰrÓ™{Ăźšpv*€ž:gMŻcÎůbÇśJËxâÍÜ:HíËCM{ÉÉCM;«éŮ8z›Oł´Í§Ň‘{­Lµ =W°!§ŰÓůÓ_źÎßţůvţřçÇó‡?>śO·§óĎź?˙űó÷żOU+©OmŻ?µ2ýx5ů–•âsV®/]Ńľ%mµÇŚ­vź{ĚR9ůČÍCNţrţnężci™Ú6UnĄeŰRąy(-‹š¶¤Íç×ui›/mÇ-÷ŐÖű °śîz´¶2Um×|í1cŰbźjß¶só‘zźŁĚjÓŇÚÎBKˇ,Ń^jĘ3·W˛¤·çČm>Ő&ć^ Ůç=đépń fË7š5'ů‹}ľ*9ćx­¸µËeź8jóPłß\ő>Whóű}©–cz‡•y‹í§Ruˇ®ŽŐćŐ7°„Ez´¦7‡~ť{sëiŐö–ćCjKW´Ďů•×ÚkוćˇćóÝšy:÷yhŮoÜC3U6µç;z›Ź †ź»}¶\+=Ý ´§ŰÓůîýÝpóúfxüú8<ýxľ< ÷źď_Čß ďŢĽšĽ©őv‘—¦ÉĎŇŃ>XşžM•ÇőrŽ ş‡·Ş–n˙^ň@ÜPOÔ¶ĄµÚ‘Ďź°ł@k+żÜJŘn;B˝÷Đ–´_čŹÁđ-Că­Ü/·Ç‡Ží;_j[MZÍů«ź-ţ”űZŤQ`7Vč! Şr%3EŹç– k9éźó×:— ĐÎńŕ_"ŤŘ@ µW©źů_S±1wźÚiRh츩šüĹŽëŤőrĆŇajZ#±ŢžžfŹ4SA@i`[‡mŽ^ˇŘ1RZMţb=™9ç+-łÔgg8d Uŕ\Sęá=$M-‘2ő‰łć|© uę\ąăÚró×k›Řú"ĺ´fxöü`L}‚k Đć>_nRô´ö¨fđ˙śAë§ÚSo‡ ´¦E‡~ťX2ţgîń[±ăMĄmÉ`f‰óĹÂOťoŤ`0•–Ú6áÓ!=zqş=ťďŢß 7Żo†ÇŻŹĂÓŹ§ááËĂp˙ůţ÷íűŻáÝ›W“ňŢzQŽ:µ€) ?Í=Z˝üĽţ¨˝¦7€ťZ==ÜŹh° _Ö:h´ÇhĹÖ® -Ď’ZFĄdmľĐ¶TÚ§ÎąĹ_ńő’ćą—ŕąFúKÚRK´”ĂšÓsôÔ6·vmÖ¦·÷|^{ą4ż´ćVč‹­y—ş@j×ć+]ón+ýÖşpkËwi9¬Uf©t-Q­CmjKíş÷tZgV ´ŽđŕťşéŐĽÍŤiN-âśÓ›—ęŐ(Yëp|ă\b‚ŘĐĬąApl©˘©7çôą˝±©ĹŇc˙fΉx§Ň”Ó^¦Ęm­6QÓ¶sŰ|Ş\bu›şnç.“Ö¶T˛OKÔľ°¤ŇSZç ĐšxŠővőňF7ułmíő'ŚÄλyĺ<˛%/N·§óÝű»áćőÍđřőqxúń4<|yî?ß˙nčß ďŢĽ ľ±öřÝóţóľĺŽ]çÚkZĽśăBZú-®ć-éH7˛5ޤŹh«ײÝűňÖ˙yőôPÜÂűůŢz°Ĺ±ëYpÝ@ áZ-†Ć1Ząëď]nĎ]/.uÜĄ×;š’e1ć8&´2ÄÖS‹Mţ[g/硚M¸ôׇ=híĆsP6Ő–š0gĹű©éR˝€ą˝„sLjű vζŇc€@kąK],ý°ŽĄ#gŇ©’cźBc˝r©2iYt8”¶śt–ä!őZWÖSOH*X¸ ’b\É1sŽSRF9ç‹-gQ›KdŔ­ŢÄk¬Z_»_Ézx=ĺŽĆô k[OgmôfŔB=Ză1KĂţubîąĺóYÍqçXí~ęŘ%+×çĚĎÍŰerÓY’‡Ř~pD/N·§óÝű»áćőÍđřőqxúń4<|yî?ß˙~~˙5Ľ{ój2 ęí3Roi2eWsŹV/?çďĄ÷¤¶÷ huDô’đĚ`x€@ €ˇqŚVîş|—ŰSK¸„ö‹ť/µí¶ökĂXzkóâ—´ĹÖ ¬Y»/÷a?ţďµ×ŘK ŕĺ‘3źšŠ!´ýůďS“‹–,š=^ :7-sä/–ÎŇ…ż{™îh=Ąń%Ň1>wŞ7.•ţXĎZŞW.tţÚOpąů‹Í€źš?÷ ĐęŔÚ=!=©Ŕ®¦Śrň[.'´ŚOË1@ µBPqíńTďLŻb=akçĎgAČcz˘Xmp¦7 ęŃş|ČĆG—ôjµ|>Ë=ćszżýűmrŰřWŽĄé©ÍCíú‰ąů›JWζqzbűŔ˝8ÝžÎwď×7Ăă×ÇáéÇÓđđĺa¸˙|˙űAúý×đîͫɠ·ĎHćnzŃÜŁŐËĎůőž» ´zę9Ň‹ôĆ`x€@ €ˇqŚVlÝľ±Đr2©e[BÇŤ­X3^«d˙Ň»…ńc±tÖćÁ/@h5J­÷ZĎ0¶ÜLÎC{üß-kě•ÖóV ß0ô…`IDAT´¶ljbŐP Ułľ`é˘ŮĎßÔţ5“–¦öÉIgMJË Z3z&JâK¤ă2Ŕ™ zB˙ nB=^9Ç[%çĺ/”¶śt–ä!őZW¶§žĐ89ůo]î'÷|ˇt¶ä!uLh]!9‚Ú@˛µw-7@:Z0 K2˝Ă‚¶HĆŇY›˝Y°PŹÖÔ óĐŻsČ-źĎjÔžo<}|Ś%µçćáůXßţý–ťÎ’<Äö€#zqş=ťďŢß 7Żo†ÇŻŹĂÓŹ§ááËĂp˙ůţ÷ôűŻáÝ›W“@oź‘ĚÝô˘ąG«—źóë=vhőÔs¤ čŤÁđ-Că­ĐôSÓCËݤ–m 7´ĆŢÔ¶TÚ§ÎąôŻceך·Ňt”Î4­ńp×:÷ZçÝę/fsÚgmŢüŠXŔˇ­ĐŤ5¶†`ęĆ‘{Ł˙wé{53­ŻqăL•ç‘ÍYGµłëď-s¦{‰öąőCĽTyoësô2MMäúĽKŻŐÜ=^ă…­c‹O¬±2 mĎí-©‡ĐľĎ_Ó z„üMý÷x"ÚĄ‡TÚk'ńŤí7wýĄę!§ni°§ŰÓůÓ_źÎßţůvţřçÇó‡?>śO·§óĎź?˙űó÷żOç)o߼=ÇLmţ»ń˙>˙˙Ë?±c…ÎťJSI:Çi+MKÉůj·µ¦%tžXŢk¶Ť·×”gI›¨i›9çŰSţbű…ÎÚ>WŰ«iós\wsÔß\u»¦€íé®Gk+ssőôoíO6µŰ.·ĎUĎKŐC¨×f/ů‹Ąż÷Ď]K.ÇŞżk­j)+Řľ«Z[ż¬UŢ寏rY#0,;ŞnK¦w`Ö7ń=Ľ}ÇÜ{É_(ăqJôw­ĹęčĎ"=ZSľCźaJ~%¸ä4Ąo·µq÷–Ř€đÔ ú9ë6–÷Tą„ΙęŮzţrĚž?!Ö¶÷ÚkĄ´¦Ę±¤ţĆmLPŰöât{:ß˝żn^ß Ź_‡§OĂĂ—‡áţóýďŔ÷_Ă»7ŻŠŢü{ěŤ`ŰeżÖŻÝćž JŰ8®ć­^~†ě­ożÁ[iĎĹ–ť^zič0Đ2 śĄë`ÍzÍýEˇv @.áZ-†Ć1Ząë]nĎYOmjżŘůRŰRiź:çż0 ĺqŽuKŇQrĚkţ2îZçŢÓŻ缆–LKkŮű§2€]ZˇdjN˘Ř  dćńĽA©*Ŕ­yC*ÍiŢöjÎ:Ę­ó˝=¬r^jÖjgKžoëu&HÖˇŢ çzűźšČőy˙–Ţ„ą{"Ćł‡‚ĺPŔ+łĐöÜŢŃ’zíűü÷µ˝ S=ž±t¦^R˝›9m0¸¬=-ĆT/őZ ¦ę´¶lręw®vťjź9m^9ݞΟţútţöĎ·óÇ??ž?üńá|ş=ťţüůßźż˙}ĘZ>gűóߍ˙÷rĄú©ëS˙ť›¦’tŽÓVš–’óŐnkMKč<±Ľ×loŻ)Ď’6QÓ6sĎ7•‡Řľ%é,)ëÖöÝR6©ëş¤Ěćhł­yni+­íz®k Öv€ëé®Gk+ssőôoíO/µŰ.·ĎUĎKŐCMďK(-—˝9©1xs]k·Ďž—왫縦]/±.hÎ~–î~\-ĐÚúŤŔd­ň ĚJÚöŇ?pđŔť.ë5Ă’1§®wŘ'Ó;0ëőę"‡Ë%TżăqJôwŤĆęXÎËĄ/ňŘŕĚ’ó’Ýţ5o©k8î)-±Ú©AôsÖm,ď©r ťł6Čš:ßĺ±BźÖjëŻ4ďKŹ9ůě1řŁť-UGˇö™{LA/ôăĹéötľ{7ÜĽľż>O?ž†‡/Ăýçűßň÷_Ă»7Ż6ńćŻ7bżeżÖŻÖ´ćŇÜŁŐËω˝˝í7x+íd°‹@Ë€p–®5ëU`nĂ´Z Ťc´r×ńşÜžł.ÚÔ~±óĄ¶ĄŇ>uÎ5~AĘăë*–¤Łä×0~­sŻu^ńű.ËÚcŞWe€@«Ih~¬ŘĹ»čJfRĎ‹”  bÜš7Ňü—ćmŻć¬ŁÜ:_łm\#{}pűˇŽ vháMlęfYÓË45‘ëóţ-˝Vs÷xŤgůˡ€5Vfˇíą˝Ł%őÚ÷ůďkzAĺŻ<©cĆň7µo,©<×”gë˝#'-µ÷‘’ň®i©¶”Sž‚4ďt{:úëÓůŰ?ßÎ˙üxţđLJóéötţůóçţţ÷©zUűĐß…V»żü3Çęö9Bé§­4-%ç«ÝÖš–ĐybyŻŮ6Ţ^Sž%m˘¦mćśoOů+©÷Úüµ\GˇóµŢ{jĘłőzšŁ~róÝŇçjݱ6GÓ]ŹÖVşü{úŚ·DZj?ˤęďrą^óű\˛—ü­Y-×ŃZĺąö_Kž/TfK¬Qšłźĺ€8ş«Z[żřŚ‘wůŰ^ţr_Ö—tÍóĹ^*JîË> Bšéő-vo®±‡Ţ^ňĘÇůÓ›á~QŇao^.}aĹD–ôj­Ýµ_’–k¦çi‰ nN ˘źłncyO•Kčś9żfŰrţZę¶6ˇc¶´ÝšüĹηö54WľçČűÔ¶Ëë TÖąÇôéŁ{qş=ťďŢß 7Żo†ÇŻŹĂÓŹ§ááËĂp˙ůţ÷Ĺóý×đîÍ«˘7˙{#ŘvŮŻQ·©Ţ¬­çoíó»ŁkîŃęĺ'ĽŢöĽ­Ů˰v;€-ÂYşÖ¬×Ü_ÜíµÝî=×`0<€@ @ ŔĐ8F+wí¬Ëí±ĹˇcűĹΗÚ°ą@+Ô¤ć$Šýş«döâńś<ˇ` ŕ|:ŘS ›)řyi=SŔÖ˝ě-AkŽŻŠ-ea›m¶Ůf›m¶Ů–ł-fŃ%x¦¶O ~ĎYg.5F+7Mk1F `!‹|:Ľě^‹­…X˛Ş{hy€CZ± hĽmjІšăě.ĐŠőX­ÉŻ€]Z=ő0éízc0<€@ @ ŔĐ8F+4ÝÂÔŔôФ¤SNí;_j[Nú§ÎU“ÎÔ¤«ĄiLĄ5g"×Ňr+©‡Üm-mÂř;h…†ÔC2öđ¬ť>ö@ĎMîC˝%¨Ů·%Ř(™mż¦JŇ)`ŕh|:Ľ’’ÉZkµE@»«,*ýd„z».˙ÝҶ0ŰüeP¶VCĺKK*ťfö@ ŐAPq­óőÜËłöĄśO€SiÉŮGqµO‡k|:ŰŁžĘ-–ő Ćh]Í=S!¸®E>^>ŔccvJöă;W’3iĽ-•żśéJŇ;^Ş\bŰsóxą­fj‡Öş­=.\Ű‹Óíé|÷ţn¸y}3<~}ž~< _†űĎ÷żlß ďŢĽš z{čů5Ћ歵 —JŔ.­žzŽôb˝1@  Đ`hŁ•;5ŔĺöŘâбýbçKmŘ\  jRËĹĦ`Č]yüß±` ŕ|:ŘS ›ţo˙÷߀-{Ů[‚Ö_U»śŚm¶Ůf›m¶Ůf[ŽE—ŕ™Ú>5ř=5¦kj[Íř/€5ٰE>^vŻĹÖBŚŤŐJý[˝VŔ!­X4Ţ65ECÍqvhĹz¬ÖäWŠŔ®­žzôv˝1@  Đ`hŁšnaj`zhRŇ© L§ö‹ť/µ-•öŘ9ç´äô=MÔş§IcM€ ŔŐ­PŔšé=öđŞť>¬ĄÎSó0­Ů§4Ť%çë!đËO9ĐÚłTŹÝÔöÚµrŇ‘:_¨—ďy˛×’^Ŕši;ZÉX śJgÉ~ĎeĘc/S– ĐŞzđ§ŞkYˇ^ŻXúck;.Q^©ŕćrßńgÚÖ^˝ĄĘ:·ZÖĆ 'ő)ş´rzE¶l+čkŚS‹±`őí¬d‰(č*ĐÚëClŞç¤W˝N8[cz‚ăŃ{sôfĐj‘­ËTl`qIŻVęóŇÜRç mźĘÓśă´ćĘ˙T:[Ź™[ď©€fÜ›Ú^˛-7oăAň‚-ZĽ8ÝžÎwď×7Ăă×ÇáéÇÓđđĺa¸˙|˙űáóý×đîÍ«ÉdoźuĚ{ô˘ąG«—źÂëyvhő: Ă´Z Ťc´Rk^ĘYú%¶_ě|©m9鏷füWé~sýZ˛×_‚†Ä–šóĽk•IjMÉ–öYş@{긹ËÍ™÷ŇşČYO4u˙IMÓ‘JOŞbĺ™ZOł¶\€Zˇ›Cj-şŘŤĽvíşÚőéR7·Ú›ßÖošs?×XS±e-Ç–ŕ%§-ä?¶_íŻlSë]ÎH·\ sÜ'ćh©zČ}‰śš‹hVŞ÷l<±en/JíŰqNo^mOA(©Ëąˇň\"P ĺ?•÷ÔĂx­iFRçË)ËqobÍ1—ĘűćĂ‹•gެÖâ‰Xoךo|ˇóĺ qŚG{U"W0±|«Đ—>ă 'óQ㇠%ĂäD±1X¶…\^ ýuú‹f9ŽÄ±ν™Eöv(űKż®" íŇyÇ}Q%“ĎÁx Ģ1_éhś‹{ĺ{EPĄŢŠh W(büPńæŹëHß7`>Ű^wĎÜwäľ3ˇĐjëŠE¦-ˇEhűśżřˇć?ËA˘ľAŠEćęFgJg ČÜĎC>Ţ2ßô·…şĺĺT ú‹“UőhlŹý*Ţ{}é»P–HĽ¬ă˝7&pćO)X>úsmÖ®_ Šń,ŢĘ!6Cňh îjë´ŻoąčFć=‰č¨sůű$€‰4$ŹiĐusÎAJ˙b`<µaŰR·Ó(Łţę"s/{MřŢîă?Ż@®I¤ż5 ŚAŰFćaúA=đ>ăXĽ>*Ă\DHţüNW1÷Á5ŤpD…˝f@ Ö8rÂe2¤!é¸ dçŁ&ν–ŔµŰ—ˇFę+O–e-˝äQ Éc:´Q)ĚC—˙Q€”7>›®łřéŚc]=¶qᣍŹE®ÝĘca9‡Ř^ąĺó•»¶„ůÔ‚:޶ÍĂç>ŽŘ¨âř»Ą“ĎÂő ĂyiY-ËŇÍ&ô´} ě5‰…o Hßs¬µřˇf_ѡíS€`ŰąG6>ů"㫾Üő—®¦qy)!NýÇ8.ý~úA“/…±|Ű®»ˇą÷­˘ŞjËv“8őĆe¨wŽ«©Éq§ŽiŃ-ŕÔŻ.CU,~:‹‰Ă¦_ŽaţËÔhyž˝¶Y«~á§-˘¸*1qXC8ä´Ű©cl[BQĦ6mW®s3q$_Ö˝_ÄüçN‰Ĺ\ů}pćýĚUé«?űé«^ĚNëŽč–źýâä DDÁ¸ĂŤĎÎA‹*8ńR 7‹!QËçĂżf‘©XöŐusÉ"_0ťkaź‚čh Ćj BJLĆcžr®Q©ÇůŻ2›Ú§TÎOëHľěÔë…O30W˝Ű0~ĐéĂ'ŢĽŚ\Á€*”Äöްž™¸öĎó=ő™Zť^/`"îÔi¨ú8ÚŽâČtl©[&S ŃÂ! %4‰XôôCQ,|ľŚě ŃCz­ ~ŇŻłśnć1}<ŽŮăăX¸ŢĐŘ•ô¦§4ś{-Ű–řä«4&ăG4„Eç?Ę`ů–é)ÇLÝ.Ŕ(š0žÚČĺsśŠ85Çřó:ôCŽ¸Ű¶Dęv@ aŃ>ŹpPDR WÓ°×$GuLÖ0ťDňÍE„Cj­čÓS:–Żça$Žh8˙ó8R·r@HĹ…×ăPËWł°W-hT蚆Âwhűôö•VŢ\ϱ˝1ÄF5ľw,ĚÄ §ŽéřäË ´č†uüÖk ś>> „ś‹~ńzټٲ݄Ě;!„@qUâFÖŔŇ7§}šŁŚ:ÖĐç˘ÔöŤĂ0$&“qĹ÷Sk­Ďµ×6kŐ/â‡NřnË^Yř:Ť÷~•ÄąW'‘ű΂˘|ř×ŢűUrS_o×ÇR˙2|YĂÄ QŹ ÄF5$;ő“ľ[Ŕµë)č‡&qú¤Ţ¶?űé«^Lľŕä·|;Ź\Á€v(U¨Hëô˝ÄQsI×őç\!󩀪l¤[(ä`]7 iA® $Žj8˙†ó–ýÖŔŠQÄء(¤iŔ,Ö›“^O ů˛㱍g/´$tmaʧ±âŞD4*p右ČćMO%Vľ7Q\•űcő™™“:˛ßČ?0*ŁĘí-R«ęݵKXřË2 JśJ 95Ž ď$‘ÉćqůÓ%ľ[ÁÄÉ8bQyřMżÎŞąť¦Ĺ0űę®ç,;'˝Sǝƛ˙k Ë·sHÝŃđż_Ěbâpaaââ—˛VY _§‘y`"ü“0Â{6*"ţ‚†ř n«Ţ†¨„ŻlękĺÍËѨSţĚýD$VëgŤîVí€cE,~“F©,ś¶(ŁN“ęŢ‘<,âÄŮEÄřÁ¦§âHÓ‘<¦aázĆcôÔgjušÝ(wExKľÄPJ P0ˇ˝8=FlźŽĚ­Ô†‰c $¦Ä'tÄöG‘ągŐ*ŘoúuoÖż5ýÖŔôń†Ňśă‹mŘWDbP÷DĘĺQ_"츜bq×MYqYĂ&äž(’Ç´Š[ˇsµTéŕÎ#güE Ążç!d c‡ÔĘˤ‚ďľŇk›5ëţÚrsůĆ’ 0Í|ŰşŰá‘Oýrµü“‡5\ű—ąQ¶P˝P/}“ĹĚ+¸ř»Čr é¬ŮTt yLC:[‚\Hk!÷0Ťä1ÇşVC%äÝuŐg6n¤áź8窮đó(‹2»€™WO#}ČÜ\Dᡉx\CöN™lÚˇ8NŹ!ýĎtÍŮç'ýÍB̑Ǎźj›Ö#\ú:Źů˙žŔě« ‘‡--Ş`âĄ>ü,˙g8ľ›Qą7O!÷ŔńŮ,|łRç/; AŮ« yÄÉ'}żŕtř˛ż<ÜUQTś>>±ąĽĺo\—Y:Ťô=ćŞD¬b™  ŘĎL”~"‰öŻ«žßz-SÇ'ˇE•Úc`ţˇůĎRBÝĽďÔ†Ź7}ĎŔ导‡“ĹFnüy™‡EŘĎJĐö«ż T.ôL­˝/ţÖy±súťe¬<µ |ň÷?Ő8˘cńO3€câp(źü- „”¶}%6k×/Z¶e“§uo|óő⣏źxó,Ë)żPőÖůµ*×Z Ë· 9©c˘rÍ,|“©këŽús‹ľęUó_ćŹÇ Eüďçý® ţ|…GEĚ–*ĺÉ?˛^Á{g“Đ6X^×ÍĄ«yĚ˙f3''ŤEQ4%4MĹÂ?VśQ2µ°9dš¸ôűi\ú}o}BęNóáe›¨˝“k˛ö#%ąo ôŁÚ[źń¨ż_!T#†ąj {§€ńŁ0iŔCŽó»pßDâč$2· 0ő>¶đČÂňmÓÇ6?ş.]_˝faöä8f_ť€UĆu>0»ź~˙kç_Güů(âĎG‘}XÄĄĄ´§ż°¸*‘ľ“ÇÜ_® ÎOç>Jcţě8¦ŹÇ1ů’ŽKW35kŻVŰHLhµ7ĂNG˝kMBUEÇéEŁ ˘ŁÎ#|ţˇk7ó¸üÇj´l}Ľ…ďŇE„ökUbůvĺŤ÷áhĺ o‹ßdpůďiŃ0 EšŔŹ ™8ńö2ć~ÇdE˛ßűlŮy ®¶‰D›5ëAµe§¨mÎŰoąo:Â[}©fš6„ëčšéŰ.ággŻáÜ+’Ç*cbCU—Yłď.B–Që{sź¦1˙ö$âŁ8}2ŽK_e0˙›DË<–n® hY8÷_:&_Đ ;CÎŚÇ”Ć_ű—!ҸřŰD[ńýä«<&_T AQśaeŮo ̶ ó™ UŤŢgF&^žX/†gŰîÓX.ßÂ;űĘ Ě˝9_çëF4}c‡'=¤ Í }= {Ul4h‡ÂKŮ9Ľ÷Ć8f_Ť#˙Đ@ňí¬”N,ި!{=USÔ °˘8*o۲2öÓ}Wˇđ˛« Ů€´`•$Ô=:ëřx/Ľ.pęzĆóŃÂ^m~Ü•Ď/ŕĂŻK¬iBv+e€€fUtlńB †˙Ç* „ /!„ěh<}ĽŃŇk†B)Ľą“aíBH «B†ĹâE™•C!´x !d'[Ľ˛,Y;„2HámĹäDýää™l¦¶Ţë˙ iĚŰťă~ý(Kł´ŞëűuŢ˝¶M·uŰM:Ý–w+ëmĺ÷Ű7{íK˝ô…­îŹŐㆽO´Ó–ÂëĘŁťŹ·nÔCٵ®ě?ŤnŮ4â˘Y>ĺš<:ŮÓŤĚťŠ¸şŇ¨ĄYö¨AvŻs+wWŻ›Ň* ĽŰô˝BőűEËýý^'ĺிĺëçőę§ uý˘ĐuĐÇskĄÍp|Ľˇpý_R«m­¶u!{ĺS]nüíWZťwł˛ů©Ă^;[łú ˘ŽÝ–^Ëîöm\ß,­~ť‡źrnuývZŹýlçf×j»:iÜÖě÷Ł ýě Ťi;ŻÇLmí|ĽÍ¶»×W˙OK };]+Dő˙ :M5-wŐĺƲ¤o§kűőęĂ–-‚óµ;ďĆíŤuŇmŮZ×X?~Úˇ1˝nŇh…׹űɧUÝ7ÖscZýč“ŐţŘŘŻüô‘feňęĂýę§íę±×úi–ŹWx]ŁÍú‚WŰzß®?y]›ý<ÇÖ®†6$Ž%6‰źßý{ĄWá"˙j…66j»ónuL»´v"~ę°_}#¨>ŮL†NŻÓ~\c­Ęŕ· ‚ÔŹ Ďµťx•=`ÓĚ˙%ľ•ô­´·ŞÉ˙M÷Ďő>ĘH9Zä۶žĘmŇęˇ^S‰Öő^;MĂOÇ˝Ué°~ËÚɶe ¬O–{,gąő[=ÇÄT˘}Ú}*G«2řŃw?Ţ”F7Z0`=đ:Ç˙Wu5¸˙¶;‰©vé[é]wŢŰĺ|»)gĐçÖŞ Şwcm†ădđu¤Ź7u3UWá©›©@;ręfŞ.ŹÔÍ’Ç“-ËŇkÜé4óď4;ďĆc[ĄŐM™ü–ĄÓ6î&ŤV$Ź'=Ój•ŹßvnUć ű¤»<Ý”Óď1Ýŕ>ŢÝĎ:­Ç^Ęá§ ŤmŕuŚ»ľ[ßxŤ·ë·A|łĐěnVĆ‘‰—'Öc/ÍŐ%bŢ›Çň×ËĽ-BHż,^µÁż`¶đ{$O&˝˙zŞď…ÝĘĽŰ•aĐĺŘîç6 mą“Ďa§ôÓťĐOĽ™xyb}ü?ćëVćţ5‡ĺ«´x !¤oďÂźÔ­ŚďJe¨$„ţ ďOC?¤#“ÍŔ|fîş±¤„2H8-$!„l…Ĺë…Ş¨=ą"ýcćµضÍ6b`ŘIÂën\2\,]]b±°lcčj „ałx0ţÚv€mDŘhńBˇđBČPęęr‹eK_/±fdćŐ™ŔŰě‚+›}`{ oÝě=e`îý9Ě˙aŢ{ąÂô+Ó¬ÝXţfŮ×ěIÝ´ŮY°ěpWĂüć!\ë°1‡¶aŘI®†ęÝUJŢA‡ÝňŮFĆ7šë0dYŔ(ęΓËoűR¶jžR†+ÖÚFžuON}ČßÉ; 1G8–€ž‚(}m‹Ôí|Ëí¦]‚,1%Śé©řŔű€/Ę@á± kMbě@ ŠlÔ„üťËµ˙K n‘ÉcçúÖ6ůűLÓ†R–i ±hoýáň—)$&tčĎkµş3žš°mĄrÂ+„€”˛îŽZ]&ĂA7m¤żfş/WÄ‹·OcůăÓ}ßú<řjRZ€´r é›ý›3Dmrµűi ć­IčÔý§ ö%ű"ş10- ¦6ą¬úľ0 OK[ÖÚQxlÂ2‹°ËÄúÓ0{śŔˇîXçĄg9dn-`rj6Đ¬ě˘ łhÁ4m(Uť …‘˝ł‚’”Т@±h`úçÝĺ[0L¦  Ă\µ X•6čxŻ\“űĂćßź÷\ö:†ôniôĄŤ<Ó‘@ن\+f~w K:…éßôG| W7.ŕüŁŤčŃÉW“őŁŮ™ú°÷^u.k1Ş#ŞhPÎ@ł°ľż yϱ¬´“FßšÓ*ćj vE'…ëϵÜ{?é©x‰ÔŞ„ů¤„€Ş@‰ŔŻńRą^pÝ„Ué› Ht)ľr͆”%”Ö$ě5ąÔ€Š¨ŻE ŁT”°×dOíˇĹÂ@°~(alżŠŇŹ€RĺRw®†ů÷ç!"˛R°n“ôŹ®ÚHÚ€4ťPPŇ„QÔ ÷U|eťĺ«Ż°‹i÷ćú‘ŕe–5çZţ+(Kľ®¸6”1¨{Ĺç˛)m×µžÄ7u§ąkA ęţp“ÚŘâ>ĐÔbA@–=k7Ç™_˘>°®†’i@ş¦¤U÷ke UŃľąÄńÓç—ľuB„kŁ;¤T ¬¸ą$€5çW–ťR9€íŢ!¨{Â(ýČr rÍÉŁ{owĐÉŁ“uË™;_Űü¦Ń¸źWúŤűwR&?ĺňJßë÷zw>ÍŇďIÖ|¶‘-U@Ń)K ,!Ą{-†Ą?ťŞí·ü?§_[Ş›, )m`­ٍŐÄ>0Ëúˇ Y–FL[…,f*˘o@ÚŘŹS0n;#qTíěµX×⛺SďZČ|_BL ĂX-ÁXíńɦŹ×iÓ¶˛%LłčĂ ‰@n%a5¶ÉµL@ę~ (—jub™n©nÄWJ‰Řˇ1”~°*J [Ž/9T±´C€9ŰDDB„J(®őţ´Z˝Ť«á€á·“)ŠŰvîsďÎADDmąŮ1ŤóűNť¬­kµ­îŽĺs?wŢîX÷ŤC˛:)“×ńíŇ÷*câX˘iÝř9ź Ű¨v¬ Č5Ó±ąĘ% lCÇ$JÖ PvŽÍ>Ô XÍłÎĆ+ŰkÓ„˝«ss$˙{ˇçürya!`,ܸó®Ý€Eŕjő†7Uq łe q;ŹůŹô@ÎyňP¸îB”?V¬ŻF7A—uÜK°Ö,¤ďĄaŻ9űhQ ‰—Á°`Ż•ÝĆŘX`} ™P©1 ÖjL~T%¶á`ŮĄžË E% €č¦çŚRÍR­ tOyąĆOŰ«ăGuhÔÎ-^۶1˙ÇyĚ˝;繼•T…°™¸‘f+ń:m#YŔZŲ U|w" QykíßŔ,±˛ĘŇem—*–ÓÉÝÖnę/ł=‹oŃ”?‘ČÝłđÖ»Ú> ĆSÚ>Í3ʶY,Ŕř^Gćv!°sÎ=)5›ę†­ęŮ|¶&ş` dňÄöj(6”`[€˛P*KČ+Rʀıń®üŃ–±ńDˇjZMüÔŃ(¬'E ´Qg"ŢĆ.E ×uéXĽĺŠŁ§ÎÇ.qý¸n¨Ę¨€ůĚîNx«wĐĆ;Şk&X­¶uł_âÚ Uk¸ń×뜂οÓ6’k†#@!ŐűY–€P  ”~0y˛‚&ôö¸iŻĹ ĄUomCB(/;7¤”mdżëÝâ4KČ2pęµ1 ´R9WQ/şĺŤaLÎŤ!ŚÄI­ăĽŚU×B%ÝńýŢâšůľÔ›¨ôŘLŰ„“‡&aZ& Ź (<-Ŕx*ˇ B„!~”JNZ€ŘăxAµÖukb[.Ő\ Ö“˘«MÂPG«ˇČJ•~ŇKß“5aµęž\ß/‹($Pxd@?ëŢÇŰ©ĄŰřČÝĚ2őka%–­Ňé— {ťS?ňňŰFŽšB­‘ e B©X„ ±}IČŐ¤˝ˇŚA„DĺeD—¬őÖvµă«: mç2łí@.Ë.!¶O­ř)Ă@9\ű­]ze@®U.Â#łot/úU×BĆ(ˇäqŽŘnXşĄ>řx;ąNĄ”Č2ÎŁu¨"AeŔZ“°¤„ „«őDĐökĐö©]X‚îŃűPŁŠËň”°lY]Ů»üÇú›Ş(µtK5ń‚z͙ɛžë—of:N¦Ś*°W+wĐw*wÔU»ĺ1íŇěřXŹýS ¤oĄ›뱾í1]–eÓşfż­ţď´ Ý´‘ű~o€=„cS„THl Ł“Íyń¶šĘc˝‰.*/Ó\Ö¶,ĹŞę‹p٤‚řŃ@ĎůéqĹQż˛k­ňk;ćeŮ%V$ŽĹ ză ŃµĐx9ëŃpýş‡“uÚtMGÁ(8~m!0~hÜąi<0 D/ŤCmöR­‹ňJár©Ţş­EázsnBŘ6iŹuT*ÉĘĐIÔŤ˘ŕ´yŹç7űj˘ĺöŽ?¶WmĚ4ßty»PÝ.·ű¶hoĄK«ŻmTÍ`ŇvýZ€Đ BĘĆŁyYBÚ+˝űyíÇÚ~–qÄ×ÝůaADĆÖNC?2 )Ťž,‘°cě`B–ĄÂ|Rů5Ë ŁôCĄTX?¨°ž©Lhz°´\ ňGçĆ‘ůľTű+K0*ÁŮYÝőÉç'‘'?G"ž@©\B¦B&TÍE·—ú©X¸ęhőO@Uśżj!¤Kt»§T}‘Yµž+ţ^!•?'Żz—DźĽ]ůŽŢ™ŰtGm'rŤbäw[uąŐ~~ň­ţď7o?‚Ü.}?é¶:®'˙^‡m„r Ą’‰0*oq+«<·án QářgQ6 Ń˝/}łPą $Â.kS”+ŹhŠ^{<˘â Ýĺ§=Ż@„…‡#Q*9˘hŻ–°R°a|'1űĆDZłÉµP´Ńp-ßęxŃęËŮ‹ĄPТb2†ô4ĚŐŤÇdkÍ„”˛nއ`/¶d]źtzÉŕň«ÝťŰ{©\áĘSOÍšMžS¶PxÝwĐfŤ™{şQŕ‹_¦0ľO4µ[_ý˝řÍĽq IDATeŞiú^Ozno%f^ŰËě^î¤ě^ŰÜçáuNíňęGŐ Ż HG‡śN)ŠË°ź*P$! r5űq bß4ę^t“żrF)¤ţ: HË×)śd(1ŞC‰&k=T(:DkEÇ/Ü©›AwľRŞą,ĘŽOÓ˛ă‘ðW%fßĐýĄ€ î2Ź)aŠţ^ś9˛ˇă> $K0WM@r"‰ě,J˛ĽňTÚŔjâţPEicŘť pŤ˛3ZAÚ•ˇ“Ťmćv÷Ô|Ý[$ĽîqlŃhŢ㗹đö(ŁJmąĄż«CańÓNóZĚŞeę‡Hú­˙~µQöˇ×K$ çĽí>DĹiŘŠĨ@7žł"ú°*0 `-‡âš etb4îľm@(‰®ňŤEAł×$¬g%äďI¬<´ŔĚQ$OŞŽr$łW ÔíZh†ÎPŃÓSc·wż®ÓjŞ˘Â(0WM(Š‚JÁ?z—ĺ†[ˇRßUąużh?z˘«kÂKěëć¬m~AťŻ_8çôaÜrÇz^,qńÓ‹¸đöĎĺ čDt;čA”i+é´Ťo\n›¦([v"˘;Źű®NŰ+ޢ/ŤfŰW€>Ą;†ww„ăi ć]ą¬íy“ ’˙©!E¬š-p-rťVęÂ\5wĆöŹ! ÷ˇŽęG6”6ą7a\îéĽTk,^DÂP ŠŞBD„E¸/%éŞË]xű¦;*.oŁ Y6ČXý#YŹř})ĺĆh‡®ăĆ×Ć«¸đîbDß|w[íZ赨ńCqäŤ`­Ő·Qż±mËńUC@DÂŤĆ ö¨PáÚ7·B÷Âëq‘źqńĎqá×ÝľSŢú6rdj¬źzŐâ‚é-ÓOţ¬y[Z}"ׂoß^§cűĆ0¶o,řňÁí>H ´~ÇO ®úańF÷EQ|ZąţúBÝr]†ósÚÝ€ß6"ědkčÜÇŰpőşŁ&:ą›‘ŔńÓF„}€l]Ĺ\kl<6ćđÁ6"ěŰÜâ-•K¬©!‡mDŘv¸ĹK!„ÂK!ۆ¶®†Ą«K¬Ą!‡mDŘvđÎĽ6ĂrŘF„}`‡ o«Md8`ö&ĽUrŹ%kО+÷—ąWMôýEâp”-@¶„Ą«K|ś&[Bú~±#A\xůHC†ő d»Áád„2`B¬BČ0˛ôŮ\WÇÍĽ9_9ţF—Çź đ2,$Gë\\vą•v"ÖîtŻ|>ŰŃńgÎ.ř*] „ ôý"–®ŻpąOËýl7ż˘gáMKÔýő’!ťpáődÝź{˝×˙A0sr¬n„—]Ţ-bń¦o§kÝ húv÷§S´w/żLŐţÜëhůnŻĺN\ Ő_÷ź˙ăo´\ŢVÂŰJ -áfֱײ— 6ßřŰ.˛;,ávVr+ëąiź¦eşĄ–nU`«Ç]ůüJÍě'­ŞČ6űÝÂ[żŞ%ܸÜĘ:vď×(ÚîăÝ–˛ŰböÚŹ Ż'kÖqŁ;ÂËr¦Ą;<>ŢnG8Ôą‰\ŁÜbŰé ¸ˇ^·uéş^Ý˝¸-héî1mg©¶łx…¸ĺĹKKuŕ–o˘ë%ľUŃÝŠŹs÷ńćGë1MŠďîŔŹĄęg˙NÄ—–ę`}Ľť)óăn¨rćě–ôŰ=śŚâK:qúx‡ÇŇ Z|›ąvśŹ·™zą%Zíçw};ס°6~VýŁŹwxÇń6Šď™łg:rCTÝ U÷‚{yĐŚLĽ<±ţÖ›oA?¤#“ÍŔ|f"};ŤÔőŤ{,‘8íë$9IŇŚÔ͢úđ<ąđ‹łÁ|Á¶ôŮś§Ą[ÝżŃbNß/béł9\ůüJĺ˙űp˝Ži6-d/ł“mą«–)Ův.,ZŞ[6Ž×˝˙V}u6p‹—qťČV1 /-ÓÁÎŐĐíh·ĹŰÝńý·x;^B¶ĘÂ$»“nu§Úgz=ľ_Ââ@Ů©7ÝaŐ,ÎNF!Ć·ĹkŰ6Šľ#„ěúőnÁ·đ*О­žů€7 2x®üžěě$úĺŞŘŃ(fNޱç1I˝É΀>^B0CmńŽŚŚx®___gËB(ĽýŮ+źoŘ3gGŘj„mÍP¸FFFpĺóőMAĐl¶© cqu[¶Nć’í¤ěťÎO;Čú"Żah?B¶Ěâ]ş•Gú®HQ13ďĘĘmgÉö"ÄŤłN ‹č6–©“9eűQ†nĘŇé±Őí˝äôů˛­,^·č@ú®…Ą[ůŽŇX__oű·–gŁ8{-7ۧťé%^áhšĺ߬,AX÷îsh—~ăůzŰŤŰjÚĆfm×n}cŮüÔo§y2‹·*şŐ±‹g>H#}×ÂĚ”ŃÁúú:Ň· P÷ę0ÍTU‡ő¬!tŘv7Rë8‘éÚęu[Xî_/ ŇŹUäާ•ĺ: ËŻ…Ů®^Ú­ók©÷zÎť¤×¬®˝ţďÔĘî$mBîjđä&Ž[MXˇîuÄ6V_ŃaŻ:â+× ±zۉµ+r.D?ÂŕW‚8_w>Íňí$˝v7śNoĆAĄMH_…7qDEú®U÷•XâÚŃŚ@n«7˙­óYEtí ‹Đqĺ󕾍hh´bz˝č‡ż˘Únżnęg«E«źíC+—ôJO>Ţ™©8GÔ:ŃíäĺZ#ćłÔ=.Ń]+!%éüB„)~­Ó^ÄŞ“ Ž:÷N‚SĂŤ‰ˇs5ĚLĹ‘ľ›®ýß U«7“]‡eUÜ Ď PG„ĂĄµ®|±Ž3żééBó#Níü‚­|ÄÝ b«yČ"Z´®~lók…B(ĽłS"Z Z°„l/†ĘÇ»ť"ZBČŽq5l§íű-ŃVŰĽ¬X?ű7ŰŻÝzZÉ„PxçĘçëśŢ•ŕőÂŞ1 bý Ň%„ěWCěÄŐˇaNBhń’¬ŇA§Aˇđz2sr¬çůx !dXá´„Bá žf`BČV@Ż~öÎDH@–eÓß˙ýh†Eˇđ… ,ľ? YĚ5 ©˙ťűó2+‰âúx} ˲ \şe “Í_žFěŃ22ŹŃ]|'ŢĄřB(ĽZĽć+qęéE ŞůkG%’É$bSo!};ÍŠ"„PxB;¤A¬qŞx bß %@}”‚6*pńăKXüŰ%śůkvWŐKăÜÁȇ ď.!©+Pož‡80 @D5 ˘BŢ»=b#¦Ŕń˙>1YY„ oŻdŻ/cüŢ”“ ô˘GgˇĽt bźŽRYB]Í ±Č=(ŔZłş¶ć#E4‹2ŃĘĘô™˘]Ťfů´Š¸Ń‰µęUţvçNČNŁZ‰î7 Đž¦Q öťE€¨ŇĘ@8˘BŢYöM"ń’Ž|>ßU>ŐůÜs14ŠŹźh^izíßIÔŠnňn<Ö}N^3¶µ;wB(ĽŰ?Q4~¦¬=­Ľ0[5j뤽ٝP*1(•K]•Íď g^bÜNÔÚĺ×­ĺÚéůůuÎEA(Ľ;Śnć~ţ·cĺ.Ýô(`ŘÎ{µh°Ą#¶“űG{u–¡pßĘßh™v*čΛŇúx}°°´„X¤"ş `W-\ ¬ëŹŤ éŢâÝéĐ…@…·cŞăx/}±[§ô”*ďX̉ď&űlńşý nËłŮcĽ{˙N,dŻcšĺíÇ-á.Ĺ—]ćjčY–E€ą7g‹˙k¬#ĆöV‚j>íŢÇŰĚÇŮÎÚíúV4zIËďyôz !Ţ]dńNż»€p(ŚRąTűMüf“żŢX‹ĹXY„ oÜřă4+ôńB…—B(Ľ„B„>Ţ6|ř§}í·ň`o˝ů`âĺ V!„ÂŰ ďýî=‹…¦ŰoÜĚ y<‰‹]¬‰/!„4®†€ŽăÂ;°đĹ+B‹·ß,˝ŚĺŻú‡B‹70ŠĹJR`ńksż¶±ňŔ†Ń`­ ,^ÍăŇg—°đĹEĚ˙q–emY9wóç¸ü™Đâ"–n呾kaéú GTĚLĹ»JçgÇ– ”óPöưüÎ),쟇Ň‘ş.‹8¦můąöňim§óěĐrJIB‹wE·Jú®…Ą[ÝMV.”H#uŕ ł/IčŁďíËŔʧ{ęŻßhÍ&żńÂëřv“ßôŁŚíĘÖęŻňv{î„Đâ Şč^ů}pć4Ňw-ĚLužVro§``ó¸&S¸üŻó?vËă¸t§„Soc˝µŠágą]š­f2k7 {PeôS¶nĎ»Ós'„Â;(AnŤ˘ĺdé8}+ -¤!˙] óĐq— ăţRß\˝şáĆč´ŚťDŮč6ŻtüÜ`ˇđöHâŠô] g>H×­ë&…ą¦@D2ŽŔ¬§+Hß¶!Ę%Lż2śçż&¨2·šŢ’âK(Ľ}Äy‘¶áçíĺĺZ⨊ӯF‘<©#ý§Â$TÝ" ⇧Q,ěMŰHÜ)ľ„ÂŰgńMßM»„¸s˘Q'N:˙‹Ć*ŔÁjZ˛gŃmŚöŕG4üZvŤűµ[ßĘÇT›mó{níÄłY:ťś!Ţ! ŐŰ»#ŠÝŤ"˛DĐéö™ÂŹhv˛-¨ňRl …w‘żźęňąăŻB(Ľ;‚sż:ç{ßěÝl Öî ÓTúĽ9˛K„wćäXW#gf˛÷~÷{ !$08W!„Px‡źf`B…—B†ľ\Ű"ňß:#%Ěg¦çöŘŢ ţÓ8+‹ / ‚řOăHß2`<6aŻfĄĂ)-Śż8Ž™źĎ°˘ŮĐŐ°…$¦4čud\#Đ(ş„PxÉÄ÷üoßB.PÂäK“Š®ßĘzťŁ¶“|ˇ«tDP-ęÄ÷XŔ,˛˙—Áô«Ó?§ 'Śá4„PxÝ*Î˙ůŔÄ7q,ŃmeU6~^ěŽćĐn2?“‘{Ąç§ś^é6űşńüüLžîwŇݞxC…w@ŃbPÖkcxśF‘ňšĺËo¤/:™r±×(ť¸.ü¤í§ľˇđ‹ wŃÂxj`éÓL|˝őä Ä?»‚ÂĂěă ńqL˙óFß„9ČýúUž~\7çDź4ˇđn1AF´(>Îbńz ™§'p>»‚TbŇ(bú×Uúv~­Ů#z?­ó~ \·yŃĘ%Ţ-&ČŃhʨ@.”Ŕ‡Z—&LجIŕóŕőŮ-±đ¶“%čÇ—Më–PxwřöŃŠĹ"˛qjJĹĄś^3 e Ú±DO­ű…PăKĄn˘W4ú˝öń:ľÓHťÓęüÚť»źsę$"!Ţm‚şGŕňßrЉKqęčěwć ž°o¦ OöěNč62C§QşŤXá'ożiU&ş…w˙©í`Ţşµ€\ŢBa ›Áä§YA>Ü˝ cĐéBáb&^žÁÄË_¨>v|şęń$˘/\a ČĄĐ ď6ˇ:Ž7HôßžgŲKŕ\ „BáÝ}0˘!^B!^BˇđBˇđB…— €Ô7Y\ţ8Ť1ő-<§žÁ™˙Z@ę›l`é÷kţ‚aśs5 /ń…ń¨X±.áßÖÄ_Ňpá—‹5QNiĎ!űź§ÖÇú&‹´>†Â;Xqt3Ď/!ÝŔ(vÚÁpMh@BÄ»łŇ0ńĎk°Ż§Přň"ĚGäÄ)čX…­"9ř‰üĐ,}Żč^‘ :‰Tá·¬îôZM’ŢŞͶBáÝ!śűmcę[¸đËELVgK+;?ö#ÚYçSdĺdćô)ÄN&1ńĘDעë7’C/ÔI>ťDŞđMÂkvµN–i- ď6ÁĎG^®Ź©oáÜ»Ó8÷ŰDÍęMßlîăŤn(t*D^˘d¤ŠNÂuSfwú´v …wé&ŠE#©o˛XľşR[űb°ď9}ńę˛ă†0M|í÷ď Lt°ű19E‘l|ą¶ÍąřĹiäďxnĎ,_]ÁôkcHźŔĺŹÓŔ§‹0ď呝>…Üűs4ŹÂßPřü+­'s§°ZĽ¤)ÉW&|eŔlÝşݬÔíŻý¦űYĐZ˝@j¶ÍO” ż>WŻ|;-O«cZ 'ŁQ /¨Uč÷‘ż“~#Yt»>´‚`A] „ ş…—ě kśe#^B!^BˇđB…—B…—B(Ľ„B(Ľ„Bá%˘ß(‚dPÓ%6~˘L…—ĘvŠ@ŃËGÝ hĐ2PČ …—hB­D ˙č"ÔŻ.Â~dŔ8ձЌÇÇ7‰NłmŐĺfű7îç•§{[ăołr¶Ëł]y»-G»ĽýÖŮ=p’śmÎ "PřŤěŕgą]š^ű·›b±U?űöRF¦ ŢmĚ0G čf°a}lď$şEĐů12ˇđADź¨Šî°E čVĐwc9…—l.~qËWWđÜž3HźŔôkc€Ë§ˇ}şóťYČéS°˙hůwć ˘ĘPo?öÇyZ»„»DŠN"/řŤÔŕ7bEăz/lc÷NÄ·×r02ˇđ’>Š÷‘ˇ—t[E‡čwt F¦ ^˛m˙)DŚLA(Ľ¤«tĐi°>ÉN‚PB…—B(Ľ„B(Ľ„˛}áË5śz3!¤”MŻ}–dEB(ĽA!„Ŕĺ?$€2 ťCáÎ|í×Zć>Mł’!ľˇ«Á'– ¨ę ŮyäŇ"÷ŘÝËHŕôŰ_B…704MĂsűG`ý°ŽÜ#@®É7®ˇř 8ý_ čGçľµőÂ;ĚópJDB(ĽaţýdęžO ŕô«ÓPö˛ ,~9Ź…żÍăÂÇ…--çv›˘‘ /iŠ”j¸’ZÇ™˙,§˙c“/ _ĆřA ˙ Â÷ť ďvđĐiT‡fůB(ĽľBŔZb{€Ĺô:˘*păÎ: Źóg§aÄD"$ş¶6sůśçĚZîmŤË­fâj–făńnKŮĎLb^s ´‹Ü@©g׌jč6ÂŰâ•?QP`ňĹäľ_‡”€˘˛,w ‹ű Ő<˛~f#„ě2áí5ÂCŐâU\˘[’ŔĘ÷ë;4‚?Y‡-ѵĹŰ/(‚„ĐŐ°m©YĽUD7¦vř÷“u<·±H÷ďvŔ+ŚB‹·ďT-ŢË_,cîÍiü,>‚\aQx.6‚őuÇßŰ‹Ź×Ż•şĽ".Đš&„Â;‹wî×ÓP"@®°ĄAtc}đńK„‡ ˘=P¨ ˇđvlńž~g"$ ˲ö;ý«8qvc},Ű27ĹŤ ďŽbńÓDßŇf„Bv|ąF!^BˇđBˇđB…—BOvŐ¨†‘‘Ďőëëëě „ o?DöĘç›öĚŮöB…7ŃőYBˇđz°t+Źô] K×W8˘bf*Ţ••ŰÎ’Ą0B(Ľ.Ń­âüźďH|ýřk›ůzýâ5ÉLăě]îőŤűB(ĽCCUtŻüŢůD÷Ěi¤ďZ™ň/ş##ÎÄ5é[¨{ufŞŞĂzV€:l»€©uśHvçŽh53Wă6ÎâEŮ®OAn=˘Őçę^GlcńöŞ#ľr­ű ”~#1BȶŢÄé»Î|®[×I ·Ő›˙V‡ů¬"şö†Ĺ č¸ňůJ×#8'-!¤†ęŠ™©8GÔ:ŃíÄżŰů¬uŹKt× @HGI:ż˝Ŕh „!ĽUńőúżŞVŻŞę°~pÜ R (:€Â(pĺ‹î|ĽŐ?żŃ"îś2´®† ąňů:&'‚˙8˘_Ń"!´x·=ło8–Żź?BˇđBČf(] 3'Ç:É@!´x !„ěnámö!„Px !„ÂK!$hB¬‚îaD B…wŔ"Ë„ oEwX'Nçd=„Px‡ŽťŃ‚˘KČöcGż\óŠh±t+ßQýţä¸:yŽ{"ŻIušM¶ă^nuŞĹ†č2Ş!´x f¦âľŁ·ĂrĹoS"Žč ˇŁTs3ôîăm ˙žËçšşšíOˇđî:&Ö‹ř±žBáÝÖô#JEŐRĄpBá%‚‚KČö/×!„ÂK!^B!^BˇđBń G5ô@ł±¸ý.FˇđRd±9Zś9;ÂĘ"„Px]/‘%„ Ż˝DŚp[ąí,Ůn…ą×ů8ź!ŰŹýrÍ+bÄŇ­|Gi¬ŻŻ·ýëE4Ýżîő^Ó2V×7Ç) ˇĹ;44‹áwv±őőőZ`Ęj|´ęşîh7Rë8‘ěÜá5KX㜸ÍBö4;žBáNA®Dh¤UÄj|´XE|E¤2qą¨F‹/ –"K…w[Đ,bD»<ͬŢü·NីĽíĘç+Ťhh5e#Ĺ—íĎŽöń1Â|ćÄGsG‹@HGI:ż q˛rB…w(Ĺ×ë˙N¨Z˝ŞŞĂúÁq7Hé§ GśP=WľčüE[ŁV—_°ą×ą-^ 1!t5ěX®|ľŽÉ‰ţ|áőŇĚŻűˇÝ6B-ŢmËěţ†–ńsaB…—B†Ś]áj¨Žă%„ZĽ„Bá%~hö!„Px !„ÂK!„ăx‡3g<×_ů|–•C…—ôJł°AŤ3śeď-°˛ˇđ’ D·Ů‡Ţ!†ü[ĽśD‡ —ŤTçřµž9sü›e6łŚ›AŃ%„»#E·&św-ů®Ĺ×-şfĺ7u˝~şÉNiś<˝QŰMĽN'„Â;T4‹h‘ľ›®w řüRÎzćŠj±§>Ş Ăęq‚őfÔţ„ ďđtĺ‹v®»E×|ćL3iŻ:sű:Q-zźă·qĘH÷dę^âĘ)& ˇđÍ"Ztëj¨Ćo3ÍŠĄ»Z€9¬—ĘÎż˝Š®—!¨ý !ÝÁ(: čŐ ™J¤>ŞĹ†čę¬tBhń’™©¸ď(Ĺí°\ńŰ”#şBč(ŐÜ ˝űxŁXäňą¦n†fűB(Ľ;‚N‡‰ő"ľA¬'„Px·5ýRQµT)ś„PxÉ€ ŕ˛}ŕË5BˇđB…—B…—B¶/;ňĺÚ©7SB@JŮô÷ÚgI¶>!„ÂB\ţC(úŃ9îĚ×~­5`îÓ4[ž˛eěXWeŞ:‚BvąÇ@ńá‡Č=vD÷ň8ý6Ĺ—Bá MÓđÜţX?¬#÷k@ňŤk(>N˙WúŃ9¤oíáĺd7„Px‚ař÷“u¨{F`<$€ÓŻNCŮČ2°řĺ<ţ6Ź Ř!Ţ RBŤWRë8óź#%ŕôŚ`ň`áďË?äQřľsá­ZăńqOk˛şľq›×qÍŇhf­6N`Óiz„ oßBŔZb{€Ĺô:˘*păÎ: Źóg§aÄD"$ş~|wĎň嵾q›{{ă˙Íp§ŃlŇňNŇ#„ C;ŞˇšÍ"ňÚL‹ťßěśpoëŮĐ)Šo~RŐś€TśűnYRo‘Ü}°řüâŁő·Rž Ż®t äR»0ľú/éÎ č×× I¶¬Vł»ÉVVĘXŇ7,IV¤n®ýčĽv~łs"ÓŮPŻŰqOHD6cËĘز2MY™Ţ}–š˛í¦dKv+ŻC;Z,I'ź_|ôŇßľót€däNJ…“Mĺ5Żm۲[í°×ĘX˛¬öN»%5l©ŢČĘn÷{ű?^WF’šŁM¤vW¶Ýtlţ‰˘ćž,J™đc€( 9©kʲ$µ¤ĆÆ쇶¬“–¬L» n¸ˇÂ©žšŹ|ŇVĆŇĘrQĄo4g˛ň†­ÝĎęÚÚ®uăňqđó·Ž_‹FĂVuŻ®­íýĐč~±ŢůpOű÷ë±ôůO˙°$Işqg_µ˙>ŚĄO€¤ź¶”Ďgۉń† …˘ž[eYGK*di.3'űaV §sÚ˙l_őŻ* *ÎIšŞĽ×.#I‡ęM»%ůÖęs´Îă°ŃĄ¦ę겞V['-]űßKš{˘]ďý®&[Ňâ·ŠZY.jţT^WŢݕƨ@–¤ÚŞ}y¨üy-<3§•ĺ˘$[ëźÔbKÍk_6Ôhjk»")§Ü…ˇű,>ť“$}~ż¦†”Ëĺ†î …ĽĄâ_äee¤Ă?Ę:iiţ[íó/WÖµű«Őî±¶l˝ôĂŰúüćyٶ­ýĎöĄ–”ÜRń)i·RŰvx±i·lékŹ­Ł˘¸]$Ű*«©úiUK KzýŐIŇÖÝ}Ů-[ç^\ĐëŻ.Č~x¨Ę§Çßühۇ˛ZZ‰p^+/őúĹv˙;ż­éóÚž=5'»^ÓŤ[űzĺl{n[ŰűŞÔUű˛ˇÝ˝]={Şí0"…“YĺN¶A»e+2ß-r«żxIKw»[KŇíw—Tű˛Ö>¦Ő®Í,ËR.cÖ¦í÷îEX¦`·š˛u”{ÂÇSäv¬Ą©ý$ŐeťĚÉĘd»mľj˙;÷DN‡>ÔśŁĎk×·´ţ«Ş¶ľ=Ż_˙₊Oĺ”Ďęđa^«/¶ Ŕk?ŰŇÍí]mÝ+ę׿¸ Ĺç攵ęjÚG…ďűnéÚ[*üEQź˙çëRFĘĺlŐŘÇîźçtíçtí˝ŰÖ>Ü’2VĎąż˙QEWßľ)ëdNRVëoµ ×őŹwtĺ­ Y's˛mé•ď.č•ď–´qg]ąÜńĺvËŽt^çMń{ăÖž^{s]–•S6›UłŮTőŹv·8^˙¸˘ęgueż‘Uöń|äďŔ¨X'-)st›¶f«ŮÜţú˛ľs©ýđÍ·Jj<0!cćč+keĄV3°Ö1Ë*Â'dw’cGaě^NŃ=FM5[Róë¦ôu´ţĄö›Ůr9K…ąĽ¤lO»ą'ŰEěÁ†Ô˛{öŐ˙űPůÇ :|ín+ä,Őľ<ě®_^űŃ9­ýč\ĎxĹ',Ut§Žęg5ĺóEYGAš‘쇇’ĺźwÖŰ_Kő†nnďŞúéľňůbĎ<«;ű˛NTx˛Ř>§ąöÜö˙XënŻ=0s›Ë©ţU]–ĺ±¶¸ĄHçŐéżú»Ţq˝–ç/Č2çőű0*¶mŠ[5»I°ł8~é‡ŐîăŐďjăźź•Ô.¦;ÇY–eÚzŹa©[G»•[÷>Ë-g!|Ľ(îÓ9Eč_’¶îŐôĘŮy­,/čŮŹŞŞ´ŰÍ?SPůĚI’noďK˛zćüě©‚v~ßPqîčNĐő ٶtp`knÎŇ;×·Tu­ăÝ˙˛.Ű‘wÓn×|Ű‘˝˙9¬RŐű7ŞRĆę^Ł|ľ(ËĘőôe·¤ě7ŽćŢ™Űü7‹’j˛íf÷jť_ŽŹkŰv¤óęłô\Q›˙U?ę+ŁŢ%2™đsHSýÁˇ¬LQ¶Ő®KťĹńęŹw%Io•d™ççßü\›o™Ą˘™ö],”iľ‡_í{TGąĺXËܱ˘[ŰGíZ˝E±łż¦iĹÚ‡{Ý7¬ýúß_ÓÎdIZxfNĘ´Úź|°)Yůž1^żXVńé˘Ę§ŰÉhíˆŞ{5Yůy˝÷ńž®}Q^.˲öÔ°Ű©ěâé‚~ňAU·Ó[X6żÖ±;Lxmsł2yeźëŮću]ť}ÍmQ…'rŇ7,­<ß>‡÷ą%Éňí#Ęy˝÷Ńž®ý`QŻś]Ô\aNu[Ĺb^ëżú\•˙WÓÁ[sOXşziU»źŐuđŔÖú'źź(@ ök¶m)ŇRîd®űÁ›o—zŻţ°*˲Ôh4¤–Tř‹‚¬ŚĄýZ=°öčFcÝwř9Óâc)r˙›o3'[Ňţ—Úş»«µ_TdŰ’ődozíg[Z=ł ą',íýţ@Ţ\—d)›±tăÖçj<<Ô…ł%]xyQV¦}džęg5íţnOú:úgmÇíĆ­ĎŐhęÂË%•_—%iďz˙?*ÚĽS•uŇ˙vmQÎëĆťĎupx¨×ţz^Kß*Ęz®ý‹Cí‹}5›¶®ý¬Ş×_-iá™9-<3§ťßč˝ełsľă¤a˙‹†ö謁XPńTQ{{{šĎÍK™ö›ďÜnP–ZŇáaűłćź™WöUů]đ§=źX|~ńŃAöBřŚZ¶t¸ĄĎďm¶+pŻ˘Ř×yĽysSëwĘ梞wWóϲíCu‹ěŚu,ťýÓµç˝zé}U?k´ŹoŮíc/*›9*|›Í†l»î¸G˛eŽ+(›±třŐ^{ëɢ˛Ůö˘\ŻmnÝc¬Â±äŘó8ŹľŽÍ-cµű3ÇY–ôů¶ĎőĄż{G»÷ŐÝv^~ÇXůöői6˛Ö{®s>ýC[Feńą‚Ţůa٢{Ş˙w]ĹSĹöZb‡l&«Ă‡‡ŞŐjj4Z\\Tńé˘nŢŮ×Őë{˛z/«k®–7[¦ĂVoQ,u–ôޱbŮÇç‹Íă‚‹şl6ç[ŕJRţÉăĽ×¶AŽ ;.hnľ[Ňâ·Űűmíî×%ÇĂÎ+ě(íĆÁŢęÚ¸»Ż×^^Đ·ڵUí~Mů|ľýafć}TT˙Şý‰ÂťÂx˙Ź mÜ©ůĆýÇ-©ŃhČ~ŘčŢc®˝˝Ů^Kë¸-†Ý’dyŽüÓ˙ZZíĺWßŢmŰĘ?I1 fŹmKëźěËĘHçĎÎkáąć ŞY7+Úš_7U,5˙ÍyY'-íýˇˇµ˙¨jďőĐ1úZVqxCĺÓłćŘ™›Ű¶őß^Űřś0AJOó[ »_Ří)ľˇ?®ÂÜ-¨Pź•1“ Đ*woŹ]@ç¬ëę$ÇÜćô)Ő»]Ą1ö¬Ś™ĘÝŰÝÇĎ>ť‹˝˙÷®o¨4HrěŞ3’´ţ‹wz6.<5řÄŔ¬Hď/V ď—š•1GaśÎËY/<Ő)Žß:ŻůSóŞîTU˙Ş®Ęv%µ €ÉfrśĆŘł2ć(ŚËy­żu^+/®H’*w+Z{wmšÂz0R,«đ´ti]’TýŕÂČĆLŇ•WWzžŻ}¸Ő×~OŽóZ:]ęŮUýt·ż «ŐţǬ¤‡KŽIpĺ˙îJę,ĘišÇM­}żäß0ŐRMŽhó÷˙˛cýűůŹĘ±ŤY2Eńîż·‹âŇ?ç\8Ú×gÁśĆyzqĽW^]9V‡íwsź—óřĄÓ%펲@ÎôΉâˇÚ…±tôYç1)éł‚ůű˙łŁŢź]ćgZ?ýřŰ-‚˙ÝQř¶ŽÉA}ô;¦źXÎÓGůą9U~w0đţóéi?Ę 5É丼Üű[É0k—ËËĺD×>'Ý˙¨ĆűűÖ•‘$[WŢÚhżp22/ öďVk?ľ }?üü&ĺ:&H«÷iétđ_2ÝIfá Kç˙ySj-<ćŐ[×ÖýŁ"ŘnyßY^±ti]Wş®k?č#=Žă<Ď–ĄşĆ%ÄűÝ×ĘcعƖ.'ť;‹ Š˘ńW^.kw/řĹUZp˝8ů{@Ĺŕ(Çv<^ş´ţłĚ™ŢúôÓĎ×ţm]×޸ k’ěťTßmĹW˙m]W#Č=çyşÔßĎlÇĎë~ÎÓŹ;vľaűťĽćălo+|íqç$)Ý5Çť„Ň]0;“Kż}Q¶wŠq÷ľ¤ű÷;—(çÖgĐÜťí‡ô¶ßAżŃů¦ŃŠ~m‡y˝xíÄĚU/-F{Ju'†ÄĎŁ0?hř˙0ëYň`”JRk°wëľ´e î˝ë©ůÂĹźw_Ťú‹…ÇqŤ‡çéń3»}žÇóá~Ó]żűŹqÍçXűQţâ•Öšcgç÷x6îöaĎăî߯żÎóލsŚzmĽúĆ@!îó şQ®myą|¬X껟ëŹ;9®ÜŰUů…ŕąro7–Ä9j…|VőĂć±Ây÷‹F_ý¸Ź­ük»¨.˙p]Ź=ŇV„µ¶W?¸Ýmu\Żă‚ÚĆqžnao®‹tw —žkyďxA?ŇżJ$ťGMő˘*tüúę§8Jş˙aű쇣(ř˘ţI(Q®Ă ç<ĘëĽţ°]ąWUů…%ĎŁ+÷ŞžmąĺŃOëč­hYI…'łş˝WW!źŐźľň~#ąg?ýŚi”B>ńí¨Híďüű=>é~â2VóŐšcŻ(΢%é(îţÝ g?óEÁWřS”Ż_=Iž 2ŚŽ_ş·µ]ŐĘňұm±¦}5[¶Ú%Ž­B!ŻŰ{uIŇí˝şţňɬţT?ěîę§ź1ŹĆîÜ4­Íů8j‘ÇlyŹă;ć ă:$rźcÇ|Vθ^+w«ýMpXŁZs<ëEJż)yQ\Ë€őKľ"ü‡çujÖ_{02?¶îV»EĎÖÝjěkH˝Š@»eIéü››Z¸řs]ýŕ¶®]zIW?¸­…‹?×ę››Úřçó=séçƤǶlłż]|;;ďęŰďŤP˝Žwţ<ćŃĎöaoŔ÷}ŽÝóqżrfI›Ł,GąćŘY¤¸×Źv żíQúŤŇ&éţýÚyőá·öÖO”9ÄURűčç:ô;÷ öĽF+¬ŕę8‰Ü߳ضĄ–ĄŤ7W%©}«6căÍóf”~úÓŚÜąŐ©ó¶§ťÇÎj+†ä¸óKŔ±qÜc:ŰĆđËI¬÷9öOOűiYsěUDYGÖ.Ęó4ű÷;f>ű]w;®Eŕ0×!ěôó}$(Í[ąyŚ]{`ËoMsíAŁÓ2´ź~Ćt!µ¬ăŹíú]ZŇsĽ©ÚŽÎĹŚú8™7¸ sźă°ůŘ-éüYďµë·bJ—ů„<‡4ďsě.ţJ§=nWvúµîĂ«WŽö÷¤ŞŢé¸W»0w´m°1=ĎÓy>~Źcx#dś÷9ö|3gO{[·ÂBŻţęťć}Ž1ž+cŽÂXťÉ1EŠé_ĺÖmĆLrܻɎ›Öyy"9FÇîcô[`â´?©mô®\ěó pŚŮ÷Ą„ÇNş˙ľCJţ7BŔô«Üág ¦É1ŇřM`,‘É1`É1`É1`É1`É1`$•Ż]ߌ«+Ŕ ă#îŚT’ÉqůĚKqv‡””ź›K{ fÔŐź®+—Ë©Ńh¤=ł‚5Ç€qEj `ä\Éńc©M—a–č•—Ë=_Ăô“Ż~“ @2íŻNrLq •íJ÷kĐÂł˛]xü°1)†1ÔjĄ~·Š·>—”5ĎšćqSŻś}6­)¦PyąÜS,wŠ_gˇę,;Ç;ź»ŹńjßyînďÔ9ÎkŘ|śó›SĐůp‡5ÇíÂX:*Š;ŹźWÁĄ€tn÷{ÜTřFe~ť%#^ɸßü(ŚُĎń•WWĽwdÚC_ykŁ=‘LgBíZ}íÇôĘŮ­ľĆYű0úńă"ĘĽ'őÜ M~ék’K%ú5=v·ńzµ=€I'ÇW^]ŃîŢnŕ1Ą…’ç¤fEEď0Ĺ4…8€i‘DJ:ŞäŐťü‚”Ŕ¨>!϶ý÷ůĎĄÓ%ĎíNľ©´cźłĐë~Î}^ÇąűŽZ,şçÓiç.8ťĎ˝öŤv|çą{ Ż>Ý×Ăo @r†yĂ €Ťjͱe…sL+xwP‘V|v ¨Ĺá K‚ ÷¨}DĂ}|ç|śŰÚ r®0MÜĹiŘčÜÇ…mŹ’ŕzőá|Ţďúeż9ń†< Ä8$ÇIń+NýŠĆAűU!µjď…BŔ4 *pűŮžTż^Ű˝ŢÔtLŘÚă¨Ű8Ś*9®7ü«ăż,dŹműS˝9ôl’*úŇ*&ý á(˛ß FQŢȵŠI`ĆŚ*9>x?zô¨űřĉíăC–U8Ť[Áe-ô †)`VÄQĐR3jTÉńaHq,IŤß^î>^:•×Âs Çű˝±Îďy?iu>^kśű×Yűë.–ÝÇŇÚ`fŤ*9ŽĘĘőč«Ű:ńäK‘ŽZ?ěWXFië·­źů :v”ą8‹Ţ¨séç)ŚŔL‡OČëČź~_’ÔĽż–ć4n÷‹Ţ`씞ŕviŁHŽ=?äĂc=q§(¶ÖŐ;­ÉDú éč‡"€©1đ/ÉI'ÇQ Äď,şŹŹ ciíCŢ €—5Ç'NśHkh mÖ˙zŻ~´$“ăňssqv@ßü>.y>F9ĘGVűµ ;>ęů :‡aÄqíÇáű‡)ĺJŽKm"$Äý‰y~ź 7Jťâ®óŐĎśâ* Ýspn¦Ď(c¦ń=‡ď;&@«ýŐIŽ)Ž3§Ľ\î~9·ąŹńjăuŚ×>÷qî×]0Ťď7ż1ű) ťçÖżű|˝ÚöĂďúť_ÔíîąEąľýމ)‘iŤĹ}ŽHB§đt˙ëÜßŃď’÷ńAű’6FĐ~çőŰć×_Řó~őÓźßµözěu^Qçĺ1¦Č¸Ü­€4ą“@Ż‚:čxg»qĄx‹Z4ĆqľÎqüĆí§ż°_ ÂÚ}‡énîV@šÜi`ăTű‰Zř†7Čőń3ŞÂ2ÉďĎ$|ď1WrĚšcŔTę÷Ď꣋SXqçXiňz`šs—×ĆkŽł"límGŘ:Ő 5ËýĚ%¨çţ 7Ę\˘, Zwěw}‚ćă5–ß9]żA®µ_›~Šá°kÓĎ|0a\Éń‰Ĺç]ľtYó§ćUÝ©ŞţU]•튶n… ´ÓÚőM]{ăBĽ“Ě”«?]×µ7.¨ŃhôŐn÷ [Ą§­đÇ f:˘ň<ýţ˙ŔĘŮ]ľtY+/®H’*w+Z{wŤä€4¸“b$Ź"ž¸[ăBm´‚–†`†q· Ŕ 9LŁÝ/ěđŔŤä0m&íÍxĆÉ1`É1`É1`É1`É1`É1`Z­]ßě»Í•‹« ĚŔÄ 9Lł+ĎG>víúF‚30HŽÓ̲¬đ"*/—»Ź+Ű•ŘúMRyąě9WżíýăŐĆiĐë4ČŘ@,HŽÓ,¬6.-”´»·ÚŹ»X›¤âÍkîQ z~q\§a®í$}o0†\Éńc©M€ض˙WiˇÔsŚŻb«˛]é)2;ŹËËeĎâÓk{XwŰ ~ŁĽýôßĎůEĂ«}”±Ću·w˙ ô-Óţ"9L%ŰT˝ĺĺ%IRe»zěąT÷ÁYDGy¶ŻŁßă˝ÚwŽuţÖÔó‹*,}ʞ$lÎsšcŔ4;lľz¦]oŢ­Ű?Ś ‚Ě/ÉŚZÄyµŹłŚ’´2Wg›a—J#ÁšcŔ4ł]Ĺo§0޸S=¶/Iq­ˇőzĂ۰rP˙H"µ% ĆȰć0ŐZvűËaăVĺh»óˇ{‚4^oúňšźß1ă2g`l±ć0ÍÜéđú'•ă uşAË †ą ś×›˙éÓďżţ“őüŽ ŰÎ/kŽÓ¬Sż˙qĄçů Š­ ýao´‹Ł}?sŠ2vĐzá¨ýş}Týǰć0ŐF¸®xÜÄů&»QéĚyÜć…Br f·omŽdśq,ćĆqNa&qÎ2$Ç€iuĺâjÚS0iHŽä0HŽä0HŽä0HŽä0HŽä0HŽä0HŽä0HŽä0HŽä0HŽä0HŽÓjíúfßm®\\M`&&É1`šőSěRL2$ÇDłůńQńĽúňčfç¸IŹ˝ůńf,ýűő׹Ä5Oŕ’cŔ,[»ľ)]vcŁ.ÎF5ö(Î)ŽsfžÖäJŽKm"ŚXÔe^ĹÔęË«=)hçńćÇ›ÇŇQżíam˘ Ó˝ßo~Ź˝Ú‡Ť7Č9Ť4ç~ćäţ7hśaľ'`™öÉ1`Şu áNJě~gĺqŘľ¸Ćě<öś’/,ťZŞeNŇŃ/5Qú%]žQ¬9Ěš$ c)¸ň+Ł`Aëť“L8٬î—ßą »TbP^3fkŽł$©Â8̰…—3 Ť»ďAç’Vű$ú¤@FkŽł¦ßÂŘ˝ľXJďM]^s t|©ó¤®ŐäÚb ±ć0KMŚÝ…SŘr÷r8oçL9ýúvn÷:Ćo_Ô±űoPQŻ[”9ym÷JăÓĽ# ĆkŽł Žea…RĐţ(oř *ţ‚¶őÓ.¬ý0ýĆŐ6Ęö8űvlLÖ0ľ‚ŘY,Ţśé4’cŔ4ŐGBŹű‡rLK19-ç1 $9T IDATFr VŁľ#€)@r $Ç€Ar $Ç€Ar $Ç€i3ŞŰ·_ß­†ä0Ť®˝q!í)HÉŐź®+—Ë©ŃhôßäÓd¨{ś»’ădžž ˘ˇ–VeÚ_$ÇkŽ5Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $Ç€‘drÜh4´v}3Î.„źA’Tr|ĺâŞrąś®˝q!®.„źA–tr @ř` ¬9 îV$Ç€Ar $Ç€Ar $Ç€Ar $Ç€Ar $ÇłeíúfÚSHÜ•‹«5$9ž=×޸öÓh4”ËĺÔh4úoěJŽ‹mV@ †úKy«ýEr °ć0\kŽc]VQ^.GÚ–”AĆ*/—»í˘´:f”ç:¬ŇBi }Ł6)óěG”yOęą0q2íŻÄÖORX^.«˛]Qe»"IÝ5l{̆ݽÝŘű¦¦Ě´¤×W¶+ݢӋłxvÓiÓŮď~ě'J’ëŐŢ™wö»çí7WżľýÚ‡ť§»ß¤‹ěŇBéX%ˇu¶éôáÜçuś»ď~÷ŤË<ĂĆt·sĎÝůÜk_иaÇwž»ÇđęÓ}=üĆ`f¤ąćŘ«xô+ÝEdÔţĽöyśQŠř(űüŽ +şýúN#}*ľÂŠşNˇµč ęo\ç9Č|=§(c¸ŹďśŹs{P›A΀©5Šű‡žAíĽ*©%Qçć7ţ¤-żđ+úüб¨ĽŠşa$5Ożt8iQ á ö^(„pĄ»U¤]„¦=ľ—AŠŃ$‹)żbość™V1éwm˘Č~K,€K’w«p [·Iz#ŕ8KŁňZćfÜ ľ¤îŞáwmąfŔën‰&ÇîŮëy\ýÇ=VZíGń†<7ż7¬ů=´owű~űMkžĂÎ'¨Ť2®3)ö;Öť&»Ź Jšă^ŢŔDq%Ç'ź_|tůŇeÍźšWu§ŞúWuU¶+Úşµ•Úźµë›şöĆI“óĆ«I™§Ű¤Î€Iwő§ëşöĆ5ŤČmVήčňĄËZyqE’Tą[ŃÚ»kń%ÇaËĆqý-f\Rw« ř“’jNĘ<Ý&uŢĚ´Yş[ÚŤ†Ö®o¦= €ń3Šűc|\ą¸Ş\.×]w ’ăŮÓĎât€™Br $Ç€Ar $Ç€Ar<[¸…W.®ößäxö”ĎĽ”öŽ©Ü˝­ËŻžŹĄŻ÷>ܬ!Éńl*=m…0"»_´ËQ+íj”äc#“r€Gr €qAr ©Ç$ÇiWŁ®äř±8ű./—{ľśŰŁ´d_ÜF9VüľGô“„Ać7.Ż0€VL_CŽźXr\Ů®DÚ6lźă¤Ľ\ű9:9ç:č܇9ß°1'éZ€áŘöqHcͱ»r¦yîB¨ł/¨€ :Ć˝/h,Żů„ÍŰoľÎńýÚřÍ1輂ć§~Ż_”ď‰W{÷őęwŽ^s :Îo_”×Hž»8.żPŠÔ®ro7ž ¤˝ć8¨(ň*$ű9&J16ź~˙ ďUG/Ęc÷XIôzösý^ŻaćŇy6Ď ţ@ÂZvĎÓĘvUĺĺĄŔ&•íę±vK:9Žšîyé§ŔŚŇ~ĐBlÎ1ýŠC?ŁZë÷=v©D\†y őÓ·…1éđZV±u·Ş•3ŢňÖÝjĽK1’NŽGQdô3Fň F5Ç$ƉłĎ$ŻĂ$Ľ%Mźí›w«ZuČ›w«ľÇ,É»UŚ+çzŇ qÝő`’ ňiĆť*w ŘĽSí¶y§:™w«ă.TYz1ČłüŽsżËď dAv?ĹpĐ’†°ů¦µD$hNAÇ…mä/ýĚ%čűÔť°%·Ş‘Ž+9>±řüâŁË—.kţÔĽŞ;UŐżŞ«˛]ŃÖ­­„f0üîl1ę‚líú¦Ęg^Rééx?·śd c÷ [•»·uţ{«±ô·ńѦ®\ŚŢ×ĘŮ]ľtY+gV$I[Ű˝÷îZęźI2ńÜiň´/©ŕvg N3yźăiÖĎ-צˇ ś†sčJű>Ç@É1ĐÓGy ŽäcäiŘý"őßËŽiĆő1Đ"9ž=•»·Óž€§Ęť”ë’ăŮŇĎýţfÉ1`É1`É1`É1`É1`É1`É1`É1`É1`TÖ®o¦=L+WŹmă5„~x˝†B‘Féň«çÓž&Ŕ{nřîă5„(‚^CHŽ#ĹO ‹×’Dr %+c…ŕ5„D‘FÉâ'ÍÍ{{ńM‰;÷ÂB"ýóB‘FjČź4ç–“)¸Ż›Ű{ÉUT+HÉ1`”†ý8PźI}Żx Q$Ç€‘ö' ?©&É1&É1`¤Zńµ/ť.uď~ş;dÇŃ9ÇfěŇéR"ód~AsxžĂ~ŻGÝo ’z ¤=ÖD#9Ś’~H¤öK§KŞ:~Đ—\Ď“ÇŘŐOwľîó÷ę»#ęAÇ 2Ďaż×ŁîwÔ:ßĂQľv§ĺÚ%Ę•?–ÚDłˇ5Ä—iżtş¤ęÎnĎľęή–N—şĎ;Ź—N—z¶;÷»·‡µqĎĂk^^í;ĎýĆ š“Wű%“ űÎ1ŕ:űÍĹݦç8ź}×.Žďµźaú§/ąţŤřZڞĎóů ßÇ´ŻQRݎ ™öÉ1`$ěa~h9ÚűőăÜľ´XRĺŢî±Ç強µ ÇůÜŮĆnőŽĺŐg§ťßśÜíí–Tą·ŰÝĺ:t 2—Îó°yşźoíě ý˝ö“Tżiz=˝öů˝6ťŹŁ~§éZGÖůž§Ç€DŮ­áţ°Űiď׏sűÖvµçąóqů…RßmśśíťmÜí˝účwNQÎ5l~ýÎ%č¸aŻÝ°’ęw”V–—ş×kk»Şň Ąžď“|=ö űzóz ĎÖFjŘ$Ęýçč ţÝÇ8žoÝ­zĐĆ)rű°>™SŘö~úňŰ—ŕµÚ”¤™+ËK˝娧 ßÇ€}}żŢfÉ1`”š1´ßĽ[ŐĘ™%m:~¸ŻšçM×±~cűÍ#¨Í ŰŁÎ#ޱúm6—Ő3KÇEí;NIő;jî×oŘőë÷µö˝äu5HŽ#SrĽy§ÚýáßyîîŰożg[żůő›Úş¶‡Î3dNaŰ{ć2żAć˛y§ŞŐ—â˝vĂšđdsőĹĄc×Ţóű9@:ô˝ó;®óÜ·ďYăJŽO,>żřčňĄËš?5ŻęNUőŻęŞlW´uk+µ9¦ĂÚőMť˙ŢůŰďíďka~>ұçĎ.iă–Oá8&&aŽęç{ĺe㣠]ą¸zlű°Ż!̿ן•ł+ş|é˛V^\‘$UîV´öîÉ1 iqÝéxc%ăüٲ$iăVEă:Çxp§cL ÖF)®[ą…Y˙¤2¶·ˇZ˙¤"iúo“Ĺ­Ü0‘Xs ©! ›ýűµxćä±ć“ä0JĂüAĽX,Ć6$ŹEH$Ç€‘"őðx !I^ÉńkoďJ:úÁů“#ž`j5Éý0$^CHĘkoďJo÷ÖŔíâřo{o{Qą9ť·™Ś^ĺÖí´§€ ÇkIńŞ3’Ôx8óźŤH@?÷ĽđB’ĽjŕŚ$ţ™?W`¶xŐŔI˛©Ť0cĽj`ł¬‚ęłĹ«ÎHR“č3Ć«n'Ç®íą‘LHŹW lÖs· ĚŻ¸ý y|ň fŤG śqü/0;e)Ę?>XuĽű_WM=ě¸E{ĂŐG’T>÷NßťÖęuIďíf‡űWbţűf˙ýcěd,ĺNfĂŹs¨Ü|]’ş…±dÖ»->żřhąăÎYwü<·ŮŚĂÖE`IEND®B`‚doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/images/Generate_Site.png0000644000175000017500000010657310431726002031333 0ustar twernertwerner‰PNG  IHDRRýŕ•H pHYs  šśtIMEŐ 4—Ş#RtEXtCommentCreated with The GIMPďd%n IDATxÚě˝mWšö9há:PHŕ€k‰!j&`5çőŕwČk“?Äf2ť $ö lâ5lŇɇLO2Nfě ̤'0ˇ;0ÁXÖŚüÁÔ’ÁÁ $lb(Ş :A?JRKjŐ{•^şŻîz=o÷9çŞűśŞsŔ6!„BH`R…c¬QfNB!„R`Z’9A!„FHé “9A!„FH=R„B!ˇ„Tò„B!a„TsËűÄâÓk˙Ł!§ č$˛sÓ‚€lŮç % *Ć& e€Üˇ:*ß0Ł !„˛G…”%›ž'ÖęV~}@zg§”aߥČ­¶¨j)íó€Uś{ďsšB!{SHÉĽçHŐ@[5!DŮC´§P<©!sĐď·MşléĐď7 Űž.?÷€Źß[°Ď—Ŕ…ß•!›˛o˙•Ďj¨Ý5|'î­_Ě֮סoî §K hlJTj:J·ô©)ĽN:֯׻ńL›Ü ËÂĆ]ĺ hÁ9ÚlÜi`ĺoUĎpąđŰ2,ʞÖ4§Nä;¤ŘvőŔÂú@ůř 3B™9ŮĹ(Ë ®|ZC­nŰłH \zł!ĘÖ !„ŚQH™>tÎÜhBÉd1_("{8 Ó2Q­ ”?Ż3@î) ‹?źCńxç^ŰŔĆÍ Đňw˙^„´C@ąfv¨ÔŞĐŮLÖ×}´Ăvg}ď[ PĄďxíkŐzsG2ČŐpędĺ;:ڇÓUŐoę¨~c@;¬u÷5 KBË(ĐŮżü‘,–?ŞB˘ż@ Ć掠(oÔQąSCîÉĽk¸ĺÔű¶×K%äžš‡č¨Áňx\Ĺ[/€PţJZĹc9ĽőJ/˙¶Ó‡¦‰ŁĚĽěbTĚ=Ą`őFŮY,<›Eo¶µuB!cRRz+c3ŔÂOĎáěIKżľ 1c!=ŁÂÚҡ¤tHsŐ»iČV2Ą)iůÉŕož{±«7Ż@ťéďHdKvď·đ¬†…ă9h¤*_ë¸ň·:¤”řňŁSÝkV?…Ü ćźNcý¦Ő'P{Ďí ŞŞkąI ś~ĺ Ô™^"ěˇ]‡ëN×Ú"ŞŽÓŻ^Ş*Xýp…ŁNËbů“:ÔášÎ¨ećf~Ę2.›…ŁŇ)»ÜN×`YŠ"v•©WĽÎťÉcᆍ; ,˙ɶ—lVÁÇo/żS‚±)}Ůł[%„2(¤|L6Ď*öŮŮÇÓ(Ý0PgË"{PCý[ŰT|FĂéă9|đIZfÇ{uţĹ"ΞśRv'ľz­ŽŤšáZnBĆ­KB ±)ń冎µ/ęvů8\“{"c{•îę3 ´CsĐu‰ÂQ`>źCăťŇš{ZŁ–™›]äŹ<ç»,ٞňyo˝ş€s/ĚŁúŤ EřÍKxëŐ…]¶îecĄ˙ѱpLCá'č÷udj(µó§üUWŻ•;2ŹłĎç<íŮŹ­BRÍ–·ÇČěĚw˛šXůĂ: š?Qĉ9\¸¸€ĘF W>\Cý›{(<źG6Ł˘»cös˙>ŻĂÍ*4-‹Ĺ XąVđĽŘ÷;}Ňîp—˙XÂúÍ*J·4üý/‹(Í - \úDv;Ě•Ď˨Ü5ţ§4ŇŹîtůźhČ˙¤×ëfĄ„Ż0šREą¦cýfćCęc*ľÜ0PY[„˘¨BÂÜÚIű•OJXţ¨„ěăîý÷@ P }SÚŢ `4 čßK\˝ĄĂ0Ę@«é+˙:ůâ´ŻŃ_ÍT`š2w<}™Ś‚Lfç:kË€aPf†wšr ¨Ü©ŁaJä4ůźhXü·‰•ĎëŽqTf:¶$‘N«h¶$̶'D™0Ą‰ŚGZŁ–™›]ř*ËÔQôn˙ü­ĹwJžĺuO7PţJÇ©yäs–-”ÖĘ}BŞS~^ńŞ~Ó@ýľ…Üa ĎfQ®I í4ţ­1c{9ýŘł/[M±á$„~Ź”ť#ÚoćéßJde`÷ěÓłÓŢŘ´€–ě;·“}ůőéĐaÎ˙l ş^ Jă‹ 8ó|§Oä°ôa ŮÇ´ˇ×Y[¶RgD7n˘íł¶ä®x #Ž2s˛‹ŮĂϲ´!ŰÓÖ?ÇJ×ď!›ťőöJý­†â3´Ă V>ßčÝ˝¶>÷ďx­_×ńÖ«yś=Y€ń°†ĚAŰSXşYúX.pťqłUzĄ!d@H5}ť,%PŻĐžšE.źFöP•%¨) …ăEO(ČrČ>žAĺ¶ŮíýŢż—ŤčŘř‡ŽS'&<·$¤l˘ŃČd>řs •ąődĎÓ5RťyZ»ă!f˛Źf ŕ ˙D†QGö±śŻ0.˝>EXżQĂĘçpőŁs=y&ű„ͰüRbő‹*.V‚v{JĂĺ·Ď`ḆĄ?¬CJďÉĐÍ%ÄŔ};űNťEá_l—ÓŐUbWÄL꣙x É/‘¶‡xłů‘­ôx« ČG3X8n‹©ÚÝŚMű>ŐŻíáĹüSš­AČ&fŹŘĺT©Ő}ŰJÔ2s˛ eą;~ł +0ŚšgŢí˛ń;:ęßYČ=ˇŕʧ_ÚÂt­ű‰×ŐuĽńRůŁηílő‹2‘Á댋­ËBŮßBŞĺCDµÚŤ«UÇ™΢|¨\_EýkůĽ†Ť[uT6*ĐŽäńÜÉ,Ę˙]îN–ńs˙ÝÂXţK _ţ‹¶k?RŔĺĎkXţe‹/!D –´Ś‚ÂÓYüćŁ ľü˙u46%2–^;Ťę]ŤM‰•/îuďuúDł‡5(Ź)XxƧ|§nw`-aôv<Š˘âěÉÂîř‰˙ŕľĘÚY”oë06%˛mĎZ€őĐ@óźŇ)áí‘ęÉçó/qúä<´ŚŇťŔ\űZÇňG%ˇî>÷ÄΩňmW>ţůěA/ •ݰ6ˇ=®"˙ĄÝqWşĺ}é?ě‰Îg/®ăŢé”Ŕ­Łř/ŠĎä°úŰ3€HŁp4´€ţ\RЧ­ÄQf^váZ–^:ő±üîúâĂĆź{í*LÓŽżPsîáąĹk«‰őuśy>‡B»Î¬|Qé+ë@öěb«ŕĐ!„ô )?¨3†±©căVsOe §_[0!·ęw źťGĺFúwŃßđ©gbý¦ŽSÇw­]»kËÄâósX|ˇ‘jW讎ęťđŁŔň+xăĄ9äźĚ ˙d_7pymg«wľMcS˘|«†Ą?\Ú?aś{żŚĺ_ĚáÔÉ<ćźÎáňg•®7&÷î[(4{řĄÔżk`ůŁ/anI¨Ş|żLFAć =dVűZÇŐë5\ů›íˇô< ΑŞ 4h =p›ë7ŰotµŹ×ď7°úEWţZ†oYJřQ)úwž{}K?ËcľÝŮoüCÇŇGë¨Öő]Bbq”™“]ÄU–AQ=Ňí7^«×m!Ř“Ě Ă‚Płę !„`(+l7Ň‹ž'.<ó®üz€=*źĎcîč<UB7™R0w0ôV?­ŔÚ”+ĐNśó!óˇ=D"f4¤Óvçhţ ŇÚµšMË“”Źf‘N űř–®{,% Şąn8ý@t¶Ď, a{¤ŃߡéŘgšz;Śť¸ ‘íKŻc~‰lWř M[ĘŽW:ťzýî¬P >Ş9zżĚf;®­ž¸¦Ô>ń5,Í€=Zţ`­ö'RJ7/ýŘFüe¶c~Ę2*NůâvÜoĽš- iÖ»ůŞŞ»ËĐ+oüŘ*!„€BjńßžĂŇkË}ľ¬LF@ËÍcöč<2GÔ7*(_Ű€µ)vč€BŠB!dZđ=´÷ĺőjŹ8˛˝Ť@ŁQA˝V…*,K¶ż=Ä!B!„PHuąđ’ŔékCľ˛Ý¬Mçë>ţÓüćsľĺC!„˝‡ďˇ=B!„ŇĎ#ĚB!„ )B!„‘2tŽT¦ąÂś!„B #¤ r«ÂÜ!„BqC{„B!!qţüA‹™C!„â=R„B!!qôHÉî:\„B!dˇ&YÎNuŐ+OŹ9Őq?mC’¶ŕ7ÜańŚ#-AĘ·÷ţăŞçAęBq­ÜŞôĺ˰í(ůčçXR}CűuŮ)±ű€×)§ă˝ű;˙ŹQľYîFç˙8:νzĂčlĆĄ|łÜ=/ę°Áë¤{đř`ž„Ť›Űuůă§ďćn K»źpÜň~0źď•„MvěqĐ®üŘSś†ŮpRvꕏQóÇ)śae0¬Ž:ٰ˛v˝—= «›I¦1¨­şŮŰ=ÝęŤÓyIŘ`öÄoŕ–gQâčô7Ž|tK[}Ă0ńăÇ>“jö®Jż°xĽ¸KĚř=?*ă.ÄŢĆz°RxĄŰíŻ{íEüäaR¶—M:5ž“@ĐzšDs‹ß2łý;­^íSÜĎ‹Ł.ř˝vŻ´3q·ăě‹’ęĽěŃOݢpň!¤Ň©~—Tđ-ßčÉX§ů-燡ĺsżŹxĹ—p=ó©ĺqŻůRfáäBä‡NBŘ)u`<ĎÇ@ž_ţDv-ůŚgŘ^qu<¦=m“P–{9 {ĹN÷‚ťLS:ăQşVš¨ů0˝ń‹3oÜęË´ÚśWšĄ‡s˘\9P8VŘžű×ĺľťŐ˙YÂúgôHB!„¸‘€•ż|Đ·3h¶šĚB!„O!őŢYäŽäP٨Ŕxhđ›„B!>x„Y@!„Çoš«ŠĘ™úĚ™ĎŔ˛,–m€6@hă„L˘ę5d2Y¬}¶Ć2˘ Đmś €C{„B!!ń·\1ż!1ů°Śm€ĐĆ 9ôHB!„PHB!„Ś–T¨+Z.ŰÖ>_cÎĆČ™ÎÄ^FdÔlÚˇŤ2BŞoĄç°ôΖß]ľÝćÔżťbîĆŔúëľVÚSFdoA ´qÚ8=ˇ†ö–ß]†čYč†;y°Śm€ĐĆ IžTŘ Ą”T˙“ţô泌ô/´žkŇ-˝‘śúŹŐDâÖ SĘtűIs'Ě^’ß; q0Źt¶‘9 1Ł$ZĄ›5×ă†Ő„lY%ŤS'ň#·_´€ú}ć–Äěá,EÄšGµ[Wş˙7†h揟K¬ljwt†‘¤l"˙ô,˛™höp哊…rOjÝĽÓ°, Í *ąĂZ„Ř_yÉ ?Đ!·$”ŮLÖN+ăľŇ­ν´[zC˘ö­ ˝a{ŹD Ďg‘BŚ˝ťëmoĚ­,d RI¤ÍémăěđiX[Jâm\/ëż;‹S˙±ŠŐ¬âěżśY˙3ęđ–ŻXz>;BJ)eßÓ@g›LaĘ(÷˘ŃŰ4!ߨ@ży¶[ “ ?L żą)M@Z@«‰ňőäÖ|Ě˝xrłëA ĆŤyLęă§!-ÄVéf Y0L «:4ş›@îPőͱـőűLŁ«ŕpB ÖŁó€tĎ®ćĂ**7V0b1Ö ¬†ŁaÂ0,(ťľ-•ĆĆ­{hJ -4:Ný4\¸uÝ€n©4ŚM销Ů.)ň­:rOh{J‹]”Z›÷îë°Lł+fŔ0LÔu"Ą- KĆ·8˝lƦ-Ř ů,ŠmOŃ˝†Dĺ®E¨Đ‰±¶sů—ţw'ľVäVhć–‰ÚŤrBmśZöOné[¤ĄŁr˝’¸:ó+XűÝYŕř>¸őŢxöŤ‘őEq‡wúu\ýe§˙PGý{÷ŢźÇěE;Ď<«ŤMLţޔܒXzw Ëď,Ýv ‰ţ”—H ˝ŹZ–ݸ8óźW±öŰÓ8őďÉ©úg;F_űnľű˙ ±ŮŃâ™ţĆę v7-ćQ4(OśllŔüö ämŰóˇ=Ż'Vśf06›°Úmţü‘tZ[Ńí$’ 8tĚĆ÷ dUĘŚ˝Ž7[ýŞ—´šCůú Š!Ŕܲ eÍ- kËBő® uF@ĚŠčĎEIŁŮ°¶d¤ňвi»ţˇ‰ŮÇU4”Vh5Űžýú}§ŽĎEö‚u0ęßęhB´-˘ţÉ>¦hţČ– ¤ŇČ(i +rY›5ÝDţ©,´˘O\ÍH‹,V®×±xB–±´…am|ĺfŁ-mTH©BßÔP} ±ˇKóŔŻę¶=~‹Ç3uýĘúd{vŃTQzďĽÝć]ĽŻú/[DŔ™˙XÁĘ?®â܉sXúb Ë'F3’wxW_Í­öß¶=Ü{Ďî7–ŻXz^ĂěĹrwßÄz¤`ůťea»‹ŰŰd˛UFҤ¤ č ąDĹ”ě{jËmé°e·—Pú3ń=˝®¬»_űTZőĎŰ•Q™…úXŮü2Đ2!ĄýšIL•n9ĺ©i@}<íc¶§ŽŇ2!„Ý1ćbđFŐnŮk§5ű:G MC‡líxIÔÇ5Ȇ„Şh(__Eńdđá‚ňŤ/!Dşűf—” ”'Ň]ď¶ěż˛eÇ*ť¬XZXőŃt[Ľ4!·:aŘÂQ»ŕ×oT°p|ÚˇhbJ`ˇ®ßܲÖhB´ă!RÚ˘Q¤Űö÷c<ž¨ő[”ŚŠ¬" ö~ٚȴĹŐú-oĽźŤ·'«/Ď´Ĺ,`J‰†č›UÝöŇ­lX±¶qÚń›µ ČMҨC &*ĆŽ«şôÉ@«‰…W–ÂŰÁ5 gţS·Űą/rĐN–ŃřÁ‹…E,ÝH^L5~h@BĆŢé?ÖqőŐN˙±í‘zołoîx¤ŕęëöľQŠ©Đß‘ę¨?Ě?;ß÷s;îç>^çřąĆ-NÇÜÂt»żWüü¦;é2˛¤ ČĐ2 [RZR‡µ•ĹÚoOcí·§»O8qaIu×S°”°Ő€ŢĐpć?ŻvÇX<__[¨ÝiŔx`Á°TČFĄ-âth…K@ Đož‚~krłk+ ýšZDu†đ˛* oÚÂ@ßl˘ňíđ_R^Ü őÔ±¬, ða‘±Ü&¨Y¤Ő,ŇŹíüěOC}|jVëć‰i07mÁ]ľ\ĐK)ˇ>®AĚ(ÝÉÉŤű&ôďL Ö¦ )M° Ě4 †˝Zí´¶˝6˛ŰK4“†Ş¤‘jwŘ­t«ÉćĄęu[D–ÚaŮâ) ì­ćŽ€ú13- ˝aaöŇ'QÚŤ–čßK{čośí\Ď[˛µóđ"R@FĐ2™™tbm¤Üyó0­3 vD”ŐĐQŻUPŻ×"‰¨ÎĂiý‹´gW€-¦ló*ŧŠ}6Qqal±‡×ńD]}5×J÷ޛǽ÷ćaIi{ůSŔ™ăł]51©ŢWNEeŮj}éÍ%ŃÝvş¦|łĽKLtöŹűŽ÷ëĄs^ńxŃósťăn׸ĹiđS^qLKńxŃ1ośŇ=x~śeÔíÔ¶ä–a?=µš@Ë‚YŹK4Í{@Ëľvă뜯¸řęH·Dż¦eµ˝A¬-ŰăŃń„-ür%rxŐš´Đë&ľĽő®Ţ€UŕłNe+@UŠ;EČ–„¸YĂňűńo‚i5#ÇAËH@™]~ŔćNËŘ™Ď%¬žoY›sĎć VűÄŹ±i˘zW‡eY(Ý®cáŮpöVą]‡aIâÓ9d¦»˘W¶ýľ]7 EŰc„č6g ;LeFŔl{ÂŇ©ŻR@ůnµo dźŽf?‘Ű9iHC¶őW5ďçńĎoÚCy=‡óźé8w\‰^îĂÚ8)±ţá^{Ąż­Ű}ÂÓšÎ?ŮëęGË$”Z¨đŤë9[Dµ,Ô?Ď!űôĐo-"›_†lIč›:ÄŚ€çÎaöýYT_݆ŃżÚýúű+݇ýŽĚÁLláą…©7$L)!R@ń)˛e‹©ę»s“瑲, Ëď-;n'…“Č&l‚\ôžAă4‚–‘l `K¶Śö)"ˇäVgTüo´É–hOvm{äŮî(íĆŁ×VúCôIĆ CÂx`áËkÎż)ńÁGŮîßţ¤á?iXz?Óý-ľf`ád"eĆ–ćę÷MTŤ&ę퟾لn5alÚ˙ËÖřl`ٶŃQ 7tTj{ŹŢ€2X& ?0QýZGĄ¦ŁĽQGéfĺ›!ĆŽ§I×»ż^1ŁĚŔüŢ‚ąiŔÜ4anšh¶€f+‚—¨ŐţĄ5«@ťöŘZJô?R¶lŃ‹\ě)Sĺ €ń°żŁĐ©ËŮŢOăĘ+%Ą]6RJĚjYh‡Ő>ϡHa§~µš}ç‘=R[öÄo«X˛3\f˙dű-ľĘÍ{@K"«ŚąťkY¨5šĐŰž1Ă’»Dš"Ň"ľ6®ë‰j{hĐ;!^T€h˘üçs°,Űó»đóp´ł'먖…lT >uĆí7 Y„ÜŇan™í‡vřX(,`îĂąHŢpíÄsĐž? íő ýB˛ý"lµ˝p˝áEdXúCő†„µŐö@Ď  sďT‘4ˇćH-˝ą´ëi ¬0éxtĆ)NÜÄRTń×ëµLkŻ—*îđ–‘ÜŇŰŠj}´$ %¤š?čČ›‡l” 2E»Fi·˛Ňě÷†AB ŠÇL4[˛-®,l|Ý#dÜ·‡UNż8 ¤îµÓÚţőtzť×îíF0ŤâóÁ‡÷ôÍ&˛jÚJ›ýęÜăÇ ěá˝ćŘlŔ° !0d†i ~żŽú:ôŞPěᨚM«ÓCťµEÔD´söśGŮj˘~»ŚKď˝e Ą_€ą™…n›0ŻXţ°Ô=~áÍß„SrK‡”v»ZţG /)amÖ‘±ß¬Ě ĚŁŽĘ·ľU1d@řOŻ,Ľ˛‚ő?.bá…,Ľ°€Ňç%ŽZ}“×űDMő ~xĹ»ž§b Żóĺć.5ÂÍ‘ş¸´ëiŔŹp˝Bcp˙ é=§óż—8ńşĆ)N~ß8y 6ża'ZF­&šMi´']¶“ňÄąťá=BÉ!#ěůMhéěňőö‡ďZéŢŽłŐîT”\W6 ŃžK%Â…§=©@¤Ĺ'‰fÓ9Öf÷ęôo$_™Ť4át×ŕJ ЦwžÖÚCZÍöhŃ+‡ h Y™EůnĆćNÇnnRö­i˝˘e·€B«Ůą2ľđşÂÚ–ëÍÎË­Îd˙Ž×D$ o‡c {ÚGÔO~Ö–cÓDö šhĽë÷%,Č>.P˝k |KÇ™“ž{6‹¦´ßÜ kŃ 6^ľˇwëźh ¤ Ż-âüKgqůO«]±‘páµE44péŁo ·švc`¶ëСE`KGfFeŐ!„˝LŤČkĎ™@ÝÂjMÇâ›W#őę Ż® ôÇEźĎˇř|ĺkőn‹SÔř{HСߍ'ĽłźčX}IĂŮOtÔż7Q}gsďößwÔ"*´ň­ţ„DőDőÁNqé“ćžXŞ$ć \ú¤Ř{ÔąfŘ˝{ĎďÄe0NAÓĺu˙Î};Ű˝aôžÓa.âS\2Bˤ-jH§ěNF4Öa=P ^€P4Čͬű%C§€TxµđŞÝ8•ţ¸HMiˇ´˝`Y9(™…®… %1cĎ5!<ąśýëîaË~Š7M@˙΄®KX›‹ŻhČü\@ŤažD§DłJő†ż‰äťůRI=µ{ @Ů„±i@¤ ظ»Ń}ű&vŹT 0†bTŃÜůL„ŚńUŻöŰxŇjęc°Ěz‡W»sĹ’CJ ýű†=”Ů̢-哲żőĄßHTHé ÝlB{\…±)Qş©cˇĹégłvf02üÚx§ÍÁ›:šh>~°üáe,ţě4Nźę°66 ¬üő*–߼éaQ@…Ül ř¤fÎĺ§ËP2óPDRęöë°)řˇŠćL@çšÖ â­o=¶Ôn!úćʉöŰgÉŐwÓ2wÂmŰ„=_0XBŘs E H cł Ó2‘žI'Ó6é&˛ŹŮBmőżď!Ż©8u<Źl6âÉb""ŞŰľżtĺOěů]•‹•‘–QÜá­ü4Űó×ţżň¦ý :˙Ţ˝î˙Ł&Tráő »žČd{ĄTČ–aObűx¤'ĄÜy›/i|ůąŽŮŁ*.Ľ9‹ěáÁď:ÇË8‡ň˘Ú€:Ł"$Źšnżi“ÓrĐ%3qŮÜę/٤±,ű•b&mżţ¨ EQžQĆsjÓ3iĚNŁ™Q ëŤţo›ů$Ł4 ĎiP•äór.'PąkaţHĹBf$aĆÝÎ-źď ¤S'‹]š–Á|!×=ÔŐËükĂ?škÜ~w«YĹŮ‹«ÉxRRv;[qŮŚ\´ŤIDůRC:ÍĆ.ýţ.üŠ"*qZă/#»zĎŽbîí0Z ü^î Ib^‹ż|GXOgÍböĐlüńëíź-Ž4Š'OŹ®ÂĘ}‘ĆlN —Ů#YĚvćÖŚ ÚÁ4´ăéŃç]ŚíÜ\~sůąˇ÷N§ŇzóOĎ'–>őŕ,Ôăł;ľ8öG’R˝O>‡2h[dÎŽ?eDh„ĐĆ ‰Î#a.4TîäÁ2"´B'$y|y¤š­&sjÂaÚˇŤ2zaB!„PHB!„Śϡ˝µĎÖKËĐmś Rg^<ĂšpXF„6@hă„L¨˛,‹94á°Śm€ĐĆ ™P!Őˇz_2§!ű’ąĂ‚m"!$š€âŃ s‹Ś…µĎÖčÚ'cˇ|§H`B(¤\ˇ{•Ś Ú!„I„ź? „B IŠY@ܸp1Ü’ —ŢżËő„B…Ô„˘(JßŃ~ߎKÔ\¸xˇďŢ˙éă@׿ü‹—}ÇŤB'űzhϲ,\úóUnŹ(Żýţ!„}#¤ŠÇ‹}ż(÷^9 EQ¸=…8ŮžÓ˙„BČÄ )(ß,wa;®ňÍňŘD=SÁ·ˇx4Cë#„í!dĘáĐ!„BHH&f˛ů…7ăyÎĄ÷Ţb‰B!„B*ŚP:˙ú.¸ĚR#„BČD0‘C{żůŻÇíóŻ/±Ô!„2L”GJ¶ŕŤ_.âěĹ+Ýý«ďźZŔĺ÷—qţb0!uá%{Ť¶Kź”\÷B!„%˛GjíF /˙şŚ—]ĆÚŤZ,bjńM[Dé pöâHV+ü};â©ó—B!$*‘~»Źß.öí EËţť{ç ß±˝RçŢą‚sď\éK‚Kź”şżaŞ×›ĺuŽ—ŕ"„B…”»ŔşÓúóB¶€+^ÁožëŰ˙Á›çpĺĎ+ˇ˝R˝‚ĆÉ;t᥅P‚Çézˇ!„˝O¤ˇ˝â3*Ę_™xů×ĺľ}QľÚ˝řŇb ýq0l8.¨H#„BČţ#’Gę̉<ŠĎ¨}"*ěü(h¶ěßď]ÁňĹsĐ2Y,_<‡7Ţ»Ň=6jüxł!„B!ZL ű?-‰µOW0›@ X~ÝţěÁlV`íÓ•Hs¤zç@ą‰Ą^ž©Ţk B!dş™¨ďHŐ7ü‰łí˙ew˙°}ATŘ}^Çü܇^,B!„B*q¤l˘ô.˙B!„ ©Ŕp =B!„ěK!Őů†!„BČ~âf!„BH8R“©ňťF¤oQ|=!„BôHB!„„$µuúµ„R:ţ˝úżűD!„ ©]!pĺÝ"ĐrĎ.ˇ~kąű×Ü–>,łä !„™=;´gZ€Ş@}cŐű@ăëß zßQWŢ-âěëS„B‰ĆžôHiš†~ü̶Qý[ŔÂ+WŃxśý˙ŠČ=»Ô^n†źm „BHxö¤GJ×uüď÷ŰP=ý{@8űÂ)(ʞ¬~˛Ś•?/ăÂďę´B!„PHő"Ą„:|\ÚĆË˙÷d8űŻ0˙`ĺŻë{¨Ým ţmp!5—źëţíü?x|رa×9ÝB!RcCs Č> ¬–·‘Q/omŁ~xă§ 7€b!‘ˇî?—źCµVEµVíB˝űŹőüźB!ÓÉÄΑ*ßixžăôŃÍŽGJţdT@J@U€ů§ úí6¤-*naPďuQ„B…TbDů2yÇ#Ąô¨¦î}»ŤŮ#đżßoĂ’í‘"„Böř))l[DeŔj˙űý6ţůńČ΄÷HB!„{řśćpĺ/ëXzíţOţŞőmdŕźł°˝mĎ—Š2GŞĂŕpťÓ1B!„PHMŹÔŇŻNA™Şőm("*›Đ)§cNóŁ(¶!„ ©‰Bł×!R˛%»O˝ú%žűĹÎţl&K „B…T/«&÷Ĺrz!„Ňáf!„B…!„B…!„BČ4°'çHýź‹k»&šţýűűgXú„BˇD¤Vß9ŮŚ- ;Ó˙wé÷ë,yB!„Dfo~ŮĽ%![Ŕĺ:*5ŕ“łČ~·ŽĘ}[D­ľs Ď˝I1E!„ ©]”°=P­N?¸d4 vůŚÄ²'ÎŁ|łĚŇ'„B…Ô Ú b«ÓŤË‡fíE÷¨ß• ¸ô»ËXýóeĽüÇŤ}UŘ˝Ë×ôţO!„ ©. 9ęő7 ĎA Q!o_EnĆj/ß´B!„PHuظ¶ŽąŰKPžż‘+"óě"”§OCʡْP7+(Şwë0·ĚŔ÷ďxrćňsC˙ď=op˙°s†]ăžźpśÎ'„BH|ě©·ö6ľXö  Ô`ÝZRš@ HϨ·VCó(>ťC­V Î\~ŐZµ+V:˙÷Ň»”Lç?÷vľÓ1§ű ›B!{LH•ď4<Ď)ÍômkÚČ7őî>iíľk¶€¬4[ÍPqë&n"e¸ę^×:yÂ!zŁ!„},¤E’2ż´˝Pkw€\Đ-{žyf°¤-žć?€ę «0%NĄ‹˙ ç(¨@uŘ„B Ξślľ˛¶†ěL[D)€Őń@Iŕž±ŤąědgÂ{¤!„Bö¬ę|Gęň_Ö`IŕtîšmŹÔlö¶··!öHőΡvf‹¨Úđs¤śćGyMú»ŕŠă^ś€N!„PH E¤N˝ą‚t*Ťf«Ůý[ü÷UĚ˙jg6›ĄB!„BŞ—/ß;Ĺ’%„BHâ<Â, „Bˇ"„Bˇ"„Bˇ"„Bˇ"„B!¤öSb_ţĹĘĐý˙i‘–@!„ ©pMŰ}Ű·Wh„BˇęQŰŰŰľÖ8=RĂ–‹ s!„B(¤°vنňW&Ö®ÝCńgNäCß«|Łő±̇u¨jv ,'ĎŐ$Ń+˘(Ş!„ )WŐB_™jˇĹTŻ2ÚK×ę"ËŞČ…şďŕÁ˝§wqb§sÝD‘ź{^7&!„Böˇę¨Źß.^ţuĺŻL”ż*÷ť×9î…ůĐöHFꣶ¨ęQćV=”r,ĂNqău~GL9…Ao!„2Z¦ňóĺ; ”ď4<ĎëQĆĂ:ÄL[DĄr2śGŞ×34ěXÜîí%ŔÂ\G!„hL”GŞřŚŠňW&^ţuąo_ء=ĂhëmOÔf"•µUGł•ZőP÷ć #~†]ćŢôBB!ăa˘)±÷!^Z%Ď;÷‰ë~IĹ9ěµ6Ěmns›ŰÜćvÔíGâě;ż^QĺçÚ¸â°_éaóˇWśLşjc|râ6·ąÍmn'µŮ#ĺäčÝ?xNŻçcP vťźűDńĆ vÖNBĹ+}׸ĹÝoĽýä™SśÝÂp*Ż éu+‹Ań㕯Aňśž(ns›ŰÜćö8¶Ç:GĘÉŇëáňăyË“â&ţzĂ 7·´Mç çĎO>ř ĂM”MŻÓůnqwóh:]Ä+Ĺ''ns›ŰÜćvRŰ9Ů< /-ôýü„ëĺ˝ô’t¶‡‰§pťÂpŠoŘ!-Żt˝>lzÇÉ™çgű޶ŕ6·ąÍmns;Ží}ńÖ^ŻG#.ŻUű Ű-ľaÄT”´Moü|râ6·ąÍmnÇ˝YHą Y9u´qy™ö+a=S“¨ăÎ''ns›ŰÜćvR۱x¤:{ççäEq;ć4´5l^Śßű$)bz‡¶z÷»Ą=jüÜňŘ)ü„ď–wQŇ;ě|?yäTćĂćNŃĹmns›ŰÜçvlß‘ŠÓ[ÁďPŤÇK捸IoĎß6á6·ąÍmnOÜw¤ČŢ.Ü«"ŠONÜć6·ąÍí$¶'Î#EHÜđɉŰÜć6·ąťÔ6…!„BHH8´G!„B!E!„2ZRANnÔËĚ1B!„0BęĚ‹gú¶çňs¨ÖŞŽç;>—ź€îţŢsÜî7xĚé\Ż8…=7,aĂđ{]RiEŢ k”áNBÚÉô”Á¸ęËiúâ5)ůâ·ß$#Rű±1ď0hŚ˝x‰E?÷ôş.‰J䔎Î~?é¶żZ«†®°×şĺWoš†ĺťźĽ’vŻűůÍë¸ĘÝO|Üň%H9ąŮĽß2R^yăeQëC˛bgn×8Ů`ŘŽŃ©śÜîé§lĂÔ7ű‹ZAď·Ú¨ý[Ř6$H˙°§)+lŻ®­nWoW·/˙ţňö[ożµ]8VŘ6Młűű{ÍŘFţh~ŰŤaÇ;ű˙vţďýąÝË)lŻ8ů=×oxĂŇ0?÷t»ÎO:ÜňÚ+Ľ yăçžĂĘ6HX~Ň2,íaň:n»öްí ĺôžqŮ™[úüćoóÜâ¦ÎG)Ł8Ę=J=‹šö(u%Jއ颖­ßöp/µ!q÷cAň%.űśf&Î#5- vP‘»yWâ¸ÎOž >Áô>ń9‹ú>I6ăőÄtśňÚ+.IŮĽSľ„µł°i[qß3JM’­»Ą!ŞMLB›µ‚Úő^hCâňúÉŻľcęŃžÚ cě“$˘ÜÜśăj”‚6®a‡¦EěNR<§ÝĹÖćŁÔ•Qç'现®ěŸ™wćžĂŇ÷üüÁ>YĹ)0ŁĚWš„{żŘÉ8*†…6.“ôP4®ü‡ç"î´OzľůIß~ôěu›źtRIęŕ˙Ă*}ŻT”ˇ¨ •®×•éžÓ]µVÝ59ođ~ ’/^Ă^ç”~·4ÄQq•«ßĽöSľAě%ŰŹüÖžÓ÷ˇÜ2Ę-|…uŘ×T÷ŰŰ{I㨍ÜËfFŻ´SDí/’l[¦áÁaŻÔ•ý؆xµ«“Vö­Úë"eá‡]±ŢKÍÇýjsŐćU?é¶?Ę×ÔŻÝ+·‡-w?ńqË— ĺäµÚ{UâŁÔĄ8<ĐAĘ(J9xuBN×8Ů`ŘĄťśĘÉk”Ŕ«lĂÔ7ű‹ZAď·Ú(ýź|ó¦ß4í'žÂ±ÂöęÚęvővuűňď/ożőö[Ű…c…mÓ4»żż×ŚŘW¸vZUş÷fUé «ˇÇ˝jvŘ•Óý¬^îgU÷¸V¦łúĽ[ŮF]ˇ|/ŻÜ´ĽŢ3.;sK_Őá˝Îs‹w:ĄŚâ(÷(ő,jÚŁÔ•(y¦Z¶~ŰýԆ„±ł u,î4Dµ«Icâéůć'}űqô$ÚĽ[|öZĄ’Î@·ÉeQVźŹsBö0UtU÷a+Ú»‡źđ‚äKŘOx]ç”ţ¤V÷Ž{˘ý~[ą=hŁÖżAŃë4iŐo] ’Ž(ůwm'”SŇOëam"‰xĆQqŤvě…6Äo_<ŠrŰ7N Ç Űç_;ŹÜ‘* ”o–QşVÚIĐ}‰âŃĚTxřŤć ­mĐľX§ ŮϤâ¨Đ“ ůM‹É-2y61ŤO}„uš='¤8o˛ažQŘíŚušý '›B!„PHB!„PHB!„L‘ćHů]‹®÷¸×şNN׹…çuĚ-ţIĎ9FĐ5´śňlđSvűqĺöý̤•wRukŻŰҸŇçôeđýÖ†xő©¬ď ¤ś ĹkĹi·LóŰ‘[ňÄÉpŘáLľa{ŮĚ~\ąťLI¶-Óđŕ°WęĘ~mCŘ^MÚë"e1†]±Ţëé6îW›¬&>¬Ăđ“~§•˝Ăv×ŰĂ–»źř¸ĺKrrłyże¤Ľň&t2ŠR^˘Ěé' »´“S9yŤx•mşâfQË!čýöBw6_’ŞďOáXa{umu»z»ş}ů÷—·ßzű­í±¶išÝßßkFě+\;­¶Ýű łęyĐŐĐìďwEű +\űY˝ÜĎŞîq­Lfőy·˛ Ö~[ą=hy˝g\vć–>żůä<ż+ÓÇagam0Šť…iǦ=J]‰’÷aú€¨eë·=ÜKmW™‡éSĂäKő}8ŹÔ4­ ç×»Çua†ĹÜVʞ´Ă¤ źNűĘíIŮĽSľ„µł°i[qß3JM’­»Ą!ŞMLB›µÂ,3ímHRĺ&_ĆĎ};´×zHăQaW´ĹšYAÖu 3D0-ĎĆŽßćŁÔ•Qç'ç’°®0.Ńâ’T}źtřů |˛ŠÓř˘ĚWš„{żŘÉ8śaa†ŤË$5ăĘĎqx.âNű¤ç›źôíÇĺÂöşÍO:©¤ uđ§7±Â®>źÄd»Ţű]Ő}ŘŠöAV¸»zyŘOx]ç”ţ¤VéŽ{’á^Xą=‰úÖÎÜl~Ř}Ö• é’źq—QĐv"L9%íŤkIÄ3Žrk´mH<ůµľO Ç Űç_;ŹÜ‘* ”o–QşVÚIě}‰âŃĚTxřŤć ­mĐľX§ ˇGj‚< qy–WŠ'Ţő„¶Á:MŁâDĽÉ†yBFa´3ÖiBö3ślN!„B!E!„B!E!„2Dš#ĺw˝ťŢă^ë:9]çž×±°éTâzÓĘ)ź{ŹsN!„’ręhťD“!ä‹©ßípcI‹’IĎoą [¨t’âK!„ěI!5Íx‰„¸Wżv[Ümď1'aę&BŁäI/ŁűÍ/7!ôÚ8V/Ź+ď!„PHŤŻ%&©s쌇‰ŤÁ/<; Żt» y†ő¸Ĺ!(ĂŢËoľÉkżyöž„BČÄ )/‘5‰ńĹę×~®‹ű3űq‹ /_ĐĽöZĆ ‰{B!/¤âZiŇ_”ŐŻGݡŹŇ3Wľ8ÍŤ‹R~ôPB ËľţüÁ4Šąań łň·“x: ¶–ęáJę„Bü’Gj°#vňDY}>.Bű†]ýÚ-<ż÷ŚSüů /l~ş §ůiAVX÷_N4'„ Ç Űç_;ŹÜ‘* ”o–QşVÚéhîKŹf|{5ĆíM`ÇČĽ'„BFAdŹÔ¤|¸‘C1„B™*!5IŢzBX„BȨáZ{„B!R„B!R„B!{_Huľ·3ěµöÁ_ď±Ásý\çž×1§¸Ů%¬ yş_Iň‹đq\ç§ÜG]~´B/‘ßÚsú>T§ˇół®ś×ý†]ăô…ëQ4®I†µź'lÇń•rżv&q–ą›(–ľ ip;î–źAŇ8,.^ń RľQĘĎ-}nu‰BBQ8VŘ^][ݮޮn_ţýĺí·Ţ~k»p¬°mšf÷÷÷š±=ŚüŃü¶ĂŽwö ţíüßűs»—SŘ^qň{O?áůŮçvĎ8ňĚíz?ĺăTQň4Čů~Ň°¶µ<’3hއ±Á 6W^:ĹÍɮæÝ)}nů@!a™8ŹÔ(ź{źJ‡=ťNËŚ(ńě]fRËo‹9ŹrřkÔv&?Ł,Ń䕾qŘŕ´/šN™Ć&¤¦ˇ!›·ż×P™Śüô;_p’ËĎmśöIŮŻđó$v!ÂÎŇź"ă-Ú.!$ńH űÜÓŰ}~®(C ~î;xżaq 3d0řfaŘÉĚ~Ăëí¸“HĂ4&nůgÇÝ;śĺ^iŁüĽěČ)Ě(ůw:'ˇS4Bâŕ@áXaűükç‘;’CeŁăˇňÍ2J×J; Đ}‰âŃĚTT§ ü|ÍŮë~Ă®ÜvZ$5 ’ ‹b™źAŃ˝F?ulÚÓ=ʲ‹Ňfí×ĎDڞO‰Ţ~¨+{^HMs%ńgq¬-ćµ~źßíÝâěVaÜŽ÷®38ěX”´GY‹Í-ý~ĂóĘO§t{ĺw[rúd×ňťĽĽ1AĘ6hşăH{Tď„ŰW˛÷cN×…]:ÇOY)#/»S˙ÂĆ3îv"I; c÷~ŇîU÷F!pöJ]qş.lŮí !ĺ–čIů˘vR…îĺ‰sjśXv2bżqÖř„M{\^#§4¸}!ŰŹ@őĆ(źDĂć­ź2S¶^ yO§Ŕ« Ë7LBzµaË(hý÷J{”xN›W0HąúuĂňs”Ţľ˝PW‚ÔĄqŮ`jRÉQ :'c–Ć j~ÇąäNRip«A+mŘĺbÂÚŇŕq§0â´˙¸Ë6î´Ź« qëÔ‚^—T#6ź’¬ăŽgŇv§}şĄo’ú•i¨+Óđp—gNşP™†§+ݎľi{*śÖ4Äeg\¶„68ę¶'JÚi«lŻ9iťź? T˛¤*VĐ·RĆĺ`§3~a0އÂI(ßiň˘OÚË:qĆg?ŚfÄ]W¦ů­ŇTŇ…ă6©0ĚĐIÜ ł—›8h%u‹gŘ{ Ż÷‰!‰4$YąĽŇŕ6,÷Ü•0÷ ÓˇŽzňé¨ëѸD[ŘÉĚnOŢŁ*‹(íDiO"ž“bgaë»W=r*‡qŘŮ^Ş+“ú0z p¬°}ţµóČɡ˛QńĐ@ůfĄkĄťDÜ—(Í í&-a!´'˛í„¶ĚăôÓ<Ó’֕ѓЫ'ˇ!$n;bÇD¦ˇý#á„Ć4Ô÷˝b[{தöJł!#´#˛źí…¶ËYşÝÓoxĂîé÷~aâŃ{Üé ŮonévKC\«÷Ţ7ěęěaW÷v»Î-}ăXEŢO˘–CožĹµĘzŘkťlbÜ™0y6ĎöBÝu§WÚť†˝ĘÁoŰ3*ŤŁ-Ř«b"îz;®ô„iCŽ¶Ďżvą#9T6*0(ß,Łt­´sň}‰âŃĚP±4MÇO°,!ţ<.nߥšć4°md2q©iXŃ™îĐÉ+6„L†'`Úëí^iK¦ˇ/ež% ¤¦ĄŔi,Bë-óšy–\kŹB!„BŠB!„BŠB!dď ©Îw-†˝¶8řë=6x®źëÜÂó:ć÷ űŁ„4OÉŢdÜeëeóAż6¤>8ŐY2Úöeě%‰´‡ ;Jx´yŇ!ň[{NßęMĐWhÝŽtű*ń(W"O2,N8Ü»ěŐ˛őSöÚ—ë'µ}™öWçGŮŽG o?Ř<ˇšć ëgµô0•"Ěęó~®qŠł[卲Şv”´‡]+Ń) ^«‡YÁ;čÇö‚ŘK˛u‹Gś«·űµů8żäďÇŽÜŇ>,oüŘĽÓua–ćńcg^ő6ĚÇ˝ęsxŽĂ^ÂÚµWĽÚQś˝bóN×Ei“ĆŃ?Ťk>slkíąy«&AŃ'e€^ž8Ż%sóÎɨüĆyXC6íIćµ[6 qІ(eëTfĂŻ˝ćađ˛×aeäfóI”­W{ĺĺ)wZT5h]őJ{”xŽ«m R>~Eݰ|Ą×n/Ř|:1©ýCX;óĘëaĺ—šÔ†wԂΩp¦(ń łj}ĺfµô¨i3íQ–^ »lO6?x|Üő=čęěn×%Őř‡Í§¤ęJś×%m/qÚ™[~NR[> 6źT]IŞ÷jËÚYĐ!ŰÔ8ŤiŇ…Ę4Śqď••Ć÷Â|‚IyâßëLÓJń“”öýjŹ{ˇŤüíÝ?%IžŘń¨Ą˝°FËëhŚ6ž¬ęö”łĺi`ťÖ9ŕ­Ó[ç]CôŽĄÁ®ä̶·łúŚcOFÁ“5ŻŚŻŤBgNŚwĐŐpóŕRĆěëĘÉÉřĹ/ţdDć÷MwWVfĆżĚü˝Č|ů›Ëy~®mÍë|.á /]Ç’ű+Lń®† b.ÇIL[¦l%ÜAH=ćKźŻ§ş>¸ľéźb[§ą íz¸,e6ńÔL›ť]šE>U=\YłsÔ!çžł]Rßľ»ź:qío.Á„ćë)2ĹŰĆSĚŘÍQ÷śĺL}ÎM} °µçăeNc~ęó„ö\žjśąŽ±ăĎNÖçëîňŮĄY=^™Ý«ťŮżŮ›íÍÖl®7÷ľ=‹łGŁSŤ™ŔąĄ‚9blϧçÜ—ˇĎ—Ôz ©c~m`ŰĆiŞWÉ ó‰ j窹“|S¸öq=—1˛ä1_rśťÎe°qrÄŇ.Hŕ|E?€¶.WwŰ6yŘ@‰@ €@  ˇ@Ę–»˙óárWĆp×z®ýů–ŮĘňó}…¶)d}¤Í>Oćöôý´”÷‡µ|ÜPNŽTHcŢżŻČöł±ĺľŻ–ö˙ô×é˙|ě‰ü’ŮŮsżęÓö_ëýPúžĄÓť íŘťâCá\ĎuËsşÔŠK3›kz_˛É±“‰d[™]''M&ëuOůBĘŮç5}ç«cM™Ű]uńýÜŐîˇýëšrJÇ_ ÇŠf›¶:úĘá;÷¸ú!t\»¶RÎcPZÖÇd)ʞ>_wW/Żş×_Ľî^|ú˘{ţÉón}ľîîîîŢ˙ůüË}7ćÉŮ“ÎelůńgĂżŹ˙î˙qm˶o_™¤Ű”ěOň3×6S´™k}I˙Řú!¦MC~?¶ŹúĺÝŻ´mu+[hĺěíw›ˇÇCČţ5ż7—cEşMWźÄôŤŻť´ăZ{®“Ô7tLÔp<¤ş®Ą<Ç"^u3R%#m_†ë%źş~5dnĎ5^Jß®¨íÄÔÇJĚx鏏ăHŰ—1ĺlőú°„ăŤßÚ+uá›ËAë»=ŔÁFŐ8®cęžşś-+ą_&#]瞼}ËíĽzńú$żXÍůSjM™Ű§č[Ôu¬öźęĽ‹{§ąëaĽ’SÓˇ*m¶tW9c2°K÷×˙¤ŁS}‚«%h-sű°cĆ`Žşç(gëÇŠ«,ÚŚöľşięˇíŰZŰ3t©Ž×5"çń€tNÖçëîňŮĄY=^™Ý«ťŮżŮ›íÍÖl®7÷v{0gŹFÎłv3Ŕ0·Oľ5$ç¸bl€vÇ÷ť¦P5DÇLkbŽ'k>yÂužclŤRdS–1¦9ľčĐÇĂćRRMzFJ’h¸Ü•?̵žkľe¶˛Űň<ůÖĎůjľ "oëýŕ1c‚ľÍ?V\Ç´6wa uśzľüx5”SóűµÓ-źCćś+0ú[{¶÷Cié€ţߌĄ–s_\hĺmťŁ|c7fL´ř¦| fĚ´ü…‰Źé–?¸ÇśŻk?/ť.őŕ—|BŤÉę.™E± .i¶w×ö$Ëse´ŹiŻ”' [ćů™HÍKř|}ëÚfÉOq’ěóceÍ}…ľěĐWŰ‹,µăPrL‡{1m“Ł­%w†ż“kĚÇž_BËRË1ťł’ţűąëx‹iOŰţBË™óÚň=ëóuwőňŞ{ýĹëîŧ/şçź<ďÖçëîîîîýźĎżÜgŐöeżveÔËj®Í’­ÍD/Ůź&{ą&Sy«íµBł×‡ô­žŇţÖd|×nSÓĂc(´?|ĺ/ĄÇ’Ż,ýň‡›)Ď7Úý§/ˇĺšrĚ»Ęs^©ýNQ‡Đń+é×5\Űž±×űÇ´Fu3R%§ďúőŘŚD+/ů¬)Ł}éŚč±SÚÚ[xĄĆ|h»ä>~4ăEŰ·šşřŽéáré,JŽc3GňÚŘăČ–öĄ¶1ź2é}íÇôTu(yÜĆě϶^ÉTg“R)„9u±AkÁßÜęPËtťT8ŽäĺLńLĆăştP°äń˛¤ăˇćk€«śĄľř°Řg¤ď€¨ůd1ś©¨)!ňNŇ)…\c©őľÎýM¸–Î3XÖř¬ŐiîAî:†ĚJ嚦óÝ=»ĘąäŚöÚ:¤Ú¦ćˇÇ©Â)2ľkÚmřp©ë–YÉ:”ř«~9ĆőX{§YźŻ»Ëg—főxevŻvf˙fo¶7[łąŢÜŕö`.Î5yňőm¸ţ–rš˘á¦ŽŞÇ˘O€Ş)˛Ó€%_‡Éµ@ @ Đ„¨g¤$ąo†Ë]ą°\ëąöç[f+{Lε}…¶)Ď{™,}şżĐńäűýT}ű¶ěÚ˛°‡ä9¬y<ÖŢΚó /wáTç<_>Č©Ćiěď—:‡Ô>%ů:kJ&ý­=Űűˇ´ÁŠt ˙“YZ[çV^őß2Iť˛|c7fLäHĂ{rŻáÄÜĘĎ1&¶ZţTŤBMAýđ˙5ťÇűfsi¦xÍÖdŁ–f<÷˝J?$űµ+SwŽ,ňŇ–łK1Á˝¤˝bĆCęLńÚőbŽßX[ć+Ł«ťKÎöŚ˝¤µ -K-çí5§ĆjšóąoĆs¸Î$”ëÍõL‡k„ďÖĄď“”/ăXŠŰţ5ÁÁ«9űO{K!tÖĘ×·¶mć%ÚÓvÁµ]đ\ż?¶\Sż„®ţÖŽ)×ďµr1Ň–KŰ·’~HyŚů;I}Ľ×tŃ^srĹĄ‚)éĘaűV7#U˛}™â—wĘvp”îżŇmíę÷Ňăłt¦ř\Çk,ĹŚ3[úZÎ+š>’̢”:ţ|ý>\.­C©ľ-qŚĄLI3‡sHčţZą‚ö>ť˛µ*-ÜŹž"ĂĺľkI1sî)‘"F›Év^Îůž©¤Üµ·9Ú#Ç9˛¶:—¬fŃßÚsĄĐ+ÚüS%3­çÜA”Ľ­sôCh¬˛´Ü·%ŹŻ“áTĺ\šĐsö”ăt®Ç­ďz;Çăˇt4ű[ě›ÍĄYϵ‘°ä‚­Ó\ČC2qű–k˛_Kë^âĹ~š~ť‰l!s{Š18őděŨýc@[NßńPbĚKĎ=®Đšú»Ę)ą»ň’Äq{ -K Ç­d–rŠă2őyIşŻPľ˛ř®o)ę0I ĺj¨Z¦ćµÓëŇlâˇQ°&·&8©{ŞOY)ö'©ööFí™ŰcÇ`Ş~Éoç*ݶś®ß+=ćKÍĐŮĆ€´î’~H9®}Źz¤>Ćj:n]ż?ĹĚR®ú…ŽĎóĽ­Ü©ĎuŐÍH•CŰ^3CÇdhťÇ¶ď:ŢSc!ăA;N Żş©’ź}Ř—“ŞźšˇÖţ+=s«ß]·şçzŚĺ*‹¶Íxq/€Ô& ¤ZČŁÔÂÔę,ÖK—«=ĄĎ ŇyŹMnçHŤ× y B0 ˘PWŕČŘ ‘eFŞ2r=Hš2ËsĚ'۱ ť6õ«śąłf/Ü9ęĐÚ¬Eh=Rg· cŮîÇö—˘)úĎ5–bö§yŘÜ7®mĺÉqüŔÉú|Ý]>»4«Ç+ł{µ3ű7{ł˝ŮšÍőćţds{0gŹšř¤Í§  «ć zFJóŐĺ\'e€f©9|űÇ,hń°9@˘ž‘’äł.wĺ·s­çÚźo™­ěˇ •µű mSžI7C—\lŚE(HŮ.6¶ Ir‚¶ýÜ—`8&[Ľ¶Î9ö%­?ôm# ÜK~ 4Gß2^ ‘@ŞU®lô±łŇۅ۶ÎŘďřę -gČ6]/5”.“¶‹´Í†ŰŽiip’Ş­]}ë ˛űy"ĄŰ”öATHŮŢ&Ľäž%^4}·.}3q¶Y’Ô3 ÚíąÖ Y&mi›Ő|á÷ŐÁ¶Ü8ą‚)Éń%éŢËRľ kŠ€Îv‘ŞťŻľőJ¶»­=CŇęL0MŃÖľ1ŘO’j›ceTHµp˘žűíŤÔ·ľbÚSňü[©rÖŇÖľ[ŞŚkŻ?I@”+ŔìDĘ:älëÚŰěé“§ĚRŔ@–©±‡€mĎ€HOĚąnńŘ.ŚÚLń!·©Bꑺţ®r `{ţfl]í2íĂëŇöšzöÓW[ߎ•[Ä…lsl·ö@ćd}ľî.ź]šŐă•ٽڙý›˝ŮŢlÍćzs˘˝=‹łGŁÚ>™/őkß|Ýť¶”=#UËץ—ú陯«ÓÖ€F©š.(K˝¸qQ§­Óáas))€&D=#%Éĺ5\îKQa[ϵ?ß2M¤ëÖňÜLŽ2Úv€@JČ•#LšďË·=_6ÜgŠ:Ĭ7E€•ş,ä\ @ 5g’HÚfĆ$łu¶u}ÉśK”THů˛Ó×pq—ĚšŮnEJgâ´9צ, 8ňYµ”#GPçşUć –J—THµË+ÇŚMŠç±¦. řŻ?¨ČÓ'O™% !Yf¤úÁ€ëęY©\··$uÝź­¬cő•>#UKY@ć@ĘuA.{…f»%ë ©g®urod ¤\3N%ĹÜ«Ą5á#™©šŹÔ/Ő\:Ú?6  hBÔ3R’nĂĺ®Ô$®ő\űó-ÓÖcîŽm_Kşž–ÓÔřĆîÜĆL©1ł¤l [Đ$9Ű~îË ç Ććpń.]Îűómłĺ ©oĚ·2çÜG|Pe 5ç kĆ­˙BËŮ1Űş®—c—IfSśĐs´‹«šö’׾rJÖKѦÚv‘´Íńç¶:Ągľ1¦=Vr¶iÉăv©łÚŚ1ëóuwőňŞ{ýĹëîŧ/şçź<ďÖçëîîîîýźĎżÜwcžś=é\Ć–6üűřďţ×¶lűö•Iú»®ý Ëgű·í˙cuŮżć÷Bäh—ń˘iëTËR´ť¶]¤ĺ´/)Ç™äÖŚ‰v¶ťCJ·©ę MŐÍHMůiÎ73!-§ďöb?MKČzÚýµŢĄßhźcvA»IßÚR-Ągµőź¦~1e±íŔ˛MH…äŮk-(ЬÄŐ|Αë¶_ëiĚ8k±˙ ·Eżţ …`Žv‘%×›CÝ—¨t[=}ň”ţf.ËŚT˙ÄázČ4䂝ó–‹í¶ćˇă”ëőglő×îOŰŢ1ýş‡˙·mŰ—k=m[JÇ|L[Ű–ĹGŇq6ű™ęxvő}Š:ÔT坬Ď×ÝĺłKłzĽ2»W;łł7Ű›­Ů\oîO ·sqöhôâQŰIŻ"c©3-Ś{Ú@yŃ3R©żÖ[`)AA4HŐtňćB‚%aĽÓfę@®=))€&D=#%É6\.Éő5¶,d!9´lőr%[öĺj“nßµŢز”ß:Ę‘źĎ†gS–× ¶ńč:—×Z>ßůµćc«–/ 5HąKšA~8lË|Á‹dYëßěK90S·IMoÇ4}@żOß^ôÁ<Ç{ÎŐ)ëçşfH-ŚdÖi >ôÓz?kü0¨ ťQł}Zńe»×|ú‰™Ťs•ÇUGÉ2Íď;IŮĘ©­CL_„ÎxşĘŁmëqm Ö}'YÉx’Ě@űúhxڻõm_›IʡťeOÝď’ńçK/äËyâ8JÄ–1ć+dHű0¤~’öőÝu™•őůş»zyŐ˝ţâu÷âÓÝóOžwëóuwww÷ţĎç_îĹ™ŕű™ŇmYéCłŰ‡ünH¦ű,÷¶,ňcu”l7$K˝«üľúúÚFRö~‘Ś‹Ôă ¤ýC·)]łM_YCëçëľ Ý§m›šă7¤?%ű š±«i_MÄô{ČůJz~őm_{iŰCZŹý'±}śş>9Ž˙ąĘ6#ĺŠB]yě CęÔ1¶¨z¸<ÇŚćwÇĘó)&´]¤ăÂ÷ÉPş,uý|ĺô-Ón3uýj»"™ĄÔĚşiŰ:ĺq›z|¶”r&¦ µÇQÉ:ä:żhÇ`Ě ąegvkĎ5˝Ż˝żZű}Yßm˝TAkŠmú¦đKŢ9ú“çHĘďąnŃL}qČ=>k>§ŐÔ5Ő!Gńü[˝&}ý+BÖFĎ%ŁnM ×˙ŰőŤ˝>1úÚ¸–o˝ĚůSÖ\ë7CĄÇ”vmSŹłTçćTK^ĎyŘ<Ă ńM±Űnˇ—…Lw§:XJtÇĄŢ×ΚśÇöźłĆö7<ńĄü´Wb›Sź@lĺq•3GJőźd|şŽ1íńS?[{Ç´—¦ßsô¶]JG1ç:i[Ű–Ĺ|YIÓž®1ď»vh÷·'ëóuwůěҬŻĚîŐÎěßěÍöfk6×›űĆą=‹łGY˘äŇź–Ôą9ëË438>Ć<ĚHµ}2Uźľ-9ŃęŘ-5Ű0ć ¤ĽZ锥Ň»`Ě#/ríHH4!ę)iž¨ţr_n#۲ýĹćóĺ‹É7çÚNI®>Â2´ňöl,g˘–pŚMqťŃÔĎu}Eá@j®A†/pÓäŮsĄ‰É•a^3s¦Íl.­6ŹâŘş’ú‡fw­—úÓ]Š,ňš2ÚÖ·ýLlKf‹}}4O®qťë8’ö‘´/bú]2ţ|©O|ą.SG©Ř2ĆcÚte13D®> ©ź¤}kză{“ÖçëîęĺU÷ú‹×Ý‹O_tĎ?yŢ­Ď×ÝÝÝÝű?źąÎ4Ţ˙ŁÉ6’™Zšu\›5Ű•E;4·-űxŽ ó’lޡč%ýŕŞclFq×6ĄËb¶)Íhź"›{Ěń‘"S»ŻíRÔUŇG!YësGšă$Wż‡ś[¤çBßöµÇ‘¶=¤őČŃŇ1ÓżŇ>Ń^S˙Ë6#ĺŠl]Q~ě¬EŞşˇŰ’+kfĄrLOq[(őŮź+‹Ľ6ĂĽf˝9|šóĺ Ó|rŤéżţ±VăqT[j \·ś´ÇQ çAI»”Ěá:ĹţĐŕ­=×-í=ŰÚďőşnëµv‘.]¦›Űmkß-¦9ŚÝ/ž”<˙ÔÔ5Őó bMúúWÔ­ŤČKFňš@Ż˙wɸ†ghćöOôs¬ßpŞôóľY2ĚăxzśŐtţĚ˝żáu’çŁâś–ľi{Űm[6qß·S ŚZä™ÔÇśáżÇ> KćoʱżÚnÇHŰZŇ?µ·µô¤-ÍZňÁ)¦~¶öŽi/Mżçč‡ç—Ç‘v,iĎgÚqć;·ĆŽů±íiúBó…Ś;YźŻ»Ëg—főxevŻvf˙fo¶7[łąŢÜ7říÁ\ś=0-uQ7ĐîěÇ.ó¨ŃiŠÎ®=˘eúhď"26K0ć1«@Ş•Žf@mác­ ×@˘ž‘’ćžę/—äÉ[ϵ?ß2m=ćÎö¦ęšŰŁÔ7YRďGűVpŔŚ)Ű…6&Ů©í羼ÚD‘­\ŘJ—séYÁ vÚ=V ©@jÎM¦x×z®u}™Í}ĺÉ„f!×´‹t=WnƲŘú!dľ>ŚŁ®¬ö%ÇçRgoŔj}ľî®^^uŻżxÝ˝řôE÷ü“çÝú|ÝÝÝÝ˝˙óů—{UvkW†i[6ńţM¶ë ÖŇěč!™ą%ĺÍΞ#S|H»Hë§méz!ŃCʢ͎şMm_ŘŽ•Ňă“ěđđ}ŐÍHMů)7$)¦t&˵®oF#¤ÜĄŰ)u»hŇ<¤ŘfŞşçL—ˇ/1ű·íđ}“R%“ —ę4ëĹd6/}Á+Ů.-ŐÝő ßÜ>tľµč×´ĚM-4 ČŮžôU˝mőôÉSúŔ"e™‘’fżŽÉÜžęÓ¸­ ©2˘Ç¬×b4ŮËSôˇ/Ëřđwl9§h_Fô)úHňeR4ýRÎś·/ U'ëóuwůěҬŻĚîŐÎěßěÍöfk6×›űćíÁ\ś=Šž­¨q´=ýĐŠž‘rÍ8•ľx4HŐô©—Oŕôč(Ť\{RRMzFJ’űm¸Ü•|صžkľeÚzĚ]?Żš´˙j*»M®˛Jľ —ús¶>Ě ˛]´lA“äbcűą+î3őű¦ §_˙Ő ô[ÄcއĄ#@ µĐĽkĆÍöÂC×z®u]/W<.“Ě–¸`IĘę Ę\ł`©ę ikÉňĐňKÇKĘ™'×>§׼ČTâOí®ŮŞN¸’ ˙Xŕ[oě˘ăş0IÚK;;ŁINëÚľ6©Ch@ákkíí;ߌ¨dĽ¸n©Ć´ë0Ó@éqÍŚ©ÂAVMÁ“¦śľŰ‹¶‹ŁöĄ˘%_Fę JbRäŞCŽ¶ÖŚQm šŇuŹ9ţb‚> ŠĽ ×H{AH5+Skđ)yV-4č(Y‡Ř¶n}†…@ŇYôëZćć¨ő6Ď5njh—Ňexúä)Ç €¦e™‘>“aűrAĘ•yŢV†±źkoĎh×{Nj¸Míţ´ý§yĐ|XNŰs4)ë mkiYRÍLąÚĄTÝ]ý”âřËuě@ NÖçëîňŮĄY=^™Ý«ťŮżŮ›íÍÖl®7÷'ľŰą8{4zÁ­ńýBś¨ŃŞ)Ç/Ç„‹ž‘rÍ8•ľ-N}2° @ަ“> ´cÚF®=))€&D=#%Éý6\îKIa[ϵ?ß2m=殟ŇCú”űťşŢ5—1¦˙ŤR¶‹¬/o™ëÄ/Íăf{Łvč·÷Zą•.g®Üw©ł\íB`2Ďq ŐRs>‰»fÜl/.t­çZWň˘KÉ `‰‹’«ţŇYĘĐ6łę©ëďŰ–ô…¤ÚńR˘oµý—kĚó˛NM[źŻ»«—WÝë/^w/>}Ń=˙äy·>_wwwwď˙|ţĺľóäěIç2¶üřłáßÇ÷˙¸¶eŰ·ŻLŇßuíoX>Űżm˙«{Čţ5żB[‡Tevm3¦żCÖqŤÝśă%wßjű/×OU'Ju3R5=;ăşM(ťÉr­ë›™Đ̢¤l W]muH±ż–g8CÇ‹/}J®vŃŚÁľN=^ “R-$ Öžô5ë…q%‚ĎŇĽ9\`SŚŰłôÔiŃŻ?h!jQúXyúä)Ç'€ęe™‘ęźü\ąřB™\ämeűądź)×ëĎNŘęŻÝ_‰ŔTZW|őÓî3ußjű!¤nąű6¤­SôAÎăJ9YźŻ»Ëg—főxevŻvf˙fo¶7[łąŢÜźÜnćâěŃčE ¶_§ncf>˘Ď`˘g¤\3NĄOô¨űBü>0ç‚ "s=čú–Ť\{RRó¤ŽďyűÚţđOŮđw%ëąöç[¦­ÇÜŤĺ:“ü_şÝĐ6.Őţ’ý” ¶~Ô/ú[{®ô!¶ŻL»ľJműůŘ›żÇŢ­ąč·đ mK_?÷Ť‰őjŞĂśúhÉ㪠¤ć|ň·}eß–ÍŢ·žk]׋Çf,lédRćľł˝$ÔWÎĐrhÚk¸îńwbëď«­ţ!}”Şź\m3ĹŘĺ¤ ~ÚwÍVŐp2öÍ€ő˙oű·-X Rlż#i/ßţ|ł.ˇo˘v•s,hnÓ¶ž¤­SÝsmĎ7“Ş™Őök,M1v™‘@ U‰Ú‚'M9}uŰ…S äx¶¦qŚ}fŞÄ(‘71U ś”c\3–böôTĆ‹RŤ´‹Ďׄ´MÉ‹ZL9ç vö/t˝?Ŕ’,úő-s-’S ëm«%~#Ŕrd™‘{Ýí›\Ňl®Ű#¶2Śý\{‹I»ŢŘsRĂmj÷—˛˝¦z>fřŕsČĹZÓfľul}T˛$cÂö°yĚ1–óö%Ôěd}ľî.ź]šŐă•ٽڙý›˝ŮŢlÍćzsRĽ=‹łGŁ–ÚN<ôş\ô=mĄEĎHąfśJ_ °Ľ  ŹĐT Őú Ń6úś6€©‘k€@ €@   QĎHIóŠő—űŇUŘÖsíĎ·L[ŹąëżąÜ÷fěÖÚĄĆň×ňŤ9Wż R¶ ”-h’\Pl?÷ĺÓć\kĺbR˛śsąŔ–~›¸ćX™S{/1(€Ó%WŢw2v͸Ů^jčZϵ®kĺ¸L2Xâââkß˙ÇÚMR˙”őËŐ·¶ľu4}ëK9‚Hi˙•:Vx(€*¬Ď×ÝŐË«îőŻ»źľčžňĽ[źŻ»»»»÷>˙rߍyrö¤s[~üŮđďăżű\۲íŰW&éďşö7,źíß¶˙ŹŐ=d˙šß 5Ö’vŃÔ=E;¸Ö KÚľ•”+țjĎc"¤]r+©ę±Ş›‘šň“eHB^éL–k]ߌ†fv%u?¤ľ…b«{Žúą^«í[×:SĚŚµg˙ů§Rý—ş=cĆ ”4Y ŐBÂ`íÉ[ł^HW2ř¬áˇäŘ~+ŽúÔöLÖR>Ŕ”ýú‚ąVŐÔ®± Ť[۵|K°ôţ8®”’eFŞsÝ^ ąŔĺşub+ĂŘĎ%űLą^˙Bh«żv!ľ±ŰFľe1}›Ł~ýŔ·MŰĂŃ®şÇ”QÚ·µÎúähĎ©Îęd}ľî.ź]šŐă•ٽڙý›˝ŮŢlÍćzs’ş=‹łGŁÜÚN`|-ŚźzęÂń`î˘g¤\3NĄOŘę9&€@ĘŁ¦5 0Ž8. 4ríHH4!ę)éWÁűË]yŔ\ëąöç[¦­ÇÜŮŢ~ťúu ¶ýNUg›śeĘő¦q@Ă”íâăK/âşŘ~îKÄę Ćj˝¨×\ÎśoéNą­Đ˛-ůíă-Ŕ0Ű@jΆ)2ÚŰöç+OŽ Ĺ×ncő׾°R:Ű8Öf©ëŻ©ĂđE¤©úAŰÖąĆ'/Á€ )×Ŧ–µolxKRrëŇv±r]Đ$íĄťe‰I;VWY\‰´mCĆQŽ~wőѰ<¶Ómťk|2# ĚHŐ=‡2ą˛˝ŰĘŕËh˛=ízcĎI ·©Ý_‰Ŕ4äY-[|őK=.BË2ŐsC!í’Ş˝rв“őůş»|viVŹWf÷jgöoöf{ł5›ëÍý óö`.ÎŤLµťLy ¶ŤŮúö€9ž‘Ş%Ó<·꿸żĚąČ¤Č2ú‡¶€e#×@˘ž‘’ć$ë/÷Ą˛°­çÚźo™¤üˇëćRĂ7®r–!vŰ%ŰÇ—Ë.vü-Éăzę>ÉQçç,I;…ÖĄµoŽňMWLHŮ<_ž4_ţ4É@·ĺ2ÓĽĽ¦¨d9¦¨w+'«Đ1ŞK ”¦˘JÜ%ë—z_’±;÷ “Rsż8˛±ÄݶW?H’×Ő¬ă+§¤n’YľÔł1ő“nW›Ěyěe˛ý¶ŐžxµëşúÖW÷\ăsl¶íúę­­¦˙bÇa Ç‘$ Ëqžô_豫ůŔ¬í?[9KŹOĚÔú|Ý]˝Ľę^ńş{ńé‹îů'Ď»őůş»»»{˙çó/÷Ý'gO:—±ĺÇź ˙>ţ»˙ǵ-Űľ}e -gż\®˙KËŮ_×·ßĐýŤµ[h˝cë§mkMý¤c$ŐĐ.Ó¶™¶î9ǧ¶Nˇíâ«oě1S÷)Ź#ß92ć<;®Ąe iËcW˛ďŇăóRÝŚTŤ‘}ę4,ý”#)Ű%eî@×ţrÜľŠIŁăűýĆTl›ię®-‹m|–ľm9Uęť”űÎqĹŢBMužđÍŇjÚ°ĚúžE”ö_ÎôbŔ¤·öHÜ.^ÄZG9µŰÔ¬çşĹ‚ĺ^5·Ď§ó»4«Ç+ł{µ3ű7{ł˝ŮšÍőć~ÝĚĹŮ#ë'ţÚ> ä(S+ÓÁL[ĎűS.} ĆP—Ód ŃzęiÔ’ł.K('č[0–©9?tĽä‡Aß‚±@†‡Í¤¤šőŚ”+Ń-Ađ0‡ťm=×ţ|ËŞ ¤lA‹-h ž$Űó`Ă}”Ŕ­=€–)×›uŹŻÖgf Ôî´¶•|ľÉő’:–±Śe,cËXĆ2߲¬)bĆ–Ź=\î{¦jl™ćů+€”xF @)Ë­˝ţô—+_Hr2q€ER® g¸lěší4HąfśJâ[~ ©@ަ"f«@i©Ň˙ähOIý|u"¨LH…\h[ ˘|ŢĎ5hŤŮžäů·ÚÚŚ*Ż?€5 Ś çdvŕ“eFŞr=¸›ňöOjľýŮ–ŹŐ)ĺsR©ę?VÎmĆl˵®«ś!ˤĺ>„>6–KŤA@ýNÖçëîňŮĄY=^™Ý«ťŮżŮ›íÍÖl®7÷ŚŰą8{ÔĬ·[@)Ń3RĄż&ď+@T­”ŔĂćRRMzFĘ—‹®O’šÄµžkľe’ň»¶«yţ*t˝Tß6¬ő›”6®ô7)÷[2g`H>Ŕv M^Şśýu]ëh“ŹťC¤ç‰ţsŤÁ~äf”Ľ­źç<R¶ß— ÍuBŐćNóĺśÓžDµ'·9ĽŚ2U¦xxL.ÁŘ ~Şŕܵžö[Ş9Ę)ɨ)oŠvgÝő ÁIDATóDŠ1čëé‡Ä±wŃ š-ßě×đĹŤŇYí§[Él\Ş—`—ůfS_lí™#łŐßWwßŶÔk8|űłőQL9%ý36Ă8<^JňĄ‚u[‚p[» ŠşH>ą–šąŰźäB5öiÓµžďDűI7äBĺú”=ĹI_2«‘ë(›ąóš‹V’2»ŽŰśď¶KŮ$Ŕ¤˛~Ň®}šő$ig¤3(’í‡ÎĘLŮGsżÄĚŞi.Ţ)ĆuŠäŃą@×6säąnw— ”Ě( ˝č/ý‚šc†Ä÷LonÉźKÖ'ĺě"^0ł‹n©ýLx--Ř‹ąxç裱mŽ%vÎb˙„| ¨é–ëv[Ý}í`>˛ĚH O ¶hČÉŇw[¬Ĺ@'ć˘2vÂŽiOß…`ŞöNU?Űs4’ĺŇo®ŮĆ|Š× וc%Ę™ëą$W?HÚ%ey¤Çź´]r•@y'ëóuwůěҬŻĚîŐÎěßěÍöfk6×›űüö`.Î%ýÄ\ă§x€Ń3R9ż!ó‰ ę@ަ™fˇ@iç¶THŮI&řجî¶ôˇßŢó]$SżGSĆ%HýöiW—Ěë7ní9.¶¶·C6¶Ľż^Ę€©żOiYű? YĎUDZ}ŘöY˘î®ŔLÄŰ^LJŔ $מ+Vé·i»Ţ~íşÚf5J'#•ĚÔ暉+g˝©úAŰĚ6ňY-ěĎ÷śNÎŕÓ7+”şm$YL{ú‚OWÝsQľý0y 5׋ÔŘLĎÜ‚Ođ-ž‘jH-“ďÖl®9IŕŔŰÖ'8Hd™‘’f¦™•re‚Ż-Ř»ő–«Ľcű“쫦öÔ”ß×®®1ŘŻ; ĆÉú|Ý]>»4«Ç+ł{µ3ű7{ł˝ŮšÍőćţÂv{0gŹ˘gJ]”ą8.ŁťékŔÔ˘g¤jůdĎCÁeŰ™ €Č@ަ Őeµ3ý ¨›HH4!ę)Ű×çÇü–¤&q­çÚźo@u”-h±McÁ“d{ľl¸O€¸µĐR ĺzŁů1Ĺ3K v§µ¨äóM®Ô$,cËXĆ2–±ŚeľeYSÄŚ-{¸Ü÷LŐŘ2ÍóW)ńŚ€R–[{ýé/Wn6׳RľßeÖ Ě2r9ĂecŻ0Đl ą@Ę5ăTßňMR5Í1[JăasÍ`ćŔ˛©ź‘ň˝ýÓö˙±©yé 9ÇöSVÉK>]ű[檟¤Ýl唶ٰ­cź›úË9_yQÓË[}coĘ>˘Íků d ¤|Á“oÍELłnĚĹ2äMë’ žv{S]PRż=>¶ĎS﯆‹´«^®¬s—ňĂTHMy’Í}‚Ť zćŔD ۬ÚŘĎ%łx)ÚVş?Ű,mŚI×-(†h’>Ň®wl'[ý]íâëűÇ:LHµđ¦q× ľÄ,Ăđ…Ł¶˛řĘYK[».l®ŰŚ®őrĚĽHög ^úëşn•–¸Ŕkú]›ł2&ץm;®ŰúHH•ľ¨Ä–łT%·“ĆĘ"Y6W­|­=äV\ę±rű'•ŞîcĺLőz‰±ń­ÝWČ÷ő´o%m6ÜĆ_ď`yNÖçëîňŮĄY=^™Ý«ťŮżŮ›íÍÖl®7÷'¸Űą8{Dk-p‹jŚIµ9Ą ťMJPŚ;RE00î`ąö`@ÄĎHýúwź©wň‡hi°Ü@Ęc~ó«ŹU;ů˙ykţâ'˙†ÖË ¤Ś1ćíŰ·ęť}đŻŇâ`ąTŚÉË”ÎhqhĚĺď¶ćĹŻ.ľ÷7€ÄÔĹŹ/Ěöfë¤hphŃńü=ü JDů48Ěçt Q % ˘ľ=č8ę`>çt :’QĆs÷Ž€ąŕś~ŘüŔAłÁ9HHmo¶ňY©wLŔlpNŇĚHI)>˝Ŕ|pNŢÚ“St@ H9‚)':hÎÇ?{:ú7çt đĂćßp?š´ý?˙0ú7@ ŕíŰ·ćżţᏊÝ|`^^˙_Z,3úĺĎ?2>4żůŐÇáźdţ7ź\Ŕ‚©×·c @P őô_“ť`č4€ŽřÖŢ˙援VĎG?űF€@JîăźL‹c>űĂgćáÇćíŰ·4RrĘ@jĚGŘ~r0߼űSú€6ćíÁ»ĂÁwßM)°˙íŠË¤Ś1ćęß}`Ś1ćcĚŰŻćđőÁÜ}mĚŰ»oĚW˙řÖ|sx`‡ű7›˙·żç›€€@ĘcĚ_}e]öđáóĐcL/xú{ŇĹ)cŚ1żřÉźýţĺ˙üŠÖR9\üřâýż·7[z T'ë 9_ţÝë.~|a¶7Ű÷úAUH–*ČH}uç ¦Ţ™ď˙ńQ}Ă`jä˙?ü{ř3Űz’í %ąµw|µÁźţüćĺďĆf¦~ťĽ2Ç€kő6¶\ş€äÔŰŻŹ˙ş˙&ŢËßýÂüĹúĚĂŢüôçż4ćđ•9|˝7‡Żż2ćÝťąşůŤ1ćł"•$ 9$|FjD]s¸3oo7ćđŹ;sřúŰ—v>řŃĆ<ř3sqţŔl~OĘĐ®tßÚ{÷ŤůΛˇŢ˝5‡włů»ďýę‡?Y™Ăżřáw‚ŻŁ±Űj®Űl<\š¤Nţă}ľ«?7ćpŘs¸3?ýËă¬ÓÁŢŚ9ÜsŘ;·5|¸ÜőđůŘďŽbcŰ Ý@ň@ęî·|ç˙›ßcľŢ›Ăá­Ůüőß˙üĂź]Ľź©2˙üŤ7’. ´¤Ű Ů@ň@jčĂżúĚüíď?6ţde.ţí}őíćcŢÝ™í˙:˙ę3zHŤS®‡ÉKQĚ*€ć©’ÁŔ~@čÍH}öf‚©Ź~ö‘yřđ!-HcĚŰ·oi1€?á)%ëŚÔ/˙šÖĐR˙ýrϨ)ž‡pă)))))HLH]üřâ;ú?—®źâw´ŰĐn[ZWM›,A޶8n§DŰĆěľ)«íÍöýźţϤë¶HSîVëš»ýb‚ŮăvjoŰíÍ–` âÔc~ńŰ×Ćű”0«é/rÇ/$Ă‹¨í˘:Ľ8Ž­/ůyČŚŻlĂ:…Ě>HŰdlcűۆ­Ăí¸ęćk[™}m;¶˙ţŚ’o˙!ă-¤ľ’1'­—d` Ôż˙č»ňżÝEmT„ř‚“±ő%˙–\%Rh=µűŐlăxkulćĂ0…¶Gh[ů~çXŢĐ}¸¶Z_龇·iCËđ'‹Ž@p@d–:¦…ĘÜ@-šŃ% QÉ…ÚôB¶ĐuZŘ:»°M¶po?´nşIîĆYhë¶Ř… qá†(°a•ů#R¤@‚UHŮ Ô0‚f ‚9ü?Ś$K˛^Fo~‰źDoórΙyćśiöx """Ú±Bc/ŹaéŰ4K‚h§†9ŘŽdIíä07 6K‚h'‡ąe±gNDD´ŁĂĽŕ8, ""˘ťćn±ý‡˙©ĂĐĚU -*`Ż9ž˙¤TEŔZô(` ç‘ůMDD4Đ0w¤ŰöŤąĽŽů§„ן€ţT<@KÁî)Ą÷ ţřKšha.·?gžŚR@»" mX‡ţB‰ă:˘C€ůXľcĂ2M hÂ|X€,őřLľř8éż_g˙ś†teÍósßä»g^ąóoÇ‹7ň0˛7̧ k™ś‰ÔmsÇT^y=–nä+Ë]żn˛XŽĺ{ŇË&ŕˇy9”,ß-`ţٶó­wöOi8męZ×UŚ3` +~»Zu°TW?ćŮCť5k›Yg0÷uąĽßžEHŕÂą„@Wm};!äQŁ/h*ţЉě= ©˙gV¶çNËęâW9äX}eąĂ'ŹŹ ö\"âwHś5‰lŢÂŇÍüŔÚL7ÓśĹŘDýmçGżĚôµ]vZvŰiŰb°lcهŔ…ŐK@; Ávldsé+ /čúő(G~gË·2€lú5—ôa ťó‡îË2ą,ĚU@‹j¦Łđc剂(ŠR;ÚpßD6_Ŕčˇ(b/ę?n }ׄőhgUbö‡<˛?XĐč•ç –#ˇGčĂţ_ě†ŮËYHÔVHˇŕŔZ[ßđŇËydîć`<k9ßô÷ůšÇK©ŚâĺDŞŻŹý*Îż9„€ôw&ŕI$^6pţ­1śúS v€mżuÖ®]l–Ń,ÜĚBŇ<˘ˇşŘ:më[äŮßĹňW"wׄ0öĽŽäQ†ˇbćł2řÎŔ\uŕ86R·Ň(CÁĘ"s'§(żćŤQÄžS ‹éď-„5čűĂČÜĎĂ8h ¤Ít:M=­<6*XůŃ„6¬÷­;-»íşmíŢžy€ ĚZDHţj'Ź«ůđ*DÄA8˘Â)šPB&¤=Šě˝0¤g@† $ýáwŮůŐňÓŻ'pőÖÔHmŁ’ž¬L/yDGň¨}H@J sßÄÜ?ňRâúĺńĘg>ťôŹd:8űÉúä\˝™ĂüRÚ>ŮĄ3Ą FÂZµˇ©mçᔂ3ż…6¤ř×H>óײ0M˙ÂÂň˛,ŢČcĚĐ +pŠóß摾ă÷*c‡4L˝j@V€ŕ8ŮŽĽ«Ë.}“ĆÜbBLür—ţ8ă ‚řá0–n95IŐď-SUµe˝I LĽ55R˝± ˙4K“ĎMŐKAžÇÄoć Ş >ťÂŘ‹:Ć_Ö0űUjD´\Ď^ë¬U»R—ýRX“{QG8ä×ŰÄQŽ#ˇ(bCť¶[®éÉ’/ëXľ[Ŕěg~{Ń4_ü18ő~ Öš Ôž´ŐĆ=FĂrřĎ7."›7!" F ×/OCŹ*xĺpó7 !Q™ĎG[F¦4Q~nćŻËČĺ-[VŇ`®ąR"Ó0~ĚßND©gżÎl¨×ÎŚHľě—ëŮO3°Ö×aě ß†_ygŮĽ U(phűTŘŹ,\ýż3=µ™J™^Ëc,ć—iµfű§z‰1˙€Ď)JŘŽ„>¬ŕ•Ł:ŇwśĘ¶Űh^ĺ2Rvú~Ç{>Ú°Ţ;ݶĚUŞ˘@‰}ľŚLÎŻë“Ç Lž0*ë\ţěŇMń?˛“_upńë,,Ë 4†yi(¶Mńß­í#uÓBâXbHC8$ˇ„âТŻŔ8ĹügKXľm#zȨ4î ÓŻéáÝČaüx SÇG1­nRšŢř1ÓŻÇŕ8żN#Ó‘xIGX„qć“ –nš?汦nĺa,«˛ą,żáL‹aô9Ć!˙€Áq$R·˛4„Eűy„C€"Â˙& §(‘8b`ěEłŃ8’ď, R+‹>~ĚŔҵĚ‚‚ÄK:Îü*†ÔÍ,RqöÍE`î›e8k6ô* ]Gţ‡<ôaŁ}ˇyËYۧAŇ‘ŕ÷„/é8jŕâWčŃőŁůÓŻ'pňxů;„…ky,笖ő&`Ýľ! k×—M,~›÷ë§ÉgŚ~Ż"wĎßŃëĂŁ0M‰±xĚ@áýÂzëuíµÎZµ‹ŘˇW×eŻćݤqţ7ILżGöŠ"đŃßR8˙›ä†¶Ţ®ŤĄţi"ů˛Ž±çŁ0šĐ†t$^ôË'ý]WŻĄ`Šăä Łm{ŇV‰?ďĎoéVŮĽ ýP ŞP!%ţŢo{‰#fţš®iĎŮ|ÖŞ€Ş¬O7źĎÂ*TÔH˛(8˘ăĚ[ţhŃň÷&VĚFE!-VˇvŻvöÍ’/ë0:xĺí °l CE¸Á¨QaM"řâă),ç,«+,Ö$Ä~­omfň„ĺďMäî™Đu ±ç˘ §9rh´I—–áfÖšŤ3o%1őj ßÎC‹ÖöΫ畹“A,Çů·ĆÚ–Ý…?Lbů~ćŞý€RSďÝn[ú‚é73\˝–…Şh‹éĄSM)ds+•}râ°†ůosHŽ"öĽŽóoŽâä»)„…´?ŢőaîzíŹjěňůoÇĹü_—á"~,ä±Qś}/‰Ěrsź."˙Ă ĆNÄ EUä tú5˝Ż[Y躆©×Ć0-[×ő§7qÜß!Ěţ-…Ą[Y¤nëř×—S{1а°pá+YiXóWŇČÜłţyá˝ëWěy±ç«G @š‡+U¤s&–nea?˛ îSq}ŮBfq Š"  »¸ľîs_Ą0{9mżŽ•˙;„E‘0פdíVÁ‚ů“ÄŐŰ&,+ xn ň+—Kłç ĄsŃ!¶m!Z5ŚŤ*®ŹŢÁ)Z° J¤ńŽ[ĚÝ< ¶„ˇ+=ŻcęU€Äü•|ÓeT"ĺ¶$«p= »tD­Dli#Úf]{­łVí"P]6ŘaĚP{>ęýTŰúZ1-¤ż31~,†ář°® órýµ[®ěä:0(HŃÎÉĘŽţ?Ú¤=j« Ę <˘`l Ż·˝GĄ¶§(°o¬c Ů ín||ň„Qęuć0ýţ<„P‡áş.Ô}ëíů»ĐD‘űˇ€‰·.Ŕ–€®@¨ńľhćrçß­śŽ*µ4¤n™ý|ľZî­Í”Ëô›4f>YňëaX·Ď7śfŁeÔ‡Ą„«7˛pŠŔ™·üm×xN©ŚĽ4›×üÇÁĘnîŠ˙9MÓ°’:_SďÝn[ŃhÓż/Ŕ§)(Cú°ßłľšĘBU×ç?űy ó˙Č ő‚}9}XŞŘ°‹jGíwł8'VşbÝ| ˇ Ga­.Á.čČ,kP„„  ¤",Â•Ż«ť~˝ _f°đÉ8Îţ*ľ! ¤DĺÜÜ…˙Ç…˙ŻmřC™űµWč«{5Q[Ů3YÂÜßÓP#_üy ‰— Ěp'ß»„‚Í#ţ:ÎĽ‘„q@ٰŁŔ©úu˝Ě=ŞŞC„´šEżÎáĚŻ Ěţ~}>©[&fţş¬üĽĺ\őśľO-őBŔ“5ď-—CMyíÓ!›éĆßX„if „„¸ř^“'b8f`ćÓ´}ŤĎá9E?ĐŐ¨,›(Ť8EąaąžßěCť5k#˘m벾 •Ď]Öśë5W i#í{ç˙Č!ń’ý€‚ů+Ë5;ţę¶>ú|űĺZşaâüob8y| ÖŁ˘CţIęVę>Łăm¦U[E2(ź"ІTášzڶh{ĺýƶćm|ŤúËźą›‡h•vVZV?ŕ™.|›†ë ż.<Ôě“j®9ą_Ŕ+o/@D$Fj?Cň¨äQó×–a>DOm¦R¦ËµËÝlšŤ¶WŽ•rNßÉCÓŚĘÜÔ‰Qśţs¦ćŕ»~^Ѩ¨ě2Ë&DDú†zďvŰŞť™8f@)ť:]ş™ó‡Ç«Úő“ uŻ»®0WÍ_đns7Đ›Ąňy ú #0bahĂ27SPC:ĆŽ&8¦ 6f@ŰEćŽ]i”A§_mů{Ëß›?^w–'!Ą‹BÁ»řy ™şsyůU ˛ú(-T>ożq9DDŘ…ů€—€ŘÁ(,+mźhŢŤCQ–nć0%®^ž®*3ąaU_RJ,|›ĹĄoRЇ€Ńt\úă$’GuĚüu R¶żÄ}"!ę¦[~nüŘHĺ Ř«7łţąíş÷Šuo´ną”—ű§[´XŐžRŐk· ÷F‘<Ş—†Ô °ÖÜŇNÓß c/čp˙ž.Fůő”Éĺ·•^ë¬Y»V——o$9Ëʵ-» mü®‰üŹŚ ćľľî5hëA–ëęÍ<ÎĽCěE§KíláŰ4ťo3-ÚjŁ2H/›?n y4†‘o2•:7žÓ(·˝[UmĎóË_Ť¨€gA ćSű¸Ľüńu\ý§µľlˇÚđ_üv“ŻŽáÂ˙LBz)¤—­¦AÉŁ:ŇË.dQ ý˝Ťěý4’GýđTC.rŐ?ŞŐU›Y?8 ˙|ă¶×j˙T~˝Ľ=)Š€ť»T·ü1ż¤ Ąh:Ż e'=Ůp«Ëż›mk~)ŹÄK:¦^ŤW.^ř6í·yo}^#‡4,ßw GEÍč›”člţ»6Ě˝Aî•*ÝÉcňµ“Hß27żo!Ó±|;ŹĚrúˇ^9®!ýéĘÉÓ ÓßNŔě—9\˙}Ăó—®ä0űŰ1L˝–€98ĐŁ Ćkřčr×˙źéź ygŮ{ţ9°ůoWjÎżŽСěS|ÉźOúnŢ߉zÁćQ˝óS'ŹŹm\ŢË_˙\fń$ŇwLXkZéŕ<˛ŕţ\ í{ćUĺ|úő&ŽÇˇG•ĘhŮË)˙hąţ˝ÇÖĎ™§ďűşńWÓ´!ë˙;ŽĚýśG.ôý*bĎ+ĄŤ3S©ď đ/ľ:ůŢVVm„C˙žGâ?t$^2°đ§I@„1öbđ€‹ź§Ň¶­ôŁÎÚµ‹–uŮd´BÝ۸˝h㯼s¶í/żPŤÖókµ\EK7óMw3‹Ě} —ţ8ŽKLâô‡)¤n7˙şŐ…?$*®É˘¬Ś´H dîšpź¨˝µ™&ĺ×všĺ°>˘WNQĄ˙_ňIőkţéńcćŻYMç´ěZŐ{/ŰÖň]«2’…a\&gB¨zͶrć­ô:‡ý6Ľţ>#XűővyˇFŕźçY3±|;ŹŃ˘0Ôű$ü Tňw-$ŽÄ‘ą™‡ůcďß×Î˙hcé–‰ńهĄŻ­Ŕ)Ú:1Š©×Ć BĄďß3‘˝›žĚţ-3oŽ"ö\±ç˘Xľ_ŔĄĹtĂóŻ…5‰ôífţz(ő4Ěcú“4fßĹřń⇠\ú&S9ŠîÄĘC‰1˝rE°żó»»(ˇŞ˘ăéEŁ ˘Cţđu«7rű‡ßS«ďן3Ď?ÜÇ„ëŢöšÄŇ­Ň•Î/–ľďú°€…o3ű{BÔ}ű@ZŔ „ň?ZxĺÝ%ĚĽCĽ8Ëß›ąĽä_ý¬¶żĐŻuÖ¬]ô«.;Ą¶Yď ËµpĂsŔżđͲŞó‘Aʦ[Žăâ?ßľŠéWu$Ź–ľł*ź.Ęaęܤ‡JŰ›ů4ŤŮwăŚâä‰.}ťÁěď-ç±xcŰĆô?ŻCĽčďě͇y¸ußażúOB¤qቶ~ńëâ/(0hP˙+jËß›˝Ľë‘UŐŇfšM3®ÝîN©ŚäLüv®ŇÖýë5Nbü¸©W˙Ç\_Ę®é4zضÂá(ľÍcö÷cĄie„CJ]™¤0q,†č@î~SďĎ—Ţ'‚µßصaľgěĺ±§…đTŰ7&_zsÎúĂś ‹Ĺ0úbŠ*aZ€ )=Xf _gŕ¬I €yčǦ/ý(WJŐűm?6élx\×ńŁrŃ_ˇb݆pHřŻ-T† BŞjTćS7€ ÖjzÂťÍC”ÎY5ËŰp˝ęžłmł4ŹőeB«Yߦĺ%´Jř6\·ż\ő;ŠĆĺŕW˛şWo: `»ĄeőŞ–5¤Ö4ZgŔżI>¶Ż4|R*e¤môżÎÖŰEşěUłriőzĐĺr= iç+媪ë°]Ůi«­F\·éŮ8fŕ‹Ź§ŕ8ńÉ9HŻös~;(·yQKëŘz»i´üBŐ.»ë6Lłá(Éc™Q}ńYH@ěŐ+íŞ—6Ót[h2Í m˘4zÓčużálŘ·5ZßNĘ®e[ěbŰR"ad—üݬŤüröăpeńďú4ńÎ2÷HiWÖ·ş‚ĚźaŢĆÔ«Ż`ćťŮš>}4* qŚĽGô‚ürékËpÖÄz!wćDôě8˙Ö(¦^‹!wßDňÝÂ,”]hęŐQÄ^P|YÇŇͦޛ‡PŤJřÖ†ąěËA3‡Ů›¸~#[Đţxa(2Čç˛B…ăČŇw“ąÁđŃçY|ôU6¤+Ţk°PvăAÝob€ç˙ŢĹŮ?-!eW÷˘·´g~á7:&ĆĎv;‹Ź®¸,i˘Ý¬ęt íN•Ód!Ą4tŢřő~ťÎbŃŽň3Ăś¶PĂ ŕ˘î`ąú˛-ć۶śĽ6Óęˇ\Ç­ËÝ뢜;ťFF|łÔ.k'ݵXĆľµIŻÇĺôWľĺuLK:'8ĺhµ Aö#ŐíxĂ4şŮlňţ Đľ˛Ő¶ĐKű÷ú<Ť~ď·ű°.Mˬuč ¨ĽÖa6ü đ‡Ů«˙vşÄ±v›ôÍô®[ľÝ,gż×­UűجrÜŤmt'—ÓNŞ«~”Yyĺ‚úÇŰ˝ýöĐĆďç9óÔŤTÍ Ąn¤úZ8©©šy¤n¤<žlą,˝.Cőtšť/k¶Ţőźm5­n–)č˛tZÇÝLŁ•äńdĂiµšOĐznµĚýn“ŐËÓÍrýL7Ş?_ÝÎ:-Ç^–#Č2Ô×AŁĎT—w«Ď×oăíÚm?Î 7ۆ®c«íˇ“í¸Óë46Ł vł? şž­Ę¬_ËŮÍu'­Ę1Čzw“ {Ć^{Şž©yŇş3‹Ą+K ăĚrÖ#k×}×™h'ă-P‰ž…žy#Ş˘ň*ĆmlňőI8ŽĂ:b` ¶qj ÔÉ×'YJŰĚâ7‹¬#¶¶b§ ł=ë=s;ö>Ó» ëŘmś=s"""bŃuő ŻĹc‹WY˛}4ůÚdßëvÁ–Í6@lă ój5wkń€™÷g0űÁlăÇ%㯎ł±őÁŇ·KîÔMŃł…m€ŘĆwoďj}öYŞ›łp±ý°Žm€ŘĆŮ3o„$%Źô·űQlŔ:2żŐ«>†ôĚ‚˙ĂÂ@–­¶Ké Úp=/®^éú€ľW@î ÚáŢÚOĎű9iCz€ú»¬ObřĹ9$č_ď8ýŤ‰éŁJďőŢh'%–>ťAňť3HýcÉτú?źźű!őň, eHďxţ÷ĚÇÁěÇł97ÓđńVŞüfáŘË4[lťÖ‘ôP,ő@CĄsˇ" Qş(§:Đűv4í‰Ň8ĺQ·´÷puŻ<őשž˝`IźKdďŘ8}NBÖa®šĐ‡uťë‡• y dnĺű¶Îٟܦ˝·ň•ě[Ő–sË• ł`"“Ë@ۧ#o:P"€cfȆëIČ'~oWJ7qt´ăž2,˝ŞňÜř{łĄávÉ_M#uyňçvĺő±—UŔł{ę%Ł.ަO¤6^©YsÍ‚ěĎiŹŞ4eHŔzäÔ„ą€>ě÷ŕŇË9X«dQď¸w.%`®ú#kŁ/č5ó(÷<+ŰWů2Ôźöfý‹Ńž?/Y•,ÖšDćÖ ŕIhĘďç<ą_ók×rä†E„!„Ó·}\ĄG^´Ö+«Şd~°¤?ź†ăřçó“ż>ÓŐqcÇfÎÍl8* ŠŤB°Üłí$ «ß?€~)Ż[ýżŤÖĄßóď´ŽdŃôC-¤úßŰô$ ĹBîc±—ă…D4˙Řľ‡ ±¨AJ»vTBD‘xŮ Hđ,˙Đ{ĎŘz(!=`âő ´RZWQä^©'QŮĂHśĐ;ž—ąÖ`X˝4ÝŃýŤw ™îzŻp Ú€ĺXB ~(˶G~5sUBŠ!ŐĎ×ő§%˝ţ`¤®u^FRú§sĆĎ]đËFÚEpÔĺ‹ëűş'*âżÜ'6 MHĎĐË9{Y k»¦·^öů• ś˙Ń„qHZwőşYo+-Ś>ßY™®<\­P”ŤcŮöš ËňO+¸Ni¸?äöĺ«q#Ăé{ţWŇôhéśyČ?@ …CW!ĄÄX,şemÜ‘*dŃD~Ő@nUâúďtŘŇď‘—ĂüÂk¬>ő[üav˛čŇÉ_OHţz ňAé»YÄŹ¨ţ~豉ŘÁä&P0óP‡:kç]We§=ňúáćfĂěÍ‚µ:…â ‚|P!ߨ\1Ż uä«!JŤ €ß J©çѡ '!×ňÎ „2•sb])šµŁĺť©jŇ @:N_vݶăBVKç}Ă€®ü[Ůť{€,şĄľŠüŹ&¦Ţęţ@˘<¬ž1]¸ ÖÂđőą;€sćťl§RJdň?BĄXó»(aK —Ë/äď¨őýşßłě8Ě]ż‡R:h“ž¤Dňż'ýoSH ¸6Ň·rp]ký=žÓ}?©=XRĄî.Púu)b&g5|~éFSŻ'ę¶A·jÉ: ó‚eŐ–m]k[şY{A¦ÓÇË-EĐřßŐŹřa-W%VXK‰DL…9 cô9uëÚ¸'€˘…Ś©cě Dü¨ _˙_-ҧó„?Ňäˇňí ”ęYZ9?ČŁadRÉ_'€ˇ8`±i,Ý(Ŕ8ÜYĆuüŐ4eHłV: zŻtT´ć´üL»inxo“ϦËßlđžÄ±„˙ş`~A?d=Z˝Ďkóo»rčdş©Łę~‰ťöę(Y«X˙ú‘ŠCDt˙ĽćZđFz r”.x«€VNt„= bG^©\Ű #¦řű8OńĎíy lÇßůůî¬ďŕVî $ŽjĄáÉţ «×ď>Ťh¸öą>~5­Ó6`čňfŢżN@ŚőDî™P"‰ĂŁP› ýv±Ľ®”E©Ë5>>bT†â—ż4ÄfÖë¨Ç2rÝň÷~Qęí× I÷¸~SŻ%:Ú_XŹśĘ(‘]”ĎÓ®.¶,zTíiy::hůÁ†®«!Ąky¸E Ó˛áčQŰq0qT‡1܇Ż3ö¸ź“Ň©\Ĺn=Č#ÇĎc,‰pý“Ě~ę­lćÝéîöqk9X †cA>¶ţ~ýBçÄńŔâ0‘ú2…ř!Ăđ;R]ÔIÇ?çę¬9ýd¶éăÍP áNŁó(€ôkZ­ŁĘUě ťŞm@č!e}XÚ“ÎJĎË)ťTŕQĆôę*lČÂúI/ŤCJł§SX„1r0 !ŰVaýTú×l; ÷qîcöcö#€ý@ď߇-«Ë'ţÁHć[ůË\Ążţő»kńçâHÄŠ!KŔő\dň dAUĐ<Č»>“€, 99‰äř8˙•@â—cH1ü‹‚Š6P:Ç;Cě€?bĐKą•«—eÍůs!ÂĄ?@Y7ż9ĚU«¶lş)O X{Ó–;űІDá@.gÁĽgBz?Ż ţ‚†‰#Ą ßű9»4¤î"'Ť źÇ…ŹĎĂĽ›†xĽ^qĹÂě§s•×ˡŢq˝Íҵ%~'_O ůjń#a@Dýk“b⇀Ě sKE¸ďj^Ýť3ofĂQQ»ŕlŘĂ® »FŻU‡`Ł÷dWk}ýăłU?QXţü…ŻR–+HČWľü˙FÓ¨_Ţęĺ¬^®úĺďE§uĎ…ëZŁt!H)´•ÓëCí„b *üóÝđLHč]/cúFéÇ<‰pUŻXxĄŤJ1*…B”έ‹îć§?§@„E#| ×őÖYs±’w`ţ 1őÖDűź ť …׿¶Sú>sů,Ůcď¨m@ŹęФ†ô˝4¬µő›]´ Ą¬ů ěľ„yŃ.…ş <‘ĄÇŇ…Ą_ÖżşŐ‡ąVÜů‡Ś®WöŇčLe4J4Oéżrř Ę÷Ą»ňŕXk6´!u Ëť(áŘ€¶_ {ĎBú¶‰Éă:^9˘Á•ţíB ¶ě:măé›feűΞűgß™Âé7OâŇg •ëbÎľ3…Âj.÷pń­çú;»´ OEŃÇÉC˙'eELGܰĽ…ś‰©sW;žU÷çĚKGAÍ Ż:Ş´QčVżŢ, [˝çě›É óh4ßvŻŐ/słpm´LŤ^kôůęĎ´Zľ~ą¶ rŔ?)ý`EH ňwt˘°gUr ˇčk98SĂă@¨ű OţĆß@R›¤ @Xř?ć"CÄ%š¬´Pˇ˙Ü“ô:ßC†˙k_•ázĎŰĚm¦„ł&1ő–ŽčŻÔ>ś7+׾¦„‘/»¸­źW´wܸ҅µfA„’cI,ß[†+Ýţ7Î'ţݞĄSŤ ăš ×s„‘{ŘÇ ^K˝{锾†Y_gŐ§:*× Ž”ćO˙‚8°=ôöł»!˙·Ěź  sł aÚ.ôý*¬5‰Ô-É1 G4"Ř4AŰxyźs&\ ¸űý[KĎ~z SoL`bĽ¶ťYkć˙~łçÎöÔaP!× H<§ű_µýŐ,”hŠĐüGÇB đ8 7’G·×„tü=óh4ŠBÁ?™öÝłP†”Ęă~jĐ[i«–©Óď™wSGË÷Ť&ÇůY˙*çă@Tś„SČ@ Dßľs^>€]ę©ĂŠYŠ”ˇQˇáJ˘«ůjQ?$ť˘„ýČEîŽÄĘ}aLľEň„ę÷ÖB~ ÷ÚS®VoÚ‹ţ໓ÇF:®ďAm§ĺi¨Š ł`ÂZł ( \¸ýv~l!~X/}kÁżÎőü ăÜňĹqoÍuµMllgµżçŤĐĆ‘Ô\;!JWe®wn;öú|KmÂż~¤ły á_s"B@XXk.lÇF8ČrgMÚ>˙`aá˙VÓUŚŐü-ÇŰś}a/Y´s0ń{żSoř_ť˙{moxęŤ L˝1™Ź/”zý§;ZÖr»Í\žńŰ8€ÄAéŻgEEâÄá?ţÁ<\'ŹĄŰ¦Î]íŞÍu|ÜY(páÓ 8űîنŹűĄ“Đܬ€ÝnýŞŁF;Ë ; φtňĂę®ÚöŞń„D4ş m8ăáďlE¬»k0W]XßYČ.ŰĐźSSü/Zé}mÁ°z_¶ÓĐzŻÄZłŚěA8Ô˙PŽ]:ó{É®·~3ŠÁ”Ť¬J—ţ…o^]Ż6†ŞčPT"˘ ,ÂÝVUĹ˙*¨YpŕŘ6„'şúţ·Ş¨p‹6ÂB@QÂ0ö vŮeČ­ŮČć-č*pňxa±˝÷s•÷~Ďwö“Ú źzcZÔm%oba1…““IL˝1±!č;µţs­ü Üć?= M‹"q<ŃsŁŰÝŘŮwĎn8*˘íĄďuR!= ŚÔGö(Č„”rý*÷®„qýЉ‘Uś=7í@ýď_ő×V«÷ÚԊءrf"$`č†˙Ă:ąW¨©ŁŇŹŞŚăřçčüź9Ő†4˝*EA8˘|H˝Ů8 cä@nTiţQ;QE ˇCUÂ_ěQC sĎAüP‰±č¦ĚłßűąäŃx%¤ÇŹ'*AşE|̨ĽŢiŻĽZüťĆĺ…÷–±đĺ" 'ß[či¨ăݦUŽŠV ¸đżpöw ň󶾎ü&6˛×5Ř ÷6Ó‹˙[˙•“Á®D"¦÷ż~7q;ÁČđH˙—Żz÷ö즖OâřÄćŐC·‡ś"ŚCďjYFi)źkÝ„őЇÂĐŹ†7żěú¸źŤŤb46ÚpÚáPńĂqÄǶ~ęĐÔŁ#=:Ő—yt|,Ž˘°Z: úÝŮšÇ5śßž?uş­#b b6t~ÎĽî(¨ŃQQâH‚-m ©#b bvü¬›ŐwŰëŘmś=ó®ç˛Őls¬#b ¶ńÝëg,"""†9mˇ¶Ăě‹ß,˛”¶9Ö± Ű8ĂĽ©É×'YBŰëŘmśZ†ąă8,ˇmŽuDlÄ6Nm‡Ůł%K‰v­Ń÷µç~‘v\@âĹ(KжÄâ7‹bŁ-“ľ[č(䉶u·kÔDÄ!6"˘ÖřŐ4""˘ÝŇ3§ÝgńňLWź›,Ýňońňő.?˙ źaŢ^âĹhÍ©Ýţ¸]0wrP=í/>›ęčó§ŢžĽlDDä۵Ăěé»,^[áăM*ë DD´Éa~öÍdÍ_/ÓŮ “'Fj®ÔßíŹwÔČĘŃDÍ_őóŤţODÄ0oáÂW©Ę_·ˇ|á«Ô–°‡ŢY˝|}ńňLÍ_đĎ_oů¸Łş»•®üU?GDÄ0ďrŔÖ÷Ř›őâ=nŇőźŻ˙·Ý|jzvě‘×<î$ČËźýâł/*çÔôđËÁÝěß~őŘŰőć[őň‰ćuZî±×?nŐ‹Ż~_ý@őç«{ôŐ=űFďcŹĽ=ň^T_Ą^ŕť^$×mČ—{ńőCńŤzřDD»*Ě«{ÁŐáŮëĐy/CöA?ËůHŔőLß\ý×ÎľřlŞë ß:íQ7zo}¸íĘ0Ň Ţěivč졷ďˇwúő´ÖµCę§ŢžďzZťö¨›˝źND»>Ě·«vÎygçĚűč͆ÖűyÎĽ—:1̆kŁ!ůVď ú|Yy°ŢÝ÷ĚëýÔۧ:‚/±—‡Ö«oVX7ú*[ůŹç̉h§Ú3öňŘÓÓqČ@f9ë‘…ô­4R×ü Ě>”˙E®vÁ;Hü%¸ću»xy¦aŹĽü™úóíé»,^žÁź}Qú˙őŽĎ‰×¦O#y<É-•¶Döˇlz TŢ5ŤveĎĽYoełGŢ]˝´üő6""öĚ·{äíë´Ű«Ř«{ćÝ}ľ¶gN´U˘F‚=sbÓłqĐÓíÇV~ž¨Ňw sÚx T Ş;őóDD»ÁĎXDDD» gî8Ď]Ń®5řŰô …ą˘(|}rǬԩyŕAŰËd(ěD<ÍCĎTďDAďF4hť~őŹhG†ůŮsµ}Ď…ŹĎł¶¶sĎĽ]Xź~w—>ťeŤŐŮvWłô—ů¦ŹOż;Ă#""Ú®=séŔ™ßNáä{s•ç>™<ŕŇ'ł8ý^ga^ľKőĎĹ6zn«Őß8¦—őëć=ýX–~–C·óÝŽuKD´í{ć‹7s8őa§>Lcńf®/>uÎrł`Nľ7 Ŕńz‰ ÷8ßĘëdű}ůęe©ľ]ýťę:ťćv,÷ť˛|DDí™/ŢĚ!ýť]yě˙?‡Éc±®ć>†x{sL׼6č^qŁP­ďŐ7 ÝFźé¦×\}›×FÓú¸]Ď:čÍmÝ^¶Ń}â[­ĐyVO»Q9—_ ş®­Fe‚¬[ϵzŃŽč™—ü‹?&*ߡ­÷ŽyţßôűszßďťOż?‡é÷ç*Ż BąÚ. ›LŁ`i:›ŃĂoŐcow/ůúŢjő{«:•Yý<}¶—őkTţŤÖµŃ{ŐYłukVďťL›hG„yÓŻ»-fĐŰcJű|ĎM×<ńÜ4ć>źďşwŢlç]żóďfÜě3۱gôvłÍz›ť”Y§ë_˝\ťŽ2t:˙^vÓ&"ęV×Ă쉗T¤żłk~m-ń’ÚÓ]®¦Ţśęčů~÷h;Ýď¤áÔFCŘíŢ;2Űę dťqxťv\Ď|ňX ‰—Ôš ďö|9¸ž˙wćă9Ěľ7 =Şaö˝iśůx®ňÚV`»^}ż¦_’»vĂŔ[ŮłlwzŕYŞw"˘mćĺ@oô˙®x‹_ĎcD€Ěľë%mDXüzľ§sć­B˘QŔµ µúsË˝„`« î: • ËÔ*Đ«{ďŐď r­@7ók¶ní>ÓMů7űL§çąŰ•ŻŽ'˘­°gěĺ±§§ß9 ăĚrÖ# é[i¤®ů;¨ěCŮrčĽ<ĚŢËŤ$Ξű‰É3mß—úr6ĐŻŔťú0˝c›ť˝ÁíSí¶‚ZĽ¶Â­ěP黌žĎ>” ź'Ú*ŰâGc¤t‘ú’?ŐZÝ;î68¨˙ANDÄ0€żąľ1Đi{•?넞é0çđ!{ćÁ{HĂ|‹¤ďzú®:ŔŃ""Ú]~Ć" ""bĎ|[™x'!¤”M˙˝z™ß&""†ů¶%„ŔÜ ŔŚ#3Čßž­ük™OÓ¬u""z¦<“Ă춨ęä—g‘}î„ěC?Čç>Hŕä» t""bĎ|ŰŇużŘżöă§ČţČ"|ë* Ź€“˙ť€qd¦ôÓ°ĽHŽŘ3ß–LÓÄżz uď?ŔÉ×ơěőołşđŐ,ć?źĹŮ?çYűDDÄ0ߎ¤”P#Ŕ©§8ő_{ ]ŕä/÷ ţ<0˙÷%Śr÷ Č?č<ĚGcŁ•Ë˙Ż˝ŃkŤ>×lDDD»>Ě…°‹€¶XH?ET®ß~ŠüCŕĚŰă0 @b, ęî& ٱQdsYdsŮš0®~ľţµę×ë˙ODDÔ«myÎ<}·Đö=Í~X¦Ü3—O€¨ H ¨ a˛žBJ@QéÉ®–­Ű®ţśžů0ďĺŕĘ=sĄ*Č] ¬1Ě›ôĚOľ·ž¬ü;ţ›ëxĺíő絨ĆÚ'""†ův´đéŕ~ŮŤ=i""ÚŽx T"""†91̉¨kĎÜ9ó˙|oqĂĹoő˙ţë“IÖ<1Ě·+XxҬ" Ej˙ťůß%Ö:=Sž˝_€ó$¤\şi"łśľ: íÇ%dúAľđţ8^9Ç@'""†ů¶î™[E@ó X˝Du w±¨D2™„vě4ҷҬy""boWú!˘XŔDáÄđ˙#íÔSЇ.üů>ż„S[ŢU]»V""bo[ICză ÄQH"ŞňÎU§ôS®€ő“ĹÚ'""†ůvł|m Łwf ś8 a$=2ĺđİדP×2H Ů{yŘE»ëŢíhl´á˙«ßW˙|Ł÷4úL»ů™Oł÷ѳ陹š}ůŰyč«i`H‡s{ "*¤´GTČŰ Ŕp‰Ărą\WóŤŤVîVý˙jŐ?űZ~Oi6zł×šM·ÓyĂ| Ňw mß“x1ZóX_-]Ô¶fVž“Îơt×+ÝçÜs»Z¶ w=kđŐá_˙Ůf=én½r""†ů–«ę ˘żő{ă‹w# Ží[48Ňđřţ=Čľ¶[áPx`Ë_ßîô ałçMDD;Ű3wÜüâ"´H)ČŔ)÷Ä%°b=Ũ¶Z¤űž9Ă|ŔĘß3żôĺ" L{ŕ–zć#Ú<}úrŔ=óęsęŐ=äfCěŐďď¤'ßč3ÍćMDDĎ®gîç\Ą'ˇE€™w&ˇE€™OˇE€‘}~çV»?gŢě|y» Ńş}ľQč÷cZĽ(Žaľí{ćăçć…áznĺßÄď˙Ýú󚦱ö‰aľ]˙xśµJDD» ďgNDDÄ0'"""†91̉ćDDD´#…vËŠžz{ľáó_|6ĹV@DD óífĎž=M‚űiÍăĺ;ólDDÄ0ߎAţôéÓŔ!ż•=ó~ޢ´›iąĄ*1Ě;˛x3‡ôw6Ż­ ń’ŠÉc±®§•ľ™‡şĎ€ý(U5`CČ7ëÁďD˝1śhçÚ6Ŕ•ĽĆßŮXĽ™ëzzŐAn=ĘCz@ęZé›ŔŇ•<–®tß®żąIőMMęźovó”úžpŁi4úlłiYž óo·ŽAßODD»°g^ň/ţśú0Ťôw6ŇߥkŢW~˝ű‘ß3·¬<2·ćľçü¦1óŢiĚ~r)p7ëÁ6 Çn‡˝ËÁXţłtĐĺétY:]Ź^×›ž‘0úw €Ä‹Ń¶=sËĘCÝë±Ďľ,}} ÉW§ = 8űi¦ŁkVý° w6 ŇîuyDT`ÔOź˝r""†9/©HgăÔ‡éšçş=onYĄ!v+żá5qp @ỳ]nŻ˝Ď^>_ßăÄü;ťG?–‰ş·mΙO‹!ń’Ú— UőĎ™+żgiůđđ"ň7&`Űf×=h†±gŢ$ĐŁű m‡Đ°ĺ!"Çď™/]ąZy­ú˙€ŢQʶ:Đ; ü~ťG®źî ÎQ7›GłQ‰ÍX&""Ú!aŢ/ő_9;˙‡i$OřÎĄ®Ą‘<–€Sę•§tr˝>äś{»sçť|ľţqĐ íÇşŃćxć~›ýéÓ§ţ˛ôG.Ř“&"bĎ|G8}ą|~\Gęąe˱ա٪×NDD óm+č÷ȉv"Ţ•aNDDD s"""bíV»ćjöSoĎ7|~+ďgNDDÄ0o˘Ů}Ężř¬ö~ćËwćŮaľĽňC1B~+{ć›őc-˝Ü•¶żmuÎ|ńf‹×VpęĂ4oćzšVúfą»Ążrߣń/Ăm˝Ţ¸%čçäDDě™4ČÓßŮëaüť ×őťÓÔ}ţ]ÓTŐ€Uú7u-!Ę7_1zÍúŢnůµF·mt˙ďú÷Ő÷šë§×lš}ľŮ4[-_§ď'""†y]x_üŃż!Ę©ÓHg#ý]şć}ĺ×۱ĺˇîóďgžą5×đ=ç˙0Ť™÷Nţ…¸VCÔ­B0Hoą]¶&ďöëť.o·ëGDD»$̇ţÝ´˝Mj9ČŐ˝~|öÝ8`éëKHľ:éůw]9űi¦Łđ r׳~i4tŢmpťGőô›őô‰aŢPâ%éďlśú0]ó\·Ăě–Ub·ň^§ ľ;Űńtű¦ý¸ ii´{Oł!ô~˝ź6Ç‘ŁčCIDAT¶ąnňX ‰—Ôľ9¨ŞÎ\‰”ÎŤKË˙€‡‘ż1ŰîîîiŐç©·ĘvX""bĎĽa OëĎ´ěGyHůb7`éĘŐĘkŐ˙ôŽzÔízÍÍÂ6čűËďköůfÓěfÄ ~ĺĎ7›Vł÷ĂĽďężO~ţÓHžđ/śK]K#y,§Ô+O=č¬7Üëó­0Č˝Ć[…g7¨őcťhk=sżÍ^˙]ňĘ÷Éeéo—ŤŤ˛'MDÄžůÎvúrůü¸ŽÔsË–cłÂ4H/źć;FĐď‘íDĽ*ĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDDÄ0'""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśćDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""bĂśaNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""b1̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDD s"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉aNDDÄ0'"""†91̉ćDDDÄ0'"""†91̉ćDDDÄ0'""˘Íó˙y“](Éó´IEND®B`‚doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/itext/0000755000175000017500000000000011632765556026010 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/resources/itext/itext.xml0000644000175000017500000033700710661311422027655 0ustar twernertwerner Please visit my website (external reference) These are some special characters: <, >, &, " and ' some books I really like: When Harlie was one by David Gerrold The World according to Garp by John Irving Decamerone by Giovanni Boccaccio some movies I really like: Wild At Heart Casablanca When Harry met Sally True Romance Le mari de la coiffeuse Some authors I really like: Isaac Asimov The Foundation Trilogy The Complete Robot Caves of Steel The Naked Sun John Irving The World according to Garp Hotel New Hampshire A prayer for Owen Meany Widow for a year Kurt Vonnegut Slaughterhouse 5 Welcome to the Monkey House The great pianola Galapagos header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
please jump to a local destination <chunk font="Helvetica" size="24.0" fontstyle="normal" red="255" green="0" blue="0">This is chapter 1</chunk>

<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 1 in chapter 1</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 2 in chapter 1</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 3 in chapter 1</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 3</chunk> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="24.0" fontstyle="normal" red="255" green="0" blue="0">This is chapter 2</chunk>
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 1 in chapter 2</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 2 in chapter 2</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 3 in chapter 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 3</chunk> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="24.0" fontstyle="normal" red="255" green="0" blue="0">This is chapter 3</chunk>
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 1 in chapter 3</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 2 in chapter 3</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 3 in chapter 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 3</chunk> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="24.0" fontstyle="normal" red="255" green="0" blue="0">This is chapter 4</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 1 in chapter 4</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 2 in chapter 4</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 3 in chapter 4</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 3</chunk> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="24.0" fontstyle="normal" red="255" green="0" blue="0">This is chapter 5</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 1 in chapter 5</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 2 in chapter 5</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 3 in chapter 5</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 3</chunk> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="24.0" fontstyle="normal" red="255" green="0" blue="0">This is chapter 6</chunk> header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 1 in chapter 6</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 2 in chapter 6</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 3 in chapter 6</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 3</chunk> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="24.0" fontstyle="normal" red="255" green="0" blue="0">This is chapter 7</chunk>
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 1 in chapter 7</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 1</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 2 in chapter 7</chunk>
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 2</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
<chunk font="Helvetica" size="20.0" fontstyle="normal" red="0" green="0" blue="255">This is section 3 in chapter 7</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 1 of section 3</chunk> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah header example cell with colspan 1 and rowspan 2 1.1 2.1 1.2 2.2 cell test1 big cell cell test2
blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 2 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
<chunk font="Helvetica" size="18.0" fontstyle="normal" red="0" green="64" blue="64">This is subsection 3 of section 3</chunk> blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
doxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/0000755000175000017500000000000011632765555023561 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/0000755000175000017500000000000011632765555024350 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/0000755000175000017500000000000011632765555025571 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/0000755000175000017500000000000011632765555026677 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765555030003 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765555031270 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/doxia/module/itext/0000755000175000017500000000000011632765555032425 5ustar twernertwerner././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/doxia/module/itext/ITextSinkTestCase.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/doxia/module/itext/IText0000644000175000017500000001063511211462442033370 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.Writer; import java.net.URL; import java.net.URLClassLoader; import org.apache.maven.doxia.AbstractModuleTest; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkTestDocument; /** * iText Sink Test case. * * @author Vincent Siveton * @version $Id: ITextSinkTestCase.java 781348 2009-06-03 11:57:22Z vsiveton $ */ public class ITextSinkTestCase extends AbstractModuleTest { /** {@inheritDoc} */ protected String outputExtension() { return "xml"; } /** {@inheritDoc} */ protected String getOutputDir() { return "sink/"; } /** * Convenience method * * @param prefix * @param suffix * @return the input file */ protected File getGeneratedFile( String prefix, String suffix ) { File outputDirectory = new File( getBasedir(), outputBaseDir() + getOutputDir() ); if ( !outputDirectory.exists() ) { outputDirectory.mkdirs(); } return new File( outputDirectory, prefix + "." + suffix ); } protected Sink createSink( Writer writer ) { ITextSink sink = new ITextSink( writer ); sink.setClassLoader( new URLClassLoader( new URL[] { ITextSinkTestCase.class.getResource( "/images/" ) } ) ); return sink; } /** * Test PDF generation * * @throws Exception */ public void testGeneratingPDFFromITextXml() throws Exception { File f = new File( getBasedir(), "src/test/resources/itext/itext.xml" ); ITextUtil.writePdf( new FileInputStream( f ), new FileOutputStream( getGeneratedFile( "test_itext", "pdf" ) ) ); } /** * Generate a pdf and a rtf from the standart test model. * * @throws Exception if any */ public void testModel() throws Exception { Sink sink = createSink( getXmlTestWriter( "test_model", "xml" ) ); SinkTestDocument.generate( sink ); sink.close(); ITextUtil.writePdf( new FileInputStream( getGeneratedFile( "test_model", "xml" ) ), new FileOutputStream( getGeneratedFile( "test_model", "pdf" ) ) ); ITextUtil.writeRtf( new FileInputStream( getGeneratedFile( "test_model", "xml" ) ), new FileOutputStream( getGeneratedFile( "test_model", "rtf" ) ) ); } /** * Test empty anchor DOXIA-329 * @throws Exception if any */ public void testEmptyAnchor() throws Exception { Sink sink = createSink( getXmlTestWriter( "empty_anchor", "xml" ) ); SinkTestDocument.generateHead( sink ); sink.body(); sink.anchor( "empty_local_anchor" ); sink.anchor_(); sink.lineBreak(); sink.link( "#empty_local_anchor" ); sink.text( "link to empty local anchor" ); sink.link_(); sink.lineBreak(); sink.anchor( "defined_local_anchor" ); sink.text( "defined local anchor" ); sink.anchor_(); sink.lineBreak(); sink.link( "#defined_local_anchor" ); sink.text( "link to defined local anchor" ); sink.link_(); sink.body_(); sink.flush(); sink.close(); ITextUtil.writePdf( new FileInputStream( getGeneratedFile( "empty_anchor", "xml" ) ), new FileOutputStream( getGeneratedFile( "empty_anchor", "pdf" ) ) ); } } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/doxia/module/itext/ITextUtilTest.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/test/java/org/apache/maven/doxia/module/itext/IText0000644000175000017500000000743111213204343033364 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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.Locale; import junit.framework.TestCase; import com.lowagie.text.PageSize; /** * @author Vincent Siveton * @version $Id: ITextUtilTest.java 782608 2009-06-08 12:49:39Z vsiveton $ */ public class ITextUtilTest extends TestCase { public void testGetDefaultPageSize() throws Exception { Locale oldLocale = Locale.getDefault(); try { Locale.setDefault( Locale.US ); assertEquals( PageSize.LETTER, ITextUtil.getDefaultPageSize() ); Locale.setDefault( Locale.CANADA ); assertEquals( PageSize.LETTER, ITextUtil.getDefaultPageSize() ); Locale.setDefault( Locale.FRANCE ); assertEquals( PageSize.A4, ITextUtil.getDefaultPageSize() ); } finally { Locale.setDefault( oldLocale ); } } public void testGetPageSize() throws Exception { assertEquals( "A0", ITextUtil.getPageSize( PageSize.A0 ) ); assertEquals( "A1", ITextUtil.getPageSize( PageSize.A1 ) ); assertEquals( "A2", ITextUtil.getPageSize( PageSize.A2 ) ); assertEquals( "A3", ITextUtil.getPageSize( PageSize.A3 ) ); assertEquals( "A4", ITextUtil.getPageSize( PageSize.A4 ) ); assertEquals( "A5", ITextUtil.getPageSize( PageSize.A5 ) ); assertEquals( "A6", ITextUtil.getPageSize( PageSize.A6 ) ); assertEquals( "A7", ITextUtil.getPageSize( PageSize.A7 ) ); assertEquals( "A8", ITextUtil.getPageSize( PageSize.A8 ) ); assertEquals( "A9", ITextUtil.getPageSize( PageSize.A9 ) ); assertEquals( "A10", ITextUtil.getPageSize( PageSize.A10 ) ); assertEquals( "LETTER", ITextUtil.getPageSize( PageSize.LETTER ) ); assertEquals( "LEGAL", ITextUtil.getPageSize( PageSize.LEGAL ) ); } public void testIsPageSupported() throws Exception { assertEquals( true, ITextUtil.isPageSizeSupported( "A0" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A1" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A2" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A3" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A4" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A5" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A6" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A7" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A8" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A9" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "A10" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "LETTER" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "letter" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "LEGAL" ) ); assertEquals( true, ITextUtil.isPageSizeSupported( "legal" ) ); } } doxia-1.1.4/doxia-modules/doxia-module-itext/src/site/0000755000175000017500000000000011632765556022626 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/site/site.xml0000644000175000017500000000167211103330660024273 0ustar twernertwerner doxia-1.1.4/doxia-modules/doxia-module-itext/src/main/0000755000175000017500000000000011632765556022606 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/0000755000175000017500000000000011632765556023527 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/0000755000175000017500000000000011632765556024316 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/0000755000175000017500000000000011632765556025537 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/0000755000175000017500000000000011632765556026645 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765556027751 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765556031236 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/0000755000175000017500000000000011632765556032373 5ustar twernertwerner././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSinkFactory.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/IText0000644000175000017500000000453011216135717033341 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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.AbstractTextSinkFactory; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.WriterFactory; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; /** * IText implementation of the Sink factory. * * @author Vincent Siveton * @version $Id: ITextSinkFactory.java 785531 2009-06-17 09:47:59Z ltheussl $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="itext" */ public class ITextSinkFactory extends AbstractTextSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { return new ITextSink( writer, encoding ); } /** * createSink. * * @param writer a {@link java.io.Writer} object. * @return a {@link org.apache.maven.doxia.sink.Sink} object. */ public Sink createSink( Writer writer ) { // TODO: should this method be deprecated? return createSink( writer, WriterFactory.UTF_8 ); } /** * Create a Sink into a PrettyPrintXMLWriter. * * @param xmlWriter not null XML writer to write the result. * @return a Sink instance. */ public Sink createSink( PrettyPrintXMLWriter xmlWriter ) { if ( xmlWriter == null ) { throw new IllegalArgumentException( "xmlWriter could not be null." ); } return new ITextSink( xmlWriter ); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextUtil.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/IText0000644000175000017500000001342411451326654033346 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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 com.lowagie.text.DocumentException; import com.lowagie.text.PageSize; import com.lowagie.text.Rectangle; import com.lowagie.text.xml.XmlToHtml; import com.lowagie.text.xml.XmlToPdf; import com.lowagie.text.xml.XmlToRtf; import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.Field; import java.util.Locale; /** * A set of util methods for the iText framework * * @author Vincent Siveton * @version $Id: ITextUtil.java 1003453 2010-10-01 09:45:16Z ltheussl $ */ public class ITextUtil { /** * Set the default page size for the document depending the user's country. * TODO Maybe more generic? * * @return the page size * @see com.lowagie.text.PageSize */ public static Rectangle getDefaultPageSize() { String defaultCountry = Locale.getDefault().getCountry(); if ( defaultCountry != null && ( defaultCountry.equals( Locale.US.getCountry() ) || defaultCountry.equals( Locale.CANADA.getCountry() ) ) ) { return PageSize.LETTER; } return PageSize.A4; } /** * Return a page size as String. * * @param rect a Rectangle defined in {@link PageSize}. * @return a page size as String or A4 if not found. * @see com.lowagie.text.PageSize */ public static String getPageSize( Rectangle rect ) { Field[] fields = PageSize.class.getFields(); for ( int i = 0; i < fields.length; i++ ) { Field currentField = fields[i]; try { if ( currentField.getType().equals( Rectangle.class ) ) { Rectangle fPageSize = (Rectangle) currentField.get( null ); if ( ( rect.width() == fPageSize.width() ) && ( rect.height() == fPageSize.height() ) ) { return currentField.getName(); } } } catch ( Exception e ) { // nop } } return "A4"; } /** * Return true if the page size is supported by {@link PageSize} class, false otherwise. * * @param aPageSize a page size * @return true if the page size is supported, false otherwise * @see com.lowagie.text.PageSize */ public static boolean isPageSizeSupported( String aPageSize ) { Field[] fields = PageSize.class.getFields(); for ( int i = 0; i < fields.length; i++ ) { Field currentField = fields[i]; if ( ( currentField.getName().equalsIgnoreCase( aPageSize ) ) && ( currentField.getType().equals( Rectangle.class ) ) ) { return true; } } return false; } /** * Parse an iText XML from the specified InputStream, writing an Pdf document * specified OutputStream. * * @param is the InputStream from which the XML is read. * @param os the OutputStream to which the result as Pdf is written. * @see com.lowagie.text.xml.XmlToPdf */ public static void writePdf( InputStream is, OutputStream os ) { try { XmlToPdf x = new XmlToPdf(); x.parse( is, os ); } catch ( DocumentException e ) { throw new RuntimeException( "DocumentException : " + e.getMessage(), e ); } } /** * Parse an iText XML from the specified InputStream, writing an rtf document * specified OutputStream. * * @param is the InputStream from which the XML is read. * @param os the OutputStream to which the result as RTF is written. * @see com.lowagie.text.xml.XmlToRtf */ public static void writeRtf( InputStream is, OutputStream os ) { try { XmlToRtf x = new XmlToRtf(); x.parse( is, os ); } catch ( DocumentException e ) { throw new RuntimeException( "DocumentException : " + e.getMessage(), e ); } } /** * Parse an iText XML from the specified InputStream, writing an html document * specified OutputStream. * * @param is the InputStream from which the XML is read. * @param os the OutputStream to which the result as Html is written. * @see com.lowagie.text.xml.XmlToHtml */ public static void writeHtml( InputStream is, OutputStream os ) { try { XmlToHtml x = new XmlToHtml(); x.parse( is, os ); } catch ( DocumentException e ) { throw new RuntimeException( "DocumentException : " + e.getMessage(), e ); } } } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkA0000644000175000017500000001233011216135717033306 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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.Stack; /** *

SinkActionContext class.

* * @author Jason van Zyl * @version $Id: SinkActionContext.java 785531 2009-06-17 09:47:59Z ltheussl $ */ public class SinkActionContext { /** Constant TITLE=0 */ public static final int TITLE = 0; /** Constant AUTHOR=1 */ public static final int AUTHOR = 1; /** Constant DATE=2 */ public static final int DATE = 2; /** Constant HEAD=3 */ public static final int HEAD = 3; /** Constant BODY=4 */ public static final int BODY = 4; /** Constant SECTION_TITLE=10 */ public static final int SECTION_TITLE = 10; /** Constant SECTION_TITLE_1=11 */ public static final int SECTION_TITLE_1 = 11; /** Constant SECTION_TITLE_2=12 */ public static final int SECTION_TITLE_2 = 12; /** Constant SECTION_TITLE_3=13 */ public static final int SECTION_TITLE_3 = 13; /** Constant SECTION_TITLE_4=14 */ public static final int SECTION_TITLE_4 = 14; /** Constant SECTION_TITLE_5=15 */ public static final int SECTION_TITLE_5 = 15; /** Constant SECTION_1=20 */ public static final int SECTION_1 = 20; /** Constant SECTION_2=21 */ public static final int SECTION_2 = 21; /** Constant SECTION_3=22 */ public static final int SECTION_3 = 22; /** Constant SECTION_4=23 */ public static final int SECTION_4 = 23; /** Constant SECTION_5=24 */ public static final int SECTION_5 = 24; /** Constant DEFINITION_LIST=30 */ public static final int DEFINITION_LIST = 30; /** Constant DEFINITION_LIST_ITEM=31 */ public static final int DEFINITION_LIST_ITEM = 31; /** Constant DEFINED_TERM=32 */ public static final int DEFINED_TERM = 32; /** Constant LIST_ITEM=40 */ public static final int LIST_ITEM = 40; /** Constant NUMBERED_LIST_ITEM=41 */ public static final int NUMBERED_LIST_ITEM = 41; /** Constant NUMBERED_LIST=42 */ public static final int NUMBERED_LIST = 42; /** Constant DEFINITION=43 */ public static final int DEFINITION = 43; /** Constant PARAGRAPH=44 */ public static final int PARAGRAPH = 44; /** Constant LIST=45 */ public static final int LIST = 45; /** Constant TABLE=50 */ public static final int TABLE = 50; /** Constant TABLE_CAPTION=51 */ public static final int TABLE_CAPTION = 51; /** Constant TABLE_CELL=52 */ public static final int TABLE_CELL = 52; /** Constant TABLE_HEADER_CELL=53 */ public static final int TABLE_HEADER_CELL = 53; /** Constant TABLE_ROW=54 */ public static final int TABLE_ROW = 54; /** Constant TABLE_ROWS=55 */ public static final int TABLE_ROWS = 55; /** Constant VERBATIM=60 */ public static final int VERBATIM = 60; /** Constant FIGURE=70 */ public static final int FIGURE = 70; /** Constant FIGURE_CAPTION=71 */ public static final int FIGURE_CAPTION = 71; /** Constant FIGURE_GRAPHICS=72 */ public static final int FIGURE_GRAPHICS = 72; /** Constant LINK=80 */ public static final int LINK = 80; /** Constant ANCHOR=81 */ public static final int ANCHOR = 81; /** Constant UNDEFINED=82 */ public static final int UNDEFINED = 82; private Stack stack = new Stack(); private int currentAction; /** *

Getter for the field currentAction.

* * @return a int. */ public int getCurrentAction() { //return currentAction; if ( stack.empty() ) { return UNDEFINED; } else { return ( (Integer) stack.peek() ).intValue(); } } /** * release. */ public void release() { //currentAction = -1; stack.pop(); } /** * setAction. * * @param action a int. */ public void setAction( int action ) { //currentAction = action; stack.push( new Integer( action ) ); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextHeader.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/IText0000644000175000017500000000576611167436114033355 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * Header object containing meta-informations. * * @author Vincent Siveton * @version $Id: ITextHeader.java 763762 2009-04-09 18:19:56Z ltheussl $ */ public class ITextHeader { private String title; private StringBuffer authors; private Date date; /** * Default constructor */ public ITextHeader() { // nop } /** * Add a title to the Document * * @param title1 the title. */ public final void setTitle( String title1 ) { this.title = title1; } /** * Get the title * * @return title as String */ public String getTitle() { if ( this.title == null ) { return ""; } return this.title; } /** * Add a new author * * @param author the author. */ public void addAuthor( String author ) { if ( this.authors == null ) { this.authors = new StringBuffer(); } else { this.authors.append( ", " ); } this.authors.append( author ); } /** * Get the authors * * @return the authors as String */ public String getAuthors() { if ( ( this.authors == null ) || ( this.authors.length() == 0 ) ) { return System.getProperty( "user.name" ); } return this.authors.toString(); } /** * Add a date to the document * * @param date1 a date as String */ public void setDate( String date1 ) { try { this.date = new SimpleDateFormat().parse( date1 ); } catch ( ParseException e ) { this.date = new Date(); } } /** * Get the date of the document * * @return the date as String */ public String getDate() { if ( this.date == null ) { return new Date( System.currentTimeMillis() ).toString(); } return this.date.toString(); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextFont.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/IText0000644000175000017500000002233011167436114033337 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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.awt.Color; import com.lowagie.text.ExceptionConverter; import com.lowagie.text.Font; import com.lowagie.text.FontFactory; import com.lowagie.text.markup.MarkupTags; import com.lowagie.text.pdf.BaseFont; /** * iText wrapper object for font. * * @see com.lowagie.text.Font * * @author Vincent Siveton * @version $Id: ITextFont.java 763762 2009-04-09 18:19:56Z ltheussl $ */ public class ITextFont { /** A normal font style */ public static final String NORMAL = MarkupTags.CSS_VALUE_NORMAL; /** A bold font style */ public static final String BOLD = MarkupTags.CSS_VALUE_BOLD; /** A italic font style */ public static final String ITALIC = MarkupTags.CSS_VALUE_ITALIC; /** An underline font style */ public static final String UNDERLINE = MarkupTags.CSS_VALUE_UNDERLINE; /** A default font name */ public static final String DEFAULT_FONT_NAME = FontFactory.HELVETICA; /** A default font size */ public static final float DEFAULT_FONT_SIZE = 12; /** A default font style */ public static final String DEFAULT_FONT_STYLE = NORMAL; /** A default Black color definition */ public static final int DEFAULT_FONT_COLOR_RED = Color.BLACK.getRed(); /** A default Black color definition */ public static final int DEFAULT_FONT_COLOR_GREEN = Color.BLACK.getGreen(); /** A default Black color definition */ public static final int DEFAULT_FONT_COLOR_BLUE = Color.BLACK.getBlue(); private static final int SECTION_FONT_SIZE_0 = 24; private static final int SECTION_FONT_SIZE_1 = 22; private static final int SECTION_FONT_SIZE_2 = 20; private static final int SECTION_FONT_SIZE_3 = 18; private static final int SECTION_FONT_SIZE_4 = 16; private static final int SECTION_FONT_SIZE_DEFAULT = 14; private boolean monoSpaced = false; private float currentSize = 12; private int currentStyle = Font.NORMAL; private Color currentColor = Color.BLACK; /** * Default constructor */ public ITextFont() { // nop } /** * Add bold style to the current style */ public void addBold() { this.currentStyle += Font.BOLD; } /** * Remove bold style to the current style */ public void removeBold() { this.currentStyle -= Font.BOLD; if ( this.currentStyle < 0 ) { this.currentStyle = Font.NORMAL; } } /** * Add italic style to the current style */ public void addItalic() { this.currentStyle += Font.ITALIC; } /** * Remove italic style to the current style */ public void removeItalic() { this.currentStyle -= Font.ITALIC; if ( this.currentStyle < 0 ) { this.currentStyle = Font.NORMAL; } } /** * Add italic style to the current style */ public void addUnderlined() { this.currentStyle += Font.UNDERLINE; } /** * Remove italic style to the current style */ public void removeUnderlined() { this.currentStyle -= Font.UNDERLINE; if ( this.currentStyle < 0 ) { this.currentStyle = Font.NORMAL; } } /** * Add monospaced style to the current style * * @param monoSpaced true for monospaced style */ public void setMonoSpaced( boolean monoSpaced ) { this.monoSpaced = monoSpaced; } /** * Set a new font color * * @param color a new color */ public void setColor( Color color ) { this.currentColor = color; } /** * Set a new font color * * @param size a new size */ public void setSize( float size ) { this.currentSize = size; } /** * Return the font name * * @return the font name */ public String getFontName() { Font font = getCurrentFont(); return font.getFamilyname(); } /** * Return the font style * * @return the font style */ public String getFontStyle() { Font font = getCurrentFont(); StringBuffer sb = new StringBuffer(); if ( font.isBold() ) { sb.append( BOLD ); } if ( font.isItalic() ) { if ( sb.length() == 0 ) { sb.append( ITALIC ); } else { sb.append( "," ); sb.append( ITALIC ); } } if ( font.isUnderlined() ) { if ( sb.length() == 0 ) { sb.append( UNDERLINE ); } else { sb.append( "," ); sb.append( UNDERLINE ); } } if ( sb.length() == 0 ) { return NORMAL; } return sb.toString(); } /** * Return the font name * * @return the font name */ public String getFontSize() { Font font = getCurrentFont(); return String.valueOf( font.getCalculatedSize() ); } /** * Return the font color blue * * @return the font color blue */ public String getFontColorBlue() { Font font = getCurrentFont(); return String.valueOf( font.color().getBlue() ); } /** * Return the font color green * * @return the font color green */ public String getFontColorGreen() { Font font = getCurrentFont(); return String.valueOf( font.color().getGreen() ); } /** * Return the font color red * * @return the font color red */ public String getFontColorRed() { Font font = getCurrentFont(); return String.valueOf( font.color().getRed() ); } /** * Get a section font size depending the section number. *
*
0
*
Chapter: font size = 24
*
1
*
Section 1: font size = 22
*
2
*
Section 2: font size = 20
*
3
*
Section 3: font size = 18
*
4
*
Section 4: font size = 16
*
5 ot otherwise
*
Section 5: font size = 14
*
* * @param sectionNumber a section number * @return a font size. */ public static int getSectionFontSize( int sectionNumber ) { switch ( sectionNumber ) { case 0: return SECTION_FONT_SIZE_0; case 1: return SECTION_FONT_SIZE_1; case 2: return SECTION_FONT_SIZE_2; case 3: return SECTION_FONT_SIZE_3; case 4: return SECTION_FONT_SIZE_4; case 5: default: return SECTION_FONT_SIZE_DEFAULT; } } /** * Convenience method to get a defined MonoSpaced font depending the wanted style and size. * * @param style the font style. * @param size the font size. * @param color the font color. * @return a font the font. */ public static Font getMonoSpacedFont( int style, float size, Color color ) { try { return new Font( BaseFont.createFont( BaseFont.COURIER, BaseFont.CP1252, false ), size, style, color ); } catch ( Exception e ) { throw new ExceptionConverter( e ); } } /** * Convenience method to get a defined font depending the wanted style and size. * * @param style the font style. * @param size the font size. * @param color the font color. * @return a font the font. */ public static Font getFont( int style, float size, Color color ) { Font font = new Font(); font.setFamily( DEFAULT_FONT_NAME ); font.setStyle( style ); font.setSize( size ); font.setColor( color ); return font; } /** * Convenience method to return the current font * * @return the current font */ private Font getCurrentFont() { if ( this.monoSpaced ) { return getMonoSpacedFont( this.currentStyle, this.currentSize, this.currentColor ); } return getFont( this.currentStyle, this.currentSize, this.currentColor ); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.javadoxia-1.1.4/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/IText0000644000175000017500000015764411451327013033351 0ustar twernertwernerpackage org.apache.maven.doxia.module.itext; /* * 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 com.lowagie.text.BadElementException; import com.lowagie.text.ElementTags; import com.lowagie.text.Image; import java.awt.Color; import java.io.File; import java.io.IOException; import java.io.LineNumberReader; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.maven.doxia.sink.AbstractXmlSink; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; import org.codehaus.plexus.util.xml.XMLWriter; /** *

A doxia Sink which produces an XML Front End document for iText framework.

* Known limitations: *
    *
  • Roman lists are not supported.
  • *
  • Horizontal rule is not supported with 1.3. * See * http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg10323.html
  • *
  • iText has some problems with ElementTags.TABLE and ElementTags.TABLEFITSPAGE. * See http://sourceforge.net/tracker/index.php?func=detail&aid=786427&group_id=15255&atid=115255.
  • *
  • Images could be on another page and next text on the last one.
  • *
* * @see http://www.lowagie.com/iText/tutorial/ch07.html * * @author Vincent Siveton * @version $Id: ITextSink.java 1003454 2010-10-01 09:46:51Z ltheussl $ */ public class ITextSink extends AbstractXmlSink { /** This is the place where the iText DTD is located. IMPORTANT: this DTD is not uptodate! */ public static final String DTD = "http://itext.sourceforge.net/itext.dtd"; /** This is the reference to the DTD. */ public static final String DOCTYPE = "ITEXT SYSTEM \"" + DTD + "\""; /** This is the default leading for chapter title */ public static final String DEFAULT_CHAPTER_TITLE_LEADING = "36.0"; /** This is the default leading for section title */ public static final String DEFAULT_SECTION_TITLE_LEADING = "24.0"; /** The ClassLoader used */ private ClassLoader currentClassLoader; /** The action context */ private SinkActionContext actionContext; /** The Writer used */ private Writer writer; /** The XML Writer used */ private final XMLWriter xmlWriter; private boolean writeStart; /** The Header object */ private ITextHeader header; /** The font object */ private ITextFont font; private int numberDepth = 1; private int depth = 0; private StringWriter tableCaptionWriter = null; private XMLWriter tableCaptionXMLWriter = null; /** Flag to know if an anchor is defined or not. Used as workaround for iText which needs a defined local * destination. */ private boolean anchorDefined = false; /** Flag to know if an figure event is called. */ private boolean figureDefined = false; /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ private Map warnMessages; /** *

Constructor for ITextSink.

* * @param writer the writer. */ protected ITextSink( Writer writer ) { this( writer, "UTF-8" ); } /** *

Constructor for ITextSink.

* * @param writer the writer. * @param encoding the encoding. * @since 1.1 */ protected ITextSink( Writer writer, String encoding ) { // No doctype since itext doctype is not up to date! this( new PrettyPrintXMLWriter( writer, encoding, null ) ); this.writer = writer; this.writeStart = true; } /** *

Constructor for ITextSink.

* * @param xmlWriter a pretty-printing xml writer. */ protected ITextSink( PrettyPrintXMLWriter xmlWriter ) { this.xmlWriter = xmlWriter; this.writeStart = false; init(); } /** * Get the current classLoader * * @return the current class loader */ public ClassLoader getClassLoader() { return currentClassLoader; } /** * Set a new class loader * * @param cl the class loader. */ public void setClassLoader( ClassLoader cl ) { currentClassLoader = cl; } // ---------------------------------------------------------------------- // Document // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void close() { IOUtil.close( writer ); init(); } /** {@inheritDoc} */ public void flush() { if ( getLog().isWarnEnabled() && this.warnMessages != null ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } } this.warnMessages = null; } // ---------------------------------------------------------------------- // Header // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void head_() { actionContext.release(); } /** {@inheritDoc} */ public void head() { //init(); // why? this causes DOXIA-413 actionContext.setAction( SinkActionContext.HEAD ); } /** {@inheritDoc} */ public void author_() { actionContext.release(); } /** {@inheritDoc} */ public void author() { actionContext.setAction( SinkActionContext.AUTHOR ); } /** {@inheritDoc} */ public void date_() { actionContext.release(); } /** {@inheritDoc} */ public void date() { actionContext.setAction( SinkActionContext.DATE ); } /** {@inheritDoc} */ public void title_() { actionContext.release(); } /** {@inheritDoc} */ public void title() { actionContext.setAction( SinkActionContext.TITLE ); } // ---------------------------------------------------------------------- // Body // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void body_() { if ( writeStart ) { writeEndElement(); // ElementTags.CHAPTER writeEndElement(); // ElementTags.ITEXT } actionContext.release(); } /** {@inheritDoc} */ public void body() { if ( writeStart ) { writeStartElement( ElementTags.ITEXT ); writeAddAttribute( ElementTags.TITLE, header.getTitle() ); writeAddAttribute( ElementTags.AUTHOR, header.getAuthors() ); writeAddAttribute( ElementTags.CREATIONDATE, header.getDate() ); writeAddAttribute( ElementTags.SUBJECT, header.getTitle() ); writeAddAttribute( ElementTags.KEYWORDS, "" ); writeAddAttribute( ElementTags.PRODUCER, "Generated with Doxia by " + System.getProperty( "user.name" ) ); writeAddAttribute( ElementTags.PAGE_SIZE, ITextUtil.getPageSize( ITextUtil.getDefaultPageSize() ) ); writeStartElement( ElementTags.CHAPTER ); writeAddAttribute( ElementTags.NUMBERDEPTH, numberDepth ); writeAddAttribute( ElementTags.DEPTH, depth ); writeAddAttribute( ElementTags.INDENT, "0.0" ); writeStartElement( ElementTags.TITLE ); writeAddAttribute( ElementTags.LEADING, DEFAULT_CHAPTER_TITLE_LEADING ); writeAddAttribute( ElementTags.FONT, ITextFont.DEFAULT_FONT_NAME ); writeAddAttribute( ElementTags.SIZE, ITextFont.getSectionFontSize( 0 ) ); writeAddAttribute( ElementTags.STYLE, ITextFont.BOLD ); writeAddAttribute( ElementTags.BLUE, ITextFont.DEFAULT_FONT_COLOR_BLUE ); writeAddAttribute( ElementTags.GREEN, ITextFont.DEFAULT_FONT_COLOR_GREEN ); writeAddAttribute( ElementTags.RED, ITextFont.DEFAULT_FONT_COLOR_RED ); writeAddAttribute( ElementTags.ALIGN, ElementTags.ALIGN_CENTER ); // startChunk( ITextFont.DEFAULT_FONT_NAME, ITextFont.getSectionFontSize( 0 ), // ITextFont.BOLD, ITextFont.DEFAULT_FONT_COLOR_BLUE, ITextFont.DEFAULT_FONT_COLOR_GREEN, // ITextFont.DEFAULT_FONT_COLOR_RED, "top" ); writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, ITextFont.DEFAULT_FONT_NAME ); writeAddAttribute( ElementTags.SIZE, ITextFont.getSectionFontSize( 0 ) ); writeAddAttribute( ElementTags.STYLE, ITextFont.BOLD ); writeAddAttribute( ElementTags.BLUE, ITextFont.DEFAULT_FONT_COLOR_BLUE ); writeAddAttribute( ElementTags.GREEN, ITextFont.DEFAULT_FONT_COLOR_GREEN ); writeAddAttribute( ElementTags.RED, ITextFont.DEFAULT_FONT_COLOR_RED ); // writeAddAttribute( ElementTags.LOCALDESTINATION, "top" ); write( header.getTitle() ); writeEndElement(); // ElementTags.CHUNK writeEndElement(); // ElementTags.TITLE } actionContext.setAction( SinkActionContext.BODY ); } // ---------------------------------------------------------------------- // Sections // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void sectionTitle() { actionContext.release(); } /** {@inheritDoc} */ public void sectionTitle_() { actionContext.setAction( SinkActionContext.SECTION_TITLE ); } /** {@inheritDoc} */ public void section1_() { writeEndElement(); // ElementTags.SECTION numberDepth--; depth = 0; actionContext.release(); } /** {@inheritDoc} */ public void section1() { numberDepth++; depth = 1; writeStartElement( ElementTags.SECTION ); writeAddAttribute( ElementTags.NUMBERDEPTH, numberDepth ); writeAddAttribute( ElementTags.DEPTH, depth ); writeAddAttribute( ElementTags.INDENT, "0.0" ); lineBreak(); actionContext.setAction( SinkActionContext.SECTION_1 ); } /** {@inheritDoc} */ public void sectionTitle1_() { writeEndElement(); // ElementTags.TITLE font.setSize( ITextFont.DEFAULT_FONT_SIZE ); bold_(); actionContext.release(); } /** {@inheritDoc} */ public void sectionTitle1() { font.setSize( ITextFont.getSectionFontSize( 1 ) ); font.setColor( Color.BLACK ); bold(); writeStartElement( ElementTags.TITLE ); writeAddAttribute( ElementTags.LEADING, DEFAULT_SECTION_TITLE_LEADING ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); // writeAddAttribute( ElementTags.LOCALDESTINATION, "top" ); // trygve actionContext.setAction( SinkActionContext.SECTION_TITLE_1 ); } /** {@inheritDoc} */ public void section2_() { writeEndElement(); // ElementTags.SECTION numberDepth--; depth = 0; actionContext.release(); } /** {@inheritDoc} */ public void section2() { numberDepth++; depth = 1; writeStartElement( ElementTags.SECTION ); writeAddAttribute( ElementTags.NUMBERDEPTH, numberDepth ); writeAddAttribute( ElementTags.DEPTH, depth ); writeAddAttribute( ElementTags.INDENT, "0.0" ); lineBreak(); actionContext.setAction( SinkActionContext.SECTION_2 ); } /** {@inheritDoc} */ public void sectionTitle2_() { writeEndElement(); // ElementTags.TITLE font.setSize( ITextFont.DEFAULT_FONT_SIZE ); bold_(); actionContext.release(); } /** {@inheritDoc} */ public void sectionTitle2() { font.setSize( ITextFont.getSectionFontSize( 2 ) ); font.setColor( Color.BLACK ); bold(); writeStartElement( ElementTags.TITLE ); writeAddAttribute( ElementTags.LEADING, DEFAULT_SECTION_TITLE_LEADING ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); // writeAddAttribute( ElementTags.LOCALDESTINATION, "top" ); // trygve actionContext.setAction( SinkActionContext.SECTION_TITLE_2 ); } /** {@inheritDoc} */ public void section3_() { writeEndElement(); // ElementTags.SECTION numberDepth--; depth = 1; actionContext.release(); } /** {@inheritDoc} */ public void section3() { numberDepth++; depth = 1; writeStartElement( ElementTags.SECTION ); writeAddAttribute( ElementTags.NUMBERDEPTH, numberDepth ); writeAddAttribute( ElementTags.DEPTH, depth ); writeAddAttribute( ElementTags.INDENT, "0.0" ); lineBreak(); actionContext.setAction( SinkActionContext.SECTION_3 ); } /** {@inheritDoc} */ public void sectionTitle3_() { writeEndElement(); // ElementTags.TITLE font.setSize( ITextFont.DEFAULT_FONT_SIZE ); bold_(); actionContext.release(); } /** {@inheritDoc} */ public void sectionTitle3() { font.setSize( ITextFont.getSectionFontSize( 3 ) ); font.setColor( Color.BLACK ); bold(); writeStartElement( ElementTags.TITLE ); writeAddAttribute( ElementTags.LEADING, DEFAULT_SECTION_TITLE_LEADING ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); // writeAddAttribute( ElementTags.LOCALDESTINATION, "top" ); // trygve actionContext.setAction( SinkActionContext.SECTION_TITLE_3 ); } /** {@inheritDoc} */ public void section4_() { writeEndElement(); // ElementTags.SECTION numberDepth--; depth = 1; actionContext.release(); } /** {@inheritDoc} */ public void section4() { numberDepth++; depth = 1; writeStartElement( ElementTags.SECTION ); writeAddAttribute( ElementTags.NUMBERDEPTH, numberDepth ); writeAddAttribute( ElementTags.DEPTH, depth ); writeAddAttribute( ElementTags.INDENT, "0.0" ); lineBreak(); actionContext.setAction( SinkActionContext.SECTION_4 ); } /** {@inheritDoc} */ public void sectionTitle4_() { writeEndElement(); // ElementTags.TITLE font.setSize( ITextFont.DEFAULT_FONT_SIZE ); bold_(); actionContext.release(); } /** {@inheritDoc} */ public void sectionTitle4() { font.setSize( ITextFont.getSectionFontSize( 4 ) ); font.setColor( Color.BLACK ); bold(); writeStartElement( ElementTags.TITLE ); writeAddAttribute( ElementTags.LEADING, DEFAULT_SECTION_TITLE_LEADING ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); // writeAddAttribute( ElementTags.LOCALDESTINATION, "top" ); // trygve actionContext.setAction( SinkActionContext.SECTION_TITLE_4 ); } /** {@inheritDoc} */ public void section5_() { writeEndElement(); // ElementTags.SECTION numberDepth--; depth = 1; actionContext.release(); } /** {@inheritDoc} */ public void section5() { numberDepth++; depth = 1; writeStartElement( ElementTags.SECTION ); writeAddAttribute( ElementTags.NUMBERDEPTH, numberDepth ); writeAddAttribute( ElementTags.DEPTH, depth ); writeAddAttribute( ElementTags.INDENT, "0.0" ); lineBreak(); actionContext.setAction( SinkActionContext.SECTION_5 ); } /** {@inheritDoc} */ public void sectionTitle5_() { writeEndElement(); // ElementTags.TITLE font.setSize( ITextFont.DEFAULT_FONT_SIZE ); bold_(); actionContext.release(); } /** {@inheritDoc} */ public void sectionTitle5() { font.setSize( ITextFont.getSectionFontSize( 5 ) ); font.setColor( Color.BLACK ); bold(); writeStartElement( ElementTags.TITLE ); writeAddAttribute( ElementTags.LEADING, DEFAULT_SECTION_TITLE_LEADING ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); // writeAddAttribute( ElementTags.LOCALDESTINATION, "top" ); // trygve actionContext.setAction( SinkActionContext.SECTION_TITLE_5 ); } // ---------------------------------------------------------------------- // Paragraph // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void paragraph_() { // Special case if ( ( actionContext.getCurrentAction() == SinkActionContext.LIST_ITEM ) || ( actionContext.getCurrentAction() == SinkActionContext.NUMBERED_LIST_ITEM ) || ( actionContext.getCurrentAction() == SinkActionContext.DEFINITION ) ) { return; } writeEndElement(); // ElementTags.PARAGRAPH actionContext.release(); } /** {@inheritDoc} */ public void paragraph() { // Special case if ( ( actionContext.getCurrentAction() == SinkActionContext.LIST_ITEM ) || ( actionContext.getCurrentAction() == SinkActionContext.NUMBERED_LIST_ITEM ) || ( actionContext.getCurrentAction() == SinkActionContext.DEFINITION ) ) { return; } writeStartElement( ElementTags.PARAGRAPH ); writeStartElement( ElementTags.NEWLINE ); writeEndElement(); actionContext.setAction( SinkActionContext.PARAGRAPH ); } // ---------------------------------------------------------------------- // Lists // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void list_() { writeEndElement(); // ElementTags.LIST writeEndElement(); // ElementTags.CHUNK actionContext.release(); } /** {@inheritDoc} */ public void list() { writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); writeStartElement( ElementTags.LIST ); writeAddAttribute( ElementTags.NUMBERED, Boolean.FALSE.toString() ); writeAddAttribute( ElementTags.SYMBOLINDENT, "15" ); actionContext.setAction( SinkActionContext.LIST ); } /** {@inheritDoc} */ public void listItem_() { writeEndElement(); // ElementTags.LISTITEM actionContext.release(); } /** {@inheritDoc} */ public void listItem() { writeStartElement( ElementTags.LISTITEM ); writeAddAttribute( ElementTags.INDENTATIONLEFT, "20.0" ); actionContext.setAction( SinkActionContext.LIST_ITEM ); } /** {@inheritDoc} */ public void numberedList_() { writeEndElement(); // ElementTags.LIST writeEndElement(); // ElementTags.CHUNK actionContext.release(); } /** {@inheritDoc} */ public void numberedList( int numbering ) { writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); writeStartElement( ElementTags.LIST ); writeAddAttribute( ElementTags.NUMBERED, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.SYMBOLINDENT, "20" ); switch ( numbering ) { case Sink.NUMBERING_UPPER_ALPHA: writeAddAttribute( ElementTags.LETTERED, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.FIRST, 'A' ); break; case Sink.NUMBERING_LOWER_ALPHA: writeAddAttribute( ElementTags.LETTERED, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.FIRST, 'a' ); break; // TODO Doesn't work case Sink.NUMBERING_UPPER_ROMAN: writeAddAttribute( ElementTags.LETTERED, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.FIRST, 'I' ); break; case Sink.NUMBERING_LOWER_ROMAN: writeAddAttribute( ElementTags.LETTERED, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.FIRST, 'i' ); break; case Sink.NUMBERING_DECIMAL: default: writeAddAttribute( ElementTags.LETTERED, Boolean.FALSE.toString() ); } actionContext.setAction( SinkActionContext.NUMBERED_LIST ); } /** {@inheritDoc} */ public void numberedListItem_() { writeEndElement(); // ElementTags.LISTITEM actionContext.release(); } /** {@inheritDoc} */ public void numberedListItem() { writeStartElement( ElementTags.LISTITEM ); writeAddAttribute( ElementTags.INDENTATIONLEFT, "20" ); actionContext.setAction( SinkActionContext.NUMBERED_LIST_ITEM ); } /** {@inheritDoc} */ public void definitionList_() { actionContext.release(); } /** {@inheritDoc} */ public void definitionList() { lineBreak(); actionContext.setAction( SinkActionContext.DEFINITION_LIST ); } /** {@inheritDoc} */ public void definedTerm_() { font.setSize( ITextFont.DEFAULT_FONT_SIZE ); bold_(); writeEndElement(); // ElementTags.CHUNK actionContext.release(); lineBreak(); } /** {@inheritDoc} */ public void definedTerm() { font.setSize( ITextFont.DEFAULT_FONT_SIZE + 2 ); bold(); writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); actionContext.setAction( SinkActionContext.DEFINED_TERM ); } /** {@inheritDoc} */ public void definition_() { writeEndElement(); // ElementTags.CHUNK actionContext.release(); lineBreak(); } /** {@inheritDoc} */ public void definition() { writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); // We need to add a non break space first to display empty string write( "\u00A0" + StringUtils.repeat( " ", 16 ), false, false ); writeEndElement(); // ElementTags.CHUNK actionContext.setAction( SinkActionContext.DEFINITION ); } /** {@inheritDoc} */ public void definitionListItem_() { actionContext.release(); } /** {@inheritDoc} */ public void definitionListItem() { actionContext.setAction( SinkActionContext.DEFINITION_LIST_ITEM ); } // ---------------------------------------------------------------------- // Tables // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void table_() { if ( tableCaptionXMLWriter != null ) { tableCaptionXMLWriter = null; writeEndElement(); // ElementTags.TABLE writeEndElement(); // ElementTags.CHUNK writeStartElement( ElementTags.PARAGRAPH ); writeAddAttribute( ElementTags.ALIGN, ElementTags.ALIGN_CENTER ); write( tableCaptionWriter.toString(), true ); writeEndElement(); // ElementTags.PARAGRAPH tableCaptionWriter = null; } else { writeEndElement(); // ElementTags.TABLE writeEndElement(); // ElementTags.CHUNK } actionContext.release(); } /** {@inheritDoc} */ public void table() { writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); writeStartElement( ElementTags.TABLE ); writeAddAttribute( ElementTags.LEFT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.RIGHT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.TOP, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.BOTTOM, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.ALIGN, ElementTags.ALIGN_CENTER ); writeAddAttribute( ElementTags.WIDTH, "100.0%" ); writeAddAttribute( ElementTags.TABLEFITSPAGE, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.CELLSFITPAGE, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.CELLPADDING, "10" ); //writeAddAttribute( ElementTags.COLUMNS, "2" ); actionContext.setAction( SinkActionContext.TABLE ); } /** {@inheritDoc} */ public void tableCaption_() { actionContext.release(); } /** {@inheritDoc} */ public void tableCaption() { tableCaptionWriter = new StringWriter(); tableCaptionXMLWriter = new PrettyPrintXMLWriter( tableCaptionWriter ); actionContext.setAction( SinkActionContext.TABLE_CAPTION ); } /** {@inheritDoc} */ public void tableCell_() { writeEndElement(); // ElementTags.CELL actionContext.release(); } /** {@inheritDoc} */ public void tableCell() { writeStartElement( ElementTags.CELL ); writeAddAttribute( ElementTags.LEFT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.RIGHT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.TOP, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.BOTTOM, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.HORIZONTALALIGN, ElementTags.ALIGN_LEFT ); actionContext.setAction( SinkActionContext.TABLE_CELL ); } /** {@inheritDoc} */ public void tableCell( String width ) { actionContext.setAction( SinkActionContext.TABLE_CELL ); } /** {@inheritDoc} */ public void tableHeaderCell_() { writeEndElement(); // ElementTags.CELL actionContext.release(); } /** {@inheritDoc} */ public void tableHeaderCell() { writeStartElement( ElementTags.CELL ); writeAddAttribute( ElementTags.LEFT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.RIGHT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.TOP, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.BOTTOM, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.HEADER, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.BGRED, Color.GRAY.getRed() ); writeAddAttribute( ElementTags.BGBLUE, Color.GRAY.getBlue() ); writeAddAttribute( ElementTags.BGGREEN, Color.GRAY.getGreen() ); writeAddAttribute( ElementTags.HORIZONTALALIGN, ElementTags.ALIGN_CENTER ); actionContext.setAction( SinkActionContext.TABLE_HEADER_CELL ); } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { actionContext.setAction( SinkActionContext.TABLE_HEADER_CELL ); } /** {@inheritDoc} */ public void tableRow_() { writeEndElement(); // ElementTags.ROW actionContext.release(); } /** {@inheritDoc} */ public void tableRow() { writeStartElement( ElementTags.ROW ); actionContext.setAction( SinkActionContext.TABLE_ROW ); } /** {@inheritDoc} */ public void tableRows_() { //writeEndElement(); // ElementTags.TABLE actionContext.release(); } /** {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { // ElementTags.TABLE writeAddAttribute( ElementTags.COLUMNS, justification.length ); actionContext.setAction( SinkActionContext.TABLE_ROWS ); } // ---------------------------------------------------------------------- // Verbatim // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void verbatim_() { writeEndElement(); // ElementTags.CELL writeEndElement(); // ElementTags.ROW writeEndElement(); // ElementTags.TABLE writeEndElement(); // ElementTags.CHUNK actionContext.release(); } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { // Always boxed writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); writeStartElement( ElementTags.TABLE ); writeAddAttribute( ElementTags.COLUMNS, "1" ); writeAddAttribute( ElementTags.LEFT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.RIGHT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.TOP, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.BOTTOM, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.ALIGN, ElementTags.ALIGN_CENTER ); writeAddAttribute( ElementTags.TABLEFITSPAGE, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.CELLSFITPAGE, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.CELLPADDING, "10" ); writeAddAttribute( ElementTags.WIDTH, "100.0%" ); writeStartElement( ElementTags.ROW ); writeStartElement( ElementTags.CELL ); writeAddAttribute( ElementTags.LEFT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.RIGHT, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.TOP, Boolean.TRUE.toString() ); writeAddAttribute( ElementTags.BOTTOM, Boolean.TRUE.toString() ); actionContext.setAction( SinkActionContext.VERBATIM ); } // ---------------------------------------------------------------------- // Figures // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void figure_() { writeEndElement(); // ElementTags.IMAGE writeEndElement(); // ElementTags.CHUNK actionContext.release(); figureDefined = false; } /** {@inheritDoc} */ public void figure() { figureDefined = true; writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); writeStartElement( ElementTags.IMAGE ); actionContext.setAction( SinkActionContext.FIGURE ); } /** {@inheritDoc} */ public void figureCaption_() { actionContext.release(); } /** {@inheritDoc} */ public void figureCaption() { actionContext.setAction( SinkActionContext.FIGURE_CAPTION ); } /** * If the name is a relative link, the internal link will used a System property itext.basedir, * or the class loader. * {@inheritDoc} */ public void figureGraphics( String name ) { String urlName = null; File nameFile = null; if ( ( name.toLowerCase( Locale.ENGLISH ).startsWith( "http://" ) ) || ( name.toLowerCase( Locale.ENGLISH ).startsWith( "https://" ) ) ) { urlName = name; } else { if ( System.getProperty( "itext.basedir" ) != null ) { try { nameFile = new File( System.getProperty( "itext.basedir" ), name ); urlName = nameFile.toURI().toURL().toString(); } catch ( MalformedURLException e ) { getLog().error( "MalformedURLException: " + e.getMessage(), e ); } } else { if ( getClassLoader() != null ) { if ( getClassLoader().getResource( name ) != null ) { urlName = getClassLoader().getResource( name ).toString(); } } else { if ( ITextSink.class.getClassLoader().getResource( name ) != null ) { urlName = ITextSink.class.getClassLoader().getResource( name ).toString(); } } } } if ( urlName == null ) { String msg = "No image '" + name + "' found in the class loader. Try to call setClassLoader(ClassLoader) before."; logMessage( "imageNotFound", msg ); return; } if ( nameFile != null && !nameFile.exists() ) { String msg = "No image '" + nameFile + "' found in your system, check the path."; logMessage( "imageNotFound", msg ); return; } boolean figureCalled = figureDefined; if ( !figureCalled ) { figure(); } float width = 0; float height = 0; try { Image image = Image.getInstance( new URL( urlName ) ); image.scaleToFit( ITextUtil.getDefaultPageSize().width() / 2, ITextUtil.getDefaultPageSize().height() / 2 ); width = image.plainWidth(); height = image.plainHeight(); } catch ( BadElementException e ) { getLog().error( "BadElementException: " + e.getMessage(), e ); } catch ( MalformedURLException e ) { getLog().error( "MalformedURLException: " + e.getMessage(), e ); } catch ( IOException e ) { getLog().error( "IOException: " + e.getMessage(), e ); } writeAddAttribute( ElementTags.URL, urlName ); writeAddAttribute( ElementTags.ALIGN, ElementTags.ALIGN_MIDDLE ); writeAddAttribute( ElementTags.PLAINWIDTH, String.valueOf( width ) ); writeAddAttribute( ElementTags.PLAINHEIGHT, String.valueOf( height ) ); actionContext.setAction( SinkActionContext.FIGURE_GRAPHICS ); if ( !figureCalled ) { figure_(); } } // ---------------------------------------------------------------------- // Fonts // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void bold_() { font.removeBold(); } /** {@inheritDoc} */ public void bold() { font.addBold(); } /** {@inheritDoc} */ public void italic_() { font.removeItalic(); } /** {@inheritDoc} */ public void italic() { font.addItalic(); } /** {@inheritDoc} */ public void monospaced_() { font.setMonoSpaced( false ); } /** {@inheritDoc} */ public void monospaced() { font.setMonoSpaced( true ); } // ---------------------------------------------------------------------- // Links // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void link_() { writeEndElement(); // ElementTags.ANCHOR font.setColor( Color.BLACK ); font.removeUnderlined(); actionContext.release(); } /** {@inheritDoc} */ public void link( String name ) { if ( name == null ) { throw new NullPointerException( "Link name cannot be null!" ); } font.setColor( Color.BLUE ); font.addUnderlined(); writeStartElement( ElementTags.ANCHOR ); if ( StringUtils.isNotEmpty( name )&& name.startsWith( "#" ) && StringUtils.isNotEmpty( header.getTitle() )) { name = "#" + DoxiaUtils.encodeId( header.getTitle(), true ) + "_" + name.substring( 1 ); } writeAddAttribute( ElementTags.REFERENCE, HtmlTools.escapeHTML( name ) ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); actionContext.setAction( SinkActionContext.LINK ); } /** {@inheritDoc} */ public void anchor_() { if ( !anchorDefined ) { // itext needs a defined local destination, we put an invisible text writeAddAttribute( ElementTags.BLUE, "255" ); writeAddAttribute( ElementTags.GREEN, "255" ); writeAddAttribute( ElementTags.RED, "255" ); write( "_" ); } anchorDefined = false; writeEndElement(); // ElementTags.ANCHOR actionContext.release(); } /** {@inheritDoc} */ public void anchor( String name ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } if ( StringUtils.isNotEmpty( header.getTitle() ) ) { name = header.getTitle() + "_" + name; } String id = name; if ( !DoxiaUtils.isValidId( id ) ) { id = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid link: '" + name + "' to '" + id + "'"; logMessage( "modifiedLink", msg ); } writeStartElement( ElementTags.ANCHOR ); writeAddAttribute( ElementTags.NAME, id ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); actionContext.setAction( SinkActionContext.ANCHOR ); } // ---------------------------------------------------------------------- // Misc // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void lineBreak() { // Special case for the header if ( ( actionContext.getCurrentAction() == SinkActionContext.AUTHOR ) || ( actionContext.getCurrentAction() == SinkActionContext.DATE ) || ( actionContext.getCurrentAction() == SinkActionContext.TITLE ) ) { return; } writeStartElement( ElementTags.NEWLINE ); writeEndElement(); } /** {@inheritDoc} */ public void nonBreakingSpace() { write( " " ); } /** {@inheritDoc} */ public void pageBreak() { writeStartElement( ElementTags.NEWPAGE ); writeEndElement(); } /** {@inheritDoc} */ public void horizontalRule() { writeStartElement( ElementTags.PARAGRAPH ); writeAddAttribute( ElementTags.BLUE, "255" ); writeAddAttribute( ElementTags.GREEN, "255" ); writeAddAttribute( ElementTags.RED, "255" ); write( "_" ); writeEndElement(); writeStartElement( ElementTags.PARAGRAPH ); writeStartElement( ElementTags.HORIZONTALRULE ); writeEndElement(); writeEndElement(); } // ---------------------------------------------------------------------- // Text // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void rawText( String text ) { writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); write( text, false ); writeEndElement(); // ElementTags.CHUNK } /** {@inheritDoc} */ public void text( String text ) { if ( StringUtils.isEmpty( text ) ) { return; } switch ( actionContext.getCurrentAction() ) { case SinkActionContext.AUTHOR: header.addAuthor( text ); break; case SinkActionContext.DATE: header.setDate( text ); break; case SinkActionContext.TITLE: header.setTitle( text ); break; case SinkActionContext.TABLE_CAPTION: this.tableCaptionXMLWriter.writeText( text ); break; case SinkActionContext.VERBATIM: // Used to preserve indentation and formating LineNumberReader lnr = new LineNumberReader( new StringReader( text ) ); String line; try { while ( ( line = lnr.readLine() ) != null ) { writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); write( "", "]] >" ); write( line, true, false ); write( "]]>", true ); writeEndElement(); lineBreak(); } } catch ( IOException e ) { throw new RuntimeException( "IOException: ", e ); } break; case SinkActionContext.FIGURE_CAPTION: writeAddAttribute( ElementTags.ALT, text ); break; case SinkActionContext.SECTION_TITLE: case SinkActionContext.SECTION_1: case SinkActionContext.SECTION_2: case SinkActionContext.SECTION_3: case SinkActionContext.SECTION_4: case SinkActionContext.SECTION_5: case SinkActionContext.FIGURE: case SinkActionContext.FIGURE_GRAPHICS: case SinkActionContext.TABLE_ROW: case SinkActionContext.TABLE: case SinkActionContext.HEAD: case SinkActionContext.UNDEFINED: break; case SinkActionContext.ANCHOR: anchorDefined = true; case SinkActionContext.PARAGRAPH: case SinkActionContext.LINK: case SinkActionContext.TABLE_CELL: case SinkActionContext.TABLE_HEADER_CELL: case SinkActionContext.DEFINITION: case SinkActionContext.DEFINED_TERM: case SinkActionContext.NUMBERED_LIST_ITEM: case SinkActionContext.LIST_ITEM: case SinkActionContext.SECTION_TITLE_5: case SinkActionContext.SECTION_TITLE_4: case SinkActionContext.SECTION_TITLE_3: case SinkActionContext.SECTION_TITLE_2: case SinkActionContext.SECTION_TITLE_1: default: writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, font.getFontName() ); writeAddAttribute( ElementTags.SIZE, font.getFontSize() ); writeAddAttribute( ElementTags.STYLE, font.getFontStyle() ); writeAddAttribute( ElementTags.BLUE, font.getFontColorBlue() ); writeAddAttribute( ElementTags.GREEN, font.getFontColorGreen() ); writeAddAttribute( ElementTags.RED, font.getFontColorRed() ); write( text ); writeEndElement(); // ElementTags.CHUNK } } /** * {@inheritDoc} * * Unkown events just log a warning message but are ignored otherwise. * @see org.apache.maven.doxia.sink.Sink#unknown(String,Object[],SinkEventAttributes) */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { String msg = "Unknown Sink event: '" + name + "', ignoring!"; logMessage( "unknownEvent", msg ); } /** {@inheritDoc} */ protected void init() { super.init(); this.actionContext = new SinkActionContext(); this.font = new ITextFont(); this.header = new ITextHeader(); this.numberDepth = 1; this.depth = 0; this.tableCaptionWriter = null; this.tableCaptionXMLWriter = null; this.anchorDefined = false; this.figureDefined = false; this.warnMessages = null; } /** * Convenience method to write a starting element. * * @param tag the name of the tag */ private void writeStartElement( String tag ) { if ( tableCaptionXMLWriter == null ) { xmlWriter.startElement( tag ); } else { tableCaptionXMLWriter.startElement( tag ); } } /** * Convenience method to write a key-value pair. * * @param key the name of an attribute * @param value the value of an attribute */ private void writeAddAttribute( String key, String value ) { if ( tableCaptionXMLWriter == null ) { xmlWriter.addAttribute( key, value ); } else { tableCaptionXMLWriter.addAttribute( key, value ); } } /** * Convenience method to write a key-value pair. * * @param key the name of an attribute * @param value the value of an attribute */ private void writeAddAttribute( String key, int value ) { if ( tableCaptionXMLWriter == null ) { xmlWriter.addAttribute( key, String.valueOf( value ) ); } else { tableCaptionXMLWriter.addAttribute( key, String.valueOf( value ) ); } } /** * Convenience method to write an end element. */ private void writeEndElement() { if ( tableCaptionXMLWriter == null ) { xmlWriter.endElement(); } else { tableCaptionXMLWriter.endElement(); } } /** * Convenience method to write a String * * @param aString */ protected void write( String aString ) { write( aString, false ); } /** * Convenience method to write a String depending the escapeHtml flag * * @param aString * @param escapeHtml */ private void write( String aString, boolean escapeHtml ) { write( aString, escapeHtml, true ); } /** * Convenience method to write a String depending the escapeHtml flag * * @param aString * @param escapeHtml * @param trim */ private void write( String aString, boolean escapeHtml, boolean trim ) { if ( aString == null ) { return; } if ( trim ) { aString = StringUtils.replace( aString, "\n", "" ); LineNumberReader lnr = new LineNumberReader( new StringReader( aString ) ); StringBuffer sb = new StringBuffer(); String line; try { while ( ( line = lnr.readLine() ) != null ) { sb.append( beautifyPhrase( line.trim() ) ); sb.append( " " ); } aString = sb.toString(); } catch ( IOException e ) { // nop } if ( aString.trim().length() == 0 ) { return; } } if ( escapeHtml ) { if ( tableCaptionXMLWriter == null ) { xmlWriter.writeMarkup( aString ); } else { tableCaptionXMLWriter.writeMarkup( aString ); } } else { if ( tableCaptionXMLWriter == null ) { xmlWriter.writeText( aString ); } else { tableCaptionXMLWriter.writeText( aString ); } } } /** * Convenience method to return a beautify phrase, i.e. one space between words. * * @param aString * @return a String with only one space between words */ private static String beautifyPhrase( String aString ) { String[] strings = StringUtils.split( aString, " " ); StringBuffer sb = new StringBuffer(); for ( int i = 0; i < strings.length; i++ ) { if ( strings[i].trim().length() != 0 ) { sb.append( strings[i].trim() ); sb.append( " " ); } } return sb.toString().trim(); } private void startChunk( String fontName, int fontSize, String fontStyle, int fontColorBlue, int fontColorGreen, int fontColorRed, String localDestination ) { writeStartElement( ElementTags.CHUNK ); writeAddAttribute( ElementTags.FONT, fontName ); writeAddAttribute( ElementTags.SIZE, fontSize ); writeAddAttribute( ElementTags.STYLE, fontStyle ); writeAddAttribute( ElementTags.BLUE, fontColorBlue ); writeAddAttribute( ElementTags.GREEN, fontColorGreen ); writeAddAttribute( ElementTags.RED, fontColorRed ); // writeAddAttribute( ElementTags.LOCALDESTINATION, localDestination ); } /** * If debug mode is enabled, log the msg as is, otherwise add unique msg in warnMessages. * * @param key not null * @param msg not null * @see #close() * @since 1.1.1 */ private void logMessage( String key, String msg ) { msg = "[iText Sink] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } } doxia-1.1.4/doxia-modules/doxia-module-xhtml/0000755000175000017500000000000011632765555021071 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/pom.xml0000644000175000017500000000303011470562366022375 0ustar twernertwerner 4.0.0 doxia-modules org.apache.maven.doxia 1.1.4 ../pom.xml doxia-module-xhtml Doxia :: XHTML Module A Doxia module for Xhtml source documents. org.codehaus.plexus plexus-utils doxia-1.1.4/doxia-modules/doxia-module-xhtml/src/0000755000175000017500000000000011632765555021660 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/0000755000175000017500000000000011632765554022636 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/resources/0000755000175000017500000000000011632765555024651 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/resources/index.xml.vm0000644000175000017500000002257410767705722027133 0ustar twernertwerner Welcome to Maven Brett Porter Jason van Zyl
Search Maven Sites
Get Maven ${currentVersion}
Released: 20 June 2007

Maven ${currentVersion} (1.3Mb)
System Requirements, Installation Instructions, Release Notes

Maven Tasks for Ant 2.0.7 (938k)
Documentation, Release Notes

Other Maven Projects

Continuum continuous integration server

Maven 1.x All stories start at the beginning...

OS Summit Asia

Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

If you think that Maven could help your project, you can find out more information about in the "About Maven" section of the navigation. This includes an in-depth description of what Maven is, a list of some of its main features, and a set of frequently asked questions about what Maven is.

Learning about Maven

This site is separated into the following sections, depending on how you'd like to use Maven:

  • Run Maven Information for those needing to build a project that uses Maven
  • Use Maven Information for those wanting to use Maven to build their project, including a "10 minute test" that gives a practical overview of Maven's main features in just 10 minutes
  • Write Maven Plugins Information for those who may or may not be using Maven, but want to provide a plugin for shared functionality or to accompany their own product or toolset
  • Improve the Maven Repository Information for those who may or may not use, but are interested in getting project metadata into the repository
  • Develop Maven Information for those who are currently developers, or interested in becoming developers of the Maven project itself

Each guide is divided into a number of trails to get you started on a particular topic, and includes a reference area and a "cookbook" of common examples.

You can access the guides at any time from the left navigation.

Documentation Index

If you are looking for a quick reference, you can use the documentation index.

Plugins

For detailed information on just some of the plugins available for Maven, see the plugin list.

How to Get Support

Support for Maven is available in a variety of different forms.

To get started, search the documentation, the wiki, issue tracker, or the mailing list archives to see if the problem has been solved or reported before.

If the problem has not been reported before, the recommended way to get help is to subscribe to the Maven Users Mailing list. Many other users and Maven developers will answer your questions there, and the answer will be archived for others in the future.

You can also reach the Maven developers on IRC.

doxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/resources/fun.html0000644000175000017500000000426210577144521026322 0ustar twernertwerner This is fun!

This is the first first-level section

This paragraph belongs to section one.

This is the first second-level section

This paragraph belongs to subsection one.

This is the second second-level section

This paragraph belongs to subsection two.

This is the first third-level section

To make the task even harder, the h3-heading was dropped, but we expect the parser to recognize this section as level 3, not level 4.

This is the third second-level section

This paragraph belongs to subsection three.

This is the second first-level section

This paragraph belongs to section two.

    	//what is source code?
    

This is also a paragraph. Take a look at the other paragraph.

Just introduce some images. maven feather maven feather

doxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/resources/file.with.dot.in.name.xml0000644000175000017500000000001210767706471031366 0ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/resources/download.apt.vm0000644000175000017500000001270510767705722027612 0ustar twernertwerner ------ Download Maven ${currentVersion} ------ Brett Porter Jason van Zyl ------ 4 October 2005 ------ Download Maven ${currentVersion} Maven is distributed in several formats for your convenience. You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24 hours to reach all mirrors. Maven ${currentVersion} is distributed under the {{{http://maven.apache.org/license.html} Apache License, version 2.0}}. We <> encourage our users to configure a Maven repository mirror closer to their location, please read {{{guides/mini/guide-mirror-settings.html} How to Use Mirrors for Repositories}}. *-------------------------+---------+----------+-----------+ | | Mirrors | Checksum | Signature | *-------------------------+---------+----------+-----------+ | Maven ${currentVersion} (tar.bz2) | {{{http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-${currentVersion}-bin.tar.bz2} maven-${currentVersion}-bin.tar.bz2}} | {{{http://www.apache.org/dist/maven/binaries/maven-${currentVersion}-bin.tar.bz2.md5} maven-${currentVersion}-bin.tar.bz2.md5}} | {{{http://www.apache.org/dist/maven/binaries/maven-${currentVersion}-bin.tar.bz2.asc} maven-${currentVersion}-bin.tar.bz2.asc}} | *-------------------------+---------+----------+-----------+ | Maven ${currentVersion} (tar.gz) | {{{http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-${currentVersion}-bin.tar.gz} maven-${currentVersion}-bin.tar.gz}} | {{{http://www.apache.org/dist/maven/binaries/maven-${currentVersion}-bin.tar.gz.md5} maven-${currentVersion}-bin.tar.gz.md5}} | {{{http://www.apache.org/dist/maven/binaries/maven-${currentVersion}-bin.tar.gz.asc} maven-${currentVersion}-bin.tar.gz.asc}} | *-------------------------+---------+----------+-----------+ | Maven ${currentVersion} (zip) | {{{http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-${currentVersion}-bin.zip} maven-${currentVersion}-bin.zip}} | {{{http://www.apache.org/dist/maven/binaries/maven-${currentVersion}-bin.zip.md5} maven-${currentVersion}-bin.zip.md5}} | {{{http://www.apache.org/dist/maven/binaries/maven-${currentVersion}-bin.zip.asc} maven-${currentVersion}-bin.zip.asc}} | *-------------------------+---------+----------+-----------+ | Maven Ant Tasks 2.0.7 | {{{http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-ant-tasks-2.0.7.jar} maven-ant-tasks-2.0.7.jar}} | {{{http://www.apache.org/dist/maven/binaries/maven-ant-tasks-2.0.7.jar.md5} maven-ant-tasks-2.0.7.jar.md5}} | {{{http://www.apache.org/dist/maven/binaries/maven-ant-tasks-2.0.7.jar.asc} maven-ant-tasks-2.0.7.jar.asc}} | *-------------------------+---------+----------+-----------+ * Previous Releases All previous releases of Maven can be found in the {{{http://archive.apache.org/dist/maven/binaries/}archives}}. * System {Requirements} *----------------------+---------------------------------------------------------------------------------------------+ | <> | 1.4 or above (this is to execute Maven - it still allows you to build against 1.3 and prior JDK's) *----------------------+---------------------------------------------------------------------------------------------+ | <> | No minimum requirement *----------------------+---------------------------------------------------------------------------------------------+ | <> | No minimum requirement. Approximately 100MB will be used for your local repository, however this will vary depending on usage and can be removed and redownloaded at any time. *----------------------+---------------------------------------------------------------------------------------------+ | <> | No minimum requirement. On Windows, Windows NT and above or Cygwin is required for the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X. *----------------------+---------------------------------------------------------------------------------------------+ * {Installation} Instructions ** Windows 2000/XP [[1]] Unzip <<>> to the directory you wish to install Maven ${currentVersion}. These instructions assume you chose <<>> [[2]] Add the <<>> directory to your path, by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then editing the <<>> variable in the user variables. eg. <<<"C:\Program Files\Apache Software Foundation\maven-${currentVersion}\bin";%PATH%>>> [[3]] In the same dialog, make sure that <<>> is set to the location of your JDK, eg. <<>> [[4]] Run <<>> to verify that it is correctly installed. ** Unix-based Operating Systems (Linux, Solaris and Mac OS X) [[1]] Extract the distribution archive to the directory you wish to install Maven ${currentVersion}. These instructions assume you chose <<>>. The directory <<>> will be created from the archive. [[2]] Add the <<>> directory to your path, eg. <<>> [[3]] Make sure that <<>> is set to the location of your JDK, eg. <<>> [[4]] Run <<>> to verify that it is correctly installed. doxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/resources/test.xhtml0000644000175000017500000000611710772521335026701 0ustar twernertwerner Title

Paragraph 1, line 1. Paragraph 1, line 2.

Paragraph 2, line 1. Paragraph 2, line 2.

Section title

Sub-section title

Sub-sub-section title

Sub-sub-sub-section title
Sub-sub-sub-sub-section title
  • List item 1.
  • List item 2.

    Paragraph contained in list item 2.

    • Sub-list item 1.
    • Sub-list item 2.
  • List item 3. Force end of list:
Verbatim text not contained in list item 3
  1. Numbered item 1.
    1. Numbered item A.
    2. Numbered item B.
  2. Numbered item 2.

List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]].

Defined term 1
of definition list.
Defined term 2
of definition list.
Verbatim text
                        in a box        

--- instead of +-- suppresses the box around verbatim text.

figure.png

Figure caption

Table caption
Centered
cell 1,1
Left-aligned
cell 1,2
Right-aligned
cell 1,3
cell 2,1 cell 2,2 cell 2,3

No grid, no caption:

cell cell
cell cell

Horizontal line:


New page.

Italic font. Bold font. Monospaced font.

Anchor. Link to Anchor. Link to http://www.pixware.fr. Link to showing alternate text. Link to Pixware home page.

Force line
break.

Non breaking space.

Escaped special characters:
~
=
-
+
*
[
]
<
>
{
}
\

Copyright symbol: ©, ©, ©.

doxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/0000755000175000017500000000000011632765554023557 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/0000755000175000017500000000000011632765554024346 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/0000755000175000017500000000000011632765554025567 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/0000755000175000017500000000000011632765554026675 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765554030001 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765554031266 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/0000755000175000017500000000000011632765554032422 5ustar twernertwerner././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlIdentityTest.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000000522411207760055033431 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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.module.AbstractIdentityTest; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.StringUtils; /** * Check that piping a full model through an XhtmlParser and an XhtmlSink * leaves the model unchanged. */ public class XhtmlIdentityTest extends AbstractIdentityTest { /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); assertIdentity( true ); } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new XhtmlSink( writer ); } /** {@inheritDoc} */ protected Parser createParser() { return new XhtmlParser(); } /** {@inheritDoc} */ protected String getExpected() { // DOXIA-177 String expected = super.getExpected(); String startCaption = "begin:tableCaption"; String endCaption = "end:tableCaption"; int iStartCaption = expected.indexOf( startCaption ); int iEndCaption = expected.indexOf( endCaption ) + endCaption.length(); String captionTag = expected.substring( iStartCaption, iEndCaption ) + EOL + EOL + EOL; expected = StringUtils.replace( expected, captionTag, "" ); int iStartTableRows = expected.substring( 0, iStartCaption ).lastIndexOf( "begin:tableRows" ) + "begin:tableRows".length(); StringBuffer text = new StringBuffer(); text.append( expected.substring( 0, iStartTableRows ) ); text.append( EOL + EOL + EOL ); text.append( captionTag.subSequence( 0, captionTag.indexOf( "end:tableCaption" ) + "end:tableCaption".length() ) ); text.append( expected.substring( iStartTableRows ) ); return text.toString(); } } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlParserTest.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000001305711215415010033417 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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.File; import java.util.Iterator; import java.util.List; import org.apache.maven.doxia.parser.AbstractParserTest; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; import org.codehaus.plexus.util.FileUtils; /** * @author Lars Trieloff * @version $Id: XhtmlParserTest.java 784707 2009-06-15 09:53:12Z vsiveton $ */ public class XhtmlParserTest extends AbstractParserTest { private XhtmlParser parser; /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); parser = (XhtmlParser) lookup( Parser.ROLE, "xhtml" ); // AbstractXmlParser.CachedFileEntityResolver downloads DTD/XSD files in ${java.io.tmpdir} // Be sure to delete them String tmpDir = System.getProperty( "java.io.tmpdir" ); String excludes = "xhtml-lat1.ent, xhtml1-transitional.dtd, xhtml-special.ent, xhtml-symbol.ent"; List tmpFiles = FileUtils.getFileNames( new File( tmpDir ), excludes, null, true ); for ( Iterator it = tmpFiles.iterator(); it.hasNext(); ) { File tmpFile = new File( it.next().toString() ); tmpFile.delete(); } } /** {@inheritDoc} */ protected Parser createParser() { return parser; } /** {@inheritDoc} */ protected String outputExtension() { return "xhtml"; } /** @throws Exception */ public void testDocumentBodyEventsList() throws Exception { String text = ""; SinkEventTestingSink sink = new SinkEventTestingSink(); ( (XhtmlParser) createParser() ).parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "body", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testHeadEventsList() throws Exception { String text = "Title" + ""; SinkEventTestingSink sink = new SinkEventTestingSink(); ( (XhtmlParser) createParser() ).parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "head", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "title", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "author", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "author_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "date", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "date_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testPreEventsList() throws Exception { String text = "
";

        SinkEventTestingSink sink = new SinkEventTestingSink();

        ( (XhtmlParser) createParser() ).parse( text, sink );

        Iterator it = sink.getEventList().iterator();

        assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() );
        assertFalse( it.hasNext() );
    }

    /**
     * Test unknown tags.
     *
     * @throws java.lang.Exception if any.
     */
    public void testUnknown()
        throws Exception
    {
        String text = "";

        SinkEventTestingSink sink = new SinkEventTestingSink();

        ( (XhtmlParser) createParser() ).parse( text, sink );

        Iterator it = sink.getEventList().iterator();
        assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() );
        assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() );
        assertFalse( it.hasNext() );
    }
}
././@LongLink0000000000000000000000000000016200000000000011564 Lustar  rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlSinkTest.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000002172611352225025033430 0ustar  twernertwernerpackage org.apache.maven.doxia.module.xhtml;

/*
 * 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.StringWriter;
import java.io.Writer;

import org.apache.maven.doxia.sink.AbstractSinkTest;
import org.apache.maven.doxia.sink.Sink;

/**
 * @author Jason van Zyl
 * @version $Id: XhtmlSinkTest.java 926772 2010-03-23 20:52:37Z ltheussl $
 * @since 1.0
 */
public class XhtmlSinkTest
    extends AbstractSinkTest
{
    /** {@inheritDoc} */
    protected String outputExtension()
    {
        return "xhtml";
    }

    /** {@inheritDoc} */
    protected Sink createSink( Writer writer )
    {
        return new XhtmlSink( writer, "UTF-8" );
    }

    /** {@inheritDoc} */
    protected boolean isXmlSink()
    {
        return true;
    }

    /**
     * Test link generation.
     *
     * @throws java.lang.Exception if any.
     */
    public void testLinks()
        throws Exception
    {
        XhtmlSink sink = null;
        Writer writer =  new StringWriter();
        try
        {
            sink = (XhtmlSink) createSink( writer );
            sink.link( "http:/www.xdoc.com" );
            sink.link_();
            sink.link( "./index.html#anchor" );
            sink.link_();
            sink.link( "../index.html#anchor" );
            sink.link_();
            sink.link( "index.html" );
            sink.link_();
        }
        finally
        {
            if ( sink != null )
            {
                sink.close();
            }
        }

        String actual = writer.toString();
        assertTrue( actual.indexOf( "" ) != -1 );
        assertTrue( actual.indexOf( "" ) != -1 );
        assertTrue( actual.indexOf( "" ) != -1 );
        assertTrue( actual.indexOf( "" ) != -1 );
    }

    /** {@inheritDoc} */
    protected String getTitleBlock( String title )
    {
        return "" + title + "";
    }

    /** {@inheritDoc} */
    protected String getAuthorBlock( String author )
    {
        return author;
    }

    /** {@inheritDoc} */
    protected String getDateBlock( String date )
    {
        return date;
    }

    /** {@inheritDoc} */
    protected String getHeadBlock()
    {
        return "" +
                "";
    }

    /** {@inheritDoc} */
    protected String getBodyBlock()
    {
        return "";
    }

    /** {@inheritDoc} */
    protected String getSectionTitleBlock( String title )
    {
        return title;
    }

    /** {@inheritDoc} */
    protected String getSection1Block( String title )
    {
        return "

" + title + "

"; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return "

" + title + "

"; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { return "

" + title + "

"; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return "
  • " + item + "
"; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return "
  1. " + item + "
"; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return "
" + definum + "
" + definition + "
"; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { return "\"""; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { return "" + "" + "
Table caption
cell
"; } // Disable testTable until the order of attributes issue is clarified // TODO: remove /** {@inheritDoc} */ public void testTable() { assertEquals( "Dummy!", "", "" ); } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return "

" + text + "

"; } /** {@inheritDoc} */ protected String getVerbatimBlock( String text ) { return "
" + text + "
"; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return "
"; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { return "" + anchor + ""; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return "
"; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return " "; } /** {@inheritDoc} */ protected String getTextBlock( String text ) { // TODO: need to be able to retreive those from outside the sink return "~,_=,_-,_+,_*,_[,_],_<,_>,_{,_},_\\"; } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { return text; } /** * Test entities is section titles and paragraphs. */ public void testEntities() { XhtmlSink sink = null; Writer writer = new StringWriter(); try { sink = new XhtmlSink( writer ); sink.section( Sink.SECTION_LEVEL_1, null ); sink.sectionTitle( Sink.SECTION_LEVEL_1, null ); sink.text( "&", null ); sink.sectionTitle_( Sink.SECTION_LEVEL_1 ); sink.paragraph( null ); sink.text( "&", null ); sink.paragraph_(); sink.section_( Sink.SECTION_LEVEL_1 ); } finally { sink.close(); } assertEquals( "

&

&

", writer.toString() ); } /** * Test head events. */ public void testHead() { XhtmlSink sink = null; Writer writer = new StringWriter(); try { sink = new XhtmlSink( writer ); sink.head(); sink.title(); sink.text( "Title" ); sink.title_(); sink.comment( "A comment" ); sink.author(); // note: this is really illegal, there should be no un-resolved entities emitted into text() sink.text( "ģ&" ); sink.author_(); sink.head_(); } finally { sink.close(); } String exp = "Title"; assertTrue( writer.toString().indexOf( exp ) != -1 ); } /** {@inheritDoc} */ protected String getCommentBlock( String text ) { return ""; } } ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/XhtmlSinkWithLanguageIdTest.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000000337411141061207033423 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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 java.util.Locale; import org.apache.maven.doxia.sink.Sink; /** * @author Vincent Siveton * @version $Id: XhtmlSinkWithLanguageIdTest.java 739565 2009-01-31 14:39:03Z vsiveton $ */ public class XhtmlSinkWithLanguageIdTest extends XhtmlSinkTest { /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new XhtmlSink( writer, "UTF-8", Locale.US.getLanguage() ); } /** {@inheritDoc} */ protected String getHeadBlock() { return "" + "" + "" + ""; } } doxia-1.1.4/doxia-modules/doxia-module-xhtml/src/site/0000755000175000017500000000000011632765555022624 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/site/site.xml0000644000175000017500000000167211103330660024272 0ustar twernertwerner doxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/0000755000175000017500000000000011632765555022604 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/0000755000175000017500000000000011632765555023525 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/0000755000175000017500000000000011632765555024314 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/0000755000175000017500000000000011632765555025535 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/0000755000175000017500000000000011632765555026643 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765555027747 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765555031234 5ustar twernertwernerdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/0000755000175000017500000000000011632765555032370 5ustar twernertwerner././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000001677611244503630033407 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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 javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Attribute; import org.apache.maven.doxia.sink.XhtmlBaseSink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.StringUtils; /** * Xhtml 1.0 Transitional sink implementation. *
* It uses the DTD/xhtml1-transitional * http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd. * * @author Jason van Zyl * @author ltheussl * @version $Id: XhtmlSink.java 807186 2009-08-24 12:29:12Z vsiveton $ * @since 1.0 */ public class XhtmlSink extends XhtmlBaseSink implements XhtmlMarkup { // ---------------------------------------------------------------------- // Instance fields // ---------------------------------------------------------------------- private String encoding; private String languageId; /** An indication on if we're inside a head title. */ private boolean headTitleFlag; // ---------------------------------------------------------------------- // Constructors // ---------------------------------------------------------------------- /** * Constructor, initialize the Writer. * * @param writer not null writer to write the result. */ protected XhtmlSink( Writer writer ) { super( writer ); } /** * Constructor, initialize the Writer and tells which encoding is used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. */ protected XhtmlSink( Writer writer, String encoding ) { super( writer ); this.encoding = encoding; } /** * Constructor, initialize the Writer and tells which encoding and languageId are used. * * @param writer not null writer to write the result. * @param encoding the encoding used, that should be written to the generated HTML content * if not null. * @param languageId language identifier for the root element as defined by * IETF BCP 47, Tags for the Identification of Languages; * in addition, the empty string may be specified. */ protected XhtmlSink( Writer writer, String encoding, String languageId ) { this( writer, encoding ); this.languageId = languageId; } /** {@inheritDoc} */ public void head() { init(); setHeadFlag( true ); write( "" ); MutableAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( "xmlns", XHTML_NAMESPACE ); if ( languageId != null ) { atts.addAttribute( Attribute.LANG.toString(), languageId ); atts.addAttribute( "xml:lang", languageId ); } writeStartTag( HTML, atts ); writeStartTag( HEAD ); } /** {@inheritDoc} */ public void head_() { if ( !isHeadTitleFlag() ) { // The content of element type "head" must match // "((script|style|meta|link|object|isindex)*, // ((title,(script|style|meta|link|object|isindex)*, // (base,(script|style|meta|link|object|isindex)*)?)|(base,(script|style|meta|link|object|isindex)*, // (title,(script|style|meta|link|object|isindex)*))))" writeStartTag( TITLE ); writeEndTag( TITLE ); } setHeadFlag( false ); setHeadTitleFlag( false ); if ( encoding != null ) { write( "" ); } writeEndTag( HEAD ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TITLE */ public void title() { setHeadTitleFlag( true ); writeStartTag( TITLE ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TITLE */ public void title_() { content( getTextBuffer().toString() ); writeEndTag( TITLE ); resetTextBuffer(); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#META */ public void author_() { if ( getTextBuffer().length() > 0 ) { MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.NAME, "author" ); String text = HtmlTools.escapeHTML( getTextBuffer().toString() ); // hack: un-escape numerical entities that have been escaped above // note that numerical entities should really be added as one unicode character in the first place text = StringUtils.replace( text, "&#", "&#" ); att.addAttribute( Attribute.CONTENT, text ); writeSimpleTag( META, att ); resetTextBuffer(); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#META */ public void date_() { if ( getTextBuffer().length() > 0 ) { MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.NAME, "date" ); att.addAttribute( Attribute.CONTENT, getTextBuffer().toString() ); writeSimpleTag( META, att ); resetTextBuffer(); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#BODY */ public void body() { writeStartTag( BODY ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#BODY * @see javax.swing.text.html.HTML.Tag#HTML */ public void body_() { writeEndTag( BODY ); writeEndTag( HTML ); flush(); init(); } // ---------------------------------------------------------------------- // Public protected methods // ---------------------------------------------------------------------- /** *

Setter for the field headTitleFlag.

* * @param headTitleFlag an header title flag. * @since 1.1 */ protected void setHeadTitleFlag( boolean headTitleFlag ) { this.headTitleFlag = headTitleFlag; } /** *

isHeadTitleFlag.

* * @return the current headTitleFlag. * @since 1.1 */ protected boolean isHeadTitleFlag() { return this.headTitleFlag ; } } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/AbstractXhtmlSink.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/Abstr0000644000175000017500000000223611150514100033336 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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.SinkAdapter; /** *

Abstract AbstractXhtmlSink class.

* * @author Jason van Zyl * @version $Id: AbstractXhtmlSink.java 746993 2009-02-23 12:36:16Z vsiveton $ * @since 1.0 */ public abstract class AbstractXhtmlSink extends SinkAdapter { } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSiteModule.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000000251611212745470033377 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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.site.AbstractSiteModule; /** *

XhtmlSiteModule class.

* * @author ltheussl * @version $Id: XhtmlSiteModule.java 782392 2009-06-07 14:14:16Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule" role-hint="xhtml" */ public class XhtmlSiteModule extends AbstractSiteModule { /** * Default constructor. */ public XhtmlSiteModule() { super( "xhtml", "xhtml", "xhtml" ); } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlParser.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000001517011244503630033372 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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 javax.swing.text.html.HTML.Attribute; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.parser.XhtmlBaseParser; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Parse an xhtml model and emit events into a Doxia Sink. * * @author Jason van Zyl * @version $Id: XhtmlParser.java 807186 2009-08-24 12:29:12Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="xhtml" */ public class XhtmlParser extends XhtmlBaseParser implements XhtmlMarkup { /** For boxed verbatim. */ private boolean boxed; /** Empty elements don't write a closing tag. */ private boolean isEmptyElement; /** {@inheritDoc} */ protected void handleStartTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { isEmptyElement = parser.isEmptyElementTag(); SinkEventAttributeSet attribs = getAttributesFromParser( parser ); if ( parser.getName().equals( HTML.toString() ) ) { //Do nothing return; } else if ( parser.getName().equals( HEAD.toString() ) ) { sink.head( attribs ); } else if ( parser.getName().equals( TITLE.toString() ) ) { sink.title( attribs ); } else if ( parser.getName().equals( META.toString() ) ) { String name = parser.getAttributeValue( null, Attribute.NAME.toString() ); String content = parser.getAttributeValue( null, Attribute.CONTENT.toString() ); if ( "author".equals( name ) ) { sink.author( null ); sink.text( content ); sink.author_(); } else if ( "date".equals( name ) ) { sink.date( null ); sink.text( content ); sink.date_(); } else { sink.unknown( "meta", new Object[] {new Integer( TAG_TYPE_SIMPLE )}, attribs ); } } /* * The ADDRESS element may be used by authors to supply contact information * for a model or a major part of a model such as a form. This element * often appears at the beginning or end of a model. */ else if ( parser.getName().equals( ADDRESS.toString() ) ) { sink.author( attribs ); } else if ( parser.getName().equals( BODY.toString() ) ) { sink.body( attribs ); } else if ( parser.getName().equals( DIV.toString() ) ) { String divclass = parser.getAttributeValue( null, Attribute.CLASS.toString() ); if ( "source".equals( divclass ) ) { this.boxed = true; } super.baseStartTag( parser, sink ); // pick up other divs } /* * The PRE element tells visual user agents that the enclosed text is * "preformatted". When handling preformatted text, visual user agents: * - May leave white space intact. * - May render text with a fixed-pitch font. * - May disable automatic word wrap. * - Must not disable bidirectional processing. * Non-visual user agents are not required to respect extra white space * in the content of a PRE element. */ else if ( parser.getName().equals( PRE.toString() ) ) { if ( boxed ) { attribs.addAttributes( SinkEventAttributeSet.BOXED ); } verbatim(); sink.verbatim( attribs ); } else if ( !baseStartTag( parser, sink ) ) { if ( isEmptyElement ) { handleUnknown( parser, sink, TAG_TYPE_SIMPLE ); } else { handleUnknown( parser, sink, TAG_TYPE_START ); } if ( getLog().isDebugEnabled() ) { String position = "[" + parser.getLineNumber() + ":" + parser.getColumnNumber() + "]"; String tag = "<" + parser.getName() + ">"; getLog().debug( "Unrecognized xhtml tag: " + tag + " at " + position ); } } } /** {@inheritDoc} */ protected void handleEndTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { if ( parser.getName().equals( HTML.toString() ) ) { //Do nothing return; } else if ( parser.getName().equals( HEAD.toString() ) ) { sink.head_(); } else if ( parser.getName().equals( TITLE.toString() ) ) { sink.title_(); } else if ( parser.getName().equals( BODY.toString() ) ) { consecutiveSections( 0, sink ); sink.body_(); } else if ( parser.getName().equals( ADDRESS.toString() ) ) { sink.author_(); } else if ( parser.getName().equals( DIV.toString() ) ) { this.boxed = false; super.baseEndTag( parser, sink ); } else if ( !baseEndTag( parser, sink ) ) { if ( !isEmptyElement ) { handleUnknown( parser, sink, TAG_TYPE_END ); } } isEmptyElement = false; } /** {@inheritDoc} */ protected void init() { super.init(); this.boxed = false; this.isEmptyElement = false; } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlMarkup.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000000340611141054030033360 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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.HtmlMarkup; /** * List of Xhtml markups. *
* Xhtml uses all {@link javax.swing.text.html.HTML.Tag} and {@link javax.swing.text.html.HTML.Attribute} * as markups. * * @author Vincent Siveton * @version $Id: XhtmlMarkup.java 739557 2009-01-31 13:54:32Z vsiveton $ * @since 1.0 */ public interface XhtmlMarkup extends HtmlMarkup { /** XHTML namespace: "http://www.w3.org/1999/xhtml" */ String XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; /** XHTML 1.0 transitional public id: "-//W3C//DTD XHTML 1.0 Transitional//EN" */ String XHTML_TRANSITIONAL_PUBLIC_ID = "-//W3C//DTD XHTML 1.0 Transitional//EN"; /** XHTML 1.0 transitional system id: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" */ String XHTML_TRANSITIONAL_SYSTEM_ID = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootdoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSinkFactory.javadoxia-1.1.4/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/Xhtml0000644000175000017500000000323311141061207033362 0ustar twernertwernerpackage org.apache.maven.doxia.module.xhtml; /* * 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.AbstractXmlSinkFactory; import org.apache.maven.doxia.sink.Sink; /** * Xhtml implementation of the Sink factory. * * @author Vincent Siveton * @version $Id: XhtmlSinkFactory.java 739565 2009-01-31 14:39:03Z vsiveton $ * @since 1.0 * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory" role-hint="xhtml" */ public class XhtmlSinkFactory extends AbstractXmlSinkFactory { /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding ) { return new XhtmlSink( writer, encoding ); } /** {@inheritDoc} */ protected Sink createSink( Writer writer, String encoding, String languageId ) { return new XhtmlSink( writer, encoding, languageId ); } } doxia-1.1.4/doxia-book/0000755000175000017500000000000011632765560014626 5ustar twernertwernerdoxia-1.1.4/doxia-book/pom.xml0000644000175000017500000001102311470562366016137 0ustar twernertwerner 4.0.0 org.apache.maven.doxia doxia 1.1.4 ../pom.xml doxia-book Doxia :: Book Component A component to write books like user manuals and guides in any format supported by Doxia. org.apache.maven.doxia doxia-core org.apache.maven.doxia doxia-sink-api org.apache.maven.doxia doxia-module-apt org.apache.maven.doxia doxia-module-docbook-simple org.apache.maven.doxia doxia-module-itext org.apache.maven.doxia doxia-module-latex org.apache.maven.doxia doxia-module-xdoc org.apache.maven.doxia doxia-module-xhtml org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-i18n 1.0-beta-6 org.codehaus.plexus plexus-utils org.apache.maven.doxia doxia-core test-jar test org.codehaus.modello modello-maven-plugin src/main/modello/book.mdo 1.0.0 site-docs pre-site xdoc xsd descriptor generate-sources java xpp3-reader xsd reporting org.codehaus.mojo l10n-maven-plugin 1.0-alpha-2 en fr doxia-1.1.4/doxia-book/src/0000755000175000017500000000000011632765560015415 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/0000755000175000017500000000000011632765560016374 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/resources/0000755000175000017500000000000011632765560020406 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/resources/book-1.xml0000644000175000017500000000304411137600663022211 0ustar twernertwerner plexus-user-guide Test Book chapter-1 Chapter 1
section-1
section-2
chapter-2 Chapter 2
section-3
section-4
doxia-1.1.4/doxia-book/src/test/resources/book-1/0000755000175000017500000000000011632765560021476 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/resources/book-1/section-4.apt0000644000175000017500000000171610524215463024005 0ustar twernertwerner ----- Section 4 ----- Trygve ----- Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. doxia-1.1.4/doxia-book/src/test/resources/book-1/section-2.apt0000644000175000017500000000174310524215463024003 0ustar twernertwerner ----- Section 2 ----- Trygve ----- Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? doxia-1.1.4/doxia-book/src/test/resources/book-1/section-1.apt0000644000175000017500000001020010524215463023766 0ustar twernertwerner ----- Section 1 ----- Trygve ----- Subsection 1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec sagittis malesuada nisi. Aliquam orci eros, vestibulum eu, placerat et, pretium sed, nisi. Proin consequat. Praesent faucibus sem id arcu hendrerit nonummy. Aliquam blandit accumsan pede. Vivamus aliquet lacinia nunc. Praesent dapibus orci eu magna. Cras nonummy, pede nec facilisis semper, sem nibh vestibulum massa, sed ornare tortor elit non lectus. Nullam mauris turpis, luctus et, vulputate vitae, commodo sit amet, purus. Fusce erat. Proin ullamcorper imperdiet est. Morbi sit amet dui. Fusce bibendum auctor augue. Sed leo sapien, vehicula ac, nonummy id, cursus at, nulla. Ut sed purus. * Subsubsection 1 Suspendisse sagittis metus nec leo. Suspendisse velit. Phasellus ipsum dolor, porttitor ut1, varius id, scelerisque vel, ligula. Aliquam tempor sem in pede tincidunt nonummy. Vestibulum et nulla. Nunc et dolor a risus porttitor tem pus. Sed felis arcu, consectetuer non, imperdiet sollicitudin, ullamcorper vitae, nulla. Vestibulum ante ipsum primis in faucibus. Subsection 2 Duis eget libero aliquet quam ultrices malesuada. Donec molestie dignissim nunc. Curabitur turpis. Suspendisse a nibh ut elit vulputate ultrices. Etiam nulla erat, nonummy vel, fringilla at, scelerisque non, ante. Suspendisse adipiscing rhoncus purus. Nulla in augue. Ut ac nisi eu nisi cursus elementum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec et turpis. Donec nec mi. Mauris malesuada congue sem. Maecenas et urna in nisi sagittis facilisis. Cras nibh. Aliquam purus. Donec convallis congue libero. Nulla feugiat. Nulla massa libero, consectetuer ac, aliquet ac, consequat eu, purus. Pellentesque eleifend pretium augue. Subsection 3 Integer auctor, nisi ut convallis imperdiet, ligula diam sollicitudin dolor, porttitor mattis urna sapien at velit. Fusce vestibulum, neque nec malesuada tempor, tortor nisi accumsan purus, quis faucibus metus elit ac urna. Aliquam commodo velit vel ipsum. Donec blandit diam blandit eros. Aliquam pretium fermentum neque. Sed nec tellus eu orci ullamcorper facilisis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce suscipit. Sed sit amet diam ac ante tincidunt ornare. Sed sodales vestibulum quam. Fusce accumsan. Ut ut mi. Subsection 4 Maecenas tincidunt lobortis nunc. Phasellus euismod diam sit amet felis. Donec lorem metus, vulputate vitae, ornare vel, molestie sit amet, pede. In erat velit, adipiscing sed, varius in, interdum cursus, enim. Quisque dolor ante, tincidunt vel, congue eget, consectetuer id, nunc. Suspendisse hendrerit. Proin egestas, massa eget egestas ullamcorper, nisl elit gravida magna, vitae dignissim odio velit ut tortor. Fusce lobortis consequat nulla. Vestibulum pretium justo at metus. Sed lorem velit, elementum eget, pellentesque ac, ornare id, mi. Pellentesque vel ligula et erat dictum commodo. Integer malesuada lacus nec metus. Aliquam id purus ac neque mattis venenatis. Aenean lobortis accumsan massa. Donec dui ante, facilisis vel, hendrerit ut, vehicula in, eros. Suspendisse potenti. Sed fringilla. Suspendisse vel nibh. Sed sit amet lacus quis massa tincidunt elementum. Ut ut augue vitae ligula dapibus aliquam. Subsection 5 Fusce non eros non lectus venenatis bibendum. Nullam pharetra. Nunc commodo pede et metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum imperdiet nisl nec nulla. Morbi congue dictum pede. Aliquam ligula. In pede nulla, varius a, blandit ut, pulvinar vitae, mauris. Suspendisse sit amet magna. Curabitur cursus placerat justo. Vivamus imperdiet magna commodo mi. Vestibulum eget metus quis sem sollicitudin consectetuer. Morbi metus augue, elementum rutrum, luctus quis, porttitor a, est. Phasellus quis sapien et augue adipiscing fermentum. Sed fermentum tristique dui. Vivamus aliquam, tortor at ultricies commodo, urna ipsum fringilla neque, sit amet congue purus enim a justo. doxia-1.1.4/doxia-book/src/test/resources/book-1/section-3.apt0000644000175000017500000000203510524215463023777 0ustar twernertwerner ----- Section 3 ----- Trygve ----- 1914 translation by H. Rackham But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure? doxia-1.1.4/doxia-book/src/test/resources/expected/0000755000175000017500000000000011632765560022207 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/resources/expected/doc-book/0000755000175000017500000000000011632765560023704 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/resources/expected/doc-book/plexus-user-guide.xml0000644000175000017500000001707411141050701030001 0ustar twernertwerner Test Book Chapter 1
Subsection 1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec sagittis malesuada nisi. Aliquam orci eros, vestibulum eu, placerat et, pretium sed, nisi. Proin consequat. Praesent faucibus sem id arcu hendrerit nonummy. Aliquam blandit accumsan pede. Vivamus aliquet lacinia nunc. Praesent dapibus orci eu magna. Cras nonummy, pede nec facilisis semper, sem nibh vestibulum massa, sed ornare tortor elit non lectus. Nullam mauris turpis, luctus et, vulputate vitae, commodo sit amet, purus. Fusce erat. Proin ullamcorper imperdiet est. Morbi sit amet dui. Fusce bibendum auctor augue. Sed leo sapien, vehicula ac, nonummy id, cursus at, nulla. Ut sed purus.
Subsubsection 1 Suspendisse sagittis metus nec leo. Suspendisse velit. Phasellus ipsum dolor, porttitor ut1, varius id, scelerisque vel, ligula. Aliquam tempor sem in pede tincidunt nonummy. Vestibulum et nulla. Nunc et dolor a risus porttitor tem pus. Sed felis arcu, consectetuer non, imperdiet sollicitudin, ullamcorper vitae, nulla. Vestibulum ante ipsum primis in faucibus.
Subsection 2 Duis eget libero aliquet quam ultrices malesuada. Donec molestie dignissim nunc. Curabitur turpis. Suspendisse a nibh ut elit vulputate ultrices. Etiam nulla erat, nonummy vel, fringilla at, scelerisque non, ante. Suspendisse adipiscing rhoncus purus. Nulla in augue. Ut ac nisi eu nisi cursus elementum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec et turpis. Donec nec mi. Mauris malesuada congue sem. Maecenas et urna in nisi sagittis facilisis. Cras nibh. Aliquam purus. Donec convallis congue libero. Nulla feugiat. Nulla massa libero, consectetuer ac, aliquet ac, consequat eu, purus. Pellentesque eleifend pretium augue.
Subsection 3 Integer auctor, nisi ut convallis imperdiet, ligula diam sollicitudin dolor, porttitor mattis urna sapien at velit. Fusce vestibulum, neque nec malesuada tempor, tortor nisi accumsan purus, quis faucibus metus elit ac urna. Aliquam commodo velit vel ipsum. Donec blandit diam blandit eros. Aliquam pretium fermentum neque. Sed nec tellus eu orci ullamcorper facilisis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce suscipit. Sed sit amet diam ac ante tincidunt ornare. Sed sodales vestibulum quam. Fusce accumsan. Ut ut mi.
Subsection 4 Maecenas tincidunt lobortis nunc. Phasellus euismod diam sit amet felis. Donec lorem metus, vulputate vitae, ornare vel, molestie sit amet, pede. In erat velit, adipiscing sed, varius in, interdum cursus, enim. Quisque dolor ante, tincidunt vel, congue eget, consectetuer id, nunc. Suspendisse hendrerit. Proin egestas, massa eget egestas ullamcorper, nisl elit gravida magna, vitae dignissim odio velit ut tortor. Fusce lobortis consequat nulla. Vestibulum pretium justo at metus. Sed lorem velit, elementum eget, pellentesque ac, ornare id, mi. Pellentesque vel ligula et erat dictum commodo. Integer malesuada lacus nec metus. Aliquam id purus ac neque mattis venenatis. Aenean lobortis accumsan massa. Donec dui ante, facilisis vel, hendrerit ut, vehicula in, eros. Suspendisse potenti. Sed fringilla. Suspendisse vel nibh. Sed sit amet lacus quis massa tincidunt elementum. Ut ut augue vitae ligula dapibus aliquam.
Subsection 5 Fusce non eros non lectus venenatis bibendum. Nullam pharetra. Nunc commodo pede et metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum imperdiet nisl nec nulla. Morbi congue dictum pede. Aliquam ligula. In pede nulla, varius a, blandit ut, pulvinar vitae, mauris. Suspendisse sit amet magna. Curabitur cursus placerat justo. Vivamus imperdiet magna commodo mi. Vestibulum eget metus quis sem sollicitudin consectetuer. Morbi metus augue, elementum rutrum, luctus quis, porttitor a, est. Phasellus quis sapien et augue adipiscing fermentum. Sed fermentum tristique dui. Vivamus aliquam, tortor at ultricies commodo, urna ipsum fringilla neque, sit amet congue purus enim a justo.
Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
Chapter 2
1914 translation by H. Rackham But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
doxia-1.1.4/doxia-book/src/test/java/0000755000175000017500000000000011632765560017315 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/0000755000175000017500000000000011632765560020104 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/apache/0000755000175000017500000000000011632765560021325 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/0000755000175000017500000000000011632765560022433 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765560023537 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/0000755000175000017500000000000011632765560024471 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/0000755000175000017500000000000011632765560026314 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/indexer/0000755000175000017500000000000011632765560027752 5ustar twernertwerner././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/indexer/BookIndexerTest.javadoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/indexer/BookIndexerTest.ja0000644000175000017500000001123110767707462033342 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.indexer; /* * 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.book.context.BookContext; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.services.io.BookIo; import org.apache.maven.doxia.index.IndexEntry; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.util.FileUtils; /** * @author Trygve Laugstøl * @version $Id: BookIndexerTest.java 638290 2008-03-18 09:45:22Z bentmann $ */ public class BookIndexerTest extends PlexusTestCase { public void testBasic() throws Exception { BookIo io = (BookIo) lookup( BookIo.ROLE ); BookIndexer indexer = (BookIndexer) lookup( BookIndexer.ROLE ); BookModel book = io.readBook( getTestFile( "src/test/resources/book-1.xml" ) ); BookContext context = new BookContext(); io.loadFiles( context, FileUtils.getFiles( getTestFile( "src/test/resources/book-1" ), "*.apt", "" ) ); indexer.indexBook( book, context ); IndexEntry root = context.getIndex(); assertNotNull( root ); assertEquals( 2, root.getChildEntries().size() ); IndexEntry c1 = assertIndexEntry( root, 0, "Chapter 1", "chapter-1", 2 ); // ----------------------------------------------------------------------- // Section 1 // ----------------------------------------------------------------------- IndexEntry s1 = assertIndexEntry( c1, 0, "Section 1", "section-1", 5 ); IndexEntry ss1 = assertIndexEntry( s1, 0, "Subsection 1", "Subsection_1", 1 ); assertIndexEntry( ss1, 0, "Subsubsection 1", "Subsubsection_1", 0 ); assertIndexEntry( s1, 1, "Subsection 2", "Subsection_2", 0 ); assertIndexEntry( s1, 2, "Subsection 3", "Subsection_3", 0 ); assertIndexEntry( s1, 3, "Subsection 4", "Subsection_4", 0 ); // ----------------------------------------------------------------------- // Section 2 // ----------------------------------------------------------------------- IndexEntry s2 = assertIndexEntry( c1, 1, "Section 2", "section-2", 1 ); assertIndexEntry( s2, 0, "Section 1.10.32 of \"de Finibus Bonorum et Malorum\", written by Cicero in 45 BC", "Section_1.10.32_of_\"de_Finibus_Bonorum_et_Malorum\",_written_by_Cicero_in_45_BC", 0 ); // ----------------------------------------------------------------------- // Chapter 2 // ----------------------------------------------------------------------- IndexEntry c2 = assertIndexEntry( root, 1, "Chapter 2", "chapter-2", 2 ); IndexEntry s3 = assertIndexEntry( c2, 0, "Section 3", "section-3", 1 ); assertIndexEntry( s3, 0, "1914 translation by H. Rackham", "1914_translation_by_H._Rackham", 0 ); IndexEntry s4 = assertIndexEntry( c2, 1, "Section 4", "section-4", 1 ); assertIndexEntry( s4, 0, "Section 1.10.33 of \"de Finibus Bonorum et Malorum\", written by Cicero in 45 BC", "Section_1.10.33_of_\"de_Finibus_Bonorum_et_Malorum\",_written_by_Cicero_in_45_BC", 0 ); } private IndexEntry assertIndexEntry( IndexEntry parent, int childIndex, String title, String id, int childCount ) { assertTrue( "parent: " + parent.getId() + ", " + "required count: " + childCount + ", " + "actual count: " + parent.getChildEntries().size(), childIndex < parent.getChildEntries().size() ); IndexEntry indexEntry = (IndexEntry) parent.getChildEntries().get( childIndex ); assertEquals( title, indexEntry.getTitle() ); assertEquals( HtmlTools.encodeId( id ), indexEntry.getId() ); assertEquals( childCount, indexEntry.getChildEntries().size() ); return indexEntry; } } doxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/renderer/0000755000175000017500000000000011632765560030122 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/renderer/docbook/0000755000175000017500000000000011632765560031542 5ustar twernertwerner././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootdoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/renderer/docbook/DocBookBookSinkTest.javadoxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/services/renderer/docbook/DocBookBo0000644000175000017500000003264511214446323033265 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.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.Writer; import java.util.Locale; import javax.swing.text.MutableAttributeSet; import javax.swing.text.SimpleAttributeSet; import org.apache.maven.doxia.module.docbook.DocBookSink; import org.apache.maven.doxia.sink.AbstractSinkTest; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkUtils; import org.apache.maven.doxia.util.DoxiaUtils; import org.codehaus.plexus.util.FileUtils; /** * Test the book path of the DockBook sink * @author Dave Syer */ public class DocBookBookSinkTest extends AbstractSinkTest { /** {@inheritDoc} */ protected boolean isXmlSink() { return true; } /** {@inheritDoc} */ protected String outputExtension() { return "docbook"; } /** {@inheritDoc} */ protected Sink createSink( Writer writer ) { return new DocBookBookSink( writer ); } // // DocBookBookSink specific // /** * Checks that the sequence [bookTitle(), text( title ), bookTitle_()], * invoked on the current sink, produces the same result as * {@link #getBookTitleBlock getBookTitleBlock}( title ). * NewLines are ignored. */ public void testBookTitle() { DocBookBookSink sink = (DocBookBookSink) getSink(); String title = "Grodek"; sink.bookTitle(); sink.text( title ); sink.bookTitle_(); sink.flush(); String actual = getSinkContent(); String expected = getBookTitleBlock( title ); assertEquals( "Wrong book title!", expected, actual ); } /** * Checks that the sequence [bookAuthor(), text( author ), bookAuthor_()] * , invoked on the current sink, produces the same result as * {@link #getBookAuthorBlock getBookAuthorBlock}( author ). * NewLines are ignored. */ public void testBookAuthor() { DocBookBookSink sink = (DocBookBookSink) getSink(); String author = "Georg Trakl"; sink.bookAuthor(); sink.text( author ); sink.bookAuthor_(); sink.flush(); String actual = getSinkContent(); String expected = getBookAuthorBlock( author ); assertEquals( "Wrong book author!", expected, actual ); } /** * Checks that the sequence [bookDate(), text( date ), bookDate_()], * invoked on the current sink, produces the same result as * {@link #getBookDateBlock getBookDateBlock}( date ). NewLines are ignored. */ public void testBookDate() { DocBookBookSink sink = (DocBookBookSink) getSink(); String date = "1914"; sink.bookDate(); sink.text( date ); sink.bookDate_(); sink.flush(); String actual = getSinkContent(); String expected = getBookDateBlock( date ); assertEquals( "Wrong book date!", expected, actual ); } /** * Checks that the sequence [bookHead(), bookHead_()], * invoked on the current sink, produces the same result as * {@link #getBookHeadBlock getBookHeadBlock()}. NewLines are ignored. */ public void testBookHead() { DocBookBookSink sink = (DocBookBookSink) getSink(); //sink.bookHead(); sink.bookHead_(); sink.flush(); String actual = getSinkContent(); String expected = getBookHeadBlock(); assertEquals( "Wrong book head!", expected, actual ); } /** * Checks that the sequence [book(), book_()], * invoked on the current sink, produces the same result as * {@link #getBookBlock getBookBlock()}. NewLines are ignored. */ public void testBook() { DocBookBookSink sink = (DocBookBookSink) getSink(); sink.book(); sink.book_(); sink.flush(); String actual = getSinkContent(); String expected = getBookBlock(); assertEquals( "Wrong book body!", expected, actual ); } /** * Checks that the sequence [chapterTitle(), text( title ), * chapterTitle_()], invoked on the current sink, produces * the same result as * {@link #getChapterTitleBlock getChapterTitleBlock}( title ). * NewLines are ignored. */ public void testChapterTitle() { DocBookBookSink sink = (DocBookBookSink) getSink(); String title = "Title"; sink.chapterTitle(); sink.text( title ); sink.chapterTitle_(); sink.flush(); String actual = getSinkContent(); String expected = getChapterTitleBlock( title ); assertEquals( "Wrong chapterTitle!", expected, actual ); } /** * Checks that the sequence [chapter(), chapter_()], * invoked on the current sink, produces the same result as * {@link #getChapterBlock getChapterBlock}(). * NewLines are ignored. */ public void testChapter() { DocBookBookSink sink = (DocBookBookSink) getSink(); sink.chapter(); sink.chapter_(); sink.flush(); String actual = getSinkContent(); String expected = getChapterBlock(); assertEquals( "Wrong chapter block!", expected, actual ); } /** * Returns a title block generated by this sink. * @param title The title to use. * @return The result of invoking a title block on the current sink. * @see #testBookTitle() */ protected String getBookTitleBlock( String title ) { return "" + title + ""; } /** * Returns an author block generated by this sink. * @param author The author to use. * @return The result of invoking an author block on the current sink. * @see #testBookAuthor() */ protected String getBookAuthorBlock( String author ) { return "" + author + ""; } /** * Returns a date block generated by this sink. * @param date The date to use. * @return The result of invoking a date block on the current sink. * @see #testBookDate() */ protected String getBookDateBlock( String date ) { return "" + date + ""; } /** * Returns a head block generated by this sink. * @return The result of invoking a head block on the current sink. * @see #testBookHead() */ protected String getBookHeadBlock() { return ""; } /** * Returns a body block generated by this sink. * @return The result of invoking a body block on the current sink. * @see #testBook() */ protected String getBookBlock() { return ""; } /** * Returns a SectionTitle block generated by this sink. * @param title The title to use. * @return The result of invoking a SectionTitle block on the current sink. * @see #testChapterTitle() */ protected String getChapterTitleBlock( String title ) { return "" + title + ""; } /** * Returns a Section1 block generated by this sink. * @param title The title to use. * @return The result of invoking a Section1 block on the current sink. * @see #testChapter() */ protected String getChapterBlock() { return ""; } // // from DocBookSink // /** {@inheritDoc} */ protected String getTitleBlock( String title ) { return ""; } /** {@inheritDoc} */ protected String getAuthorBlock( String author ) { return ""; } /** {@inheritDoc} */ protected String getDateBlock( String date ) { return "" + date + ""; } /** {@inheritDoc} */ protected String getHeadBlock() { return ""; } /** {@inheritDoc} */ protected String getBodyBlock() { return ""; } /** {@inheritDoc} */ protected String getSectionTitleBlock( String title ) { return "" + title + ""; } /** {@inheritDoc} */ protected String getSection1Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getSection2Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getSection3Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getSection4Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getSection5Block( String title ) { return "
" + title + "
"; } /** {@inheritDoc} */ protected String getListBlock( String item ) { return "" + item + ""; } /** {@inheritDoc} */ protected String getNumberedListBlock( String item ) { return "" + item + ""; } /** {@inheritDoc} */ protected String getDefinitionListBlock( String definum, String definition ) { return "" + definum + "" + definition + ""; } /** {@inheritDoc} */ protected String getFigureBlock( String source, String caption ) { String format = FileUtils.extension( source ).toUpperCase( Locale.ENGLISH ); return "" + "" + "" + caption + ""; } /** {@inheritDoc} */ protected String getTableBlock( String cell, String caption ) { // Using the same set ordering than the JVM MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( "frame", "none" ); att.addAttribute( "rowsep", "0" ); att.addAttribute( "colsep", "0" ); return "" + caption + "" + cell + ""; } /** {@inheritDoc} */ protected String getParagraphBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getVerbatimBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getHorizontalRuleBlock() { return ""; } /** {@inheritDoc} */ protected String getPageBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getAnchorBlock( String anchor ) { return "" + anchor + ""; } /** {@inheritDoc} */ protected String getLinkBlock( String link, String text ) { String linkend = DoxiaUtils.isInternalLink( link ) ? link.substring( 1 ) : link; return "" + text + ""; } /** {@inheritDoc} */ protected String getItalicBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getBoldBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getMonospacedBlock( String text ) { return "" + text + ""; } /** {@inheritDoc} */ protected String getLineBreakBlock() { return ""; } /** {@inheritDoc} */ protected String getNonBreakingSpaceBlock() { return " "; } /** {@inheritDoc} */ protected String getTextBlock( String text ) { // TODO: retreive those from the sink return "~,_=,_-,_+,_*,_[,_],_<,_>,_{,_},_\\"; } /** {@inheritDoc} */ protected String getRawTextBlock( String text ) { // TODO return ""; } /** {@inheritDoc} */ protected String getCommentBlock( String text ) { return ""; } } doxia-1.1.4/doxia-book/src/test/java/org/apache/maven/doxia/book/BookRendererTest.java0000644000175000017500000000554611100621011030533 0ustar twernertwernerpackage org.apache.maven.doxia.book; /* * 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.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.StringUtils; import org.apache.maven.doxia.book.model.BookModel; import java.io.File; import java.util.List; /** * @author Trygve Laugstøl * @version $Id: BookRendererTest.java 707844 2008-10-25 13:41:29Z vsiveton $ */ public class BookRendererTest extends PlexusTestCase { public void testBasic() throws Exception { BookDoxia doxia = (BookDoxia) lookup( BookDoxia.ROLE ); File book1 = getTestFile( "src/test/resources/book-1.xml" ); List files = FileUtils.getFiles( getTestFile( "src/test/resources/book-1" ), "**/*.apt, **/*.xml", "" ); BookModel book = doxia.loadBook( book1 ); doxia.renderBook( book, "pdf", files, getTestFile( "target/test-output/itext" ) ); doxia.renderBook( book, "xhtml", files, getTestFile( "target/test-output/xhtml" ) ); doxia.renderBook( book, "xdoc", files, getTestFile( "target/test-output/xdoc" ) ); doxia.renderBook( book, "latex", files, getTestFile( "target/test-output/latex" ) ); doxia.renderBook( book, "doc-book", files, getTestFile( "target/test-output/doc-book" ) ); doxia.renderBook( book, "rtf", files, getTestFile( "target/test-output/rtf" ) ); assertCorrectDocbook(); } /** * Regression test for the docbook output. */ private void assertCorrectDocbook() throws Exception { String expected = FileUtils.fileRead( getTestFile( "src/test/resources/expected/doc-book/plexus-user-guide.xml" ) ); expected = StringUtils.deleteWhitespace( expected ); String actual = FileUtils.fileRead( getTestFile( "target/test-output/doc-book/plexus-user-guide.xml" ) ); actual = StringUtils.deleteWhitespace( actual ); assertEquals( "Wrong docbook output!", StringUtils.replace( expected, "\r", "" ), StringUtils.replace( actual, "\r", "" ) ); } } doxia-1.1.4/doxia-book/src/site/0000755000175000017500000000000011632765560016361 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/site/apt/0000755000175000017500000000000011632765560017145 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/site/apt/index.apt0000644000175000017500000000133310670231421020743 0ustar twernertwerner ----- Writing Books in Doxia ----- Lukas Theussl ----- Introduction Doxia allows you to write books like user manuals and guides in any format supported by Doxia. Combined with the Doxia Book Maven you are able to include the manuals directly in your generated site with links to the off-line friendly formats like XDoc, PDF, RTF and LaTeX. * How It Works The only thing you need in addition to the content files itself is a simple book descriptor which is used to specify the ordering of the sections and the names for the chapters. See {{{./book.html}The Book Descriptor Reference}} for a reference to the descriptor. A sample is given on the main Doxia {{{http://maven.apache.org/doxia/book/index.html}site}}. doxia-1.1.4/doxia-book/src/site/apt/using-book-xsd.apt0000644000175000017500000000264511140054106022510 0ustar twernertwerner ----- Using Schema Book 1.0 ----- Vincent Siveton ------ 2009-01-28 ------ ~~ 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 Using Schema Book 1.0 The Decoration XSD is located {{{http://maven.apache.org/xsd/book-1.0.0.xsd}here}}. Your favorite IDE probably supports XSD schema's for .xml files. You need to specify the following: +-----+ ... +-----+ doxia-1.1.4/doxia-book/src/site/apt/usage.apt0000644000175000017500000000215510670231421020743 0ustar twernertwerner ----- Usage ----- Lukas Theussl ----- Usage Below is a simple example to illustrate how to use it. +------------------------------------------------------ BookDoxia doxia = (BookDoxia) lookup( BookDoxia.ROLE ); // load the book descriptor File book1 = new File( "book-1.xml" ); BookModel book = doxia.loadBook( book1 ); // files to include List files = FileUtils.getFiles( new File( "src/resources/book/" ), "**/*.apt, **/*.xml", "" ); // render books in different formats doxia.renderBook( book, "pdf", files, new File( "target/itext/" ) ); doxia.renderBook( book, "xhtml", files, new File( "target/xhtml/" ) ); doxia.renderBook( book, "xdoc", files, new File( "target/xdoc/" ) ); doxia.renderBook( book, "latex", files, new File( "target/latex/" ) ); doxia.renderBook( book, "doc-book", files, new File( "target/doc-book/" ) ); doxia.renderBook( book, "rtf", files, new File( "target/rtf/" ) ); +------------------------------------------------------ See the {{{./apidocs/index.html}Javadocs}} for more details. doxia-1.1.4/doxia-book/src/site/site.xml0000644000175000017500000000311211140054106020021 0ustar twernertwerner doxia-1.1.4/doxia-book/src/main/0000755000175000017500000000000011632765560016341 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/modello/0000755000175000017500000000000011632765560017774 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/modello/book.mdo0000644000175000017500000004234311215146576021432 0ustar twernertwerner book BookModel This descriptor specifies the metadatas and the content for a book.

A book is defined by a collection of chapters, a chapter by a collection of sections, a section by a file.

An XSD is available at:

]]>
package org.apache.maven.doxia.book.model BookModel Describes the book layout and packaging. 1.0.0 id 1.0.0 String true Specifies the id of this book. This is a symbolic name for a particular book from this project. title 1.0.0 String Specifies the title of this book. author 1.0.0 String Specifies the author of this book. date 1.0.0 String Specifies the date of this book. chapters 1.0.0 Specifies a collection of chapters. Chapter * Chapter 1.0.0 id 1.0.0 String true Specifies the id of this chapter. This is a symbolic name for a particular chapter. title 1.0.0 String Specifies the title of this chapter. sections 1.0.0 Specifies a collection of sections. Section * Section 1.0.0 id 1.0.0 String true Specifies the id of this section. This is a symbolic name for a particular section. title 1.0.0 String Specifies the title of this section. file 1.0.0 String Specifies the file of this section.
doxia-1.1.4/doxia-book/src/main/resources/0000755000175000017500000000000011632765560020353 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/resources/book-renderer_en.properties0000644000175000017500000000227511136250225025701 0ustar twernertwerner# 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: # This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It # must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the # JVM's default locale (which need not be "en"). See the method javadoc about # ResourceBundle.getBundle(String, Locale, ClassLoader) # for a full description of the lookup strategy. doxia-1.1.4/doxia-book/src/main/resources/book-renderer_fr.properties0000644000175000017500000000152011142023576025702 0ustar twernertwerner# 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. toc=Table des matičres previous=Précédent up=Haut next=Suivant doxia-1.1.4/doxia-book/src/main/resources/book-renderer.properties0000644000175000017500000000151010553273463025221 0ustar twernertwerner# 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. toc=Table Of Content previous=Previous up=Up next=Next doxia-1.1.4/doxia-book/src/main/java/0000755000175000017500000000000011632765560017262 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/0000755000175000017500000000000011632765560020051 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/apache/0000755000175000017500000000000011632765560021272 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/0000755000175000017500000000000011632765560022400 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765560023504 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/0000755000175000017500000000000011632765560024436 5ustar twernertwerner././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/InvalidBookDescriptorException.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/InvalidBookDescriptorException.java0000644000175000017500000000374011175620077033417 0ustar twernertwernerpackage org.apache.maven.doxia.book; /* * 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.book.services.validation.ValidationResult; /** * Indicates that the book descriptor file could not be parsed correctly. * * @author Trygve Laugstøl * @version $Id: InvalidBookDescriptorException.java 769433 2009-04-28 15:26:55Z ltheussl $ */ public class InvalidBookDescriptorException extends BookDoxiaException { /** serialVersionUID */ private static final long serialVersionUID = -5706648416915909753L; /** ValidationResult. */ private ValidationResult validationResult; /** * Construct a new InvalidBookDescriptorException and stores the given ValidationResult. * * @param validationResult The ValidationResult to store. */ public InvalidBookDescriptorException( ValidationResult validationResult ) { super( "Invalid book descriptor." ); this.validationResult = validationResult; } /** * Return the ValidationResult. * * @return the ValidationResult associated with this Exception. */ public ValidationResult getValidationResult() { return validationResult; } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/0000755000175000017500000000000011632765560026261 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/0000755000175000017500000000000011632765560027717 5ustar twernertwerner././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/DefaultBookIndexer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/DefaultBookIndexer0000644000175000017500000001224710767707462033373 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.indexer; /* * 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.FileNotFoundException; import java.io.FileReader; import java.util.Iterator; import org.apache.maven.doxia.Doxia; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.book.context.BookIndex; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.model.Chapter; import org.apache.maven.doxia.book.model.Section; import org.apache.maven.doxia.index.IndexEntry; import org.apache.maven.doxia.index.IndexingSink; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.parser.manager.ParserNotFoundException; import org.codehaus.plexus.logging.AbstractLogEnabled; /** * Default implementation of BookIndexer. * * @plexus.component * * @author Trygve Laugstøl * @version $Id: DefaultBookIndexer.java 638290 2008-03-18 09:45:22Z bentmann $ */ public class DefaultBookIndexer extends AbstractLogEnabled implements BookIndexer { /** * @plexus.requirement */ private Doxia doxia; // ---------------------------------------------------------------------- // BookIndexer Implementation // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void indexBook( BookModel book, BookContext bookContext ) throws BookDoxiaException { BookIndex index = new BookIndex(); for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); indexChapter( bookContext, index, chapter ); } bookContext.setIndex( index ); } // ---------------------------------------------------------------------- // Private // ---------------------------------------------------------------------- /** * Index a chapter. * * @param context the BookContext. * @param bookEntry the IndexEntry. * @param chapter the Chapter to index. * @throws BookDoxiaException if the chapter cannot be indexed. */ private void indexChapter( BookContext context, IndexEntry bookEntry, Chapter chapter ) throws BookDoxiaException { IndexEntry chapterEntry = new IndexEntry( bookEntry, chapter.getId( ) ); chapterEntry.setTitle( chapter.getTitle() ); for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); ) { Section section = (Section) it.next(); indexSection( context, chapterEntry, section ); } } /** * Index a section. * * @param bookContext the BookContext. * @param chapterEntry the IndexEntry. * @param section the Section to index. * @throws BookDoxiaException if the section cannot be indexed. */ private void indexSection( BookContext bookContext, IndexEntry chapterEntry, Section section ) throws BookDoxiaException { BookContext.BookFile bookFile = (BookContext.BookFile) bookContext.getFiles().get( section.getId() ); if ( bookFile == null ) { throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." ); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- IndexEntry sectionEntry = new IndexEntry( chapterEntry, section.getId() ); IndexingSink sink = new IndexingSink( sectionEntry ); try { doxia.parse( new FileReader( bookFile.getFile() ), bookFile.getParserId(), sink ); } catch ( ParserNotFoundException e ) { throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e ); } catch ( ParseException e ) { throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( FileNotFoundException e ) { throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } sectionEntry.setTitle( sink.getTitle() ); } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexer.java0000644000175000017500000000314011150511552032752 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.indexer; /* * 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.book.model.BookModel; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.book.BookDoxiaException; /** * Index a book. * * @author Trygve Laugstøl * @version $Id: BookIndexer.java 746976 2009-02-23 12:15:38Z vsiveton $ */ public interface BookIndexer { /** The plexus lookup role. */ String ROLE = BookIndexer.class.getName(); /** * Index a book. * * @param book the book to index. * @param bookContext the BookContext. * @throws org.apache.maven.doxia.book.BookDoxiaException if the book cannot be indexed. */ void indexBook( BookModel book, BookContext bookContext ) throws BookDoxiaException; } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/0000755000175000017500000000000011632765560030067 5ustar twernertwerner././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/LatexBookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/LatexBookRenderer0000644000175000017500000002024311451074657033371 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.book.BookDoxiaException; import org.apache.maven.doxia.book.services.renderer.latex.LatexBookSink; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.model.Chapter; import org.apache.maven.doxia.book.model.Section; import org.apache.maven.doxia.parser.manager.ParserNotFoundException; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.Doxia; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.WriterFactory; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.io.FileNotFoundException; import java.io.Reader; import java.io.Writer; import java.util.Iterator; import java.util.Map; import java.util.HashMap; /** *

LatexBookRenderer class.

* * @plexus.component role-hint="latex" * @author Trygve Laugstøl * @version $Id: LatexBookRenderer.java 1003021 2010-09-30 11:51:11Z ltheussl $ */ public class LatexBookRenderer implements BookRenderer { /** * @plexus.requirement */ private Doxia doxia; // ---------------------------------------------------------------------- // BookRenderer Implementatino // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void renderBook( BookContext context ) throws BookDoxiaException { BookModel book = context.getBook(); if ( !context.getOutputDirectory().exists() ) { if ( !context.getOutputDirectory().mkdirs() ) { throw new BookDoxiaException( "Could not make directory: " + context.getOutputDirectory().getAbsolutePath() + "." ); } } File bookFile = new File( context.getOutputDirectory(), book.getId() + ".tex" ); FileWriter fileWriter = null; try { fileWriter = new FileWriter( bookFile ); PrintWriter writer = new PrintWriter( fileWriter ); writeBook( book, context, writer ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while opening file.", e ); } finally { IOUtil.close( fileWriter ); } } // ---------------------------------------------------------------------- // Private // ---------------------------------------------------------------------- /** SectionInfo: id and title. */ static class SectionInfo { /** id. */ String id; /** title. */ String title; } /** * Write a book. * * @param book the BookModel to write. * @param context the BookContext. * @param writer the writer to use. * @throws IOException if any. * @throws BookDoxiaException if the section cannot be written. */ private void writeBook( BookModel book, BookContext context, PrintWriter writer ) throws IOException, BookDoxiaException { // ---------------------------------------------------------------------- // Process all the section documents and collect their names // ---------------------------------------------------------------------- Map sectionInfos = new HashMap(); for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); for ( Iterator j = chapter.getSections().iterator(); j.hasNext(); ) { Section section = (Section) j.next(); SectionInfo info = writeSection( section, context ); sectionInfos.put( info.id, info ); } } // ---------------------------------------------------------------------- // Write the main .tex file // ---------------------------------------------------------------------- writer.println( "\\documentclass{book}" ); writer.println( "\\title{" + book.getTitle() + "}" ); if ( StringUtils.isNotEmpty( book.getAuthor() ) ) { writer.println( "\\author{" + book.getAuthor() + "}" ); } if ( StringUtils.isNotEmpty( book.getDate() ) ) { writer.println( "\\date{" + book.getDate() + "}" ); } LatexBookSink sink = new LatexBookSink( writer ); sink.defaultBookPreamble(); writer.println( "\\begin{document}" ); writer.println( "\\maketitle" ); writer.println( "\\tableofcontents" ); // writer.println( "\\listoffigures" ); for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); writer.println( "\\chapter{" + chapter.getTitle() + "}" ); for ( Iterator j = chapter.getSections().iterator(); j.hasNext(); ) { Section section = (Section) j.next(); SectionInfo info = (SectionInfo) sectionInfos.get( section.getId() ); writer.println( "\\input{" + info.id + "}" ); } } writer.println( "\\end{document}" ); } /** * Write a section. * * @param section the Section to write. * @param context the BookContext. * @return SectionInfo * @throws IOException if any. * @throws BookDoxiaException if the section cannot be written. */ private SectionInfo writeSection( Section section, BookContext context ) throws IOException, BookDoxiaException { File file = new File( context.getOutputDirectory(), ( section.getId() + ".tex" ) ); Writer writer = WriterFactory.newWriter( file, context.getOutputEncoding() ); LatexBookSink sink = new LatexBookSink( writer ); BookContext.BookFile bookFile = (BookContext.BookFile) context.getFiles().get( section.getId() ); if ( bookFile == null ) { throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." ); } Reader reader = null; try { reader = ReaderFactory.newReader( bookFile.getFile(), context.getInputEncoding() ); doxia.parse( reader, bookFile.getParserId(), sink ); } catch ( ParserNotFoundException e ) { throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e ); } catch ( ParseException e ) { throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( FileNotFoundException e ) { throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } finally { sink.flush(); sink.close(); IOUtil.close( reader ); IOUtil.close( writer ); } SectionInfo info = new SectionInfo(); info.id = section.getId(); info.title = sink.getTitle(); return info; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer0000644000175000017500000001542311215145553033344 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.Doxia; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.model.Chapter; import org.apache.maven.doxia.book.model.Section; import org.apache.maven.doxia.book.services.renderer.xhtml.XhtmlBookSink; import org.apache.maven.doxia.sink.render.RenderingContext; import org.apache.maven.doxia.parser.manager.ParserNotFoundException; import org.apache.maven.doxia.parser.ParseException; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.Iterator; /** *

XHtmlBookRenderer class.

* * @plexus.component role-hint="xhtml" * @author Trygve Laugstøl * @version $Id: XHtmlBookRenderer.java 784534 2009-06-14 10:05:31Z vsiveton $ */ public class XHtmlBookRenderer extends AbstractLogEnabled implements BookRenderer { /** * @plexus.requirement */ private Doxia doxia; // ---------------------------------------------------------------------- // BookRenderer Implementation // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void renderBook( BookContext context ) throws BookDoxiaException { BookModel book = context.getBook(); if ( !context.getOutputDirectory().exists() ) { if ( !context.getOutputDirectory().mkdirs() ) { throw new BookDoxiaException( "Could not make directory: " + context.getOutputDirectory().getAbsolutePath() + "." ); } } File bookFile = new File( context.getOutputDirectory(), book.getId() + ".xhtml" ); Writer fileWriter; try { fileWriter = new FileWriter( bookFile ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while opening file.", e ); } XhtmlBookSink sink = new XhtmlBookSink( fileWriter, new RenderingContext( context.getOutputDirectory(), bookFile.getAbsolutePath() ) ); try { sink.bookHead(); sink.bookTitle(); sink.text( context.getBook().getTitle() ); sink.bookTitle_(); sink.bookAuthor(); sink.text( context.getBook().getAuthor() ); sink.bookAuthor_(); sink.bookDate(); sink.text( context.getBook().getDate() ); sink.bookDate_(); sink.bookHead_(); sink.bookBody(); int chapterNumber = 1; for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); sink.sectionTitle(); sink.text( Integer.toString( chapterNumber ) + ". " + chapter.getTitle() ); sink.sectionTitle_(); renderChapter( sink, chapter, context ); chapterNumber++; } sink.bookBody_(); } finally { sink.flush(); sink.close(); IOUtil.close( fileWriter ); } } // ---------------------------------------------------------------------- // Private // ---------------------------------------------------------------------- /** * Write a chapter. * * @param sink the XhtmlBookSink. * @param chapter the Chapter. * @param context the BookContext. * @throws BookDoxiaException if the chapter cannot be written. */ private void renderChapter( XhtmlBookSink sink, Chapter chapter, BookContext context ) throws BookDoxiaException { for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); ) { Section section = (Section) it.next(); renderSection( sink, section, context ); } } /** * Write a section. * * @param sink the XhtmlBookSink. * @param section the Section. * @param context the BookContext. * @throws BookDoxiaException if the section cannot be written. */ private void renderSection( XhtmlBookSink sink, Section section, BookContext context ) throws BookDoxiaException { sink.section2(); BookContext.BookFile bookFile = (BookContext.BookFile) context.getFiles().get( section.getId() ); if ( bookFile == null ) { throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." ); } Reader reader = null; try { reader = ReaderFactory.newReader( bookFile.getFile(), context.getInputEncoding() ); doxia.parse( reader, bookFile.getParserId(), sink ); } catch ( ParserNotFoundException e ) { throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e ); } catch ( ParseException e ) { throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( FileNotFoundException e ) { throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while rendering book: " + bookFile.getFile().getAbsolutePath() + ".", e ); } finally { IOUtil.close( reader ); } sink.section2_(); } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/docbook/0000755000175000017500000000000011632765560031507 5ustar twernertwerner././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/docbook/DocBookBookSink.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/docbook/DocBookBo0000644000175000017500000001343411245330573033230 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.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.Writer; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.module.docbook.DocBookSink; /** * An Docbook Sink that doesn't write out head or body elements for every section of a book, and has some convenience * methods relating to the construction of a Doxia Book. * * @author Dave Syer * @version $Id: DocBookBookSink.java 808201 2009-08-26 22:04:43Z vsiveton $ * @since 1.1 */ public class DocBookBookSink extends DocBookSink { /** Indicates if we're inside a head. */ private boolean hasHead = false; /** * Construct a new DocBookSink. * * @param out the writer for the sink. */ public DocBookBookSink( Writer out ) { super( out ); setSystemId( "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" ); setPublicId( "-//OASIS//DTD DocBook V4.4//EN" ); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * {@inheritDoc} * * Does nothing because we don't want the header from each document to crop up in the middle of a book. */ public void head() { // noop } /** * {@inheritDoc} * * Does nothing because we don't want the header from each document to crop up in the middle of a book. */ public void head_() { // noop } /** * {@inheritDoc} * * Marks the skip flag to true so that this element's text is not emitted by the base class. */ public void title() { setSkip( true ); } /** * {@inheritDoc} * * Marks the skip flag to false so that rendering can resume. */ public void title_() { setSkip( false ); } /** * {@inheritDoc} * * Marks the skip flag to true so that this element's text is not emitted by the base class. */ public void author() { setSkip( true ); } /** * {@inheritDoc} * * Marks the skip flag to false so that rendering can resume. */ public void author_() { setSkip( false ); } /** * {@inheritDoc} * * Does nothing because we don't want the header from each document to crop up in the middle of a book. */ public void body() { // noop } /** * {@inheritDoc} * * Does nothing because we don't want the header from each document to crop up in the middle of a book. */ public void body_() { // noop } /** * Emit the start tag for the book. * * @see org.apache.maven.doxia.module.docbook.DocbookMarkup#BOOK_TAG */ public void book() { init(); MutableAttributeSet att = writeXmlHeader( "book" ); writeStartTag( BOOK_TAG, att ); } /** * Emit the end tag for the book. * * @see org.apache.maven.doxia.module.docbook.DocbookMarkup#BOOK_TAG */ public void book_() { writeEndTag( BOOK_TAG ); flush(); } /** If no header matter has yet been encountered emit the book info start tag. */ private void bookHead() { if ( !hasHead ) { writeStartTag( BOOKINFO_TAG ); hasHead = true; } } /** * If some header matter has been encountered emit the book info end tag. */ public void bookHead_() { if ( hasHead ) { writeEndTag( BOOKINFO_TAG ); hasHead = false; } } /** * Emit the title start tag for the whole book. */ public void bookTitle() { bookHead(); writeStartTag( Tag.TITLE ); } /** * Emit the title end tag for the whole book. */ public void bookTitle_() { super.title_(); } /** * Emit the author start tag for the whole book. */ public void bookAuthor() { bookHead(); super.author(); } /** * Emit the author end tag for the whole book. */ public void bookAuthor_() { super.author_(); } /** * Emit the date start tag for the whole book. */ public void bookDate() { bookHead(); super.date(); } /** * Emit the date end tag for the whole book. */ public void bookDate_() { super.date_(); } /** * Emit the chapter start tag. */ public void chapter() { writeStartTag( CHAPTER_TAG ); } /** * Emit the chapter end tag. */ public void chapter_() { writeEndTag( CHAPTER_TAG ); } /** * Emit the chapter title start tag. */ public void chapterTitle() { writeStartTag( Tag.TITLE ); } /** * Emit the chapter title end tag. */ public void chapterTitle_() { writeEndTag( Tag.TITLE ); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/BookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/BookRenderer.java0000644000175000017500000000276611150511552033307 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.book.context.BookContext; import org.apache.maven.doxia.book.BookDoxiaException; /** * Render a book. * * @author Trygve Laugstøl * @version $Id: BookRenderer.java 746976 2009-02-23 12:15:38Z vsiveton $ */ public interface BookRenderer { /** The plexus lookup role. */ String ROLE = BookRenderer.class.getName(); /** * Render a book. * * @param context the BookContext. * @throws org.apache.maven.doxia.book.BookDoxiaException if the book cannot be rendered. */ void renderBook( BookContext context ) throws BookDoxiaException; } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/0000755000175000017500000000000011632765560031024 5ustar twernertwerner././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/IndexXdocBookSink.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/IndexXdocBoo0000644000175000017500000000507211212653116033263 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.xdoc; /* * 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 java.util.Locale; import org.apache.maven.doxia.index.IndexEntry; import org.codehaus.plexus.i18n.I18N; /** * A XdocSink implementation for index book. * * @author Trygve Laugstøl * @author Vincent Siveton * @version $Id: IndexXdocBookSink.java 782330 2009-06-07 05:55:26Z ltheussl $ */ public class IndexXdocBookSink extends AbstractXdocBookSink { /** the first IndexEntry. */ private final IndexEntry firstEntry; /** * Default constructor. * * @param out the Writer. * @param firstEntry the first IndexEntry. * @param i18n I18N. * @param locale wanted locale. */ public IndexXdocBookSink( Writer out, IndexEntry firstEntry, I18N i18n, Locale locale ) { super( out, i18n, locale ); this.firstEntry = firstEntry; } /** {@inheritDoc} */ protected void navigationPanel() { write( "" ); write( "" ); write( "" ); // ----------------------------------------------------------------------- // Next // ----------------------------------------------------------------------- if ( firstEntry != null ) { write( "" ); } write( "" ); write( "
" ); write( getString( "next" ) + ": " ); content( firstEntry.getTitle() ); write( "" ); write( "
" ); write( "" ); } } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/AbstractXdocBookSink.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/AbstractXdoc0000644000175000017500000000621611245330573033325 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.xdoc; /* * 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 java.util.Locale; import org.apache.maven.doxia.module.xdoc.XdocSink; import org.codehaus.plexus.i18n.I18N; import org.codehaus.plexus.util.StringUtils; /** * Abstract XdocSink implementation for book. * * @author Trygve Laugstøl * @author Vincent Siveton * @version $Id: AbstractXdocBookSink.java 808201 2009-08-26 22:04:43Z vsiveton $ */ public abstract class AbstractXdocBookSink extends XdocSink { /** I18N for localized messages. */ private final I18N i18n; /** The wanted locale */ private final Locale locale; /** * Default constructor. * * @param out a Writer. * @param i18n I18N. * @param locale the wanted locale. */ public AbstractXdocBookSink( Writer out, I18N i18n, Locale locale ) { super( out ); this.i18n = i18n; this.locale = locale; } /** {@inheritDoc} */ public void date_() { // nop } /** {@inheritDoc} */ public void body() { writeStartTag( BODY ); write( "
" ); navigationPanel(); horizontalRule(); write( "
" ); } /** {@inheritDoc} */ public void body_() { write( "
" ); horizontalRule(); navigationPanel(); write( "
" ); writeEndTag( BODY ); writeEndTag( DOCUMENT_TAG ); flush(); close(); init(); } // ----------------------------------------------------------------------- // Protected // ----------------------------------------------------------------------- /** * Gets a trimmed String for the given key from the resource bundle defined by Plexus. * * @param key the key for the desired string * @return the string for the given key */ protected String getString( String key ) { if ( StringUtils.isEmpty( key ) ) { throw new IllegalArgumentException( "The key cannot be empty" ); } return i18n.getString( "book-renderer", locale, key ).trim(); } /** * Add a navigation panel. */ protected abstract void navigationPanel(); } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/ChapterXdocBookSink.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/ChapterXdocB0000644000175000017500000001042411212653116033241 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.xdoc; /* * 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 java.util.Locale; import org.apache.maven.doxia.index.IndexEntry; import org.codehaus.plexus.i18n.I18N; /** * A XdocSink implementation for chapter in a book. * * @author Vincent Siveton * @version $Id: ChapterXdocBookSink.java 782330 2009-06-07 05:55:26Z ltheussl $ */ public class ChapterXdocBookSink extends AbstractXdocBookSink { /** the chapter IndexEntry. */ private final IndexEntry chapterIndex; /** * Default constructor. * * @param out the Writer. * @param chapterIndex the chapter IndexEntry. * @param i18n I18N. * @param locale wanted locale. */ public ChapterXdocBookSink( Writer out, IndexEntry chapterIndex, I18N i18n, Locale locale ) { super( out, i18n, locale ); this.chapterIndex = chapterIndex; } /** {@inheritDoc} */ protected void navigationPanel() { write( "" ); write( "" ); write( "" ); // ----------------------------------------------------------------------- // Prev // ----------------------------------------------------------------------- IndexEntry prevChapter = chapterIndex.getPrevEntry(); write( "" ); // ----------------------------------------------------------------------- // Parent // ----------------------------------------------------------------------- write( "" ); // ----------------------------------------------------------------------- // Next // ----------------------------------------------------------------------- write( "" ); write( "" ); write( "
" ); previous( prevChapter ); write( "
" ); up(); write( "
" ); next(); write( "
" ); write( "" ); } /** * Add previous link. * * @param prevChapter the previous IndexEntry. */ protected void previous( IndexEntry prevChapter ) { if ( prevChapter != null ) { IndexEntry lastEntry = prevChapter.getLastEntry(); if ( lastEntry == null ) { write( "Start of book" ); } else { write( getString( "previous" ) + ": " ); content( lastEntry.getTitle() ); write( "" ); } } else { write( getString( "previous" ) + ":" + getString( "toc" ) + "" ); } } /** * Add parent/up link. */ protected void up() { write( getString( "up" ) + ": " + getString( "toc" ) + "" ); } /** * Add next link */ protected void next() { IndexEntry firstEntry = chapterIndex.getFirstEntry(); if ( firstEntry == null ) { write( "End of book" ); } else { write( getString( "next" ) + ": " ); content( firstEntry.getTitle() ); write( "" ); } } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/SectionXdocBookSink.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xdoc/SectionXdocB0000644000175000017500000001154211212653116033261 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.xdoc; /* * 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 java.util.Locale; import org.apache.maven.doxia.index.IndexEntry; import org.codehaus.plexus.i18n.I18N; /** * A XdocSink implementation for section in a book * * @author Vincent Siveton * @version $Id: SectionXdocBookSink.java 782330 2009-06-07 05:55:26Z ltheussl $ */ public class SectionXdocBookSink extends AbstractXdocBookSink { /** indexEntry. */ private final IndexEntry indexEntry; /** * Default constructor. * * @param out the Writer to use. * @param indexEntry the IndexEntry. * @param i18n the I18N. * @param locale wanted locale. */ public SectionXdocBookSink( Writer out, IndexEntry indexEntry, I18N i18n, Locale locale ) { super( out, i18n, locale ); this.indexEntry = indexEntry; } /** {@inheritDoc} */ protected void navigationPanel() { write( "" ); write( "" ); write( "" ); IndexEntry parent = indexEntry.getParent(); // ----------------------------------------------------------------------- // Prev // ----------------------------------------------------------------------- IndexEntry prevEntry = indexEntry.getPrevEntry(); write( "" ); // ----------------------------------------------------------------------- // Parent // ----------------------------------------------------------------------- write( "" ); // ----------------------------------------------------------------------- // Next // ----------------------------------------------------------------------- IndexEntry nextEntry = indexEntry.getNextEntry(); write( "" ); write( "" ); write( "
" ); previous( parent, prevEntry ); write( "" ); up( parent ); write( "" ); next( parent, nextEntry ); write( "
" ); write( "" ); } /** * Add previous link. * * @param parent the parent IndexEntry. * @param prevEntry the previous IndexEntry. */ protected void previous( IndexEntry parent, IndexEntry prevEntry ) { if ( prevEntry != null ) { write( getString( "previous" ) + ": " ); content( prevEntry.getTitle() ); write( "" ); } else { write( getString( "previous" ) + ": " ); content( parent.getTitle() ); write( "" ); } } /** * Add parent/up link. * * @param parent the parent IndexEntry. * @see org.apache.maven.doxia.book.services.renderer.xdoc.ChapterXdocBookSink#up() */ protected void up( IndexEntry parent ) { write( getString( "up" ) + ": " + parent.getTitle() + "" ); } /** * Add next link. * * @param parent the parent IndexEntry. * @param nextEntry the next IndexEntry. */ protected void next( IndexEntry parent, IndexEntry nextEntry ) { if ( nextEntry != null ) { write( getString( "next" ) + ": " ); content( nextEntry.getTitle() ); write( "" ); } else { IndexEntry nextChapter = parent.getNextEntry(); if ( nextChapter == null ) { write( "End of book" ); } else { write( getString( "next" ) + ": " ); content( nextChapter.getTitle() ); write( "" ); } } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/RtfBookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/RtfBookRenderer.j0000644000175000017500000000323610767707462033310 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import org.apache.maven.doxia.module.itext.ITextUtil; /** * RTF book renderer with the iText framework. * * @plexus.component role-hint="rtf" * * @author Vincent Siveton * @version $Id: RtfBookRenderer.java 638290 2008-03-18 09:45:22Z bentmann $ */ public class RtfBookRenderer extends AbstractITextBookRenderer { /** {@inheritDoc} */ public String getOutputExtension() { return "rtf"; } /** {@inheritDoc} */ public void renderXML( File iTextFile, File iTextOutput ) throws IOException { ITextUtil.writeRtf( new FileInputStream( iTextFile ), new FileOutputStream( iTextOutput ) ); } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/0000755000175000017500000000000011632765560031223 5ustar twernertwerner././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSink.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/xhtml/XhtmlBookSi0000644000175000017500000001100511245330573033336 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.xhtml; /* * 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.xhtml.XhtmlSink; import org.apache.maven.doxia.sink.render.RenderingContext; import org.codehaus.plexus.util.StringUtils; import java.io.Writer; /** * An Xhtml Sink that doesn't write out head or body elements. * * @author ltheussl * @version $Id: XhtmlBookSink.java 808201 2009-08-26 22:04:43Z vsiveton $ */ public class XhtmlBookSink extends XhtmlSink { private RenderingContext renderingContext; /** * Construct a new XhtmlBookSink. * * @param out the writer for the sink. * @param context the RenderingContext. */ public XhtmlBookSink( Writer out, RenderingContext context ) { super( out ); this.renderingContext = context; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * {@inheritDoc} * * Does nothing. */ public void head() { init(); setHeadFlag( true ); } /** * {@inheritDoc} * * Does nothing. */ public void head_() { setHeadFlag( false ); } /** * {@inheritDoc} * * Does nothing. */ public void title() { // noop } /** * {@inheritDoc} * * Does nothing. */ public void title_() { resetTextBuffer(); } /** * {@inheritDoc} * * Does nothing. */ public void author_() { resetTextBuffer(); } /** * {@inheritDoc} * * Does nothing. */ public void date_() { resetTextBuffer(); } /** * {@inheritDoc} * * Does nothing. */ public void body() { // noop } /** * {@inheritDoc} * * Does nothing. */ public void body_() { // noop } /** * Calls super.head(). */ public void bookHead() { super.head(); } /** * Calls super.head_(). */ public void bookHead_() { super.head_(); } /** * Calls super.title(). */ public void bookTitle() { super.title(); } /** * Calls super.title_(). */ public void bookTitle_() { super.title_(); } /** * Calls super.author(). */ public void bookAuthor() { super.author(); } /** * Calls super.author_(). */ public void bookAuthor_() { super.author_(); } /** * Calls super.date(). */ public void bookDate() { super.date(); } /** * Calls super.date_(). */ public void bookDate_() { super.date_(); } /** * Calls super.body(). */ public void bookBody() { super.body(); } /** * Calls super.body_(). */ public void bookBody_() { super.body_(); } /** {@inheritDoc} */ public void sectionTitle() { writeStartTag( H1 ); } /** {@inheritDoc} */ public void sectionTitle_() { writeEndTag( H1 ); } /** {@inheritDoc} */ protected void write( String text ) { if ( renderingContext != null ) { String relativePathToBasedir = renderingContext.getRelativePath(); if ( relativePathToBasedir == null ) { text = StringUtils.replace( text, "$relativePath", "." ); } else { text = StringUtils.replace( text, "$relativePath", relativePathToBasedir ); } } super.write( text ); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XdocBookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XdocBookRenderer.0000644000175000017500000003535211451074657033276 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.Iterator; import java.util.Locale; import org.apache.maven.doxia.Doxia; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.model.Chapter; import org.apache.maven.doxia.book.model.Section; import org.apache.maven.doxia.book.services.renderer.xdoc.ChapterXdocBookSink; import org.apache.maven.doxia.book.services.renderer.xdoc.IndexXdocBookSink; import org.apache.maven.doxia.book.services.renderer.xdoc.SectionXdocBookSink; import org.apache.maven.doxia.index.IndexEntry; import org.apache.maven.doxia.module.xdoc.XdocSink; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.parser.manager.ParserNotFoundException; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.i18n.I18N; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.WriterFactory; /** * An implementation of BookRenderer for Xdoc * * @author Trygve Laugstøl * @author Vincent Siveton * @version $Id: XdocBookRenderer.java 1003021 2010-09-30 11:51:11Z ltheussl $ * @plexus.component role-hint="xdoc" */ public class XdocBookRenderer extends AbstractLogEnabled implements BookRenderer { /** * @plexus.requirement */ private Doxia doxia; /** * @plexus.requirement */ private I18N i18n; // ---------------------------------------------------------------------- // BookRenderer Implementation // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void renderBook( BookContext context ) throws BookDoxiaException { BookModel book = context.getBook(); if ( !context.getOutputDirectory().exists() ) { if ( !context.getOutputDirectory().mkdirs() ) { throw new BookDoxiaException( "Could not make directory: " + context.getOutputDirectory().getAbsolutePath() + "." ); } } renderBook( book, context ); } // ----------------------------------------------------------------------- // Protected // ----------------------------------------------------------------------- /** * Gets a trimmed String for the given key from the resource bundle defined by Plexus. * * @param locale the locale used * @param key the key for the desired string * @return the string for the given key and the given locale */ protected String getString( Locale locale, String key ) { if ( StringUtils.isEmpty( key ) ) { throw new IllegalArgumentException( "The key cannot be empty" ); } return i18n.getString( "book-renderer", locale, key ).trim(); } // ----------------------------------------------------------------------- // Private // ----------------------------------------------------------------------- /** * Render the book, ie the book index and all chapter index and pages * * @param book the BookModel. * @param context the BookContext. * @throws BookDoxiaException if any */ private void renderBook( BookModel book, BookContext context ) throws BookDoxiaException { // ----------------------------------------------------------------------- // Render the book index.xml page // ----------------------------------------------------------------------- File index = new File( context.getOutputDirectory(), "index.xml" ); try { writeBookIndex( index, book, context ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while rendering index page to: '" + index.getAbsolutePath() + "'.", e ); } // ----------------------------------------------------------------------- // Render all the chapter pages // ----------------------------------------------------------------------- Iterator ii = context.getIndex().getChildEntries().iterator(); for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); renderChapter( chapter, context, (IndexEntry) ii.next() ); } } /** * Write the book index, ie a TOC. * * @param index the File. * @param book the BookModel. * @param context the BookContext. * @throws IOException if any */ private void writeBookIndex( File index, BookModel book, BookContext context ) throws IOException { Writer writer = WriterFactory.newXmlWriter( index ); XdocSink sink = new IndexXdocBookSink( writer, context.getIndex().getFirstEntry(), i18n, context.getLocale() ); try { // ----------------------------------------------------------------------- // Head // ----------------------------------------------------------------------- sink.head(); sink.title(); sink.text( book.getTitle() + " - " + getString( context.getLocale(), "toc" ) ); sink.title_(); sink.head_(); // ----------------------------------------------------------------------- // Body // ----------------------------------------------------------------------- sink.body(); sink.section1(); sink.sectionTitle1(); sink.text( book.getTitle() + " - " + getString( context.getLocale(), "toc" ) ); sink.sectionTitle1_(); sink.list(); for ( Iterator it = context.getIndex().getChildEntries().iterator(); it.hasNext(); ) { writeChapterIndexForBookIndex( sink, (IndexEntry) it.next() ); } sink.list_(); sink.section1_(); sink.body_(); } finally { sink.flush(); sink.close(); IOUtil.close( writer ); } } /** * Write the chapter index for the book index. * * @param sink the XdocSink. * @param chapterEntry the chapter IndexEntry. */ private void writeChapterIndexForBookIndex( XdocSink sink, IndexEntry chapterEntry ) { sink.listItem(); sink.link( chapterEntry.getId() + ".html" ); sink.text( chapterEntry.getTitle() ); sink.link_(); sink.list(); for ( Iterator it = chapterEntry.getChildEntries().iterator(); it.hasNext(); ) { IndexEntry sectionIndex = (IndexEntry) it.next(); writeSectionIndexForBookIndex( sink, sectionIndex ); } sink.list_(); sink.listItem_(); } /** * Write the section index for the book index. * * @param sink the XdocSink. * @param sectionIndex the section IndexEntry. */ private void writeSectionIndexForBookIndex( XdocSink sink, IndexEntry sectionIndex ) { sink.listItem(); sink.link( sectionIndex.getId() + ".html" ); sink.text( sectionIndex.getTitle() ); sink.link_(); sink.list(); for ( Iterator it = sectionIndex.getChildEntries().iterator(); it.hasNext(); ) { IndexEntry subsectionIndex = (IndexEntry) it.next(); writeSubsectionIndexForBookIndex( sink, sectionIndex, subsectionIndex ); } sink.list_(); sink.listItem_(); } /** * Write subsection index for the book index. * * @param sink the XdocSink. * @param sectionIndex the section IndexEntry. * @param subsectionIndex the subsection IndexEntry. */ private void writeSubsectionIndexForBookIndex( XdocSink sink, IndexEntry sectionIndex, IndexEntry subsectionIndex ) { sink.listItem(); sink.link( sectionIndex.getId() + ".html#" + HtmlTools.encodeId( subsectionIndex.getId() ) ); sink.text( subsectionIndex.getTitle() ); sink.link_(); sink.listItem_(); } // ----------------------------------------------------------------------- // Rendering // ----------------------------------------------------------------------- /** * Render the chapter index and all section pages. * * @param chapter the Chapter. * @param context the BookContext. * @param chapterIndex the IndexEntry. * @throws BookDoxiaException if any */ private void renderChapter( Chapter chapter, BookContext context, IndexEntry chapterIndex ) throws BookDoxiaException { // ----------------------------------------------------------------------- // Render the chapter index page // ----------------------------------------------------------------------- File index = new File( context.getOutputDirectory(), chapter.getId() + ".xml" ); try { writeChapterIndex( index, chapter, chapterIndex, context ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while rendering index page to: '" + index.getAbsolutePath() + "'.", e ); } // ----------------------------------------------------------------------- // Render all section pages // ----------------------------------------------------------------------- Iterator ii = chapterIndex.getChildEntries().iterator(); for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); ) { Section section = (Section) it.next(); renderSection( context, section, (IndexEntry) ii.next() ); } } /** * Write a chapter index * * @param index the File. * @param context the context. * @param chapter the Chapter. * @param chapterIndex the IndexEntry. * @throws IOException if any. */ private void writeChapterIndex( File index, Chapter chapter, IndexEntry chapterIndex, BookContext context ) throws IOException { Writer writer = WriterFactory.newXmlWriter( index ); ChapterXdocBookSink sink = new ChapterXdocBookSink( writer, chapterIndex, i18n, context.getLocale() ); try { // ----------------------------------------------------------------------- // Head // ----------------------------------------------------------------------- sink.head(); sink.title(); sink.text( chapter.getTitle() ); sink.title_(); sink.head_(); // ----------------------------------------------------------------------- // Body // ----------------------------------------------------------------------- sink.body(); sink.section1(); sink.sectionTitle1(); sink.text( chapter.getTitle() ); sink.sectionTitle1_(); sink.list(); for ( Iterator it = chapterIndex.getChildEntries().iterator(); it.hasNext(); ) { IndexEntry sectionIndex = (IndexEntry) it.next(); writeSectionIndexForBookIndex( sink, sectionIndex ); } sink.list_(); sink.section1_(); sink.body_(); } finally { sink.flush(); sink.close(); IOUtil.close( writer ); } } /** * Render all section pages. * * @param context the BookContext. * @param section the Section. * @param sectionIndex the IndexEntry. * @throws BookDoxiaException if any. */ private void renderSection( BookContext context, Section section, IndexEntry sectionIndex ) throws BookDoxiaException { try { Writer writer = WriterFactory.newXmlWriter( new File( context.getOutputDirectory() + "/" + section.getId() + ".xml" ) ); SectionXdocBookSink sink = new SectionXdocBookSink( writer, sectionIndex, i18n, context.getLocale() ); BookContext.BookFile bookFile = (BookContext.BookFile) context.getFiles().get( section.getId() ); if ( bookFile == null ) { throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." ); } Reader reader = null; try { reader = ReaderFactory.newReader( bookFile.getFile(), context.getInputEncoding() ); doxia.parse( reader, bookFile.getParserId(), sink ); } catch ( ParserNotFoundException e ) { throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e ); } catch ( ParseException e ) { throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( FileNotFoundException e ) { throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } finally { sink.flush(); sink.close(); IOUtil.close( reader ); IOUtil.close( writer ); } } catch ( IOException e ) { throw new BookDoxiaException( "Error while rendering book.", e ); } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/PdfBookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/PdfBookRenderer.j0000644000175000017500000000323610767707462033266 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import org.apache.maven.doxia.module.itext.ITextUtil; /** * PDF book renderer with the iText framework. * * @plexus.component role-hint="pdf" * * @author Vincent Siveton * @version $Id: PdfBookRenderer.java 638290 2008-03-18 09:45:22Z bentmann $ */ public class PdfBookRenderer extends AbstractITextBookRenderer { /** {@inheritDoc} */ public String getOutputExtension() { return "pdf"; } /** {@inheritDoc} */ public void renderXML( File iTextFile, File iTextOutput ) throws IOException { ITextUtil.writePdf( new FileInputStream( iTextFile ), new FileOutputStream( iTextOutput ) ); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/DocbookBookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/DocbookBookRender0000644000175000017500000001615611451074657033355 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.Iterator; import org.apache.maven.doxia.Doxia; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.model.Chapter; import org.apache.maven.doxia.book.model.Section; import org.apache.maven.doxia.book.services.renderer.docbook.DocBookBookSink; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.parser.manager.ParserNotFoundException; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.WriterFactory; /** * An implementation of BookRenderer for docbook * * @plexus.component role-hint="doc-book" * @author Eric Redmond * @version $Id: DocbookBookRenderer.java 1003021 2010-09-30 11:51:11Z ltheussl $ */ public class DocbookBookRenderer extends AbstractLogEnabled implements BookRenderer { /** * @plexus.requirement */ private Doxia doxia; // ---------------------------------------------------------------------- // BookRenderer Implementation // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void renderBook( BookContext context ) throws BookDoxiaException { BookModel book = context.getBook(); if ( !context.getOutputDirectory().exists() ) { if ( !context.getOutputDirectory().mkdirs() ) { throw new BookDoxiaException( "Could not make directory: " + context.getOutputDirectory().getAbsolutePath() + "." ); } } File bookFile = new File( context.getOutputDirectory(), book.getId() + ".xml" ); Writer fileWriter; try { fileWriter = WriterFactory.newXmlWriter( bookFile ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while opening file.", e ); } // ---------------------------------------------------------------------- // Create the Dockbook File // ---------------------------------------------------------------------- // TODO: Write out TOC? DocBookBookSink sink = new DocBookBookSink( fileWriter ); try { sink.book(); // TODO: symmetrize bookHead? if ( StringUtils.isNotEmpty( book.getTitle() ) ) { sink.bookTitle(); sink.text( book.getTitle() ); sink.bookTitle_(); } if ( StringUtils.isNotEmpty( book.getDate() ) ) { sink.bookDate(); sink.text( book.getDate() ); sink.bookDate_(); } if ( StringUtils.isNotEmpty( book.getAuthor() ) ) { sink.bookAuthor(); sink.text( book.getAuthor() ); sink.bookAuthor_(); } sink.bookHead_(); for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); sink.chapter(); if ( StringUtils.isNotEmpty( chapter.getTitle() ) ) { sink.chapterTitle(); sink.text( chapter.getTitle() ); sink.chapterTitle_(); } renderChapter( chapter, context, sink ); sink.chapter_(); } sink.book_(); } finally { sink.flush(); sink.close(); IOUtil.close( fileWriter ); } } /** * Write a chapter. * * @param writer the writer. * @param chapter the Chapter. * @param context the BookContext. * @param sink a Sink. * @throws BookDoxiaException if the chapter cannot be written. */ private void renderChapter( Chapter chapter, BookContext context, Sink sink ) throws BookDoxiaException { for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); ) { Section section = (Section) it.next(); renderSection( section, context, sink ); } } /** * Write a section. * * @param writer the writer. * @param section the Section. * @param context the BookContext. * @param sink a Sink. * @throws BookDoxiaException if the section cannot be written. */ private void renderSection( Section section, BookContext context, Sink sink ) throws BookDoxiaException { BookContext.BookFile bookFile = (BookContext.BookFile) context.getFiles().get( section.getId() ); if ( bookFile == null ) { throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." ); } Reader reader = null; try { reader = ReaderFactory.newReader( bookFile.getFile(), context.getInputEncoding() ); doxia.parse( reader, bookFile.getParserId(), sink ); } catch ( ParserNotFoundException e ) { throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e ); } catch ( ParseException e ) { throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( FileNotFoundException e ) { throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while rendering book: " + bookFile.getFile().getAbsolutePath() + ".", e ); } finally { IOUtil.close( reader ); } } } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/AbstractITextBookRenderer.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/AbstractITextBook0000644000175000017500000003032711451074657033352 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer; /* * 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.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.text.DateFormat; import java.util.Date; import java.util.Iterator; import org.apache.maven.doxia.Doxia; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.model.Chapter; import org.apache.maven.doxia.book.model.Section; import org.apache.maven.doxia.module.itext.ITextSinkFactory; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.parser.manager.ParserNotFoundException; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.WriterFactory; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; /** * Base class for iText renderer. * * @author Trygve Laugstøl * @author Vincent Siveton * @version $Id: AbstractITextBookRenderer.java 1003021 2010-09-30 11:51:11Z ltheussl $ */ public abstract class AbstractITextBookRenderer extends AbstractLogEnabled implements BookRenderer { /** * @plexus.requirement */ private Doxia doxia; // ---------------------------------------------------------------------- // BookRenderer Implementation // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void renderBook( BookContext context ) throws BookDoxiaException { BookModel book = context.getBook(); if ( !context.getOutputDirectory().exists() ) { if ( !context.getOutputDirectory().mkdirs() ) { throw new BookDoxiaException( "Could not make directory: " + context.getOutputDirectory().getAbsolutePath() + "." ); } } File bookFile = new File( context.getOutputDirectory(), book.getId() + ".xml" ); Writer fileWriter; try { fileWriter = WriterFactory.newXmlWriter( bookFile ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while opening file.", e ); } // ---------------------------------------------------------------------- // Create the XML File // ---------------------------------------------------------------------- PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter( fileWriter, "UTF-8", null ); writer.startElement( "itext" ); writer.addAttribute( "creationdate", DateFormat.getDateTimeInstance().format( new Date() ) ); writer.addAttribute( "producer", "Doxia iText" ); // writer.startElement( "paragraph" ); // writer.addAttribute( "leading", "18.0" ); // writer.addAttribute( "font", "unknown" ); // writer.addAttribute( "align", "Default" ); // writer.writeText( "Please visit my" + System.getProperty( "line.separator" ) ); // // writer.startElement( "anchor" ); // writer.addAttribute( "leading", "18.0" ); // writer.addAttribute( "font", "Helvetica" ); // writer.addAttribute( "size", "12.0" ); // writer.addAttribute( "fontstyle", "normal, underline" ); // writer.addAttribute( "red", "0" ); // writer.addAttribute( "green", "0" ); // writer.addAttribute( "blue", "255" ); // writer.addAttribute( "name", "top" ); // writer.addAttribute( "reference", "http://www.lowagie.com/iText/" ); // // writer.startElement( "chunk" ); // writer.addAttribute( "font", "Helvetica" ); // writer.addAttribute( "size", "12.0" ); // writer.addAttribute( "fontstyle", "normal, underline" ); // writer.addAttribute( "red", "0" ); // writer.addAttribute( "green", "0" ); // writer.addAttribute( "blue", "255" ); // writer.writeText( "website (external reference)" ); // writer.endElement(); // // writer.endElement(); // anchor // // writer.endElement(); // paragraph // TODO: Write out TOC System.setProperty( "itext.basedir", bookFile.getParentFile().getAbsolutePath() ); Sink sink = new ITextSinkFactory().createSink( writer ); try { for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); renderChapter( sink, writer, chapter, context ); } writer.endElement(); // itext } finally { sink.flush(); sink.close(); IOUtil.close( fileWriter ); System.getProperties().remove( "itext.basedir" ); } // ---------------------------------------------------------------------- // Render the XML to PDF // ---------------------------------------------------------------------- File outputFile = new File( context.getOutputDirectory(), book.getId() + "." + getOutputExtension() ); try { renderXML( bookFile, outputFile ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while rendering file", e ); } } /** * Get the output extension supported. * * @return the ouput extension supported. */ public abstract String getOutputExtension(); /** * Generate an ouput file with the iText framework. * * @param iTextFile the input file. * @param iTextOutput the output file. * @throws java.io.IOException if any. */ public abstract void renderXML( File iTextFile, File iTextOutput ) throws IOException; // ---------------------------------------------------------------------- // Private // ---------------------------------------------------------------------- /** * Write a chapter. * * @param writer the writer. * @param chapter the Chapter. * @param context the BookContext. * @throws BookDoxiaException if the chapter cannot be written. */ private void renderChapter( Sink sink, PrettyPrintXMLWriter writer, Chapter chapter, BookContext context ) throws BookDoxiaException { writer.startElement( "chapter" ); writer.addAttribute( "numberdepth", "1" ); writer.addAttribute( "depth", "1" ); writer.addAttribute( "indent", "1" ); startTitle( writer, "36.0", "Helvetica", "24.0", "normal", "255", "0", "0" ); chunk( writer, chapter.getTitle(), "Helvetica", "24.0", "normal", "255", "0", "0" ); writer.endElement(); // title // writer.startElement( "sectioncontent" ); for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); ) { Section section = (Section) it.next(); renderSection( sink, writer, section, context ); } // writer.endElement(); // sectioncontent writer.endElement(); // chapter } /** * Write a section. * * @param writer the writer. * @param section the Section. * @param context the BookContext. * @throws BookDoxiaException if the section cannot be written. */ private void renderSection( Sink sink, PrettyPrintXMLWriter writer, Section section, BookContext context ) throws BookDoxiaException { // writer.startElement( "section" ); // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- BookContext.BookFile bookFile = (BookContext.BookFile) context.getFiles().get( section.getId() ); if ( bookFile == null ) { throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." ); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- Reader reader = null; try { reader = ReaderFactory.newReader( bookFile.getFile(), context.getInputEncoding() ); doxia.parse( reader, bookFile.getParserId(), sink ); } catch ( ParserNotFoundException e ) { throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e ); } catch ( ParseException e ) { throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( FileNotFoundException e ) { throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while rendering book: " + bookFile.getFile().getAbsolutePath() + ".", e ); } finally { IOUtil.close( reader ); } } /** * Start a title. * * @param writer the writer. * @param leading leading. * @param font the font. * @param size the size. * @param fontstyle the fontstyle. * @param red red. * @param green green. * @param blue blue. */ private void startTitle( PrettyPrintXMLWriter writer, String leading, String font, String size, String fontstyle, String red, String green, String blue ) { writer.startElement( "title" ); writer.addAttribute( "leading", leading ); writer.addAttribute( "font", font ); writer.addAttribute( "size", size ); writer.addAttribute( "fontstyle", fontstyle ); writer.addAttribute( "red", red ); writer.addAttribute( "green", green ); writer.addAttribute( "blue", blue ); } /** * Write a chunk. * * @param writer the writer. * @param title the title. * @param font the font. * @param size the size. * @param fontstyle the fontstyle. * @param red red. * @param green green. * @param blue blue. */ private void chunk( PrettyPrintXMLWriter writer, String title, String font, String size, String fontstyle, String red, String green, String blue ) { writer.startElement( "chunk" ); writer.addAttribute( "font", font ); writer.addAttribute( "size", size ); writer.addAttribute( "fontstyle", fontstyle ); writer.addAttribute( "red", red ); writer.addAttribute( "green", green ); writer.addAttribute( "blue", blue ); if ( StringUtils.isNotEmpty( title ) ) { writer.writeText( title ); } else { writer.writeText( "" ); } writer.endElement(); // chunk } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/latex/0000755000175000017500000000000011632765560031204 5ustar twernertwerner././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/latex/LatexBookSink.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/latex/LatexBookSi0000644000175000017500000000632711175620077033316 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.renderer.latex; /* * 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.latex.LatexSink; import java.io.Writer; /** *

LatexBookSink class.

* * @author Trygve Laugstøl * @version $Id: LatexBookSink.java 769433 2009-04-28 15:26:55Z ltheussl $ */ public class LatexBookSink extends LatexSink { /** text. */ private String txt; /** title. */ private String title; // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Construct a new LatexBookSink which is a LatexSink with the given writer, * null sinkCommands, null preamble and fragmentDocument = true. * * @param out the writer for the sink. */ public LatexBookSink( Writer out ) { super( out, null, null, true ); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** {@inheritDoc} */ protected String getDocumentStart() { return ""; // return "\\documentclass{book}"; } /** {@inheritDoc} */ protected String getDocumentBegin() { return null; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void text( String text ) { this.txt = text; super.text( text ); } /** {@inheritDoc} */ public void title_() { super.title_(); this.title = txt; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Return the title. * * @return String. */ public String getTitle() { return title; } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Writes the default LaTeX commands and preamble in the main book file. * * @since 1.1 */ public void defaultBookPreamble() { markup( defaultSinkCommands() ); markup( defaultPreamble() ); flush(); } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/0000755000175000017500000000000011632765560030413 5ustar twernertwerner././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/ValidationResult.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/ValidationResul0000644000175000017500000000415310767707462033453 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.validation; /* * 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; /** * Encapsulates the result of a validation. * * @author Trygve Laugstøl * @version $Id: ValidationResult.java 638290 2008-03-18 09:45:22Z bentmann $ */ public class ValidationResult { /** If all is OK. */ private boolean allOk; /** List of errors. */ private List errors; /** List of warnings. */ private List warnings; /** * Checks if there were any errors or warnings. * * @return True if there were no errors or warnings. */ public boolean isAllOk() { return getErrors().size() == 0 && getWarnings().size() == 0; } /** * Return the list of errors. * * @return List. A new ArrayList is constructed if the current List is null. */ public List getErrors() { if ( errors == null ) { errors = new ArrayList(); } return errors; } /** * Return the list of warnings. * * @return List. A new ArrayList is constructed if the current List is null. */ public List getWarnings() { if ( warnings == null ) { warnings = new ArrayList(); } return warnings; } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/BookValidator.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/BookValidator.j0000644000175000017500000000260510767707462033336 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.validation; /* * 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.book.model.BookModel; /** * Ensure a BookModel is valid. * * @author Trygve Laugstøl * @version $Id: BookValidator.java 638290 2008-03-18 09:45:22Z bentmann $ */ public interface BookValidator { /** The plexus lookup role. */ String ROLE = BookValidator.class.getName(); /** * Validate a BookModel. * * @param book the BookModel to validate. * @return ValidationResult */ ValidationResult validateBook( BookModel book ); } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/DefaultBookValidator.javadoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/DefaultBookVali0000644000175000017500000000657410767707462033372 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.validation; /* * 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.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.StringUtils; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.model.Chapter; import java.util.Iterator; /** * Default implementation of BookValidator. * * @plexus.component * * @author Trygve Laugstøl * @version $Id: DefaultBookValidator.java 638290 2008-03-18 09:45:22Z bentmann $ */ public class DefaultBookValidator extends AbstractLogEnabled implements BookValidator { // ---------------------------------------------------------------------- // BookValidator Implementation // ---------------------------------------------------------------------- /** {@inheritDoc} */ public ValidationResult validateBook( BookModel book ) { ValidationResult result = new ValidationResult(); if ( StringUtils.isEmpty( book.getId() ) ) { result.getErrors().add( "Book is missing id." ); } if ( StringUtils.isEmpty( book.getTitle() ) ) { result.getErrors().add( "Book is missing title." ); } if ( book.getChapters().size() == 0 ) { result.getErrors().add( "The book must have at least one chaper" ); } else { for ( Iterator it = book.getChapters().iterator(); it.hasNext(); ) { Chapter chapter = (Chapter) it.next(); validateChapter( result, chapter ); // TODO: Validate the chapter id } } return result; } // ---------------------------------------------------------------------- // Private // ---------------------------------------------------------------------- /** * Validate a Chapter. * * @param result the ValidationResult to receive the results. * @param chapter the chapter to validate. */ private void validateChapter( ValidationResult result, Chapter chapter ) { if ( StringUtils.isEmpty( chapter.getId() ) ) { result.getErrors().add( "Each chapter has to have an id." ); return; } if ( StringUtils.isEmpty( chapter.getTitle() ) ) { result.getErrors().add( "Missing title. Chapter id: " + chapter.getId() ); } if ( chapter.getSections().size() == 0 ) { result.getErrors().add( "Chapter doesn't have any sections. Chapter id: " + chapter.getId() ); } } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/io/0000755000175000017500000000000011632765560026670 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/io/BookIo.java0000644000175000017500000000354211150511552030702 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.io; /* * 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.book.model.BookModel; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.context.BookContext; import java.io.File; import java.util.List; /** * Common book-related IO methods. * * @author Trygve Laugstøl * @version $Id: BookIo.java 746976 2009-02-23 12:15:38Z vsiveton $ */ public interface BookIo { /** The plexus lookup role. */ String ROLE = BookIo.class.getName(); /** * Read a BookModel from a descriptor file. * * @param bookDescriptor the book descriptor file. * @return BookModel * @throws org.apache.maven.doxia.book.BookDoxiaException if the model cannot be read. */ BookModel readBook( File bookDescriptor ) throws BookDoxiaException; /** * Loads files in a given context. * * @param context the BookContext. * @param files a list of files. */ void loadFiles( BookContext context, List files ); } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/services/io/DefaultBookIo.java0000644000175000017500000001244311175620077032221 0ustar twernertwernerpackage org.apache.maven.doxia.book.services.io; /* * 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.book.model.io.xpp3.BookModelXpp3Reader; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.context.BookContext; import org.apache.maven.doxia.module.site.SiteModule; import org.apache.maven.doxia.module.site.manager.SiteModuleManager; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.codehaus.plexus.logging.AbstractLogEnabled; import java.io.IOException; import java.io.File; import java.io.Reader; import java.util.Collection; import java.util.Iterator; import java.util.Map; import java.util.TreeMap; import java.util.List; /** *

DefaultBookIo class.

* * @plexus.component * @author Trygve Laugstøl * @version $Id: DefaultBookIo.java 769433 2009-04-28 15:26:55Z ltheussl $ */ public class DefaultBookIo extends AbstractLogEnabled implements BookIo { /** * @plexus.requirement */ private SiteModuleManager siteModuleManager; // ----------------------------------------------------------------------- // DefaultBookIo Implementation // ----------------------------------------------------------------------- /** {@inheritDoc} */ public BookModel readBook( File bookDescriptor ) throws BookDoxiaException { Reader reader = null; try { reader = ReaderFactory.newXmlReader( bookDescriptor ); return new BookModelXpp3Reader().read( reader, true ); } catch ( IOException e ) { throw new BookDoxiaException( "Error while reading book descriptor.", e ); } catch ( XmlPullParserException e ) { throw new BookDoxiaException( "Error while reading book descriptor.", e ); } finally { IOUtil.close( reader ); } } /** {@inheritDoc} */ public void loadFiles( BookContext context, List files ) { // ---------------------------------------------------------------------- // Find all the files, map the file names to ids // ---------------------------------------------------------------------- Collection siteModules = siteModuleManager.getSiteModules(); for ( Iterator it = siteModules.iterator(); it.hasNext(); ) { SiteModule siteModule = (SiteModule) it.next(); String extension = siteModule.getExtension(); String sourceDirectory = File.separator + siteModule.getSourceDirectory() + File.separator; String parserId = siteModule.getParserId(); for ( Iterator j = files.iterator(); j.hasNext(); ) { File file = (File) j.next(); String name = file.getName(); String path = file.getAbsolutePath(); // first check if the file path contains one of the recognized source dir identifiers // (there's trouble if a pathname contains 2 identifiers), then match file extensions (not unique). if ( path.indexOf( sourceDirectory ) != -1 ) { name = name.substring( 0, name.length() - extension.length() - 1 ); context.getFiles().put( name, new BookContext.BookFile( file, parserId ) ); } else if ( name.endsWith( extension ) ) { name = name.substring( 0, name.length() - extension.length() - 1 ); // don't overwrite if it's there already if ( !context.getFiles().containsKey( name ) ) { context.getFiles().put( name, new BookContext.BookFile( file, parserId ) ); } } } } if ( getLogger().isDebugEnabled() ) { getLogger().debug( "Dumping document <-> id mapping:" ); Map map = new TreeMap( context.getFiles() ); for ( Iterator it = map.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); BookContext.BookFile file = (BookContext.BookFile) entry.getValue(); getLogger().debug( " " + entry.getKey() + "=" + file.getFile() + ", parser: " + file.getParserId() ); } } } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxia.java0000644000175000017500000000603011151514446027146 0ustar twernertwernerpackage org.apache.maven.doxia.book; /* * 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.book.model.BookModel; import java.io.File; import java.util.List; import java.util.Locale; /** * An interface to create books in different output formats from a book descriptor. * * @author Trygve Laugstøl * @version $Id: BookDoxia.java 748141 2009-02-26 13:29:10Z vsiveton $ */ public interface BookDoxia { /** The plexus lookup role. */ String ROLE = BookDoxia.class.getName(); /** * Load a BookModel from a descriptor file. * * @param bookDescriptor the book descriptor file. * @return BookModel * @throws org.apache.maven.doxia.book.BookDoxiaException if the model cannot be loaded. */ BookModel loadBook( File bookDescriptor ) throws BookDoxiaException; /** * Creates a book from a BookModel using the {@link Locale#getDefault()} and UTF-8 as default encoding. * * @param book the BookModel. * @param bookRendererId the id of the output format. * @param files a list of source files. * @param outputDirectory the output directory. * @throws org.apache.maven.doxia.book.BookDoxiaException if the model cannot be loaded. * @see #renderBook(BookModel, String, List, File, Locale, String, String) * @see Locale#getDefault() */ void renderBook( BookModel book, String bookRendererId, List files, File outputDirectory ) throws BookDoxiaException; /** * Creates a book from a BookModel. * * @param book the BookModel. * @param bookRendererId the id of the output format. * @param files a list of source files. * @param outputDirectory the output directory. * @param locale the wanted locale. * @param inputEncoding the input encoding when processing files. * @param outputEncoding the output encoding when writing files in ouputDirectory. * @throws org.apache.maven.doxia.book.BookDoxiaException if the model cannot be loaded. * @since 1.1 */ void renderBook( BookModel book, String bookRendererId, List files, File outputDirectory, Locale locale, String inputEncoding, String outputEncoding ) throws BookDoxiaException; } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/context/0000755000175000017500000000000011632765560026122 5ustar twernertwernerdoxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/context/BookIndex.java0000644000175000017500000000235311150511552030633 0ustar twernertwernerpackage org.apache.maven.doxia.book.context; /* * 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.index.IndexEntry; /** *

BookIndex class.

* * @author Trygve Laugstøl * @version $Id: BookIndex.java 746976 2009-02-23 12:15:38Z vsiveton $ */ public class BookIndex extends IndexEntry { /** * Constructs a new BookIndex. */ public BookIndex() { super( "book" ); } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/context/BookContext.java0000644000175000017500000001346211150511552031213 0ustar twernertwernerpackage org.apache.maven.doxia.book.context; /* * 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.book.model.BookModel; import java.io.File; import java.util.Locale; import java.util.Map; import java.util.HashMap; /** * Context to render a book. * * @author Trygve Laugstøl * @version $Id: BookContext.java 746976 2009-02-23 12:15:38Z vsiveton $ */ public class BookContext { /** The BookModel of this context. */ private BookModel book; /** The files. */ private Map files; /** The output directory. */ private File outputDirectory; /** The BookIndex of this context. */ private BookIndex index; /** The Locale used to generate the navigation. */ private Locale locale; /** The input encoding used to read Doxia file. */ private String inputEncoding; /** The output encoding used to write the renderer files. */ private String outputEncoding; // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** Represents a BookFile. */ public static class BookFile { /** The file. */ private File file; /** The id of the parser. */ private String parserId; /** * Constructor. * * @param file the file. * @param parserId the parser id. */ public BookFile( File file, String parserId ) { this.file = file; this.parserId = parserId; } /** * Return the file of this BookFile. * * @return File. */ public File getFile() { return file; } /** * Return the parserId of this BookFile. * * @return String. */ public String getParserId() { return parserId; } } // ---------------------------------------------------------------------- // Accessors // ---------------------------------------------------------------------- /** * Return the BookModel of this BookContext. * * @return BookModel. */ public BookModel getBook() { return book; } /** * Set the BookModel of this BookContext. * * @param book the BookModel. */ public void setBook( BookModel book ) { this.book = book; } /** * Return the files of this BookContext. * * @return Map. A new HashMap is constructed if the current Map is null. */ public Map getFiles() { if ( files == null ) { files = new HashMap(); } return files; } /** * Set the files of this BookContext. * * @param files the Map of files. */ public void setFiles( Map files ) { this.files = files; } /** * Return the outputDirectory of this BookContext. * * @return File. */ public File getOutputDirectory() { return outputDirectory; } /** * Set the outputDirectory of this BookContext. * * @param outputDirectory the output directory. */ public void setOutputDirectory( File outputDirectory ) { this.outputDirectory = outputDirectory; } /** * Return the index of this BookContext. * * @return BookIndex. */ public BookIndex getIndex() { return index; } /** * Set the index of this BookContext. * * @param index the index to set. */ public void setIndex( BookIndex index ) { this.index = index; } /** *

Getter for the field locale.

* * @return the locale * @since 1.1 */ public Locale getLocale() { return locale; } /** *

Setter for the field locale.

* * @param locale the locale to set * @since 1.1 */ public void setLocale( Locale locale ) { this.locale = locale; } /** *

Getter for the field inputEncoding.

* * @return the inputEncoding * @since 1.1 */ public String getInputEncoding() { return inputEncoding; } /** *

Setter for the field inputEncoding.

* * @param inputEncoding the inputEncoding to set * @since 1.1 */ public void setInputEncoding( String inputEncoding ) { this.inputEncoding = inputEncoding; } /** *

Getter for the field outputEncoding.

* * @return the outputEncoding * @since 1.1 */ public String getOutputEncoding() { return outputEncoding; } /** *

Setter for the field outputEncoding.

* * @param outputEncoding the outputEncoding to set * @since 1.1 */ public void setOutputEncoding( String outputEncoding ) { this.outputEncoding = outputEncoding; } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/DefaultBookDoxia.java0000644000175000017500000001206011142301255030443 0ustar twernertwernerpackage org.apache.maven.doxia.book; /* * 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.book.context.BookContext; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.services.indexer.BookIndexer; import org.apache.maven.doxia.book.services.io.BookIo; import org.apache.maven.doxia.book.services.renderer.BookRenderer; import org.apache.maven.doxia.book.services.validation.BookValidator; import org.apache.maven.doxia.book.services.validation.ValidationResult; import org.codehaus.plexus.logging.AbstractLogEnabled; import java.io.File; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; /** * Default implementation of BookDoxia. * * @author Trygve Laugstøl * @version $Id: DefaultBookDoxia.java 740705 2009-02-04 11:57:33Z vsiveton $ * @plexus.component */ public class DefaultBookDoxia extends AbstractLogEnabled implements BookDoxia { /** * @plexus.requirement */ private BookIo bookIo; /** * @plexus.requirement */ private BookValidator bookValidator; /** * @plexus.requirement */ private BookIndexer bookIndexer; /** * @plexus.requirement role="org.apache.maven.doxia.book.services.renderer.BookRenderer" */ private Map bookRenderers; // ---------------------------------------------------------------------- // BookDoxia Implementation // ---------------------------------------------------------------------- /** {@inheritDoc} */ public BookModel loadBook( File bookDescriptor ) throws BookDoxiaException { return bookIo.readBook( bookDescriptor ); } /** {@inheritDoc} */ public void renderBook( BookModel book, String bookRendererId, List files, File outputDirectory ) throws BookDoxiaException { renderBook( book, bookRendererId, files, outputDirectory, Locale.getDefault(), "UTF-8", "UTF-8" ); } /** {@inheritDoc} */ public void renderBook( BookModel book, String bookRendererId, List files, File outputDirectory, Locale locale, String inputEncoding, String outputEncoding ) throws BookDoxiaException { // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- ValidationResult validationResult = bookValidator.validateBook( book ); if ( !validationResult.isAllOk() ) { throw new InvalidBookDescriptorException( validationResult ); } // ---------------------------------------------------------------------- // Create and initialize the context // ---------------------------------------------------------------------- BookContext context = new BookContext(); context.setBook( book ); context.setOutputDirectory( outputDirectory ); context.setLocale( locale ); context.setInputEncoding( inputEncoding ); context.setOutputEncoding( outputEncoding ); // ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- bookIo.loadFiles( context, files ); // ---------------------------------------------------------------------- // Generate indexes // ---------------------------------------------------------------------- bookIndexer.indexBook( book, context ); // ---------------------------------------------------------------------- // Render the book // ---------------------------------------------------------------------- BookRenderer bookRenderer = (BookRenderer) bookRenderers.get( bookRendererId ); if ( bookRenderer == null ) { throw new BookDoxiaException( "No such book renderer '" + bookRendererId + "'." ); } bookRenderer.renderBook( context ); } /** * Returns a Set of ids of the BookRenderers that are available in this BookDoxia. * * @return Set */ public Set getAvailableBookRenderers() { return Collections.unmodifiableSet( bookRenderers.keySet() ); } } doxia-1.1.4/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxiaException.java0000644000175000017500000000374711142023710031026 0ustar twernertwernerpackage org.apache.maven.doxia.book; /* * 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. */ /** * Wraps an exception when rendering books. * * @author Trygve Laugstøl * @version $Id: BookDoxiaException.java 740275 2009-02-03 11:17:28Z vsiveton $ */ public class BookDoxiaException extends Exception { /** serialVersionUID */ private static final long serialVersionUID = 87146681585045106L; /** * Construct a new BookDoxiaException with the specified detail message. * * @param message The detailed message. This can later be retrieved by the Throwable.getMessage() method. */ public BookDoxiaException( String message ) { super( message ); } /** * Construct a new BookDoxiaException with the specified detail message and cause. * * @param message The detailed message. This can later be retrieved by the Throwable.getMessage() method. * @param cause the cause. This can be retrieved later by the Throwable.getCause() method * (a null value is permitted, and indicates that the cause is nonexistent or unknown). */ public BookDoxiaException( String message, Throwable cause ) { super( message, cause ); } } doxia-1.1.4/pom.xml0000644000175000017500000004367411470562366014124 0ustar twernertwerner 4.0.0 org.apache.maven maven-parent 16 ../../pom/maven/pom.xml org.apache.maven.doxia doxia 1.1.4 pom Doxia Doxia is a content generation framework that provides powerful techniques for generating static and dynamic content, supporting a variety of markup languages. http://maven.apache.org/doxia/doxia 2005 Doxia Developer List doxia-dev@maven.apache.org doxia-dev-subscribe@maven.apache.org doxia-dev-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-dev/ http://www.mail-archive.com/doxia-dev@maven.apache.org http://www.nabble.com/Doxia---dev-f11816.html http://markmail.org/list/org.apache.maven.doxia-dev Doxia User List doxia-users@maven.apache.org doxia-users-subscribe@maven.apache.org doxia-users-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-users/ http://www.mail-archive.com/doxia-users@maven.apache.org http://www.nabble.com/Doxia---Users-f14483.html http://markmail.org/list/org.apache.maven.doxia-users Doxia Commits List doxia-commits-subscribe@maven.apache.org doxia-commits-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-commits/ http://www.mail-archive.com/doxia-commits@maven.apache.org http://markmail.org/list/org.apache.maven.doxia-commits Maven Issues List issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ http://www.mail-archive.com/issues@maven.apache.org http://www.nabble.com/Maven---Issues-f15573.html http://markmail.org/list/org.apache.maven.issues 2.0.6 doxia-logging-api doxia-sink-api doxia-test-docs doxia-core doxia-modules doxia-book doxia-maven-plugin scm:svn:http://svn.apache.org/repos/asf/maven/doxia/doxia/tags/doxia-1.1.4 scm:svn:https://svn.apache.org/repos/asf/maven/doxia/doxia/tags/doxia-1.1.4 http://svn.apache.org/viewcvs.cgi/maven/doxia/doxia/tags/doxia-1.1.4 jira http://jira.codehaus.org/browse/DOXIA apache.website scp://people.apache.org/www/maven.apache.org/doxia/doxia ${project.version} org.apache.maven.doxia doxia-sink-api ${projectVersion} org.apache.maven.doxia doxia-logging-api ${projectVersion} org.apache.maven.doxia doxia-test-docs ${projectVersion} org.apache.maven.doxia doxia-core ${projectVersion} org.apache.maven.doxia doxia-core ${projectVersion} test-jar org.apache.maven.doxia doxia-module-apt ${projectVersion} org.apache.maven.doxia doxia-module-confluence ${projectVersion} org.apache.maven.doxia doxia-module-docbook-simple ${projectVersion} org.apache.maven.doxia doxia-module-fml ${projectVersion} org.apache.maven.doxia doxia-module-fo ${projectVersion} org.apache.maven.doxia doxia-module-latex ${projectVersion} org.apache.maven.doxia doxia-module-itext ${projectVersion} org.apache.maven.doxia doxia-module-rtf ${projectVersion} org.apache.maven.doxia doxia-module-twiki ${projectVersion} org.apache.maven.doxia doxia-module-xdoc ${projectVersion} org.apache.maven.doxia doxia-module-xhtml ${projectVersion} org.apache.maven.doxia doxia-book ${projectVersion} org.apache.maven.doxia doxia-maven-plugin ${projectVersion} org.codehaus.plexus plexus-container-default 1.0-alpha-30 org.codehaus.plexus plexus-utils 1.5.12 junit junit 3.8.2 test src/main/resources ${build.directory}/generated-site/xsd **/*.xsd org.apache.maven.plugins maven-antrun-plugin 1.3 org.apache.maven.plugins maven-release-plugin https://svn.apache.org/repos/asf/maven/doxia/doxia/tags org.codehaus.plexus plexus-maven-plugin 1.3.5 org.codehaus.modello modello-maven-plugin 1.1 maven-project-info-reports-plugin 2.1.2 org.codehaus.mojo clirr-maven-plugin 2.2.2 1.1 org.apache.maven.plugins maven-resources-plugin 2.4.2 org.apache.maven.plugins maven-javadoc-plugin 2.7 1.4 http://java.sun.com/j2se/1.4.2/docs/api/ http://plexus.codehaus.org/plexus-utils/apidocs/ http://junit.sourceforge.net/javadoc/ org.codehaus.plexus plexus-javadoc 1.0 maven-site-plugin scp://people.apache.org/www/maven.apache.org/doxia/doxia-${project.version} org.codehaus.plexus plexus-maven-plugin descriptor org.codehaus.mojo clirr-maven-plugin verify check maven-project-info-reports-plugin 2.1.2 remove-temp maven-antrun-plugin clean-download clean run reporting org.apache.maven.plugins maven-javadoc-plugin 1.4 http://java.sun.com/j2se/1.4.2/docs/api/ http://plexus.codehaus.org/plexus-utils/apidocs/ http://junit.sourceforge.net/javadoc/ org.codehaus.plexus plexus-javadoc 1.0 maven-checkstyle-plugin http://svn.apache.org/repos/asf/maven/doxia/doxia/trunk/src/main/resources/config/doxia_checkstyle.xml org.codehaus.mojo clirr-maven-plugin reporting-aggregate org.apache.maven.plugins maven-jxr-plugin true org.apache.maven.plugins maven-javadoc-plugin true 1.4 http://java.sun.com/j2se/1.4.2/docs/api/ http://plexus.codehaus.org/plexus-utils/apidocs/ http://junit.sourceforge.net/javadoc/ org.codehaus.plexus plexus-javadoc 1.0 aggregate test-aggregate m2e target m2e.version ${m2BuildDirectory} org.maven.ide.eclipse lifecycle-mapping 0.10.0 customizable org.apache.maven.plugins:maven-resources-plugin:: doxia-1.1.4/src/0000755000175000017500000000000011632765552013362 5ustar twernertwernerdoxia-1.1.4/src/site/0000755000175000017500000000000011632765552014326 5ustar twernertwernerdoxia-1.1.4/src/site/site.xml0000644000175000017500000000276211371561527016017 0ustar twernertwerner Doxia images/apache-maven-project-2.png images/maven-logo-2.gif doxia-1.1.4/src/site/xdoc/0000755000175000017500000000000011632765552015263 5ustar twernertwernerdoxia-1.1.4/src/site/xdoc/index.xml0000644000175000017500000000743311401007733017103 0ustar twernertwerner Doxia HervĂ© Boutemy

Doxia is a content generation framework that provides powerful techniques for generating static and dynamic content, supporting a variety of markup languages.

doxia-1.1.4/src/site/xdoc/doxia-deps.odg0000644000175000017500000003277411401007552020007 0ustar twernertwernerPKٸZ:ź.Ä++mimetypeapplication/vnd.oasis.opendocument.graphicsPKٸZ:Configurations2/statusbar/PKٸZ:'Configurations2/accelerator/current.xmlPKPKٸZ:Configurations2/floater/PKٸZ:Configurations2/popupmenu/PKٸZ:Configurations2/progressbar/PKٸZ:Configurations2/menubar/PKٸZ:Configurations2/toolbar/PKٸZ:Configurations2/images/Bitmaps/PKٸZ: content.xmlí\Ý’ŁşľĎSP¤r FâÇŕÚ™SÉE®vS©Ú“ŞTnN1 leQ€ćĽD.ó~y’´Äź°ŤÁ1žÉ™ń^Ě R şűÓ×j5bżütHbeGň‚˛ôIEşˇ*$ XHÓő“ú·ź˙¬ąęOĎżű¢d˛`›´Ô––đ[Ńi±ŞzźÔmž®_Đb•ú )Ve°bI›Q+Yz%žUµĺkŐü®ÁO1‰Ęc©NĐÉĽ°ÜUKq×iëśíµ ˇë Đ9ňăB8b!yâ’[đÝrÁÔn‹’FŻcÖ&4 c2źµć­MüüÉ5 Ű“úÇÔüż@ţř»Ć‚NDŰÓ{C7d|f$áq’·®đ‡ugR´ŕźçŤú.óâŻ'±ěö…]­•m‹lgÄ8¤kšjśş€&DzkĚ+mšVnÍ1 M3MCh©d§ë}BŢ÷Ö»z¦čé?.b|Ń_AkdeĄÚ¶íkČ^X¶Ö4¬e>_@\>䏓݄19ÔÝÓ˝v~;^{˙ś…éţ9cô5öMÖńçĆň»«7OŔé śPďZN%¶¬1-ępŰ{ÜWž@u1ä´q•_¶qLJĄęäípµş¬ş4ľGyR˙ó×Řň˘î÷×\ŇXą-,YIî5!YÇő2ßőČ:Ëţ0î’şWÇŚ‘n"™$Ć™ŔM $ő„ݵç¦čI8‹ýÓ.ÄÎ2ţ?zČśÍCHÇŇCÖŚr?¤‡ěŮ<„uëCzČ™ÍCć‡ôĎr>˙|Đ8íÎć!ëĆioF}Ě8ŤŚŮ\d˙¶µÔ]'Ě‹ÁbÝńÂÂ×ö˘®>5^/¬ŞU‚ÍŻQ]O«˘äX×n ŘÎBcÝ÷˝«„‰`[€"Z±ń3rz'Ql«˝’ ßÇ‹>©4´ë«ŘĺďVŕŰňíÝn˝ŞŃAKqěxSSó°tĂjAŻąz|đřşSOµ¬ž˛í¦IzÚ[®ç„…[ppŤ—kpÉjtëۡ¶&,!eţ*ŘQ˛˙ăJ)†‚‘cÔ?×Ňô> }ŻěÎŐń˛łQ¶ÜÓźx»#˛¶ľśťčŘYŢ'sYđÂŘ­ üüŢâ·$obS_ö0ćKîl‘9Jâ´7–—3méֽȱϋňm4ÝpÍ ·ÇľXm4Ľá‚ă˛×<şw'l5PPqA)Ĺ4éÝŰmĆ˝QŠŔ&ĚóĆ(‚áI Áş7G({ň¨Ż•ŚĹŹ7WwćJ˙ĹĘą=ą%ť(ŔÎWnĘÍsLńĆ™˛őÄž\Ăüeą3Ľ»šĘtĂŰúÁşěíćČřwŰ;î_˛2G¦Ŕg{No)Á2=D˙ŕJ‚ŚA‚ś­Zˇˇš®)—­@EXC@-Ĺ3-m†Ądj¶5íĐŇ„—»ýÓ,í»ńŰ(RĐôÇç®ëÎuhɸÎ<ŢŽsĚÖkţĹ÷ęۡ·רŢćß3Ż€<đ}ŻşĄ­{'•ŹŮ*—‡hß ZOwďí¦üĚe­w:~ş#Bg6 ďŮ$÷šÇŹRëĹÓ‡hi;kŇ «÷ń›Ą›—OĄ5Mśő›uťßě#÷X&?ćÚo¸ż ŇDÜÝ"ÝqäŁËŢ ‹ý'˙ÚŕŤv·°WEG畎ë¤}‘ËuRtmä0Ç#ěk‘-*Ą»·-“ş¸1Ąöcëss#bŮgdFŐĆż¶ë>ôăMâľEďżĹŔZůü_PK)ô–¦ÚőRPKٸZ: styles.xmlí\ÍŽŰ6ľ÷)éŤÖŹb»q‚EOMQ$iŻ-Q6I(j˝ÎKôŘ÷ë“tHJ2eK^9ńf7 Ą@sfÄ™ŹóŁ™Ą÷Ĺ«Ű$¶nĎ)KW¶7rm‹¤ işYŮ˝˙ ÍíW/xÁ˘d˛ HH*P.ö1É-NóĄ&®ě‚§K†sš/Sś|)‚%ËHZ -MîĄÚJݍ‡őW̦´ ·˘Ż°ämČâu˙ťł)rĽë+,ySSřĄľóRÄćYŚ÷Č`˛jŽ“Í=oěYŢtŢPŔ[ŢdëŢÜš/ĐtöIřÇDńa‚ćSËĎĐlĽs4™YŢĚCŢsů?K>`:¶&3ĄżN!‰p—EÉŇk†SÚŻě ÇŮ–vĹ›aŽŐĘ8 Ę&Éâ€p!XžaYÎhHfĹq¶ĹvÉ–i urh䕝Ó$‹IE‡„KĐš I9ś˘˘Ho†€ÂăcŽÄş"E Š*MC"ýDXő©*ÄŽsRŰ…leY8ÝfŐěŇ®k‹ś ¨H!Ű!µyŔb)[đ,‰Ö¨Bń'ś±üç÷ĽŮú쬷,Á©^lX ůц¤ _Ů\ň582*Čf7SYN[ĺô3€âO2ˇÖbśn ĽĄ«…€©ŕ Ëoo۶„pĂiĄčŻä#ţ»°Ţá4żSÉJ2ßç‚$§şVôƇTşbĐŞ—>Pj_Ń>ßŢV¤ŇŽŠ’˛”´i'óKL ”Ţă-€x΀šµÓ„šŁŰšĄŐŚšÚbHMS¦\˛••/š!ŞÓH.pbÚwnůŮtd•” ÄŘ'ůÓP§˝ŢĘÂéIcątô]ő§Lm:‚®P·kÁŃXŠžŇPůzŁŁ˛ÁŃ{F\RŰ„#ǵőJ­ébQ¤˘ á|5GýrĎźĘ= š !+_-&‘”§›­AѸnq¨Ş3 !!5TĄśtŰ4˛IÜ·+“ć®üW˝‘Ç4ofď#×0Ůb(ܱfFë"މ°4Q®CŮ´őGMBňEle˙÷ď?vW6¦7ěa$;Śd‡‘ěŁAhÉ#Ůa$;Śdˇa$;Śd×H¶93­@éŮťPa ¬i_9™\ÔWJ“Ľ‡°©ó®Ž«Ç&Žhüs#šâé¦S«‡^}ŹĂżü8üű9޶iˇ{¸­Ô8( ‚Ĺ⛞Á=·f¸Ć4ôĚCĎ<ôĚCĎ<ôĚŹźˇgzćˇgzć'Ň3ë;ľČ4ň:®2Ő„–vé˛űJMlĆý¨tKp(Żů<|Ł~ô%šż NßëŹŃe}f…ŃtţRóYuă 6Ľş{ęŇ+tnËŐ;* ĆŻ4!8/ř·Wsäté ¨ĂřâpĂ©U®qóé eś_5ŞP¤T”ő Ż űmqî}Ëąü(żŠ+ż! ŠPą!Pęö¬ŤŁřóŤk·đśqŻŽRp´¬‹Ś×ZdŞUµ_ śßX¬nĹú }­ÔŹS…qzřă‚cjâcXŃíav’Ë_6¤| ‰ąxâdk|ÚpVŔńë“Z3ĘÂwçM&§ó´JB‚sˇ<únZŢÍ€‹rźá(ă\ćNĹĺۡA)Ť•7éÝŃ·\M˙ OpenOffice.org/2.4$Linux OpenOffice.org_project/680m17$Build-93102008-12-20T23:12:092009-02-27T00:06:5117PT4H47M26SPKٸZ:Thumbnails/thumbnail.pngíů7ěűÇőOŮ…¦0a‘5Ť5k†˛dÉněe)˛dŇ4K„1–ĐKxPdi,3(3Č’e fĆîăůüßsľż~Ď÷ţĺľĎu]÷ąŢ÷9÷ąĎë}ż2žăâdaa9gltĎňdƲ°śbů›ýdE—R%±°đ‰ß»kžGEĹđ-FôDÂ@‡,§ů]ä%„]˙‰3ÖÜc=5CLJž%ÜFqß4Uň“qwŕ?žĄ‰™® ¸]đŁČ"ăá–zä—?/śé˘­pmMÔˇ%T´•Ö-Ql/F±ć˘NŚş|ąSP 1ěÉPµpť“Né‰J/›Sş˘şvó*Ďp_ö¨}TĆŻ“Ć4eÔąlú`Á•Ţ&Ű©N8"}Ů˝î:©Ő˝ż^”“¬0Ŕ"j˛Ú?«č’D,X9jHd˛  ­1/]TË ‹Ą{®u±rŤÍDBíŤ|]GJnQŢh’pb5’wDŻE˝đËŔŔ{PEeÓ ú’ŘĽ0áŚËňš×âuAµ®‹Ł á“ć×Ęű‚/ÚBl3ʦ˘Ö ᲹŮ€žę17+{¤Đ°iĆ;«µ˝});ˤ,ą…şäÄa±„o©ăDĐİ]€öňˇ«B®Y¸$ť`;ÝNÓ2Xd˘Ö"Wk-¬ă÷ ĄŢňZL˛.=ﱼ©ę‰„®đ—óÄÁś´Ź6+IľĹ5‡źb[ĹbZům‚°˛ŠÁ`<‡?,{Çhél|×|roúzďCĚš™],ˇTvŔ×±7ż`äJ勬VĽ†WůĆxx˛˝óxƧĆĐÖđt Kńq T¬¨IęK}57·¬’§l1†÷>TŹyIg· ÉŰ+uEWďĎ >ýřŮ×çWt'/zkF ž×–˘¨ ¬`áŠÝX¨˛»żŹk7Тů5ŃľěÝefł›Kč(7'ďö‚)—žCűUľ”rÝ3~M?áŘtĚ{ÝŞç´P|Ěâ©‹mV`ě.s+˛'”ąŰí‰ZŤ<˙[+ô`+bóJâłvńpž€sńî2'x2E3Azu1TŽîüy@ő! >ލo1ˇ}öĐ ¨Łý1I@ěč­eÁc©Î+ąĺžÔĹ#Îm[ đzöťËJ ˝şĎßň4đ7đ®L ËŰÍşk$qţ${S7¬6än$‹ťńj‘´ŘÚ4·CźLk¨DMÍÉIŹ÷6;äĐ7pÖ&ŠüF0jáľ˙"ÁŞ˛UôŃkTLAĐÂß'ݤ›|r{&6ÄîWfPĄ‹”lŇo‰ÔL mĚD…0É»Äđ–UĚO™Řúë§d٦Č&ΤÎDý…Űxá_ąA“ř%t•WË,Í/;ĺľSţ.ÇşË4ŕ+ÇĎ›ęŻlqÉ%Ž[­¨ëeË—ásŢA9€)nµ‘Ćö#ü“ĚĚĹzĺxŹłü»ćŘɉżĎ·ixŹŁvč"Ťů†oĐÖ‡¨ařĄű‚6ć…ďŁÚ#ŤłżĘćWŹĽŽeŻ.@©Ŕ#`Li64´ĽĘ[Főj!VÖ©{ďIßčłČ¬˙ж×l} ë6’ż™ŇBŚóÝŕřQă¦ďí3ˇxçŮÂmÓłęf[[ĄŕëpőűÚc?ă͢ýáŘ\đÜĄBťÎ=0ĺéI›<ň0¤ĚćŃú,d*xˇ‹d‘¶Úć‰ý·=+˝Tş>Ţ ĆhńŽWN‘‚Ô–€ůy#Ť>ÍčO"gCwKiG_#›ă¸? Ţń§úQŃŤdĎM‘ětŹb-X7}¸ą"@5ú  n\<ągý»ĆźĄ.´îň©‹Üy)|Í›4AqBv¤ á˙9ß`‰´®ňž>Ë2ůeʤ@t˛Fň…|&géeËĐ©/kvÓ‰F2?¨mÝ– 0iC“ľ44˛b Î-fĎć8šä­A¦g^‘ě’v.káN鸞ĹjÁ)öbÜれÄá?Uńů!˙6ř:m:®+7şšQyp¤ţľŁén¸˝LĚňg2bqPŘJěĄŃăZNĎehxÜKőłK;—ĚJBĄÎ?¬śŘo÷‚—]ýcu'ëÓNpůđ´mť˘ľ`:Ńy—Ďçü«qÇíé—ý¶Yő+hTţŽŮ»§Rż6;Ć«żđ杆×]P1Ć)śYá!8}Ä/:ż.X/kŘAVš jŐ°“Çlb6,@Cŕ|˛zKB÷=g$±ßýíšMiĹ_°G [ •€vŃVüńo¬\C ťutđýŞną”s°@ IľĚ‚†ăú†j>ÄEÚÇň ç° Dű˝+Šžźťl#$3Ďľ¬p_‰AßĆN&˝X̵.©'ţ¬ß]ŔLďEĆ}˙ŤěОj[ř•ćŘ*©˙Ń#DyĽD*sA—żjn(ŤĹ·ŐřĂG÷Ävë×eäçH9•‚{G/ąÇÚŔařfgčÚ«Ăv°ç ‡˙!<ĺs ˇc±w—ţĺ´č5`čÍé˝oLŰMeR ş¸*Őö÷]ÜÇŞ• Ň ¶Ďh/WŠnË[”ö2F'dúżš…ľ?…3¦?]ZÜ*]¸˝očí“KO§áçŰw QQŰľ.ä_ŕ/‘wvÇ0Fź:‡ź(Ź © ő yĄr©$4ůŻĹî*HókÂ?6·ŤîSL%¸ `~:ę> ÷µż¤ Â"W”Ű,µĚřÉC¸ře%´ÁżZvÝpNîőřö(ßŘ‘ď…đĐĆ@ ˘ŔĂ2€úRqA·ĺăoŰ:Łqó ťn?ýYűKŠ iŃĎá ŽÔłé!~ôÍCŻ]Ńő±A»0żŃćú}'6]bUć0zk¬ÜBSĎ[uňKŠ“«ŘÚqßYŵţđˇO Ď52Vu¬Ł˝Óa"ŘÓYk7Č_ăě3‘![óÝý­âdó®pp)ď> ɬ#^ąŤ@žäĆ3ÖVőyˇkŃŽgČCĎeĚÚRKM‘`@ëg -Ń;ŹĘú*ťŰskĚUJŽgxŽoůřźf9фȦ‘g¤U˘1!sÝPÎä®îĄI°´ôǤUŞ·h6ŹH…r?ߥK„źµş9fB'Z[lPY[]5®âąo?N5ŇzÎÄ —żÍBą‘îz ;ĆÓ÷‡ł~ŰVÁ¨QL;OQĽ¬[ăŹöeź»YÎäH‘ĂżuŚŤ˝Ż (K öĄÄ]¶ń6RÖ„€U©hjjW©J´ş źéřXô[t® ŹĺSŁ6ę†ă)#ęEKCŻwbÂ%°‰¦ˇÍîđËI¤1óţÉ˝€s6†u㇌ř$âí¬šę^î!qťóÉű<ń;ĺÇ‚&ü“OĘXgün­…şµU׏ĘküKKK1ź=‡CNxąÔĽŔ˙)l]đgK}čg»ÇŞ˘–ze-˝Ľ$Ř^°ńĄ~óš7Š]$˝ zo-“aŃ8Žiz'îŤm L?÷m¸xÝԔ͠î'88’Ľđy&śÉzÄ‘ PąNôŁŻŹO™/)˝˝Ř:˛‰śóúsRLá‹` ®«Ű“÷±rAßUŽÖć% ŞZ‹Lź˝y5 ¨¶Î _¸ľűĹQ¤­wRßäÚ×2CĚvÇ>Óý –¤ČWćq#j= lSˇ­ÜđŞ6ĺÇŚŻ©< ű7¶vy§InI˝T¤m|ŘÉvcéÔň‡.Q ‹dN°ăŤćµ3'ž;źňÚé/Ý}ŽŻüFüFďIă0Ń˙q6ĂâN&áÍD†„W;ö:ĘúĚrVŤ*ŰOÚčLOo3Ę[÷ľÖ°tWѲ˛áť›˛ÍDx*>ż}ŔԬЊ‰N?ýŮ)±äŃňżíĄ—÷¦ÝŢŘ ćJ…eH‰äęŃ÷7µçś­TTrUWD$&fq#ŻsŁÚŻ'ĹŔ*—0MË&>xš9Ł@ź‡[č˝ěC;ő˙X,Pr¦qP˙e5ď‹`TľN™Ľ§&¤¬}´`b;ŃĹűŘAözëT$ň]MÔJčÁkpşX ä†WÚňů’' x ę¶6oÚ÷NˇĺśE—ś{ÇÝ8_«Ěkkˇl)M•ýh&ZLŞLÉóÄ’Ů×ËŚśX¨ęíÔEž}÷jjgŃÓü„¬‚-·÷š1%·ŢmźąÇs»ŰÂ5,•N—Îčg•ňzÚăÁ˘ŮtÍŻ ‰`ŮĺÖŐĄ3šB˘ĽśĹpĚ-É{ł‘•gLíŮ*‚ůŔ§'ŕ€Ę+‹ę˙ęßĺ˙“˙×’´c= ärÇ7ËÉ0Öß«ÖuyţPK[żó gVPKٸZ: settings.xmlÝZŰrâ8}߯Hąöa·¶Ël ¶Ě5Ô†K&yV4ŃĹ%Éňő+aŔž0vĽµ»<@aIçt«[Ý­†ëż–Śž,@*"řŤU>-Y'Ŕ] źÝXăQ»peýUűĺZ® ´6SÔ‰YÎUu=|ců’WRDU9b ŞÚ­ řvYuwv5"[?YRÂ_n¬ąÖ^µX ‚ŕ48?rV,W*•b4şťęIP éHŕăw×ěŇş‚?“ٱ(ëŮ»ë…_…¬‹?+•.ŠëďŰŮŠz,W8·ŕ ć™§ô»˝Bś°caÂą;Zo6~ÇÜe«¶µíÖ¤µëŤ˘ëŹŃŔB{źl‡|7–Q˝ş |ő+nÝ÷k&D…ĘŘĐHxÖvPŻ<3H¸¶jĺňeůşxóSŘ=xÖqŕ…ňĺĹe%3üÁz‡^ąş:Ď  d6Ź•˙¬üçyéXüC^p KŔű\Ä[+ZcśG®Ž‘‚.ŢSii\ÁŞ…Ž‘ŇŽIpWmöc~*Ä­š–>doKÁ÷·řŔ»jČ‘7!I~č4;$g„«üHÂ÷áHńڍĘČńiú\Ý–ćaî,aŽP>Ę ¨ŻnÇ”M´zËy3‘E»Ő”h64Ť&›'˝´(a„# AWѶőĚm‡t±!ű˛ttPÚ×ć+měŃC+“÷öń‘‚u#„\YµâŃŻ«›t˛ L€Ôčß"MO¸/€ßĄř6T_ŘÚD˙i싆 âPÄěÎîřdŽé&ŚŐMŢĎ“s!ÍŃIyn†@MD‚ż+pWE®p'p[ŃUu2ŰÄÉ\BcSřƆ JÜ—,u “\R|DĐ#>G¬Ż9¨3¤€tDoă‹”áÝlKhŕˇ6¦@rß3ŁžŇ}¶Đ}ˇLü¸ˇó?¶4Î~iřż^HRşÉŃ’ e~C © Qúr)mań Ž‘9ćánŰ!ixÓÉź @ß´Z?đe”ą¦{e{]ŤČ&Ňčý+‹:ŃFŃQč c§—ĐXůő7ßđű† ¨6IüT‰i:VSČHdŠIŮ,ě’†}Á‘ˇ|׺2ŞŢSkć¦#m"5O͉SrÂ3ň©6´CťPOś]¦ŽJsJRë4KÇ{‹´›~#çiĂăGÜVńĎ]íçUgwUt#Ż ńB!ńľđnuäľäq)ŮĺČ­ą‘ŕ—Og+Boť2ŻIpK0†(wĺŇ<Ť8Bô~^MÍaD(ä»O#’‹üaKąĹqęp’–V ě‚ÓUZÝRľ„1?č8lňfĘ_…"GňŮd[H†bo)ďw“ögyóˇĎX^Á5ň¤{Q˘÷·=K? ‚Ů5%ař‹§É‰=´:l l˝‰Š `*AýPÍL”1§zË2h¶3AAűűĂ÷íŕ‘}űG±\o93ű?ńş/OîÇŻŢ˝Óz|kęmßŮ/ßôjŰí§±ů|™ŢŰöUÓi—‡ö˛Áë+ôpYzúÜ­Ś[N§Á*ćűÄÇf=TüÁ¤ľpąłz| Ąë/ÜĄîkiŮ`ĺąË°7eÎńÉ+î”é”ßWîAĐkÚęÎöľLĎ– —9Ô˝uÄ`Ô-®×igröôTvÇ1Ł_žFĄ AëF·ţbĘ -gŽ;­ŹăN›?Mú°ń‡QgRÂťÉĘ葲=?D ¬«˙ÄT¨Tđ  Öybě„`´Îyʝ뛣«ąV4c„°ŐŠÄ…0$cęĽí„ň.ámĘ›wS<&BĎ’8Ńb<(…sčŁT)Ći›ą’Ĺ]EńŔX|H!_Tý‘Ęťô”z18{oŠÁµ…Iľj¶¨¨ăNö÷7’›ş§IşQׂżĺp§śqĎręŐ›đěç˙5óď\âAšk‘a¶‡g˝Mvă@’|6ÁŤsĂç-,2çOń\Ú…üń'.?PKł„ANPKٸZ:ź.Ä++mimetypePKٸZ:QConfigurations2/statusbar/PKٸZ:'‰Configurations2/accelerator/current.xmlPKٸZ:ŕConfigurations2/floater/PKٸZ:Configurations2/popupmenu/PKٸZ:NConfigurations2/progressbar/PKٸZ:Configurations2/menubar/PKٸZ:ľConfigurations2/toolbar/PKٸZ:ôConfigurations2/images/Bitmaps/PKٸZ:)ô–¦ÚőR 1content.xmlPKٸZ:ZČrÖE D styles.xmlPKٸZ:¦ďOPPŤmeta.xmlPKٸZ:[żó gVThumbnails/thumbnail.pngPKٸZ:Şxv{Š?# °*settings.xmlPKٸZ:ł„ANt0META-INF/manifest.xmlPKîř1doxia-1.1.4/src/site/resources/0000755000175000017500000000000011632765552016340 5ustar twernertwernerdoxia-1.1.4/src/site/resources/images/0000755000175000017500000000000011632765552017605 5ustar twernertwernerdoxia-1.1.4/src/site/resources/images/doxia-deps.png0000644000175000017500000006335211152041612022336 0ustar twernertwerner‰PNG  IHDR‡žć%«,sRGB®ÎébKGDůC» pHYsĹĹGlě˙tIMEŮ*>ŠÜZ IDATxÚěÝw|Őţ˙ńצ@ĐB‘"ÍĐ›TQÁëĄw•˘ŇCű˘Ô+ RĂO(EŠ€p•"5ôb¨RB@úĄ !Ůß!c6 aHy?lffgÎ9ó™3ź9;;k2›ÍHÖg2™t°Ë31›Í&µ‚HÖg§&É>ö)?”ÔńóU^(’]ب DDDDDɡ(9%‡""""˘äPDDDD”Š’C‘ÍĎ×”îŹ}yŰ%‡"""""z¶Hfه™‹HzŇȡ4r("V‹»Ďm殇,źŇźť˙]€Ťťő[÷ˇEĎ1ÜżsĹ?"xëZěě(_·íMĂÉ5§±ŽW°yůLÎź8ŔĂprĺ-@Ĺ×[Ҳ÷Xî\żĚČ•"_á|ľňd˘íűżSś—Î2fĺI< — 2ü?Ďý‚ýë—qűÉ•·UßěŔŰŚŔŢÁ)QąGţĚň)ý9„˝Ł3Ż5ú7ďőýGgW«ë>}G8‹'ôfßúeŘ98ňjí·ů×'“Č•·@˛ďK8Ú—Ôô;×/óă78Ľýg>¸ŹWńr4éçŽí3–ąqůëÇzdźN˙ “Ťĺ‡#“ýęs˙Î Ł|[śŤ9&šŽţs¬ŻűÄ>­ťo¬c÷/ 9}h;ĂŔ%gîT·iÄý0ţóAţwáŚ1íü‰FbhŤ´¨ź>V‘ =˛‡KţdzĐZôŔâ ˝±±µeĚŹ'ľ#śf=FđçÖµĆű6.ů €öCf2}G83‚"ř,ŕ‚·Ĺ.W÷_=ŘůówŰÜýËBę˝× €ő 'sîŘ>Š•«ĆđĹ™µ;ŠŃËŽR˘bmŽďŮŔŽ5‰ĘýRŃR|ľň$Ów„óVwţ±*Eu?Ľýg>ůf3vF2(p^ŢܸĘú…“ź©M7,šĘ˙.śÁĂË›A;±3’Ďćl&·g!«×‘őQr(")ÖnČ •,Ź˝ Ű÷ *ň†żh)ěťiŇi €1’đÍÖ»ĚŢw™*ě^·_dÉÄ><¸w€ŠŻ·$gžüě[ż”GQ~ĹľőËp÷,H…şÍŘż~Ś[Bá—+bckGź2t=ß"™ŚŻí ix)‰˝Ł3Ť:ô‹-_ŘÍŐ˝ý™”­Ů;{Š—ŻI§ÇŁr˙XůLm÷ţNţs(^ľ&vöĽ\ą‡[?ę—őŃÇĘ"YśÉdJóݶ)UÉxíäâfĽö*^ÖxťÔ}nw®_fFżćś;ľ?Ń<ł9¶¶vöÔz§;ëćŤ'xŰZ*7řG‚Öq˙Î šő…Ťml·uőü)ü[ř$YĆ‹§'šćUĽśńÚ%gžŘíĆÄ$ůÜŔ¤ľ\¦z‹żKT¬ `ńqpj\9÷Wěú*Ő±ţrĺzVŻ#ąúĄe,™Íf=dQ$ ÓȡHJ“úg6›Mi}2·wtNşC±±Mö}?LúsÇ÷ăY¸Ť;~F—Qó˝ěh˘ĺę´ęÉƆť˙]ÄŽÚŘŘR§ĺ‡ń’É䓞¸‘H‹«a{‡ř핺NÓÎňš:ćqňezJÝă’_€G#“[0á~µţj? ę÷”:ĚfłéI±¦ŁP$kĐȡH&M“:qgôrÝőpËť€K!˙$‡ŃŹ˘°µłÇĂË›2Ő›pdÇ:ÎŮMđÖµT¨×wςƲĽązî/Ć­ ĹŁ@Ńg.›µĎ ŢI)ßúĆß§n @±ŇOÚWÍf"î‡áś#ô¨¦gá’\:s„3ńJŐ†Ćô3e¸ýř¤X{R‚¨‘F‘ĚE#‡"< Ln40ţżLQb‹ytçŻD=Śŕü‰ĚŢÁvËx]ď_=‰‰~Ä„®Ő‰za|%NĄú­ëßžó'ý°WřńëřůšŇłAşÔaáŘś=˛›čGQś:¸ŤEăbż@S卤żUě–Ű€í«ż%ňÁ}.…eŃ„^‰–ómÜ€Eă{ë9Ľ‹Eă{fšxM*.5Ň(’ůhäP$%‚IťlłR+Ľţ»YČĽ‘ť™7˛s˘ůçO lͦĽZ§îžą}í"ž…KđJŐFË6í:„C›Ws&8±_łçŕäÂżűMN—:¸ĺÉĎ„®Ő-¦-ăKý6}’\ľâë-Ůş2€_ `ĹWŚ:ĆרCöüş+ˇ'­?łKÉHŁFE^<ŤŠĽ D0«Ś¦DŰÓđmŇGgWěśđ.[•Ç/ĄyŹŃlZ:íźÎÉĆ–Ú-? Î»~‰îˇsΑ‹ÁA4lߏE±±µĂ5g*ľŢ’!ówQ8Ţ—fŇŇGS~âŐÚockgŹ»gAštH˙Ů›,şß{ý&Sď˝^¸ćňŔŢÁ‰r5ߤ󹉖stvĺł9›©Ů˘9ÜóbkgOˇ—+Đ}Ě÷O\fO5Ę(’ĎQfłŽ9‘ôLźtR|eŃoň¦Ţ“~é$˝Ý¸|ŽaÍ˝ÉëUڱkB^hý_ä‹îgy~4r(’†'/kFu2“¤|R× ?_[VĚ"<ě11Ń\>{ś˙× Hü›ěF÷3ŠxđďLÝ.""/˛ďÉ ý›ú`%‡"VkŮr&•+ˇ†Čćžö‘±>R‘ěJ_H‘ ~OűG;üôÓźjX‘ Ö7gÇ2fT9ItRѨˇ(9+ĹÝĂÍÇ˙@Îśź’'O?FŽ\ŔŤ÷iŰö˙áęú1ąs÷ŁK—y„…EX¬cĹŠ4h0w÷ľ88ô¦hѡ|úéRîÝ‹äÔ©kŘŘôäĺ—G$ąýâĹý±±éÉéÓ׸w/’!CVâă㏣ăGx{Ăß5QI–űđá‹4nü®®“7ozőZÄýű‘VŐýĘ•0şw_@ŢĽýqvîC‡sąw/é÷ŢľNßľË(RdQÇţý—sçÎÚ·˙“ÉŹďżßeńľĹ‹÷`2ůŃşő‹r[Ű~Öěż„mbm™SRż¤ÄÄ9r ĄJŤÄŃń#ÜÜ>ˇFŤ‰|űívXJE}°Uő~đ ŠnÝŕęú1yňôŁS§@._ľcŐ{­™~ůň:u $Ož~8:~ÄkŻŤĺ‡ö&ZöI?Ë9ĆÚľÝÚ¶Đ=‡ĎÖ9ę_2˙b›(ŔřsŹuŚ×q˙ćÍëb®RĹ;Ńô®]kď>ü­DóăţuęTÝl64xĹ ‚[l{ÇŽAfŔܸqiłŮ`~đ`şŮ×·h’ëjÔ¨´9:zv˘r{x¸&ZöĂëXl'©·nM5űřäMôŢfÍĘŻă–˝}ű+s™2’,׫Ż4‡…}mľukŞąPˇÜć\ąśÍçÎŤ7›ÍćsçĆ›sĺr6,čnľysŞEąSŇ~ÉýKę}Ö–9%őKŞě6ybŮ'Oţw’eŐ1ř|ŽńÄ1ˇvÉýmrÇpvëă–íŢ˝V˘÷{{{}fR}OÂżź4ýÎťŻÍĹ‹ç{bű$·Îg­_JúvkŰâIő~RűęüçźFSiĎžPţüsLgĚôî˝[[NśCxřtFŤjŔÚµ˙ÜăöŐW9ł=ááÓ‰Á|öxą`zö¬ Ŕwßí´ŘćÂ…»čŐ«“'ŻgßľsT«Vڇ5‹ŁGGS»v 6l8N`ŕŽDĺ.Uę%NžüśđđéřűżŔŞUźZß/ż\OHČuJ”đd÷îˇDFÎ`Ë–_H´ě¤IżqěŘe||ň4ČČlß>ooľČ„ żâîî‚] ‹ sçyDGÇWřóçw%wn—$ËaMű%1`ń:îokĘś’ú%eÎśmüúë'DFÎŕîÝo9ł=Ó¦mŇA•AF5š¨>8#öÁq~ţů0ëÖĹö!;vÄö;ˇˇ7’lٲ"ůóçdéŇ}<|ř€¨¨h–-ŰGÁ‚î4o^€eËö°dÉT¬X;;Ę”)Ŕüů]-:˛ř¦MkKÉ’ž8;ŰÓŻ_#nŢĽ˙Ôú®^}€€€T­ęŤuë–dÖ¬‰–]µ*nŮŽÔ¨áµj'  #+WĆv ĽBż~ ٲĺ$µk˙‡Í›OňÉ' hÔ¨ôËaMűĄ†µeNé˛ńĺČáŔ”)>}3׮ݥWŻzÍś=;N•úŕ§š9ł=M›–ĹÁÁŽš5‹3gN§dűť”[Çś9ť¨Ył8vÔ«÷2sćt´z©­_júöôl‹ěNßVNĄJ•ŠŻÝÜśŚ×eËzŻ]]˝ďňĺ;4o>ýűĎ%5‚€˝˝-Ý»×büřu¬]ĚżţU™uëŽpăĆ}FŤj†ť]lNęÔU||ü“,ăáĂM+WîźňĺÉ;:»Ý¤îÍY‹»ż¦FŤâóëÖ-™č=gĎ^ V­ÓëÔ)i1`ܸV¬_ś]»B(S¦&´J¶Ý­iż§Ő%)))sJ–µ}}ŹîÝđűďÇřý÷cŚńţţoŃ·oC\\tP‰¨~jżŐ¤I‹żk׎í‡Îśůß3·é_]yÜ—Yömőę˝lő:R[?kűöçŐ9”Tqv¶Orş­mňMúńÇ?°˙9J”đäłĎ3o^Žťhą=ę`ccbÁ‚ťĆ¨­­ ~XÇX&î€{’¤®¶ěâ%PÖzwl&cbb’݆5ĺ±¶ýR*%eNmýÚ¶­ÂĹ‹“ ěB­ZĹ ż˙j ĚěŮ[uP˝@q%ë#eőÁµ6Ftěl’ěwlmMÖÄąń:2ňŃSűűÔ”3µőKMßţ,m!O‰35ÁóőŰoG Dľ|n=zÉŤ˝˝-ŢŢ4iR†u뎰{÷YÖ® ¦E‹ ,čn,ëííÁ_]%4tE‹z¤Á ňÉ#k%Kzrôč%¶n=EÓ¦eŤé»v…$Z¶X±Ľś8q…íŰOÓ¸ń?oß~Ú(wśaĂVqřđEŞTńfďŢP†]ĹÔ©­źąýRú|«””9%Ë&”;· ÝşŐ¤[·šěÝĘŹ?`âÄßčß™q꓍~’ť;C¨_ż”ń÷Ö­§(]ş@˛Ţfł™°°rĺr’Ő,YŇ“#G.t†† _1¦ťIŁ‹°€gŢ/ĎÚbŤ>gqWRżţz”(8O‡sŤů·n…Ż{ö¬ÇŁG1TŻ>(ă&č8­ZU }űą8pžGŹb¸r%ŚÄdňŁA)iVîvíŞŕç·­[OÍž=ˇřů-L´lË–—!;w†MPĐzö\@łfĺŘ´éS§n¤víěŘ1şuKňőכشéDš´ßÓÖqňäŐ—9ĄËĆWĽ¸?&“łfmáîÝ*T(D… …]m§cě™őďÉ˙ÔFÖµ‘úŕÓ˙3˘ąÝ»ĎͶm§Ś~'®ŹNЧgl˛őí·Űą?’ŁG/ѫעD˵níű¸Ţ‹ŚměÚbl#Łě—gi ±r<é#2ůç„˙j'„W@ÖNďÔ)0É›”ă¬[÷‰12CѢCąxń6%Jxrňä‹aú;wP˝úNś¸’h=..lß>J• §ŞÜ EF>˘FŤ ‰~“¸]»*,Y˛×b·o‡S­Ú‹ä+ţ•éîÝC1™ |ů1Üąó€?˙i|ˬB…1äĚéĚáĂ#qwwy¦ö{’üůpíÚ]Šő 4tśUeŽűµµË&,{@ŔÖ'v˛-ZTŕ§źz'Ú7iů1§Éd2ěÓń.©ăçkJ÷ŹÝö·I/“=űŕ¸ĺjŐ*ÎŽ–#yľľEٶm NNöI®łgĎEX޺ҴiY~ýő¨Ĺr÷ďGâë;.Éú$ýK¸Ťg­_Jö‹µmaí¶ÓŁżŐȡ¤Č´imiÓĆWWGśśě©ZŐ›ĄK?dôčćŹç˙óH[[>ř öă»:‰îßȕ˙  ÁôíۢE=°łł!OWZ¶¬Č®]CŚN)-8:Ú±yózőŞGľ|n8:ÚŃşµŻń ÝřÜÝ] Lź>ő)XĐ;; Ęͧź6d×®!äÎíBďŢ‹ůűď[L›ÖÎřÖŰŰiÓÚqáÂ-z÷^üĚí÷$_ÝźĽŘŮŮeu™SRż$O®~u™;·3•+ÁÉÉ''{Ę•óbȦ,XĐU‡úŕ§úé§ŹxűíW±··Ą`Awl¦MýŤÄ0)“'żGŻ^őđđpĹÉÉž7ß,ÇÜąť-çęęČć͟ѭ[MňćÍ˝˝-*âűď»$»Ťçą_žĄ-D#‡ĎíJV$}bO#‡’qd”‘ĂěÜŔ‹ů˝ŕsçnŕí=ŚbĹň26K¶…F-iäPDDDpsűĸ/úÖ­p˘Łc8~ü2Ýş-?âF˛.}[YDDDčÔ©:łfmˇwďʼnníÉ—ĎŤQŁš«‘”ŠHv1mZ[^~9? îćřńËDF>˘PˇÜ4mZ–áĂßJŃĎčIć¦{źÖ@şF^XěéžCÉ8tϡ¨żÍ>tϡdę„ĹĎ×”í¶-"˘äPDDDD”Š’CyAôme+Ä=pSD2¦Čđ{,ß“C[~ÂÁÉ… u[đNŻĎÉéń’±LřÝŰüwÎhlZIŘŤ+äĘ[€Ę ţEłŁpΑËb})Y6ľ_ `Çš@jµčÎ{}żÔŽQ+’9ŹC}[Y$»śtłŢ·•ăľRľN3‚·ý×b^Ţ‚> _tçąxpď»×ärȱDë(XâUîŔÉĹ Ŕęeă¶צ˧~ƆESđ.[•ţł6âč’#˵µľÍ)’=čceÉôÎ˙u~ł62cg$Č[ЇëCřýűŘѻ߾›Äĺcä-čĂŕŔ fěŚdĐÜíxxysńôa~ť?ÁXWJ–Ťł|J6,š‚—OY>™¶.Ë%†"˘äPD$Séä?‡WŞ4ŔÎŢźň5ččű¬ĽC¬˛řżŁ>ĺk`gď@ń µč8,vą›VëJɲ˦ôcĂ⩸äĚͧ3~Ç5gíQr("ň"•ň­ońw‰ µ¸vá4×/žµ§dĄ:±ó/ť5¦ĄdY€Ť‹żŕÁÝŰÜ˝uM;CD”ŠĽp&Ë[áâµŤýÎť™¤ďµŚ‰‰I4-%Ë4lß'Ěf3kfŹÔľ%‡""/ZčŃ˝źÜżĎÂ%ČëU €Ó‡¶[,÷·GocZJ–hÝ*ÍzŚ xëZBŹíŐ%‡""/Ň÷źŔŮ#»yő“ű7łplěăP*7z€ŠŻ·`Ḟ„ď$úQg‚X4ľ'űmç8)Y6Năý)XâUÖ̡""™še#’]ö,ü(›ŞMŰłç×Ĺó —ŞÄŕŔŘ;:~÷6şTăęů“‰ÖáY¤$CçďĆ%gn«—Mř(›ŕťLzżfł™As·S<Á=‹Yˇ­ő(‘ěA#‡"’éu@•7ÚaďŕDÎ<ů©ßćcĚŮŚ˝Ł3.nî žDýÖ}p÷,Ť­ą= Ѱݧ ™żËH Sşl|>ĺkP§U~ŇčˇdćÁŤŠd“= ŽĘóŁ‘C‘ěC#‡""""˘äPDDDD”Š’CQr(""""JEDDDDɡ(9‘´˘‡`‹d—ÝdŇÁ.ĎDÁQr("’­’g%?""úXYDDDD”Š’CQr(""""JEDDDDɡHň¬}¬Ź˙#"Ů‘ťš@D” *‰Ł‘CÉv¬}žˇž{("JEDDDDɡ’Cɶžö‘±>R%‡""""˘äPM "bIن"˘äPDDI (9%‡""Ź%=Ôh˘(9Qr(""""JEDű(Y)‹(9‘xL€YÍ """"v—.)?ÉLúXYDDDDţˇäPDDDD”Š’CQr(""""JEDDDDɡ(9%‡""""’Vě2KA˝ĽLÚ[ŮLz˙rŹbJń¤xĹ’dĺXĘňÉ!@Ŕ>ýĚ_váçkRL‰âIK˘Xzô±˛(9%‡""""˘äPDDDD”Š’CQráůůšRőŐőÔľďEřűŻÚŃŠ›,ËŠˇ·żR˛Ý´îsŁY3ćn]»Ŕěďňi˝\ô©éĚŞéC'JĺyůYKľčPY !"ęs$C Ţ‘¬"â~Q#¸sý˛%vjI+nůIŤ "ęs$Ă9@żYyůµzD?ŠRŁ(9‘ě*.,ĺ[“É„Ť­%Ůćcĺ¸ű˘EńäŹů´nNú5ČĂšŮ#¸ç˙oX[>®íJżúą™7Ş ÷Ă,Ö~÷6Ë&÷eČŰEč]ݡ͊˛|JÜ»c±\ŘŤ+,Óťţ óҧ¦3s‡w 2üŢËdíôř"Ăď±rÚü[řđQ G†5÷főL˘FXÝ&6®`JĎô}ÝݨĎŇ/?µ(k\Y˘"°ŕ˙şĹ¶O<Žěd1,żĽYé^ŚŚ7Ď3Ď7ßú·ÇĎ×Ä®_ľ·ľç×Ĺřůš3¤uŠŹkŰŕÖŐż™7Ş ź5ĘGďęŚi[>QYCY'†"Âď2odg>©ëĆŔ&/±lJ?˘"$Űç¤E{«ßĘZç»řëďYĹĆŘfvŹ“äd»‘Ă%“ú°mĺăďźżýśĽ}ز|&ˇÇöđ0"ś]?‡ŤŤ ]FÍŕÁ˝;Lzż—CŽď˝yĺ<Oĺřž Ü“‹áwo3±{-®_ ±čřŇ2¨˘F0ąg}ÎŰgL»qůëÇzdźN˙ “Mňy˙OłFđËÜ/,¦ÝĽržM?|CxŘ-şŤůβÝ&ö!hí|Ł}v˙˛Ó‡¶3|á\rćVÜd¸i?d&§nă‡Iórĺzäy©7Żśgń„޸{¤ă°ă¤bM]¬m€°›WߥšĹÉĹÓ‡™7˛31ŃŃÔlŢU1”…b(Îś!­9ô«‘ l\ü1ŹŃvĐ´tkoő[Yď|§8ŃČáS…ŮĂ%2=č-zŽ`ń„ŢŘŘÚ2ćÇLßNłŁřsëZă}ż}7‰Ë!ÇČ[ЇÁAĚŘÉ ąŰńđňćâéĂü:ëż˙’ëCđ,\‚ˇ v3cg$ćlá©ŕ4«Ăú…“9wlĹĘUcřâĚÚĹčeG)Q±6Ç÷l`ÇšŔ§®că’ŻŚÎzúŽpfEđYŔo[›hůĂŰć“oÖĹÖ;p^ŢܸĘú…“ˉŘgÎr?ݏ7wşţß"î‡Ĺ&e1ŃĆŐt×ŃóŤ‹këbmŰü¶`w®_¦h_>_y’o¶ŢĄN«X8V1”Ĺb(ν[˙cô˛Ł|łí Ú~ŔÁ?VZŐ礶˝Őoe˝ó]r±˘8Qr@»!3(T˛<öN4lß7öĘ$ň†żh)ěťiŇi 1¬çĐ«čč€OůŘŮ;PĽB-ăJ÷ŕ¦ŘëĐćŐt€wŮŞŘŮ;P˛r]: ť•fuŘż~Ś[Bá—+bckGź2t;˛·ű—…O]Ç7[ď2{o Ţeް{Ý"V|=%űWŤI]ń—­Ů4¶ŢĺkŇÉŽEG­¸ÉqóJ•4lߏ“¶đź÷ksr˙f´ý„ŇUýSg+ëbmŰÄ]ś´8 Ď"%qtÉAG˙9ě3óůŞSЎ,CFż3t|ĘŕčěJłc?fë IDATsăJş¶·ú­¬sŠ“”Ëv+)UÉx÷‘€Wń˛ĆkGg×Dď»~ń,%*Ô˛^˛RťŘů—bç_»p€âĺk$X®nšŐáęůŘ“ˇ ź$ç_<} Éű8â®î\żĚŚ~Í9w|˘eĚćÄŁ~eŞ7±ř»DĹÚüďÂĹMŠ›äb&N«ŹĆq|÷zBOZ}<Ábľµu±¶mn<~?(†˛n Ĺ)T˘ĽńÚ5—Gl˙“®í­~+ëťď'JźĘŢŃ9Éé66ÉsÉLŇA“°ŁzśX%L°lí쟼nł“)6°=Ś|jĚćä;ǤFţúaŇÇś;ľĎÂ%¨P*—ŁXŮŞŚn]6éö±łK˛Ţ&[ĹÍ ›”ĆLZĹMB&LImČŞşXÝ6&“b(;ĹPÜ ĘÁńą··ú­¬wľSś(9L7y˝Šq%ô§m§tµĆĆôÓ‡¶ŕQŔĎÂ%ąr”S¶R¶fScą#»’8ß™0›ÍDÜĂ9G.‹« äxđćęąż·6ŹEź¸\rWMGwýŔ Ŕ ÜrçŕRČQc~ôŁ(‹<$x'Ą|ëź:¸€ĹJ+8žcܤ6fR7OłjĆ0.ž>Św™*„ŰËŞéCiÝŞ1ßÚşXŰ6yňćÚß§ąp:ď2UCY<†Dç»´<ßIĘéR¬Tńő–,דŕťD?ŠâLp‹Ć÷ |ťfTiÚîńr~ś:°•čGQ„Ýñ~‰Öé–Ű€í«ż%ňÁ}.…eŃ„^O-KĄú­ëßžó'ý°WřńëřůšŇłŐWëGwţJÔĂÎź8ŔÜáŚůáa·,–_8¶gŹě&úQ§ncѸŘzWyŁťĹÁpőüIL:ĹMjc&­âćÄŢMl\<•k3(p%+×eÓ’Ż9±w“±Śµu±¶mĘŐz €e_öĺć•ó<Śgɤ>řůšŃޤb(‹ĹŐŁŽęstľł"ćD#‡éćŤ.9¸i%WĎźdb÷šó<‹”ä­îţ4é8€äďżňeŹz˙ś0ßhÇŐs%:·® `ĹWXńŐ‹«Ż'iÚu‡6ŻćLpc;ľf1ĎÁÉ…÷›üÔuTxýv˙˛y#;3odçDóĎź8`Q·<ů™ĐµşĹ2EËřRżMăďąóq÷ć5Fľ[ ŹE·6Tq“Ćq“ÚI‹¸ ż{›ůŁ»âčâF÷1ßckgO·Ń Ó®óGuaäŇø¸ą[]kŰŕÍnCŮ·~g‚ÚĚrô Ů‡ŁCY,†¬Ą>Gç;kÎw˘‘ĂtăâćÎŕyAÔoÝwĎ‚ŘŘÚ‘Űł Ű}Ęů»ŚG0Ř982`Îfę˝× ·Üů°spÄ·qk:ú$Zç{ý&Sď˝^¸ćňŔŢÁ‰r5ߤóąO-‹sŽ\  ˘aűľx(ŠŤ­®9óPńő– ™ż‹ÂVÜ´ßvŕ4|›´ÁŃŮ{'ĽËVĺĂńKiŢc4›–Z>GěŁ)?ńjí·±µłÇÝł M:¤˙ěMŘ;8Ë´đ5y ú`ckG”•÷0)nR7©Ť™´›Ĺzsëęß´4 /o<ĽĽi7h·®]`ń„Ţ)Ş‹µmÓă%†Ěۉo“6¸¸ącgď@ŃŇŻá7q9ŐŢę¨Ęb1d-ő9:ßÎÄ_RËČL€ůŇĄŚ˙Y˝——I÷Ľqß{Ţmďçk"˝ăR1•˝âXń$Š%Én±”ÚřÓȡ”Š’CILßV–déľ‘ěE#‡""""˘äPDDDD”Š’C±F¦z¶d/ĎăAł˘xR<‰bI˛j,Ą6ţ2Mr(""""éźęce1(9%‡""""˘äPDDDD”Š’CQr(""""JEDDDDɡ¤;5%ýl‘dVá—Žtü(Ţk’ű6%‡BŔ>˘d.~ľ&?’íâM±¦X“ôˇŹ•EDDDDɡ(9%‡""""˘äPDDDD”ŠHęčQ6™TÜ×űSú(‡Ôľ/ŁşuíK˙ó Ç÷l$:ę!Q#˛Tý$űC˙uÂĄ*Ąiť¬-kVëci»Î´MÉ\4r(™ZŕđŽüc÷ĂŚÄP$ł™ůYKľčPY !ŠMÉ4r(™Ú™ŕ úÍÚČËŻŐŁWU…´d>nů)MÖ“Ú‘&ŤJzǦ(9yn˘EPĘ·>&“ž¤/""ň¬ô±r*řůšđó5ý(Š&}̧usŇŻAÖĚ Ŕý;7řĂÚňqmWúŐĎÍĽQ]¸f±Žđ»·Y6ą/CŢ.Bďę mV”ĺSúóŕŢ‹ĺÂn\aÁîôo—>5ť™;Ľ‘á÷’,Ď“Ęů4‘á÷X9mţ-|ř¨†#Ăš{łz¦Š>¦˝uőoćŤęÂgŤňŃ»şcÚ–g×/ß§ŞÎqĺľxú0_őnĚǵ]éß0/‹Ć÷"ňÁ}‹ĺâô¬b“˘6xŇtkÚÂÚňĄ¤mŇbčĘśÇPüőÇmĎĎ×Ä„®Ő-–;ľg~ľ&ö­_f1}X‹b±Ó_jUyW|5€~ ň°â«)®§b,s÷Ó ظ‚)=Đ÷uwŁ~KżüÔ({R±™’2}ëß?_S˘ţnĎŻ‹ńó51gHk%”FźÁ’I}ضrŽń÷Ďß~NŢ‚>lY>“Đc{xήźżĂĆƆ.ŁćđŕŢ&˝_‹Ë!ÇŚ÷ŢĽrž ‹§r|ĎîŔÉō𻷙ؽ×/†XT ;°gő0‚É=ësîŘ>cÚŤËçX8ŽĐ#{řtúol’ż†»y•ń]ŞqçúecÚĹÓ‡™7˛31ŃŃÔlŢŐę:Ç7ŮŻ>÷ďÜ0Úq돳1ÇDÓŃNşěĎ”¶…5峦mŇbčĘÜÇPRÎßOdř=]r°ď÷Ąěß°ßƱ'Ő»7ŻqăR(vŽ”«ýÖS׹|ęglX4ď˛UiŢc´úélc?ÍÁ/sż°vóĘy6ýđ áa·č6ć»g.Sű!39}p?Lú—+×#ĎKE¸yĺ<‹'ôĆÝł ‡(‘ĐČaÖzd#–üÉô ´č9€ĹzcckËO0}G8ÍzŚŕĎ­kŤ÷ýöÝ$.‡#oA1cg$ćnÇĂË›‹§óëü ¬˙ţK®_ Áłp †.ŘÍŚť‘ ł… §‚Ó¬ëNćܱ}+WŤá‹2kwŁ—ĄDĹÚßłkźşŽßLâÎőË-ăËç+OňÍÖ»Ôiő!ëǦ¨Îń˝T´źŻ<ÉôáĽŐÝ€¬2ćÇżO*`źů™ď›Ji[<­|Ö¶MZěC™÷J*Ž}^­NLô#NÚÄŢ>qpÓJL66Ůń #Â8{d7Ą«6Jtq•(1śŇź ‹¦ŕĺS–O¦­3’NőÓŮŁźNhă’Żh?d&Ów„3#(‚Ďţ xŰÚ§ö±Ö”ÉĹÍť®˙·€űa±Ä1ŃĆm×ŃóqÉ™[‰„’ì§Ý*Y{'¶ď{5ů€ĂČ_´öŽÎ4é4Ŕa8ô8čč€OůŘŮ;PĽB-ă*ęক±Ëm^ @‡ax—­Šť˝%+ץĂĐYiV‡ýŹ?˘ú`Ü ż\[; ř”ˇëčůěţeáS×qxűĎ´8 Ď"%qtÉAG˙9ě3óůŞS)Şs|mĹ®ĎŢŃ™FúŶcŘÍtŰź)m kĘgMۤĹ>Đ1”ąŹˇ„|·ŕŻ}±'ëă»×s?ě&µßyź‡áF\Ĺ%‡•ę·Jv}˦ôcĂ⩸äĚͧ3~Ç5gőÓŮ<ĆľŮz—Ů{cđ.S…Ýë±âë,™ŘÇ5M«2˝RĄ Ű÷ăä-üçýڜܿ™m?ˇtŐFJ"20}¬ü ŠÄ{îSü«vŻâeŤ×ŽÎ®‰ŢwýâYJT¨e1˝dĄ:±ó/ĹÎżvá4ĹË×H°\Ý4«ĂŐó± Š ź$ç_<}8Éűaâ_AŢx\Ţ"É<ËÚ:ÇçUĽśńÚĺńÉĚ“nűÓš¶Hiů¬i›”nWÇPÖ;†z­ŃżY>µż‘îý})öŽÎĽÓ{,;˙»€ý–óZŁsöČnL66”ŻŰ"ůQ˘Ĺ±ŁDîŢćî­k¸çóR?ťÍcěÎőËĚčלsÇ÷'šg6›Ó¤LqZ}4Žă»×rx|ĘĐęă J 4ruŮ;:'ݨ6¶ÉľĎLŇ^LÂÄçńšđ@µµłOz˝ń–{ô0ŇŞ:ÍÉ'[Ö\AbĹ·„­®sü+{‡x›x¶›ĺ­i›”¶…U峦mŇbčĘÜÇPîž)^ˇź8ČÝ›×8´y5Ą«5Â-w>JTŞĂáí?~ŹĐc{)Q±6nąó%»ľ†íűâŕä‚Ůl6ľˇ~:{ÇŘ“>ćÜńýx.A㎟ŃeÔ5ue2ˇ§Jd9|ňzăJč NÚNéjŤŤé§mŔŁ€7ž…Kr)ä(§lĄlͦĆr!Gv%Č?LÍf"î‡áś#WŠF›< xsőÜ_Ś[ŠG˘©ŞOžü…ąö÷i.śĆ»L•gŞsZKIۤE[¤¦mŇc»:†2×1”ß&m8}h;ż.HÄý0Ę×nŔ«µßćÄžŤ¬ Ĺ{w¨T˙ݧ®«u˙©äĘ[€•ß &xëZBŹí}bV’CQr(""""JEDDDDɡ(9%‡""""˘äPDDDD”Š’CIsv©}Ł~×R$ýYűÓ–:ŠIM|(6išěÓo2‹¤?_“ŽGy¦P|(>’šŘĐÇĘ""""˘äPDDDD”Š’CQr(""""Jňó5Ąę[\©}ßó.gF¬ËóŢö‹Şß‹lW·/~üý×Á$§ßşvŮßĺÓząčSÓ™UÓ‡j‡fÂ>;©ő=iź?ʏ’ĚyÎĎŚýFEDRaćg-ů˘Cĺ$çďČÁ?Vq?ڍ‡Üą~Y –Ĺ÷yfÚ†<_™±?°Ón“¬@Ďé’çíĎ-?=qŢ™ŕ úÍÚČËŻŐ#úQ”, ô+ÉíóçW’9eĆţ@ɡH‹ëüKůÖÇd2aă`«FQiútOă>żźąë!˧ôgç`cgGýÖ}hŃs ÷ďÜ`ńÄŹŢş;{Ę×mA»AÓprÍi¬#üîmţ;g46­$ěĆrĺ-@ĺ˙˘YŹQ8çČe,vă «f ăĎ-kxřŕ>•ĽKÇaI–'áᓦ'~Źźç~Áţő˸ýż‹äĘ[€ŞovŕíF`ďŕdU›XSΔÔűÖŐżY=s8GvüÂ{wxÉűštHő·:%YţEă{rhËO88ąPˇn Ţéő99=^JńvSşl|+ľŔŽ5ÔjŃť÷ú~™l{™cbX;g4ű~_ʍˡŘÚ;P°x9j˝ó>µ[~äţ{Ö¸‹{˙ôá,žĐ›}ë—açŕČ«µßć_źL"WŢé'/Ęó­ťo,·ű—…ś>´ťá ŕ’3wşĹIFŢÇlJއyĚq;Ą?áwoáîY0[Śv¤f˙g¤}˙<ŹEk¶Ó~ČLNÜĆ“>ćĺĘőČóRn^9Ďâ ˝q÷,HÇaÉavŚź¬xÎOJjĎťĎÓs;C…ŮĂ%2=č-zŽ`ń„ŢŘŘÚ2ćÇLßNłŁřsëZă}ż}7‰Ë!ÇČ[ЇÁAĚŘÉ ąŰńđňćâéĂü:ëż˙’ëCđ,\‚ˇ v3cg$ćlá©ŕ4«Ăú…“9wlĹĘUcřâĚÚĹčeG)Q±6Ç÷l`ÇšŔ§ŻĂĘrZ[ďßLâÎőË-ăËç+OňÍÖ»Ôiő!ëÇ&ÚţůżŇoÖFfěŚdp`y úpýbż˙eж›Ňeăź`7,š‚—OY>™¶G—Omł¸ć“iż2cg$ßl˝Kű!3Ř´tZşÄ]śĂŰć“oÖĹÖ-p^ŢܸĘú…“Ó5N2‚ô>fźÇq›–ű˘€O¦í§űď-Fö™ýý¤y™IjöFÚ÷i˝˙“ŰŻÖlÇĹÍť®˙·€űa±ď1ŃĚŐ…űat=—śąłLěčśź|ܤćÜ™e“ĂvCfP¨dyěśhŘľolVů€ĂČ_´öŽÎ4é4€űwnď;ôÇ*:úŕSľvöŻPË:>¸ieěr›WĐaXŢe«bgď@ÉĘué0tVšŐa˙úe|0n …_®Ť­|ĘĐutěČŇî_>uÖ–ÓÚzŢţ3mNĂłHI]rĐŃűĚ|ľęT˘íwňźĂ+U`gď€Oůtô°ŘžµŰMé˛Ë¦ôcĂ⩸äĚͧ3~Ç5g«Ú=.ܰh ›—Mçî­kÔ{ŻűĚŚ[s6]â.Nű!3)[łilÝĘפ“l˘zđŹ•é'AzłĎă¸MË}Ѥ〠KŔ‹Ţ˙iß?ĎcŃÚíĽRĄ Ű÷ăä-üçýڜܿ™m?ˇtŐFŠź,zÎO2HáąóExn+)UÉx¸Ô«xŮ’g×Dď»~1öä_˘B-‹é%+Ő‰ť)vţµ §(^ľF‚ĺę¦Y®žŹM¶ü[ř$9˙âéĂI>#)ţ•µĺ´¶Ţ7˙ż}“SĘ·ľĹßqëŹ+—µŰMé˛;¤~÷6wo]Ă=ź—1/ąv{Żď—,řżîŰő;ÇvýÎOłFđVw¶ď‹“KşÄ]ś2Ő›X¶WĹÚüď™gŠ“Ě ˝ŹŮçqÜZ»/žvÜä÷.Ev’šýź‘ö}ZőŮig­>ÇńÝë 9Ľ‹>ehőńĹO>ç'%ĄçÎ,=rhďčśtl’˙ÖŽ™¤9&&&Á‚ćÇ˙Y.okgźôză-÷ča¤Uu0›c’ť˙ŕŢkVbU9­®·)…ěL°|\9lmíR¶Ý. ÉśŮlfÍě‘VąJ“¶LZw‘.#)^ˇ#ÂY=ÓźÁob돳Ó%îŚĺěě’¬›)™÷§Iśdé~Ě>‡ă6-÷Ev5LíţĎHűţy‹©ÝŽ “â'«źóźő8yA2üŁlňzăJč NÚNéjŤŤé§mŔŁ€7ž…Kr)ä(§lĄlͦĆr!Gv%ČŤLÍf"î‡ß˛v$ÇŁ€7WĎýŸµˇx(šŞúX[Nkëť'a®ý}š §ń.Sĺ©Ű=ş×¸:8ąłQ®”l7ĄË´î?•\y °ň›Áo]Kč±˝F™źvĄĺ’375[tŁf‹n„ŰËŤ?ňŰ‚‰,›Ňźş˙ę™nńĽÓb´őÔÁ­(V:]ă$3KI\¤÷qkíľĐs2łŢľžÇbJ¶łjĆ0.ž>Św™*„ŰËŞéCiÝŞ‚'‹žóźő8yQ2üW&+ľŢ€…ăzĽ“čGQś bŃřŘ„ |ťf±ŁKMŰ=^ÎŹS¶ý(ŠĐŁ{X8ÖĎb}ną=Řľú["ÜçRČQMčeUY*ŐoŔ\˙öś?q€čG„ݸ_ÄĎ×Ä”ž ž> fe9­­wąZo°ě˾ܼrž‡á,™Ô?_#Z•L´ýď?˙€łGvó(ę!'÷o6¶[ąŃ{)ÚnJ—ŤÓ¸C –x€5łFXŐîţďÇĎ×Ä–łżKˇ’(ür…Ř«{‡tŤż…c{pöČn˘Eqęŕ6Ť‹­[•7ÚĄkśdf)‰‹ô>nÓs_ŹÂ_=Rgô ¸ďÓc˙?iź[»ť{7±qńTJT¬Í Ŕ”¬\—MKľćÄŢMŠ«,zÎÖăD#‡OđF—ÁÜ´’«çO2±{MËQ¸"%y«»?{łřŤ?ň÷_ů˛G˝: 7ÚqőÜ_;eëĘV|5€_ °¸ęHNÓ®C8´y5g‚Űń5‹yN.ü»ßä§®ĂÚrZ[ď7» eßúeś bh3Ë+›fŽJ´ý˘e|™ĐµşĹ´ÂĄ*Ńřńă`¬ÝnJ—5®Flíč8,€Iď×âčÎß8óçŠ'¸ď"q bѸž,žĐ›Ĺz[Ě{ąr˝tŤ?·<ůµWŃ2ľÔoÓ']ă$3KI\¤÷q›žű"Gî|Ü˝yŤ‘ď–ÂŁ@QĆ­ ÍöÉaFÚ÷é±˙ź´Ď­ŮNřÝŰĚÝG7şŹů[;{şŤ^Ŕv?Ş #—ĆĹÍ=ŰÇUV;ç?ëq˘‘Ă'pqsgđĽ ę·î»gAllíČíY†í>eČü]Ćłćě0g3őŢë…[î|Ř98â۸µńmÜ8ďő›L˝÷zášË{'ĘŐ|“Î#ćZUçąDĂö}ń(P[;\sćˇâë-2…­řRµĺ´¶Ţ9=^bČĽťř6i‹›;vö-ý~—Sí­Ž‰¶ßqXUŢh‡˝9óä§~›Ź0głqµŰMé˛ńů”ŻAťV=řÉŠŃĂşďúŃyä\ŠĽR{'ěśđ*^ަ]‡Đő˙¤kü}4ĺ'^­ý6¶vö¸{¤Içôź˝)ŮűĎŇ"N2ł”ÄEz·éą/Ú řšĽ}°±µ#ĘĘ{˛şŚ´ďÓc˙?iź[łťĹzsëęß´4 /o<ĽĽi7h·®]0.|ł{\eµsţł'/Š 0_ş”ňűmĽĽLşOG˛¬Śđë~ľ&¬=6u€ť;·đÎ;µ)VĚ_ß"Ě›7=Éu­Ył”ćÍkâăăBÉ’n´jU—ß~ű)Ńr7o^çłĎ> lŮĽ/îJçÎÍ8sćŻdË–’y EGG3wî7ÔŻ_oo'jÔ(Îřńø˙^˘ň·jU—RĄrQ¸°eËćĄ}ű¦mVD‰H¦fősă'Wîîy¸}ű¦Ĺü-Úđß˙.'&&Ćbúřń3éŇĄ—ń÷1={r’Ű8p ýúŤŕÁpŢ|ł 'OłX&á¶/]2'{aRóž´|ĎžmXłfY˘rU¬X…Ő«·áŕŕČüů36ěŁ$ËokkËwßý—úő›*˛DD^ =ËN©oźT}¬\ĄJ-Ž»ÁÔ©óŚikÖ,ĄnÝĆ;vI“ŚéłfýÇx˝mŰ#1,^Ľ;wžaçÎ3/^ €/żĹ®][;÷#1,]ş<{ö„˛wď9ĽĽ §Kc¬ZµŘH ß˙ÎśąOź>C8th/sćL`Ú´ńńęĽsç2}úB väń‹/+˛DDD$ÓJUr8xđ縻çáí·˙•`ú¸»çˇE‹6Ć´Ë—/ŻçÎťfĽ>|"E‹úP´¨ţţ0›ÍF¶nÝ*cŮŃŁ'S¨PQ ,ÂđáÓĄ!~řáźD·wď8;»Đ»÷@cÚO?-b?ꎳqă/ÜĽyťwßíŔĄKf.]2łq㟊*É^Éa±b%puÍa1˝dÉҸąĺ4¦EEEŻ÷ěŮnĽ®V­ŽńşzőşĆë}ű‚8}ú„1­RĄjń^WM—†8rä ńúµ× ăĺe˘LcZ\yjÔ¨gLűú뱼öZ!Ţy§6sćLĺÖ­Š(É~ɡłł &“ÉŞéqîŢ˝cĽÎ™ÓÝxíć–Ëx}çÎ-ÂĂďÓ\\\Ť×9rä´şśŃŃŃV/v;Ůů‘‘Lš@éŇĺŤé111ěݻѣűS­Z16lřYQ%"""Ů+9|’'%…qrĺĘťd˘?1‹[ĆŐŐ-ÉeďÝ KvQQŤ× żeśśřŁ gĎ>0>&Ž˙ Pˇ˘lŘp+ţ [·>Ćý’±e»ËčŃýU"""˘äĐ*řŻwďŢfĽŽ˙qsĺĘŐxĺ•rĆ´÷Ż÷íŰ™h˝ŽĆëř÷ž:uĚę˛Ĺ nÜřźĹşçÍ›żźDë+P Ĺ·Ą“{ÎáŁGŹčŘń-¶n]źh=ÎÎ.¬\ą… |Ůąs íÚ˝ÁÇ‘‰3m,XKÆo)˛DD^ =ËN©oźçţóy'Îföě¨Zµ6NNθ¸¸RĄJ-ćĚYn$†öö,]şž¶m»“3g.\]sPż~SV¬ř#Ń:»uű±c§Q¬XIěííÉźß‹6mş±fÍ«ËeggÇ÷ß˙ĚčŃS(W®NNÎäĚ™‹ĆŤ›łvmń‘xŤőX»6·Ţz—Ľy=±µµ%gNwęŐk²e•Šd` Rß66j‰ŁäPDDDD”Šü˙öî=.Ş2ńăřgÄ+b^ Ôň~ Ë­Ô5WËŐ˛‹xwMŚuM-E͵43µő.ľ’´ĽlTšąf^"SA,‚ŐüyE“Ô/ ‚ĚY‡LÚľď׋—ž™ç\ć §–C©‹˘ ·{_KqĽ‚ľ¶)µŠH…‰E ‹dE¤–CŃ@ …C©8_A_ۇւ¡&"˘ďşÂˇ˘şQ8…@…@Ńöˇp("R DDEDDĘáÁ^Ńö p("˘‡ÂˇÂ č»Żp(""RČA_Q(T8Qůťôleąëá9Ő˙ëeĐŹ Ç®żŇś~YŻ{…CqČ»>wŮ0&SdţkGRA·ˇňP÷ ‡"bWd‚I+ˇś öSĂ–ŘŇ5‡""""˘p("""" ‡""""˘p("""" ‡""""˘p(""e›ÁlÓ%Čţý?—ę·ş˘ě‡Š[ö¶‘K—ţ‰ż˙ŰE¤LŰşj6—ĎźˇQs?ŢX»2čÔ÷%¶DÍřoąfsćřAj×óaBT‹÷f¶bžu˝I=šĚ—+gYM×˧9 c3>ýC¶ŻžËÉ Üßň&ŻÝĎŇ}9L‹>@ă¶üôíb?ŹReüÁ˘Łż`Ýş´mŰgçJ4oîĹĘ•CX˝z]ş<ȸq]ůć›ĂľĂÎť‡3¦ Ýş5ÓJ,Ç6lř€ČČ<ú¨FŁ3ľDF`ýúý6ă,YDŹ-0ťń÷÷eůňA…–U8qPÉ{6đbčBę4l‚«{UF,'2ÁÄŽXĘýđµąĎł‘ř´~g#ľm8ÉÜâ°?f˝Őt»|ÍęTń÷ŰŁ1s š¶Ą’“3^>Í:m%űľX­Ęř9rźË5cC0ŤO6oÉ©–˛3göĄU«zÄǧys/fÍę«XÎť8q€€€ĆVŻwęÔÄę}«ď}÷ćVĂćqŹű­B­;Ý­,"eZÚ/'hř@»"ËťO5—kÜ&Ŕęő&í:™ßż9ť|÷z?`5|î”9hFôö±;ýÔŁÉŞŚ?X^^Ń×ĹĽé źÁ K+‚Âî©Č+âgçJvË:9U¬mF-‡"R¶ó@o˘dŠ‚7LE_SxíŠ:ÜýŁy{{’2ÓrťŮ­ąąK-e'MÚ@rr*:xsŕŔ/zzFp˙ýµŘłç¨ŐëůĂůŰĎ­öî=n5Ľk—ůGałf^ ‡""eE­{púhR‘ĺj×˝€Ł?ě±z=ŘÓË»Čńóßźą)…Č“ÍßŇosUĄúŔü#ŕđás–×úö5·­ 1ńąąyś=›Nhč§ Áté2€CĽűîW6&66ŚÎť›0~ 11‡Šśľ”m}ú´`Ô¨ŐěÝ{śśśÄĹcÔ¨5<őTk›qFŽ\Íľ}'ČÉąÁîÝG,eű÷ď p("RV´ č @ôś±\8{ŠëY™¬›=š`?Sú6±”kűxVĎĹń¤˝ÜČÍáXRkŢ@ëNO9źvOŻQ[Ä©C‰äÝČ%=í,źÎ%ŘĎŔĽQ]TĄčž{ŞđŔSńöž@xx|đ>ââŽńĐC3pqy/ŻPćĚن»»‘ąsźăŇĄL†]Iµj®|řáp\\śXµjŐŞą2dČJ.]Ę,túR¶Mđ$M›ŢËńăçń÷Ł1„€€Ů¤¤¤Ń¤I""zÚŚsď˝ŐčŘqFcť;ĎáÔ© řů5bôč'EDĘŠ?›HuĎű8–Çħń÷Ŕ*ěŚ^lnxéuKą'‡LŕކM9źzś·‡űŇŃČěá¤ý’Bť†Mč9<˘ČůôÎ}Ţr,)ŽâĺG\}Ň‹mÎÁčćÎsăćŞ2JŃüů/ŕăSgçJdg›;¸®QŁ2qq;¶+Ťyâě\‰ZµŞĐ§O[âăĂi×®!!kůůç‹,\ŘßrŃŰŰ“… űsúôEBBÖ:})ŰjÖt'.nŁG?A˝z5qv®DýúĽňJWâăĂíö[¸qăßčŐ«..NÔ«W“ĐĐîÄÄŚÇÍÍĄB­;u‚-"¶;†2Ö vÚ/)¬_ÎÁ˝[ąž•I˝Ć­č14śö]űY•»z9ŤM‘ÓŘżséiç¨áyí»>KŻ—¦RĄz-ŕżť`Űűü™éů÷{Óůáë \ü5•ĘUŞÓ¤}gzŹšN˝Ć­Ę\=;r'Ře˙;¤N°ËŇ6tk§ëŞ{…C)áPďťV…C±ĄN°EDD¤BÓó´­©ĺPDDDDEDDDDáPDDDDEDDD¤8tCŠ”ŠüľăD´ •±ő®N°EÄv‡lĐŽˇ‚PGÍ"˘p("RH VPŃ5‡""""˘p("""" ‡""""˘p(""""ĹŁ®lD¤ÂÉż»°Pn˝[[7©ÂˇH ‰… ‹TD:­,"Nq[Őj(" ‡""""˘p(""""˘p("ÖíN딲(ŠÂˇV5µŠÂˇB (ŠÂˇČM[Őš(" ‡""""" ‡""""˘p("R@ţ©dťRQ8‘[L&“Ö‚Xď í*µ–ŠHAÎZ"bOd‚ňayě§\("¶tZYDDDDEDDDDáPDDDDEDDDDáPDDDDE¤| ö3ÜŃť¶w:ž#~…C)uęçPDĘśňÔŁú“GŁ–C±Pˡ8 S^›–O#aŰG¤ťIÁÉĹH=ß–üĺŻöa)—Ť^~«[ţđÔ%ńńĽńKŠĂŵ2u{Ž~cçŕZąJˇóü䟯űy˝‡ÓoěśŰ.câWź°óă%ś:”Čő¬LjÔö˘íă}č2W÷ŞVËł(6“µłBHŘŤłŃ•V˝xvĚljÔö*ôł(ŠÜ´~Q8Ű>xÇ2ś›sťăÉńOŽ'ëj:ÝŚ/rüąÁOpőr׳2Ůőé2Ly7±ÜnůŹß}•kćáÝâaž9í¶Ë·qéľXń¦ŐkΞ"ć_ ČLżČ°éX˝·îíŃÄmZiYž}_¬ćč{Ľ:÷ęŞpqH:­,"c÷zsłđKďÍfÁ® ‚—óŃÂŰŽ_ŁxcýaĹfŇsxűżŢ`?ÎĎŽ5ó¨ëÓ‚1 ·XZýŠňŐşľ„E±™,ŽËâŐČŻHڽɦ|ňžÍŚY°…Ĺ{ł ‹ŠĹł®7iż¤°}ő\U¶(ŠÜN~@۱f;Ł‘qńWë÷2‘ &f~~â¶ăż¶: ›ŕâZ™nĆp5ý‚Mąčyăرö]Ü«{đĘâmT©^«XË·`WËľËĂ»yömYĂ'óCY÷öh®]ąlS>(| -ü{ŕěbÄ·µ?n¶`î˙z˝*[D–N+‹Ăč7v«ţ1śńŰ8żŤŤK§Đsx]Ćbtsżířu}[Zţď~3đ™ňňlĘ}µÖÜx-ăĄć=u-ďŮës0˙zŔËçϰxÜÓśüé{›2&“í5Í;v·nÜ6€ßNSe‹ĂRˡ8ŚÝ_dö–T†LŤÂ·M׳2ůlIzÖg×§Ën˙k×ĹhůżÁPxÇŇůaÓd2ńů˛©Ĺ^ľÍţ;'úž: ó§Ż2äő÷™} đ¬łőď;AŐPÉI•-"K-‡"âPÜ«{ŕß{ţ˝‡‘rđ;żú”­«Ţ&zŢx:?;ę®ĚăůńďRٶëL i×&R~‡wó@Ńw ß @XTŐ<îŕ—ă˙ ‡7rsprv± OÚË~OX†Źě߀×ýÍTŃ"â°Ôr("#â/ľűř擥defPżI4mcţ%{K«ŕÝđ§ă©×¸ź/ťR¬q [#ěý’śëYś:”ČŠÉ,ďg¦_´*żzĆHNüg7rs8˛7kfšĂm‡'ű«˛EDáPDävžŔÚY!ĽŇą:{Ô•÷"‚hÚţ±»»ósrfŕ¤H önĺŘŹ±·§Íăŕý©í_™âôá-ďź:”hUľZ­{™5´#!ŤĚy©3Ξ˘Qs?žxa´*[DEDn§ó3Á žş‚†¶ÇĹ膋эşľ-é14śˇ˙Xu×ççÓúQ:ő ű0ĽťCâ×ý\+WÁĹč†w‹‡yé­Ź,}$ěnçoó6Ň*°NÎ.Ô¬SŹîCż,Ł›*[D–ÁŢv"RÁw IOě¸seĺ©'Á~L&“A5&"·Rˡ(ŠÂˇAýŠÜeş^SDĘ2µŠÂˇ(ŠÂˇ‡:ÁŰÁ CˇN°EDáPD¤@¬ $"˘ÓĘ""""˘p("""" ‡""ÜţšJÁ`Ę˙ÓÚ‘ŠFOHÄb†F‘Š@-‡"Rá÷ĆÝ "" ‡""""˘p(""""˘p("ÖíN딲(ŠÂˇV5µŠÂˇB (ŠÂˇČM[Őš(" ‡""""" ‡""""˘p("R@ţ©dťRQ8‘[L&“Ö‚#T„Á Š¨ ĘBë”¶GmŹÚď+2g­Ç™ ýbyěgĐö(Ú‹ ‘ŞrÎ`ÖJpp:­,"""" ‡""""˘p("""" ‡""""˘p("""" ‡""""˘p(·ńó˙í/3ó ö3”©n_ı밼mOú~8!X]łÂˇ”MK^íÛڗ›ůHéP'ŘÄŹßl,Wó)‰ňÖˇ·#žü§śč " ‡"""6!QAQDáPĐ­×&ĺ˙˙Ö–‡ěĚ+l^ń&ßoŹćŇo©Ô¨íĹĂ@ŻSp1ş™wîyylZ>Ť„m‘v&'#ő|[đ—żŘgD±ćcOzÚY6,žÄŹß|ÎőkWi×ĺN˛˙ř¬ĚŚKü{ů4cÖ“žv–µ˝hßĺYžů:•«Ö°”»xîg>[2™˙Ä~Áµ+—ąĎűAşĄcĎAĹţ,R:Š[‡—ĎźáÓa$ďŮĚőkW©ëŰ’îCyoR›íŞ8e nŹůĂS˙•ÄÇóĆs,)×Ę<Ôí9úŤťkĺ*VË]’ĺ±'ń«OŘůńNJäzV&5j{Ńöń>ô ™«{U›ď͢ŘLÖÎ !a{4ÎFWZöâŮ1ł©QŰ«Dß/G Še)$ć_G™ąµDG'ŕęęLŻ^­=űYĽĽj:î•+ŮĽůćf˘Łż'5ő^^50ŕa¦Lé…›› AAď±nÝw|đÁ0 ęhwíÚo0`Ď=÷ŃŃ#-ËQđ±‚_ĎË31mÚ&>ú(””4ŚF'Z¶¬Ç_˙ŔÚůHɶ“IĎOu”ťgiíčí]¸ž?ŻśëYĽ3˘'&Ř”iöp7^Y´CĄJ|ş ŚmĽcwúĎŤ›K·㋜OaAaĆŔ‡8źzÜęőÖťž"i÷ż­Ćżvĺ2o÷çĚń6ө׸aQ±¸ąW#ýÂ9Ţ jÇĺóglĘ yý}üźZ¬ĎRšA˝, ďĆöX0Ŕ·ł®¦óć€öüvúXˇÓÎźfqË«Ôđäęĺ4«ňťúľÄŔĺ–á’,Ź=—Ná‹oÚ}ŻcĎA ›ţÍ: č=śŘĎŁ¬ĘzÖőfňęDÜ«{ܵpXZŰă­­†…±7_Á`r”g+燯áĂŠŠµzĎŰŰ“ÄÄÉxx¸Ű„´¬¬:uz‡„„“6ÓěÖ­[·ľBĄJ.]ʤU«éddd‘”4•† kqęÔZ·žNŐŞ®$'żnwú……ð°Oyçťmv?ËÜąĎ1~|7‡ ŢjMvlş!Ą¸ő™`˛Ţľz.'&pËGĽv?K÷ĺ0-úŤŰňÓ·;,¨ÝëÍË1 żdńŢlěĘ (| 1-Ľí|ěŮţáΧ§NĆL\µŹĹ{łymů7ś>’dSvëł9sü µëů0!*ŽĹ{ł [±ϺޤMćË•łĚĺVÍćňů34jîÇëł`WťúľŔ–¨Ĺţ,r÷·w¬y—ßNĂł®7aQ±,ޛͫËwâQ§ľÍ4KRÖžű=Ŕëł(6“žĂ#Ř˙ő†»:ŹŻÖýÓÜRľ„E±™,ŽËâŐČŻHÚ˝Éî8É{63fÁó:ŠŠĹł®7iż¤°}őÜrő8˙Ď‘—sóćd¶lCvöbbcĂđöö$%%Ťąs·Ķ“p’Gąźýű'““ł”¦Ř;~˛Íš5ÝYµj(ééY ü>7nä1dČű¤§g±rĺP<<ÜK´śË—ďŕË/ÍËš‘±€%K‚X¸0F; Q8”âű~{4#f®ŁAÓ¶TrrĆ˧9C§­`ß«,§ľv¬™ÇÎčEd\ü•Çú˝Ld‚‰™źź¸Ły˙°ó3LŠÄ»ĹĂ8»iŇľ3&.µ-{ó€=0"źÖŹâěbÄ·M€ĺôţő–*Ŕ‹ˇ ©Ó° ®îU±śČol8RjźEŠQßŬĂý_›˙±ßÖţ8»iÚţ1N^n3Í’”µçĹ0óvââZ™nĆp5ýÂ]ťÇ‚],ű.ďćŘ·e źĚeÝŰŁskŞ=AáKháßĂĽŽZű3čfKfţ˛”VH»[wş ޏÝ.YDŹ-0ťń÷÷eůróĺ)ë×Űď˛+:ú{Ö­A۶ pv®Dóć^¬\9€Ő«÷YĘvéň ăĆuĺ›oř;wfĚ.tëÖ¬ÄËYµŞ+óćí`Ѣťüúk/żü&S$'NĚÔHJD×VpçN™SDo»ď§M ßŘ9¬úÇpĆoă`ü66.ťBĎát ‹Ń­đ_¸EťjţőôQ|[?jő~“vťmĆ9źjmŤŰ(ŰÉüţ/ć÷ÓnţŰđv….Óť~ů}Š[‡gOţźąÜÍ×ó5m˙Í4KRÖžşľ--˙wŻ^ 0_“ZŇyµť_>†ĹăžćäOßŰ”)첞ć»[ 7nkľf¬¨SŰwęuZŮŢ28b@ěŢ˝ąŐp``cŽűÍnů#GÎŕăa÷ýääT«á™3ű˛}űOÄǧys/fÍę{GË9gN?†_Ŷmٶí S¦l$"˘'cÇvĹÝݨ”Z+8“)ŻČ÷ó[6:t‘Ů[R25 ß6\ĎĘäł%LčYź]ź.»Ó™Ű=@:9»ŘĹţ1#ŻŔĂíŹsĄňYäöŐ]Ü:,°}Ü8n»-«ě­żŽ]ŚĹççńŻŮçäOßS§Acţ4đU†Ľţ>Ó˘˝cvv¶»Ž •śĘŃľÇdČ˙sčçJvëÂÉÉPČö\tľ˝|ůZQˇş¨őeůvv®Íű/ľŘÔÔŮDE ! Ŕ—ĚĚëDD|FýúX¶l—v@˘p(Ĺçéĺmţőş)Ĺrťŕ­KżÍ˝ĄeĹ˙ŢĂ[±‡‰|Ë“C&™~‘čy…ßŔaošůę4hbţĄťh˝ă:ţźx›é9Ţ\ŘFIDATÔ®{?GŘcőzţpţç¨uoNM*ňsßÉg‘ß§¸uż]ű1ÎŞ\Áá’–˝SĹ™GQŰůř­„EĹŃoěüźj”oäćŘĚóxŇ^«á#űÍ߯ű›9|=ŐúWVá­öan×.óŮ–fÍĽě–÷öö %e&&S¤Í_n®őe3“&m 99•Ľ9pŕ&NÜ`70¦§gY^+ŘúĎĂĂťaĂüŮł'ŚożťČ„ Orńb&ăÇGk$ ‡Rř/Ňs§[˝Ţî ó)ŚAś:”HŢŤ\ŇÓÎňéüP‚ý ĚŐ€żřěgŕ›O–’•™Aý&mhĐ´Mˇ­/çcO‡ćn@VĎ ćHâ.näćrŕ[Vϰ}UŰÇűÜ,;ŠăI{ą‘›Ă±¤8ÖĽ5 0ßá Đ2 'ŃsĆráě)®ge˛nöh‚ý LéۤDźEî®â֡ߟž`Í[Ł8ńź}ÜČÍáxrĽĄÜ­JRöNýŢy0'ěý’śëYś:”ČŠÉ,ďg¦_´gőŚ‘–yŮż›53Íóęđd˙2Y÷e-ŢjäČŐěŰw‚śśěŢ}„QŁÖĐż»ĺűö5_Ň´‚ÄÄSäććqöl:ˇˇźb0ӥ˵ëůPÉÉ™śëŮ–×+W­Á„¨8şŤĹÓ«•śś©R˝mďCřĘxÜĽ±Łó3Á žş‚†¶ÇĹ膋эşľ-é14śˇ˙XuŰůŘăltĺµĺ;y¬ßËTó¸gŁ+~zž¶÷j5™đ~OŕŹ{ň‰ŁmŹŽŘrč(ËSľŽwj9ttj9‡2¦s5Ë5ˇ™éÉË»Á™?±ęĂë.eJRöŹX‘rŕŐrč8żŐrXţ©ĺđöÖÎ á›O–Ú}ŻšÇ=„ŻŚ§v=ź—ý#–çnl –CÇXµ–ćşUˡcÓ-L"âP^ [Č˝ ›˛oËjÎśř‰ÜëŮxÜ[źŹö çÉVŹ­+IŮ?byDDĘE€WˡăübVËaů§–CŃöXôv§–şŠpĽSˡŁÓ5‡""""˘p("""" ‡""""RÝ""vĺß9+ňGĘżKXDţ‡ßCÝâ(;D*˘‚Đ…Ř""âČţť«+e¬ş6łIEND®B`‚doxia-1.1.4/src/main/0000755000175000017500000000000011632765552014306 5ustar twernertwernerdoxia-1.1.4/src/main/resources/0000755000175000017500000000000011632765552016320 5ustar twernertwernerdoxia-1.1.4/src/main/resources/config/0000755000175000017500000000000011632765552017565 5ustar twernertwernerdoxia-1.1.4/src/main/resources/config/doxia_checkstyle.xml0000644000175000017500000001634611176011366023631 0ustar twernertwerner doxia-1.1.4/doxia-test-docs/0000755000175000017500000000000011632765552015602 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/pom.xml0000644000175000017500000000260311470562366017116 0ustar twernertwerner 4.0.0 org.apache.maven.doxia doxia 1.1.4 ../pom.xml doxia-test-docs Doxia :: Test Documents Several test documents to check syntax structures under Doxia. doxia-1.1.4/doxia-test-docs/src/0000755000175000017500000000000011632765550016367 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/0000755000175000017500000000000011632765550017313 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/0000755000175000017500000000000011632765552021327 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-javadoc-plugin/0000755000175000017500000000000011632765550025334 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-javadoc-plugin/fml/0000755000175000017500000000000011632765550026112 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-javadoc-plugin/fml/faq.fml0000644000175000017500000004533011055554323027357 0ustar twernertwerner What are the Javadoc options supported by the Maven Javadoc Plugin?

All options provided by Sun on the Javadoc homepages are wrapped in the Maven Javadoc Plugin. This plugin supports Javadoc 1.4, 1.5 and 6.0 options. Refer you to the Javadoc Package Summary for more information.

Where in the pom.xml do I configure the Javadoc Plugin?

Like all other site report plugins, the Javadoc Plugin goes in the <reporting/> section of your pom.xml. In this case, you will need to call mvn site to run reports.

You could also configure it in the <plugins/> or <pluginsManagement/> in <build/> tag of your pom.xml. In this case, you will need to call mvn javadoc:javadoc to run the main report.

Where do I put Javadoc resources like HTML files or images?

All javadoc resources like HTML files, images could be put in the ${basedir}/src/main/javadoc directory.

See Using Javadoc Resources for more information.

How to know exactly the Javadoc command line?

The Javadoc Plugin calls the Javadoc tool with argument files, i.e. files called 'options', 'packages' and 'argfile' (or 'files' with Jdk < 1.4): ${project.reporting.outputDirectory}/apidocs/javadoc.exe(or .sh) \ @options \ @packages | @argfile

These argument files are generated at runtime depending the Javadoc Plugin configuration and are deleted when the Javadoc Plugin ended.

To preserve them, just add <debug>true</debug> in your Javadoc Plugin configuration or just call mvn javadoc:javadoc -Ddebug=true or mvn javadoc:javadoc -X. In this case, an additional script file (javadoc.bat (or .sh) will be created in the apidocs directory.

How to add additional Javadoc parameters?

You could need to add more Javadoc parameters to be process by the Javadoc Tool (i.e. for doclet).

For this, you should use the <additionalparam/> parameter in your Javadoc Plugin configuration.

How to add additional Javadoc options?

You could need to add more J options (i.e. runtime system java options that runs Javadoc tool like -J-Xss) to be process by the Javadoc Tool. For this, you should use the <additionalJOption/> parameter in your Javadoc Plugin configuration.

The Javadoc Plugin calls the Javadoc tool with J options, i.e.: ${project.reporting.outputDirectory}/apidocs/javadoc.exe(or .sh) \ -J-Xss128m \ @options \ @packages | @argfile

How to increase Javadoc heap size?

If you need to increase the Javadoc heap size, you should use the <minmemory/> and <maxmemory/> parameters in your Javadoc Plugin configuration. For instance: ... org.apache.maven.plugins maven-javadoc-plugin ... 128m 1g ... ... ...

Note: The memory unit depends on the JVM used. The units supported could be: k, kb, m, mb, g, gb, t, tb. If no unit specified, the default unit is m.

How to add proxy support?

To specify a proxy in the Javadoc tool, you need to configure an active proxy in your settings.xml. Read the Configuring a proxy guide for more information.

The Javadoc Plugin calls the Javadoc tool with networking J options, i.e.: ${project.reporting.outputDirectory}/apidocs/javadoc.exe(or .sh) \ -J-Dhttp.proxySet=true \ -J-Dhttp.proxyHost=http://localhost \ -J-Dhttp.proxyPort=80 \ -J-Dhttp.nonProxyHosts="www.google.com|*.somewhere.com" \ -J-Dhttp.proxyUser="toto" \ -J-Dhttp.proxyPassword="toto" \ @options \ @packages | @argfile

How to have less output?

Just set the <quiet/> parameter to true in your Javadoc Plugin configuration.

How to remove test Javadocs report?

You need to configure the <reportSets/> parameter. Read the Selective Javadocs Reports part for more information.

How to deploy Javadoc jar file?

Basically, you need to call mvn clean javadoc:jar deploy. If you want to include the javadoc jar in a release process, you need to attach it in the release profile, for instance: ... release org.apache.maven.plugins maven-javadoc-plugin attach-javadocs jar ... ...

To deploy the Javadoc jar on a given Maven repository, you could call: mvn deploy:deploy-file \ -DgroupId=<group-id> \ -DartifactId=<artifact-id> \ -Dversion=<version> \ -Dfile=<path-to-file> \ -Dpackaging=jar \ -DrepositoryId=<repository-id> \ -Durl=dav:http://www.myrepository.com/m2 \ -Dclassifier=javadoc

How to include additional source code directories in aggregate mode?

If you use the Javadoc report in the aggregate mode, i.e. using the aggregate parameter, and if the Javadoc report does not include additional source code directories defined using the build-helper:add-source goal, you need to use the javadoc:aggregate goal instead of javadoc:javadoc goal. Read the Aggregating Javadocs for Multi-Projects part for more information.

How to use links option in Standard Doclet?

You need to configure the <links/> parameter. Also, you need to correctly write references in your Javadoc, i.e.:

  • @see MyMojo or {@link MyMojo} will NOT work.
  • @see com.mycompany.plugin.myplugin.MyMojo or {@link com.mycompany.myplugin.MyMojo} will work.

On Windows with Sun JDK, why javadoc:javadoc goal blows up due to an IllegalArgumentException in sun.net.www.ParseUtil.decode()?

You are on Windows XP with Sun JDK 5 or JDK 6 freshly installed, and when you run mvn javadoc:javadoc, you are stick by an sun.net.www.ParseUtil.decode() exception like this one.

Your CLASSPATH environement variable is probably corrupted, i.e. something like: CLASSPATH=.;C:\Java\jdk1.6.0_03\jre\lib\ext\QTJava.zip;%JAVAHOME% with %JAVAHOME% not a valid environment variable.

To resolve it, just reset the CLASSPATH environement variable, i.e.: set CLASSPATH= or set a new CLASSPATH environement variable, i.e.: set CLASSPATH=C:\Java\jdk1.6.0_03\jre\lib\ext\QTJava.zip or fix the wrong environment variable.

Refer you to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6219854 from Sun for more details.

What are the values of encoding, docencoding and charset parameters?

By default, these parameters have the following values:

encoding
Value of ${project.build.sourceEncoding} property or the value of the file.encoding system property if not specified.
docencoding
Value of ${project.reporting.outputEncoding} property or UTF-8 if not specified.
charset
Value of docencoding parameter if not specified.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-project-info-reports-plugin/0000755000175000017500000000000011632765551030021 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-project-info-reports-plugin/fml/0000755000175000017500000000000011632765551030577 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-project-info-reports-plugin/fml/faq.fml0000644000175000017500000000427011055554323032041 0ustar twernertwerner Is it possible to customize the labels of the Project Reports Menu?

Not yet. See the related issue: MPIR-35

How to exclude SCM access info?

See the SCM report documentation.

How to hide developer/contributor email addresses?

You could use services such as reCAPTCHA Mailhide. In this case, just replace email by the given URL, for instance: ... foo http://mailhide.recaptcha.net/d?k=01ebFB9eM2hZL-T96IpUgRmA==&c=AI-pouLFNTr5xMTBVDaj8iKeIFI5dy9Wj5cxSY0Nuhw= ... ... ...

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-ejb-plugin/0000755000175000017500000000000011632765551024466 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ejb-plugin/fml/0000755000175000017500000000000011632765551025244 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ejb-plugin/fml/faq.fml0000644000175000017500000000367311055554323026514 0ustar twernertwerner How can I specify a Class-Path: entry in the manifest of an EJB jar?

You just have to configure it: ... org.apache.maven.plugins maven-ejb-plugin ... true ... ...

How does the classifier affect artifacts in my EJB project?

When used, the copy of the artifact in your project will have the classifier appended to its filename. This can be used to differentiate duplicate artifacts.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-antrun-plugin/0000755000175000017500000000000011632765551025235 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-antrun-plugin/fml/0000755000175000017500000000000011632765551026013 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-antrun-plugin/fml/faq.fml0000644000175000017500000000273411055554323027260 0ustar twernertwerner Why use antrun and not the Ant program itself?

Maven has certain benefits over Ant. And for your Ant projects to take advantage of these, you can use Maven as your project management tool and use its maven-antrun-plugin to build your Ant projects.

Furthermore, if you wish to migrate from Ant to Maven, you can use this plugin first, then gradually convert your Ant expressions into their corresponding Maven expressions.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-ressources-plugin/0000755000175000017500000000000011632765550026122 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ressources-plugin/fml/0000755000175000017500000000000011632765550026700 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ressources-plugin/fml/faq.fml0000644000175000017500000000576611060312660030146 0ustar twernertwerner What are resources?

Resources are non-source code files used by your project. Examples of these are properties files, images and XML files.

When should I use the Resources Plugin's goal outside a lifecycle?

The Maven Resource Plugin simply copies resources from your source to your build output (with optional filtering). So if that's the only operation you are interested in, you can skip the other phases such as compilation and testing and simply do

mvn resources:resources

For example, if you just debugged your configuration file and you want to manually test it in your container if it works, you can simply do

mvn resources:resources

This will produce those configuration files on your output thus skipping the other phases which may eat up a huge amount of your time.

Do my main resources go to my test resources as well?

No. Your main resources and your test resources are separated from each other.

Your test resources should only be used by your tests. Thus, they are separated from the main to avoid any side effects that may occur.

What encoding values are allowed?

The Maven Resource Plugin only allows encoding values representing the charsets supported by the Java platform, namely US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE and UTF-16.

doxia-1.1.4/doxia-test-docs/src/main/resources/pom-4.0.0.xml0000644000175000017500000001213311123451332023260 0ustar twernertwerner 4.0.0 org.apache.maven super-pom 3.0-SNAPSHOT Maven Default Project central Maven Repository Switchboard default http://repo1.maven.org/maven2 false central Maven Plugin Repository http://repo1.maven.org/maven2 default false never ${project.basedir}/target ${project.build.directory}/classes ${project.artifactId}-${project.version} ${project.build.directory}/test-classes ${project.basedir}/src/main/java src/main/scripts ${project.basedir}/src/test/java ${project.basedir}/src/main/resources ${project.basedir}/src/test/resources maven-antrun-plugin 1.1 maven-assembly-plugin 2.2-beta-1 maven-clean-plugin 2.2 maven-compiler-plugin 2.0.2 maven-dependency-plugin 2.0 maven-deploy-plugin 2.3 maven-ear-plugin 2.3.1 maven-ejb-plugin 2.1 maven-install-plugin 2.2 maven-jar-plugin 2.2 maven-javadoc-plugin 2.4 maven-plugin-plugin 2.4.2 maven-rar-plugin 2.2 maven-release-plugin 2.0-beta-7 maven-resources-plugin 2.2 maven-site-plugin 2.0-beta-7 maven-source-plugin 2.0.4 maven-surefire-plugin 2.4.3 maven-war-plugin 2.1-alpha-1 ${project.build.directory}/site doxia-1.1.4/doxia-test-docs/src/main/resources/maven-war-plugin/0000755000175000017500000000000011632765550024516 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-war-plugin/fml/0000755000175000017500000000000011632765550025274 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-war-plugin/fml/faq.fml0000644000175000017500000001245011055554323026536 0ustar twernertwerner How is filtering done in the WAR plugin?

To enable filtering of web.xml you must configure the war plugin as this: maven-war-plugin 2.1-alpha-2 true ]]>

Examples can be found here.

How does the classifier affect artifacts in my war project?

When used, the copy of the artifact in your project will have the classifier appended to its filename. This can be used to differentiate duplicate artifacts.

How do I exclude transitive dependencies from my project?

Give it a "provided" scope.

What's the difference between using dependentWarExclude and provided scope?

dependentWarExclude is used in war overlays for excluding dependent war files from being included in the exploded war.

How do I exclude files in my web resources?

Use the webResources exclude parameter to identify the tokens to use for the filtering.

How do I exclude files when doing war overlays?

Use the dependentWarExcludes parameter to identify the tokens to use for the filtering.

For more information refer to Adding and Filtering External Web Resources.

Where can I find the documentation for the plugin's configuration?

For each goal, you can use the documentation from the plugin site.

If you need a specific version, generate it using mvn site:site or use: ]]>

How do I create a jar containing the classes in my webapp?

If you would simply like to package the classes and resources as a jar in WEB-INF/lib rather than as loose files under WEB-INF/classes, use the following configuration:

maven-war-plugin X.Y true ]]>

If you need to re-use this jar in another project, the recommended approach is to move the classes to a separate module that builds a jar, and then declare a dependency on that jar from your webapp as well as from any other projects that need it.

If you can't move the classes to another project, you can deploy the classes and resources included in your webapp as an "attached" artifact, with a classifier, by using the following configuration:

... mywebapp 1.0-SNAPSHOT ... maven-war-plugin X.Y true ... ]]>

This will result in two artifacts being deployed: mywebapp-1.0-SNAPSHOT.war and mywebapp-1.0-SNAPSHOT-classes.jar.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/0000755000175000017500000000000011632765551023376 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/0000755000175000017500000000000011632765551024333 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/errors/0000755000175000017500000000000011632765551025647 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/errors/404.xml0000644000175000017500000000274011033421255026664 0ustar twernertwerner Brett Porter Page Not Found

We're sorry, but the page you requested cannot be found. This may because:

  • The page has moved, was outdated, or has not been created yet
  • You typed the address incorrectly
  • You followed a link from another site that pointed to this page.

If you came to this page by following a broken link on our site, you can report the problem.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/index.xml.vm0000644000175000017500000002253211105134016026566 0ustar twernertwerner Welcome to Maven Brett Porter Jason van Zyl
Search Maven Sites
Get Maven ${currentVersion}
Released: 10 April 2008

Maven ${currentVersion} (1.6Mb)
System Requirements, Installation Instructions, Release Notes

Maven Tasks for Ant 2.0.9 (994k)
Documentation, Release Notes

Looking for Artifacts?

Search Central and other Public Repositories.

Looking for Repository Managers?

Take a look at the Repository Managers available from the community.

Looking for CI Servers?

Take a look at the CI Servers available from the community.

Supporting Maven

We'd like to thank the sponsors of the Apache Software Foundation for their support and assistance. To support the ASF, see the sponsorship page.

Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

If you think that Maven could help your project, you can find out more information about in the "About Maven" section of the navigation. This includes an in-depth description of what Maven is, a list of some of its main features, and a set of frequently asked questions about what Maven is.

Learning about Maven

This site is separated into the following sections, depending on how you'd like to use Maven:

  • Run Maven Information for those needing to build a project that uses Maven
  • Use Maven Information for those wanting to use Maven to build their project, including a "10 minute test" that gives a practical overview of Maven's main features in just 10 minutes
  • Write Maven Plugins Information for those who may or may not be using Maven, but want to provide a plugin for shared functionality or to accompany their own product or toolset
  • Improve the Maven Repository Information for those who may or may not use, but are interested in getting project metadata into the repository
  • Develop Maven Information for those who are currently developers, or who are interested in contributing to the Maven project itself

Each guide is divided into a number of trails to get you started on a particular topic, and includes a reference area and a "cookbook" of common examples.

You can access the guides at any time from the left navigation.

Documentation Index

If you are looking for a quick reference, you can use the documentation index.

Plugins

For detailed information on just some of the plugins available for Maven, see the plugin list.

How to Get Support

Support for Maven is available in a variety of different forms.

To get started, search the documentation, the wiki, issue tracker, or the mailing list archives to see if the problem has been solved or reported before.

If the problem has not been reported before, the recommended way to get help is to subscribe to the Maven Users Mailing list. Many other users and Maven developers will answer your questions there, and the answer will be archived for others in the future.

You can also reach the Maven developers on IRC.

How can I help?

Maven is an open source community and welcomes contributions. If you'd like to get involved, see the Guide to helping with Maven.

Maven is a part of the Apache Software Foundation. We'd like to thank the sponsors that provide financial assistance to the foundation. For more information on how you can support the foundation, see the sponsorship page.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/source-repository.xml0000644000175000017500000001217411055600317030562 0ustar twernertwerner Source Repository Benjamin Bentmann

Maven projects use Subversion to manage their source code. Instructions on Subversion use can be found in the online book Version Control with Subversion.

The following list shows the links to the online source repositories for the various development branches of the Maven core:

http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x  http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x  http://svn.apache.org/viewvc/maven/components/trunk

The source repositories for the various plugins are listed in the documentation of the respective plugin, reachable via the plugin index.

The source can be checked out anonymously from SVN with one of these commands depending on the development line you are looking for:

$ svn checkout http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x maven-2.0.x $ svn checkout http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x maven-2.1.x $ svn checkout http://svn.apache.org/repos/asf/maven/components/trunk maven-3.0.x

Everyone can access the Subversion repository via HTTP, but committers must checkout the Subversion repository via HTTPS to gain write access:

$ svn checkout http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x maven-2.0.x $ svn checkout http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x maven-2.1.x $ svn checkout http://svn.apache.org/repos/asf/maven/components/trunk maven-3.0.x

To commit changes to the repository, execute the following command to commit your changes (svn will prompt you for your password):

$ svn commit --username your-username -m "A message"

For those users who are stuck behind a corporate firewall which is blocking HTTP access to the Subversion repository, you can try to access it via the developer connection:

$ svn checkout http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x maven-2.0.x $ svn checkout http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x maven-2.1.x $ svn checkout http://svn.apache.org/repos/asf/maven/components/trunk maven-3.0.x

The Subversion client can go through a proxy, if you configure it to do so. First, edit your servers configuration file to indicate which proxy to use. The file's location depends on your operating system. On Linux or Unix it is located in the directory ~/.subversion. On Windows it is in %APPDATA%\Subversion (try echo %APPDATA%, note this is a hidden directory).

There are comments in the file explaining what to do. If you don't have that file, get the latest Subversion client and run any command; this will cause the configuration directory and template files to be created.

Example: Edit the servers file and add something like:

[global] http-proxy-host = your.proxy.name http-proxy-port = 3128
doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/developers/0000755000175000017500000000000011632765551026503 5ustar twernertwerner././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/developers/mojo-api-specification.xmldoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/developers/mojo-api-specification.xml0000644000175000017500000010372011012343314033536 0ustar twernertwerner Mojo API Specification John Casey

Starting with Maven, plugins can be written in Java or any of a number of scripting languages. Plugins consists of one or more Mojos, each one being the implementation for one of the plugin's goals. Maven tries to stay out of the way of the programmer with its new Mojo API. This opens up the opportunity for many Mojos to be reused outside of Maven, or bridged into Maven from external systems like Ant.

NOTE: For now, we will limit the discussion to Java-based Mojos, since each scripting language will present these same basic requirements with various forms of implementation.

Although the requirements on Mojos are minimal by design, there are still a very few requirements that Mojo developers must keep in mind. Basically, these Mojo requirements are embodied by the org.apache.maven.plugin.Mojo interface, which the Mojo must implement (or else extend its abstract base class counterpart org.apache.maven.plugin.AbstractMojo ). This interface guarantees the correct execution contract for the Mojo: no parameters, void return type, and a throws clause that allows only org.apache.maven.plugin.MojoExecutionException and its derivatives. It also guarantees that the Mojo will have access to the standard Maven user-feedback mechanism, org.apache.maven.monitor.logging.Log , so the Mojo can communicate important events to the console or other log sink.

As mentioned before, each Plugin - or packaged set of Mojos - must provide a descriptor called plugin.xml under the path META-INF/maven inside the Plugin jar file. Fortunately, Maven also provides a set of Javadoc annotations and tools to generate this descriptor, so developers don't have to worry about directly authoring or maintaining a separate XML metadata file.

To serve as a quick reference for the developer, the rest of this page will document these features (the API, along with the annotations) which are considered the best practice for developing Mojos.

This interface forms the contract required for Mojos to interact with the Maven infrastructure. It features an execute() method, which triggers the Mojo's build-process behavior, and can throw a MojoExecutionException if an error condition occurs. See below for a discussion on proper use of this Exception class. Also included is the setLog(..) method, which simply allows Maven to inject a logging mechanism which will allow the Mojo to communicate to the outside world through standard Maven channels.

Method Summary:
  • void setLog( org.apache.maven.monitor.logging.Log )

    Inject a standard Maven logging mechanism to allow this Mojo to communicate events and feedback to the user.

  • void execute() throws org.apache.maven.plugin.MojoExecutionException

    Perform whatever build-process behavior this Mojo implements. This is the main trigger for the Mojo inside the Maven system, and allows the Mojo to communicate fatal errors by throwing an instance of MojoExecutionException.

    The MojoExecutionException (and all error conditions inside the Mojo) should be handled very carefully. The simple wrapping of lower-level exceptions without providing any indication of a user-friendly probable cause is strictly discouraged. In fact, a much better course of action is to provide error handling code (try/catch stanzas) for each coherent step within the Mojo's execution. Developers are then in a much better position to diagnose the cause of any error, and provide user-friendly feedback in the message of the MojoExecutionException.

Currently, this abstract base class simply takes care of managing the Maven log for concrete derivations. In keeping with this, it provides a protected method, getLog():Log , to furnish Log access to these concrete implementations.

Method Summary:
  • public void setLog( org.apache.maven.monitor.logging.Log )

    [IMPLEMENTED]

    Inject a standard Maven logging mechanism to allow this Mojo to communicate events and feedback to the user.

  • protected Log getLog()

    [IMPLEMENTED]

    Furnish access to the standard Maven logging mechanism which is managed in this base class.

  • void execute() throws org.apache.maven.plugin.MojoExecutionException

    [ABSTRACT]

    Perform whatever build-process behavior this Mojo implements. See the documentation for Mojo above for more information.

This interface supplies the API for providing feedback to the user from the Mojo, using standard Maven channels. There should be no big surprises here, although you may notice that the methods accept java.lang.CharSequence rather than java.lang.String . This is provided mainly as a convenience, to enable developers to pass things like StringBuffer directly into the logger, rather than formatting first by calling toString() .

Method Summary:
  • void debug( java.lang.CharSequence )

    Send a message to the user in the debug error level.

  • void debug( java.lang.CharSequence, java.lang.Throwable )

    Send a message (and accompanying exception) to the user in the debug error level. The error's stacktrace will be output when this error level is enabled.

  • void debug( java.lang.Throwable )

    Send an exception to the user in the debug error level. The stack trace for this exception will be output when this error level is enabled.

  • void info( java.lang.CharSequence )

    Send a message to the user in the info error level.

  • void info( java.lang.CharSequence, java.lang.Throwable )

    Send a message (and accompanying exception) to the user in the info error level. The error's stacktrace will be output when this error level is enabled.

  • void info( java.lang.CharSequence )

    Send an exception to the user in the info error level. The stack trace for this exception will be output when this error level is enabled.

  • void warn( java.lang.CharSequence )

    Send a message to the user in the warn error level.

  • void warn( java.lang.CharSequence, java.lang.Throwable )

    Send a message (and accompanying exception) to the user in the warn error level. The error's stacktrace will be output when this error level is enabled.

  • void warn( java.lang.CharSequence )

    Send an exception to the user in the warn error level. The stack trace for this exception will be output when this error level is enabled.

  • void error( java.lang.CharSequence )

    Send a message to the user in the error error level.

  • void error( java.lang.CharSequence, java.lang.Throwable )

    Send a message (and accompanying exception) to the user in the error error level. The error's stacktrace will be output when this error level is enabled.

  • void error( java.lang.CharSequence )

    Send an exception to the user in the error error level. The stack trace for this exception will be output when this error level is enabled.

In addition to the normal Java requirements in terms of interfaces and/or abstract base classes which need to be implemented, a plugin descriptor must accompany these classes inside the plugin jar. This descriptor file is used to provide metadata about the parameters and other component requirements for a set of Mojos so that Maven can initialize the Mojo and validate its configuration before executing it. As such, the plugin descriptor has a certain set of information that is required for each Mojo specification to be valid, as well as requirements for the overall plugin descriptor itself.

NOTE: In the following discussion, bolded items are the descriptor's element name along with a Javadoc annotation (if applicable) supporting that piece of the plugin descriptor. A couple of examples are: someElement (@annotation parameterName="parameterValue") or someOtherElement (@annotation <rawAnnotationValue>) .

The plugin descriptor must be provided in a jar resource with the path: META-INF/maven/plugin.xml , and it must contain the following:

Descriptor Element Required? Notes
mojos Yes Descriptors for each Mojo provided by the plugin, each inside a mojo sub-element. Mojo descriptors are covered in detail below. Obviously, a plugin without any declared Mojos doesn't make sense, so the mojos element is required, along with at least one mojo sub-element.
dependencies Yes A set of dependencies which the plugin requires in order to function. Each dependency is provided inside a dependency sub-element. Dependency specifications are covered below. Since all plugins must have a dependency on maven-plugin-api , this element is effectively required. Using the plugin toolset, these dependencies can be extracted from the POM's dependencies.

Each Mojo specified inside a plugin descriptor must provide the following (annotations specified here are at the class level):

Descriptor Element Annotation Required? Notes
aggregator @aggregator No Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed as modules.
configurator @configurator <roleHint> No The configurator type to use when injecting parameter values into this Mojo. The value is normally deduced from the Mojo's implementation language, but can be specified to allow a custom ComponentConfigurator implementation to be used. NOTE: This will only be used in very special cases, using a highly controlled vocabulary of possible values. (Elements like this are why it's a good idea to use the descriptor tools.)
execute
  • @execute phase="<phaseName>" lifecycle="<lifecycleId>"
  • @execute phase="<phaseName>"
  • @execute goal="<goalName>"
No When this goal is invoked, it will first invoke a parallel lifecycle, ending at the given phase. If a goal is provided instead of a phase, that goal will be executed in isolation. The execution of either will not affect the current project, but instead make available the ${executedProject} expression if required. An alternate lifecycle can also be provided: for more information see the documentation on the build lifecycle.
executionStrategy @executionStrategy <strategy> No Specify the execution strategy. NOTE: Currently supports once-per-session, always.
goal @goal <goalName> Yes The name for the Mojo that users will reference from the command line to execute the Mojo directly, or inside a POM in order to provide Mojo-specific configuration.
inheritByDefault @inheritByDefault <true|false> No. Default: true Specify that the Mojo is inherited.
instantiationStrategy @instantiationStrategy <per-lookup> No. Default: per-lookup Specify the instantiation strategy.
phase @phase <phaseName> No Binds this Mojo to a particular phase of the standard build lifecycle, if specified. NOTE: This is only required if this Mojo is to participate in the standard build process.
requiresDependencyResolution @requiresDependencyResolution <requiredScope> No Flags this Mojo as requiring the dependencies in the specified scope (or an implied scope) to be resolved before it can execute. Currently supports compile, runtime, and test scopes. If this annotation is present but no scope is specified, the scope defaults to runtime.
requiresDirectInvocation @requiresDirectInvocation <true|false> No. Default: false Flags this Mojo to be invoke directly.
requiresOnline @requiresOnline <true|false> No. Default: true Flags this Mojo to be run in online mode.
requiresProject @requiresProject <true|false> No. Default: true Flags this Mojo to run inside of a project.
requiresReports @requiresReports <true|false> No. Default: false Flags this Mojo to require reports.
description none (detected) No The description of this Mojo's functionality. Using the toolset, this will be the class-level Javadoc description provided. NOTE: While this is not a required part of the Mojo specification, it SHOULD be provided to enable future tool support for browsing, etc. and for clarity.
implementation none (detected) Yes The Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).
language none (detected) No. Default: java The implementation language for this Mojo (Java, beanshell, etc.).
deprecated @deprecated <deprecated-text> No Specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated. This will trigger a warning when a user tries to configure a parameter marked as deprecated.
since @since <since-text> No Specify the version when the Mojo was added to the API. Similar to Javadoc since.

Each Mojo specifies the parameters that it expects in order to work. These parameters are the Mojo's link to the outside world, and will be satisfied through a combination of POM/project values, plugin configurations (from the POM and configuration defaults), and System properties.

NOTE[1]: For this discussion on Mojo parameters, a single annotation may span multiple elements in the descriptor's specification for that parameter. Duplicate annotation declarations in this section will be used to detail each parameter of an annotation separately.

NOTE[2]: In many cases, simply annotating a Mojo field with @parameter will be enough to allow injection of a value for that parameter using POM configuration elements. The discussion below shows advanced usage for this annotation, along with others.

Each parameter for a Mojo must be specified in the plugin descriptor as follows:

Descriptor Element Annotation Required? Notes
alias @parameter alias="myAlias" No Specifies an alias which can be used to configure this parameter from the POM. This is primarily useful to improve user-friendliness, where Mojo field names are not intuitive to the user or are otherwise not conducive to configuration via the POM.
configuration @component role="..." roleHint="..." No Populates the field with an instance of a Plexus component. This is like declaring a requirement in a Plexus component. The default requirement will have a role equal to the declared type of the field, and will use the default role hint. You can customise either of these by providing a role and/or roleHint parameter. e.g. @component role="org.apache.maven.artifact.ArtifactHandler" roleHint="ear"Note: This is identical to the deprecated form of parameter: @parameter expression="${component.yourpackage.YourComponentClass}".
configuration @parameter expression="${someExpression}" default-value="value" No Specifies the expression used to calculate the value to be injected into this parameter of the Mojo at buildtime. This is commonly used to refer to specific elements in the POM, such as ${project.resources}, which refers to the list of resources meant to accompany the classes in the resulting jar file. The default value is used when the expression evaluates to null . NOTE: If not specified, an expression of ${<name>} is assumed, which can only be satisfied from POM configuration or System properties. The use of '${' and '}' is required to delimit actual expressions which may be evaluated.
editable @readonly No Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified configuration). This is useful when you want to force the user to use common POM elements rather than plugin configurations, as in the case where you want to use the artifact's final name as a parameter. In this case, you want the user to modify <build><finalName/></build> rather than specifying a value for finalName directly in the plugin configuration section. It is also useful to ensure that - for example - a List-typed parameter which expects items of type Artifact doesn't get a List full of Strings. NOTE: Specification of this annotation flags the parameter as non-editable; there is no true/false value.
required @required No Whether this parameter is required for the Mojo to function. This is used to validate the configuration for a Mojo before it is injected, and before the Mojo is executed from some half-state. NOTE: Specification of this annotation flags the parameter as required; there is no true/false value.
description none (detected) No The description of this parameter's use inside the Mojo. Using the toolset, this is detected as the Javadoc description for the field. NOTE: While this is not a required part of the parameter specification, it SHOULD be provided to enable future tool support for browsing, etc. and for clarity.
name none (detected) Yes The name of the parameter, to be used in configuring this parameter from the Mojo's declared defaults (discussed below) or from the POM. Using the toolset, this is detected as the Java field name.
type none (detected) Yes The Java type for this parameter. This is used to validate the result of any expressions used to calculate the value which should be injected into the Mojo for this parameter. Using the toolset, this is detected as the class of the Java field corresponding to this parameter.
deprecated @deprecated <deprecated-text> No Specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated. This will trigger a warning when a user tries to configure a parameter marked as deprecated.
since @since <since-text> No Specify the version when the Mojo was added to the API. Similar to Javadoc since.

The final component of a plugin descriptor is the dependencies. This enables the plugin to function independently of its POM (or at least to declare the libraries it needs to run). Dependencies are taken from the runtime scope of the plugin's calculated dependencies (from the POM). Dependencies are specified in exactly the same manner as in the POM, except for the <scope> element (all dependencies in the plugin descriptor are assumed to be runtime, because this is a runtime profile for the plugin).

By now, we've mentioned the plugin tools several times without telling you what they are or how to use them. Instead of manually writing (and maintaining) the metadata detailed above, Maven ships with some tools to aid in this task. In fact, the only thing a plugin developer needs to do is declare his project to be a plugin from within the POM. Once this is done, Maven will call the appropriate descriptor generators, etc. to produce an artifact that is ready for use within Maven builds. Optional metadata can be injected via Javadoc annotation (and possibly JDK5 annotations in the future) as described above, enabling richer interactions between the Mojo and the user. The section below describes the changes to the POM which are necessary to create plugin artifacts.

From the POM, Maven plugin projects look quite similar to any other project. For pure Java plugins, the differences are even smaller than for script-based plugins. The following details the POM elements which are necessary to build a Maven plugin artifact.

POM Element Required for Java Mojos? Sample Declaration Notes
packaging Yes <packaging> maven-plugin </packaging> The POM must declare a packaging element which describes this project as a Maven plugin project.
scriptSourceDirectory No <scriptSourceDirectory> src/main/scripts </scriptSourceDirectory> In the case of script-based Mojos (which are not covered in detail within this document), the POM must include an additional element to distinguish script sources from (optional) Java supporting classes. This element is scriptSourceDirectory, inside the build section. This directory is included in the list of resources which accompany any compiled code in the resulting artifact. It is specified separately from the resources in the build section to denote its special status as an alternate source directory for scripts.

After making the changes above, the developer can simply call

mvn install

to install the plugin to the local repository. (Any of the other standard lifecycle targets like package, deploy, etc. are also available in like fashion.)

If you're using JetBrains IntelliJ IDEA to develop your plugin, you can use the following to configure the javadoc annotations as live templates.

  1. Download this file, and place it in $USER_HOME/.IntelliJIdea/config/templates
  2. (re)startup IntelliJ IDEA (templates are loaded on startup)
  3. add the following list to Settings -> IDE -> Errors -> General -> Unknown javadoc tags -> Additional javadoc tags
    • aggregator, execute, goal, phase, requiresDirectInvocation, requiresProject, requiresReports, requiresOnline, parameter, component, required, readonly

This section simply gives a listing of pointers for more information.

  • QDox Project (Javadoc annotations) [ link ]
  • Plexus Project (Plexus container) [ link ]
  • Maven Plugin Descriptor API [ link ]
  • MojoDescriptor API [ link ]
doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/articles.xml0000644000175000017500000004105711111121726026650 0ustar twernertwerner External Resources on Maven Brett Porter Vincent Massol

Maven: The Definitive Guide (Readable HTML and Free PDF Download)

Better Builds with Maven (Free PDF Download)

Maven: A Developer's Notebook

If you're interested in testing your Maven skills, check out JavaBlackBelt's Maven exam. This exam is being written collaboratively by the community. Feel free to add new questions, suggest improvements, etc.

If you are writing an article on Maven we suggest contacting the developers on the mailing list as we would be happy to provide feedback to help ensure accuracy in your article. Just ping us on the dev mailing list to get in touch.

Title Publisher Author Published
Introduction to m2eclipse TheServerSide Tim O'Brien, Bruce Snyder, Eugene Kuleshov July 2008
Maven 2.x (in Turkish) Anadolu Üniversitesi Mustafa Sait Özen August 2007
Setting up the Internal Repository The Server Side Avneet Mangat June 2007
Building Web Applications with Maven 2 java.net Will Iverson 1 March 2007
Introduction to Apache Maven 2 developerWorks Sing Li 19 December 2006
Maven - Menos mal que has venido (in Spanish) Universidad de Sevilla Manuel J. Recena Soto 6 November 2006
FAQ for Maven 2 and Continuum (in French) Developpez.com Eric Reboisson 11 October 2006
Keep Your Maven Projects Portable Throughout the Build Cycle DevX Eric Redmond 8 September 2006
Automation for the people: Choosing a Continuous Integration server deverloperWorks Paul Duvall 5 September 2006
Java Posse #070 - Interview with Brett Porter of Maven Java Posse Tor Norbye, Carl Quinn, Dick Wall, Joe Nuxoll, Brett Porter 18 July 2006
Continuous Integration with Continuum Java.net John Ferguson Smart 30 May 2006
The Maven 2 POM demystified JavaWorld Eric Redmond 29 May 2006
Maven: Building Complex Systems Dr.Dobb's Gigi Sayfan 21 April 2006
Working with maven 2 PeopleWare Jan Dockx 13 April 2006
Maven 2.0: Compile, Test, Run, Deploy, and More onjava Chris Hardin 29 March 2006
Descripcion tecnica de Maven (in Spanish) Metaware Inc Juan Pablo Santos Rodríguez 13 March 2006
Get the most out of Maven 2 site generation JavaWorld John Ferguson Smart 27 February 2006
An introduction to Maven 2 (in french) Developpez.com Denis Cabasson 27 January 2006
Maven 2.0 - Javapolis 2005 Vincent Massol 15 December 2005
An introduction to Maven 2 JavaWorld John Ferguson Smart 5 December 2005
Taking the Maven 2 Plunge David DeWolf 1 October 2005
Building J2EE Projects with Maven OnJava Vincent Massol 7 September 2005
Maven 2.0 and Continuum SJUG Presentation Brett Porter 1 June 2005
Exploiting Maven in Eclipse developerWorks Gilles Dodinet 24 May 2005
Managing WebSphere Portal V5.1 projects with Apache Maven and Rational Application Developer 6.0 developerWorks Hinrich Boog 30 March 2005
Maven 1.0 Javapolis Presentation Vincent Massol 16 December 2004
Master and Commander by Julien Dubois Oracle Julien Dubois November 2004
installing and working with Maven (in German) Manfred Wolff August 2004
Apache's Maven Comes of Age (Coverage of the release of Maven 1.0) internetnews.com Sean Michael Kerner 15 July 2004
Extending Maven Through Plugins by Eric Pugh OnJava Eric Pugh 17 March 2004
Maven Magic - a tutorial on Maven and J2EE projects. TheServerSide Srikanth Shenoy November 2003
Developing with Maven by Rob Herbst OnJava Rob Herbst 22 October 2003
Apache Maven Simplifies the Java Build Process Even More Than Ant DevX Dave Ford 2 September 2003
Building J2EE applications with Maven (Slides from TheServerSide Symposium) TheServerSide Vincent Massol 27 June 2003
Maven ties together tools for better code management JavaWorld Jeff Linwood 11 October 2002
How to get Maven to build your web service into a WAR on AstroGrid Astrogrid
Some Maven FAQs on AstroGrid Astrogrid
Some Useful Maven Notes on AstroGrid Astrogrid
A tutorial for Maven, J2EE projects, and MevenIDE (in Portuguese).
doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/xdoc/docs-required.xml0000644000175000017500000001410311037102353027602 0ustar twernertwerner Documentation Required Brett Porter

This page lists some of the most pressing documentation needs. If you feel something is missing, please be sure to let us know at the Maven Users Mailing List.

Documentation for users

  • new SNAPSHOT handling - partially done on Brett's blog
  • guide to dependencies, including:
    • dependency scoping - especially system scope
    • version range specifications
    • conflict resolution
  • deployment mechanism
  • dependency management
  • plugin management - in progress by J Matthew Pryor and John Casey
  • plugin configuration
  • plugin downloading - partial on Brett's blogs
  • report generation
  • project inheritence and company wide strategy
  • plugin documentation
  • using POM-properties in conjunction with plugin configuration to abstract child-POM configs
  • archetypes - writing and using
  • plugin usage guide/summary for core plugins - esp. release plugin
  • strategy for migrating from Ant builds
  • strategy for migrating from Maven 1.x builds - esp. plugins that don't convert directly

Documentation for plugin authors

  • Beanshell examples
  • plugin writing guide
  • report writing guide
  • site customisation guide
  • common tips and tricks for accessing project/build data
  • guide to available parameter expressions
  • list of standards for submitting new plugins (minimum documentation, test coverage?)

Documentation for Maven developers

  • Lifecycle architecture
  • High level architecture, components explanation
  • Intro to Plexus
  • contributors guide (add to current and consolidate, walk through some first steps)

Additional Notes

        Brett Porter wrote:
        > The active project changes during the reactor build. At the compile
        > stage, it refers to the target/classes directory. At the package
        > stage, it points to the jar file. If you are implementing your own
        > packaging goal, you need to call project.getArtifact().setFile( ... )
        > to ensure this is used.

        - multi module howto
        - per user scm setup
          - outline behaviour when connection and developConnection are defined

           Our current URL looks like:
           scm:cvs:pserver:@cvs.host.name:/cvsroot:module-version

           Using this URL, the default is to connect to the CVS server using the
           same userid as the current user.  This is the desired behavior and I
           don't want to mess that up.  I just would like a means to add a userid
           in the URL only in special circumstances like Continuum.

           We might want to do something where we say it is a best practice to
           specify a ${user} and take it from the environment and allow an override.

        - testing a plugin
        - How to get started behind an NTLM proxy.
        - How snapshots works
        - How do i use the lifecycle provided by a plugin:
        - How do i disable ibiblio
        - using version ranges
        - plugin expressions (look at bob allison's work)
        - overriding the central repository (use central)
        - description of what packagings are available and how they work
        - creating upload bundles
        - modello example
        - changing the snapshot policy frequency
        - overriding central repo
        - using POM info in applications: the POM is packaged so there is acccess
          continuum example to get the version.
        - quick description of scm,wagon,continuum        
      

Profiles Example


     
       env-test
       
         
           env
           test
         
       
       
         test.properties
       
     
     
       env-production
       
         
           env
           production
         
       
       
         app.properties
       
     
   

and you can run mvn with one of profiles like:
mvn -P env-production clean:clean install ==> we use the profile id
or
mvn -Denv=test clean:clean install ==> we use the property env define in


Emmanuel

martin.kuhn@merkur.at wrote:
> Hi,
>
> I'm a maven newbie and I try out maven 2.0 alpha 3.
>
> My questions:
>
> I have a project to build / deploy for three different enviroments (test,
> integration, production).
>
> The difference beetween the bundles is only a properties file (there are
> three different files: config-test.properties,
> config-integration.properties ...).
> In the build process I want to copy the right config file to a file with a
> common name (config.properties -> the app should work with this config
> file)
>
> Is there a solution to handle this with maven 2 or do I have to write a
> plugin?
>
        ]]>
      
doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/fml/0000755000175000017500000000000011632765552024155 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/fml/general.fml0000644000175000017500000003224511121212244026252 0ustar twernertwerner How do I prevent including JARs in WEB-INF/lib? I need a "compile only" scope!

The scope you should use for this is provided. This indicates to Maven that the dependency will be provided at run time by its container or the JDK, for example.

Dependencies with this scope will not be passed on transitively, nor will they be bundled in an package such as a WAR, or included in the runtime classpath.

How do I list available plugins?

The "Available Plugins" page lists them, and provides additional information to browse the Maven 2 repository. See http://maven.apache.org/plugins

How do I determine what version of a plugin I am using?

You can use the Maven Help Plugin's describe goal. For example, to find out the version of the install plugin:

mvn -Dplugin=install help:describe

Note that you must give the plugin prefix as the argument to plugin, not it's artifact ID.

How can I use Ant tasks in Maven 2?

There are currently 2 alternatives:

How do I set up Maven so it will compile with a target and source JVM of my choice?

You must configure the source and target parameters in your pom. For example, to set the source and target JVM to 1.5, you should have in your pom:

... ... org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.5 1.5 ... ...
Is it possible to create my own directory structure?

Absolutely yes!

By configuring <sourceDirectory>, <resources> and other elements of the <build> section.

In addition, you may need to change the plugin configuration if you are not using plugin defaults for their files/directories.

Where is the source code? I couldn't seem to find a link anywhere on the Maven2 site.

The source code can be found in subversion: http://svn.apache.org/repos/asf/maven/components/trunk.

For more information, see Building Maven 2.0.

Maven can't seem to download the dependencies. Is my installation correct?

You most probably need to configure Maven to use a proxy. Please see the information on Configuring a proxy for information on how to configure your proxy for Maven.

I have a jar that I want to put into my local repository. How can I copy it in?

If you understand the layout of the maven repository, you can copy the jar directly into where it is meant to go. Maven will find this file next time it is run.

If you are not confident about the layout of the maven repository, then you can adapt the following command to load in your jar file, all on one line.

-DgroupId= -DartifactId= -Dversion= -Dpackaging= -DgeneratePom=true Where: the path to the file to load the group that the file should be registered under the artifact name for the file the version of the file the packaging of the file e.g. jar ]]>

This should load in the file into the maven repository, renaming it as needed.

How do I unsubscribe from Maven mailing lists?

To unsubscribe from a Maven mailing list you simply send a message to [mailing-list]-unsubscribe@maven.apache.org

So, if you have subscribed to users@maven.apache.org then you would send a message to users-unsubscribe@maven.apache.org in order to get off the list. People tend to have problems when they subscribe with one address and attempt to unsubscribe with another. So make sure that you are using the same address when unsubscribing that you used to subscribe before asking for help.

If you find you still cannot get off a list then send a message to [mailing-list]-help@maven.apache.org. These instructions are also appended to every message sent out on a maven mailing list ...

How do I skip the tests? Add the parameter -Dmaven.test.skip=true in the command line How can I run a single unit test? Use the parameter -Dtest=MyTest at the command line. NB: do not specify the entire package (org.apache.x.y.MyTest) Handle special characters in site

Configure your ide to use the correct encoding. With eclipse, add -Dfile.encoding=ISO-8859-1 in eclipse.ini file

Configure the output encoding in your pom ... org.apache.maven.plugins maven-site-plugin 2.0-beta-6 UTF-8 ...

Configure the file encoding use by mvn. add to MAVEN_OPTS the encoding (same as the ide). This can be made with adding MAVEN_OPTS="-Dfile.encoding=ISO-8859-1" in $HOME/.profile

How do I include tools.jar in my dependencies?

The following code includes tools.jar for JDKs on Windows, Linux and Solaris (it is already included in the runtime for Mac OS X and some free JDKs).

... default-tools.jar java.vendor Sun Microsystems Inc. com.sun tools 1.4.2 system ${java.home}/../lib/tools.jar ...
Maven compiles my test classes but doesn't run them?

Tests are run by the surefire plugin. The surefire plugin can be configured to run certain test classes and you may have unintentionally done so by specifying a value to ${test}. Check your settings.xml and pom.xml for a property named "test" which would like this:

... test some-value ...

or

... some-value ...
Where are Maven SNAPSHOT artifacts?

If you are trying to build a development version of Maven or plugins, you may need to access the maven snapshot repositories.

You need to update your settings.xml file using the Guide to Plugin Snapshot Repositories

Where are the Maven XSD schemas?

The Maven XSD is located here and the Maven Settings XSD is located here.

Your favorite IDE probably supports XSD schema's for pom.xml and settings.xml editing. You need to specify the following: <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 http://maven.apache.org/maven-v4_0_0.xsd"> ... </project> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> ... </settings>

Maven doesn't work, how do I get help?

We have compiled a list of available resources on the getting help page

How to produce execution debug output or error messages?

You could call Maven with -X parameter or -e parameter. For more information, run: mvn --help

What is a Mojo?

A mojo is a Maven plain Old Java Object. Each mojo is an executable goal in Maven, and a plugin is a distribution of one or more related mojos.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/fml/maven1.fml0000644000175000017500000001705711037102353026035 0ustar twernertwerner What's Changed?

Maven 2.0 will feel very different to a Maven 1.0 user - and perhaps a little strange. But it is a lot simpler to work with and closer to how Maven was always meant to be! The key changes from Maven 1.0 are:

  • Faster and smaller - The Maven core no longer uses Ant, Jelly or Xerces making it much smaller, has fewer dependencies, and is perfect for embedding in other tools.
  • Defined build lifecycle - No more prereqs , preGoals and postGoals . The build is a series of well defined phases. This also means that the normal goal names are not used - compile , test and install work for any project type.
  • Built-in multiple project handling - Use the same goals on a set of projects, and aggregate the results.
  • Improved SNAPSHOT handling - Snapshots are now checked for updates only once per day by default - though can be configured to be once per build, on a particular interval, or never. A command line option can force a check - making it more like updating from an SCM.
  • No more properties files - All plugins are now configured from the POM (which is now called pom.xml ).
  • No more maven.xml - Plugins are now easier to build and integrate, and are the only way to script your builds. (Note that additions may later be made to the POM to allow simple things that scripting was used for, such as goal aliasing).
  • No more Jelly - Plugins are primarily written in Java, though there are providers for other scripting languages.
  • Improved repository layout - Maven 2.0 supports both the existing layout, and an improved repository layout that has deeper, partitioned structure making it easier to browse.
Should I use Maven 2.0, or Maven 1.0?

Maven 2.0 is the latest stable release, and we certainly recommend it for all new projects.

If you are already using Maven 1.0 - you should try out Maven 2.0, as it is very much improved. However, we still continue to support the Maven 1.x releases at this time.

If you do use Maven 1.0, and would like to upgrade in the future, you should carefully consider following some of the Best Practices listed. These will make your project a lot easier to migrate in the future.

The following are the known limitations in the current Maven 2.0 release compared to Maven 1.x:

  • Availability of plugins - While most of the core Maven 1.x plugins have been converted, several 3rd party plugins may not be available. Maven 2.0 cannot execute Maven 1.0 plugins.
What will happen to Maven 1.0?

Support for Maven 1.0.2 has been discontinued with the release of Maven 1.1. While significant new features will not be added to the Maven 1.x core (such as transitive dependencies), bugfixes and support continue and the repository is still available.

Will my Maven 1.0 plugins be supported?

Not directly.

We recommend building your Jelly plugins as thin wrappers around Java beans that do not use Maven 1.0 API's, which will allow easy migration to Maven 2.0.

How do I write custom scripts without a maven.xml file?

Taken from this post to the Maven User's List:

Everything in m2 is a plugin so for doing any sort of custom work like that you will need to make a plugin. This 1) greatly reduces the complexity within m2 because we only deal with proper plugins. The maven.xml file in m1 was a psuedo plugin essentially and greatly complicated the internals and 2) it promotes the sharing of your work right from the get go. To start with you'll probably write a plugin that is only applicable to your specific requirements, or your team's work, but you'll see people asking for some functionality and you'll go "hey, I have something like that!" and hopefully people who have concrete solutions will generalize their solutions so they can be shared with others. That's what we're trying to encourage.
We estimate that there's a lot of work bound up in project's maven.xml that is not being shared and we'd like to try and change that. We plan to make it dead simple to share plugins and hopefully people can use other project's plugins as a start for a plugin that they may need themselves.
How do I convert from Maven 1.x to Maven 2.x? This is dicussed in Guide to Moving from Maven 1.x to Maven 2.x.
doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/fml/about.fml0000644000175000017500000001233310744437107025764 0ustar twernertwerner Tell me about the goals of Maven 2.0

In addition to understanding the Goals of Maven there have also been questions about why Maven 2.0 is rewritten from the successful Maven 1.0. In summary, the main goals of the new Maven 2.0 architecture are:

  • To be simple to use - it should be more obvious and consistent about how things are working
  • Fast - a new architecture and smaller memory footprint make it as fast as possible
  • To be able to implement the features demanded were not possible under the Maven 1.0 architecture

Unfortunately, to reach these goals we've had to sacrifice backwards compatibility. Instead of making many small incremental changes that would break compatibility often over time, we decided to build on a new, solid base that can be reliable for the future, and also to maintain the existing Maven 1.x product to ensure that existing users are not left out in the cold.

Can I get involved?

The Maven project welcomes anyone that wishes to contribute to do so by providing patches to the source code, participating in design discussions, or to help out on the users mailing list by answering questions.

Frequent contributors recognised by existing committers to the project may be asked if they would like to join the project.

For instructions on checking out and building Maven 2.0, see Building Maven 2.0 .

For more information, please see How to Help .

What plugin languages will Maven 2.0 support? What about [insert language here]?

As of the current release, Maven supports pure Java and Beanshell. Java is the preferred language for it's familiarity and speed.

We get asked a lot whether Maven 2.0 will support other languages, in particular Groovy. We will allow the use of Groovy - and virtually any other scripting language (if there is demand) if someone can commit a small amount of time to implementing a factory for it.

We would recommend waiting for Groovy to have a 1.0 release so the API (and language!) is stable. What we will not be doing is actively supporting it (in terms of answering questions about how to use it) like we currently do for Jelly in Maven 1.x.

Beanshell is more mature, and we want a language that users will find answers for when they look, and that when they find bugs, it is clearly defined where they actually are.

We may consider emphasising a different language if there are compelling technical reasons for doing so - if you have a suggestion, feel free to contact the development list.

Where do I get help with Maven 2.0?

Help for both Maven 1.0 and Maven 2.0 can be obtained by subscribing and posting to the Maven Users List.

You can also join us on IRC (Internet Relay Chat) at irc.codehaus.org on #maven. This is available both over IRC and HTTP for those behind firewalls (enter #maven in the Channel box). You could also browse the IRC logs here.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site/fml/project-faq.fml0000644000175000017500000001264010767721741027073 0ustar twernertwerner Why do I care?

If you're a user of Maven then you are familiar with the Project Object Model (POM) which is the basic unit of work in Maven. Maven is a project-centric tool and so we attempt to capture the essence of a project in the POM. This includes things like what your project is, where the project lives, where you can find the sources for project, who the developers are on the project and how you can get hold of them, what you need to build the project, the way your project will be built, what form your project will be distributed in, and where it will be distributed from.

But why would a project not using Maven care?

Whether you want to use Maven or not, users of your project - especially if you provide a framework or reusable library - may choose to use Maven. The quality of the metadata in the Maven repository is important to your users as they list dependencies on your metadata, and link in the information into their own projects.

Maintaining the metadata for your project is not hard - you can submit it to Maven at release time (and for large projects it can be setup automatically), and just need to describe your project, its location, version and most importantly dependencies. Not doing so, or providing incomplete or invalid information leaves this responsibility to the users of your project.

The Maven team does work on this metadata actively to improve its quality, but with thousands of artifacts in the repository and only a certain level of knowledge of other projects this is not ideal. Nobody knows your project better than you.

How do I make sure my project's dependency metadata is correct?

It is best to get it right at the time of a release to avoid having to make difficult updates later on. Your information can be submitted to Maven using the regular repository upload procedure .

The following information is what is best to provide:

  • Project name
  • Project URL
  • License
  • Description of the project
  • Group and Artifact ID
  • Packaging
  • Version
  • Dependencies

The group ID should resemble the package name, or reverse DNS of your web site, and can contain subgroups as you see fit: for example, org.apache.maven and org.apache.maven.plugins.

The artifact ID is specific to each artifact and by convention should be the filename, excluding extension.

The packaging is the type of your artifact, such as jar, war, ear, ejb, dll, etc.

Each dependency also contains their group ID and artifact ID, as well as version specification. In particular, you should ensure that optional dependencies are marked as such, and that runtime and testing only dependencies are marked with the given scope. Ranges can be used for version if that is appropriate, such as commons-collections [2.0,3.0). Ensure that the dependency exists in the Maven system and matches first.

See the format of the project descriptor for more information.

How do I ensure my latest releases automatically appear in the Maven repository?

If you able to publish your releases to a Maven2 style repository and make it available over rsync, we can automatically publish them to ibiblio when released. This procedure requires that you take full responsibility for your metadata, but also ensures the best service for your users. If this is interesting to your project, contact dev@maven.apache.org.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-repository-plugin/0000755000175000017500000000000011632765551026145 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-repository-plugin/fml/0000755000175000017500000000000011632765551026723 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-repository-plugin/fml/faq.fml0000644000175000017500000000360111055554323030162 0ustar twernertwerner How can I create an upload bundle containing sources and javadoc for a project?

You can do that by running the javadoc:jar and sources:jar goals before repository:bundle-create:

mvn sources:jar javadoc:jar repository:bundle-create
How can I create an upload bundle for a project that I don't build using maven?

You can manually add the artifact to your local repository, creating a POM and optionally adding source and javadoc jars. Then you can run mvn repository:bundle-pack that will prompt you for groupId, artifactId and version and will generate a bundle that you can use for an upload request.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-stage-plugin/0000755000175000017500000000000011632765550025030 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-stage-plugin/fml/0000755000175000017500000000000011632765550025606 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-stage-plugin/fml/faq.fml0000644000175000017500000000257511055554323027057 0ustar twernertwerner Why isn't my username being picked up when I specify a repositoryId?

The plugin will pick up the username/password from your settings.xml file. Make sure that you are using the same id in your settings.xml that you are using on the command line.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-jar-plugin/0000755000175000017500000000000011632765551024502 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-jar-plugin/fml/0000755000175000017500000000000011632765551025260 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-jar-plugin/fml/faq.fml0000644000175000017500000000247511055554323026527 0ustar twernertwerner Why is there no documentation for the archive parameter?

The archive parameter is a class that resides outside of this plugin, in the Maven Archiver component. You can find the documentation for Maven Archiver here.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-rar-plugin/0000755000175000017500000000000011632765551024512 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-rar-plugin/fml/0000755000175000017500000000000011632765551025270 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-rar-plugin/fml/faq.fml0000644000175000017500000000414511055554323026533 0ustar twernertwerner Is the rar file generated by the maven-rar-plugin is the same with the rar file(compressed file) of WinRar?

No. They are entirely different from each other.

A Resource Adapter Archive (RAR) file is a Java archive (JAR) file used to package a resource adapter for the Java 2 Connector (J2C) Architecture

A RAR file can contain the following:

  • Enterprise information system (EIS) supplied resource adapter implementation code in the form of JAR files or other runnable components, such as dynamic link lists.
  • Utility classes.
  • Static documents, such as HTML files, images, and sound files.

While RAR(Roshal ARchive) is the native format of WinRAR archiver. Like other archives, RAR files are data containers, they store one or several files in the compressed form. After you downloaded RAR file from Internet, you need to unpack its contents in order to use it.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-dependency-plugin/0000755000175000017500000000000011632765551026044 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-dependency-plugin/fml/0000755000175000017500000000000011632765551026622 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-dependency-plugin/fml/faq.fml0000644000175000017500000000761111055554323030066 0ustar twernertwerner What is the difference between dependency-maven-plugin and maven-dependency-plugin?

Actually, they are the same, it's just that it was moved and renamed. The dependency-maven-plugin is hosted at Mojo while maven-dependency-plugin is hosted at Apache. The recommended plugin to use is the maven-dependency-plugin.

When executing mvn dependency:unpack or dependency:copy from the command line, I get "One or more required plugin parameters are invalid/missing for 'dependency:unpack'"

In order for this to work, you must configure the ArtifactItems as shown here. Note that when executing a plugin from the command line, you must put the configuration tag outside of the executions. If you haven't done this correctly, the error will look like this:

[0] inside the definition for plugin: 'maven-dependency-plugin'specify the following:
	 		

Why am I getting errors that a documented goal or parameter is missing?

The latest documents are published and may preceed the actual release. Check to make sure the goal/parameter is in the most recent version. -OR- Maven may be resolving the older codehaus version of the dependency plugin. See next question.

Why is Maven resolving "dependency:xxx" to the older org.codehaus.mojo:dependency-maven-plugin?

Due to a bug in Maven in versions prior to 2.0.7 (MNG-2926) the search order was reversed and caused Mojo plugins to supercede ones with the same prefix at Apache. The metadata at mojo was cleaned up when the maven-dependency-plugin was released at Apache. If you are still experiencing this error, chances are you have old metadata in your local repository or in a proxy / internal repository. Removing /org/codehaus/mojo/maven-metadata.* from your repo/proxy will cause it to be refreshed. Alternatively, you can specify the groupId explicitely in your pom (if you are using a bound goal), or on the command line, use groupId:artifactId:version:mojo, ie mvn org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:unpack

Why am I having trouble unpacking only a specific file?

The excludes will override the includes declaration. That means if you specify excludes=**/* ,includes=**/foo, you will exclude everything. If you only want foo, then just specify the includes. The plexus component used to unpack uses the following code to determing which files to unpack: return isIncluded( name ) AND !isExcluded( name );

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site-plugin/0000755000175000017500000000000011632765550024671 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site-plugin/xdoc/0000755000175000017500000000000011632765550025626 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site-plugin/xdoc/i18n.xml0000644000175000017500000004607411060475306027132 0ustar twernertwerner Internationalization Vincent Siveton Dennis Lundberg

The site generation done by the Site Plugin and the Project Info Reports Plugin is fully internationalized. This means that adapting them to another language, a process known as localization, is very easy. All that is needed is to download a couple of properties files and start translating the texts in them. If you want to provide a patch for an unsupported language, there are detailed instructions below.

There are currently three files that needs to be localized to support a new language. The following table summarizes the currently supported languages.

Note: The files linked to below are the files used in the latest development code. So the files may be newer than the ones included in the latest release.

Languages available Site Plugin Project Info Reports Plugin Doxia Tools
Brazilian Portuguese See See See
Catalan See N/A See
Chinese simplified See See See
Czech See See See
Danish See N/A See
Dutch See See See
English (Default) See See See
French See See See
German See See See
Hungarian See See See
Italian See See See
Japanese See See See
Korean See See See
Norwegian See See See
Polish See See See
Portuguese See See See
Slovak See See See
Spanish See See See
Swedish See See See
Turkish See See See

To see the current level of localization support you can have a look at the L10n Status Report for each one of them:

If you want to contribute a localization, follow these steps:

  1. Download each of the three properties files linked above as the base for your translation. Pick files from a language that you understand well, for instance English.
  2. Rename the files to the wanted locale. For example, site-plugin_de.properties for a new German translation for the Maven Site Plugin.
  3. Translate the files contents using your preferred text editor. The files must use US-ASCII encoding. For characters that are not included in US-ASCII you must use Unicode escapes, like "\u8ff0". See the tools section below for examples of tools that can help you to convert your texts to use Unicode escapes.
  4. To test your localization
    • Checkout the latest source for Site Plugin, Project Info Reports Plugin and Doxia Tools
    • Include your files in src/main/resources for each one
    • Run "mvn install" for each one
    • Configure a project to produce a site in several locales
    • Make sure that it is using the latest SNAPSHOT version of each of the above artifacts
    • Run "mvn site" on that project to test it
  5. When you are happy with it, create a new issue in JIRA and attach your files there.

Please refer to the Java Internationalization home page for an introduction to the topic.

Here you can find some useful tools to help you with charset questions and conversions:

You can also refer to this Sun FAQ: How Can I Determine the Encoding of a File?.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-site-plugin/fml/0000755000175000017500000000000011632765550025447 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-site-plugin/fml/faq.fml0000644000175000017500000001211611055554323026710 0ustar twernertwerner What is the difference between mvn site and mvn site:site?

mvn site
Calls the site lifecycle with the associate phases (i.e. pre-site, site, post-site, site-deploy). See Lifecycle Reference.
mvn site:site
Calls the site goal from the site plugin. See site:site.

How do I Integrate static (X)HTML pages into my Maven site?

You can integrate your static pages by following these steps:

  • Put your static pages in the resources directory, ${basedir}/src/site/resources
  • Create your site.xml and put it in ${basedir}/src/site
  • Link to the static pages by modifying the menu section, create items and map them to the filenames of the static pages
Why do my absolute links get translated into relative links?

This happens because the Site Plugin tries to make all URLs relative, when possible. If you have something like this defined in your pom.xml: http://www.your.site.com/ and create links in your site.xml (just an example) like this: You will see that the link to "Your site" will be a relative one, but that the link to "Maven 2" will be an absolute link.

There is an issue for this in JIRA, where you can read more about this.

Why don't the links between parent and child modules work when I run "mvn site"?

What "mvn site" will do for you, in a multi-project build, is to run "mvn site" for the parent and all its modules individually. The links between parent and child will not work here. They will however work when you deploy the site.

If you want to test this, prior to deployment, you can run the site:stage goal as described in the usage documentation instead.

How to include a custom Doxia module, like Twiki?

The site plugin handles out-of-box apt, xdoc and fml formats. If you want to use a custom format like Twiki, you need to specify the Doxia Twiki dependency, i.e.: ... ... org.apache.maven.plugins maven-site-plugin org.apache.maven.doxia doxia-module-twiki 1.0-alpha-11 ...

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-checkstyle-plugin/0000755000175000017500000000000011632765550026063 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-checkstyle-plugin/fml/0000755000175000017500000000000011632765550026641 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-checkstyle-plugin/fml/faq.fml0000644000175000017500000000415211055554323030103 0ustar twernertwerner How are the Checkstyle properties set?

You can set the Checkstyle properties to be used in the plugin configuration of your pom through the propertiesLocation parameter. The properties file will be resolved by the plugin based on its value.

How do I set a custom ruleset?

You can set a custom ruleset through the configLocation plugin parameter. If no value is specified, the plugin will use a default ruleset, which is the sun_checks.xml, that is bundled with the plugin.

How do I include the test directory in Checkstyle?

You can include the test directory in the Checkstyle report by setting the includeTestSourceDirectory plugin parameter to true.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-remote-resources-plugin/0000755000175000017500000000000011632765550027230 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-remote-resources-plugin/fml/0000755000175000017500000000000011632765550030006 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-remote-resources-plugin/fml/faq.fml0000644000175000017500000000714311055554323031253 0ustar twernertwerner Why do I need to use this plugin?

This plugin greatly reduces the pain associated with consistent packaging concerns across a large set of projects, or an entire organization. Any project can specify the use of a remote resource bundle and have the resources incorporated into their packaging. This means that you can create standard settings in a parent POM somewhere in the project hierarchy and have all projects use packaged common resources in a standard way like licenses, other legal notices and disclaimers, or anything else that may be common.

The generated files have a lot of missing information. Looking at the poms from the dependencies, the information isn't there either. What can I do?

There are two solutions:

  1. File bugs with the projects that produced those artifacts to get them to fix them. Also, file bugs with the Maven Evangelism project to have the Maven people enhance the metadata in the repository.
  2. Use a supplemental data file. You can create a file that contains the missing metadata. For example: com.sun.xml.bind jaxb-impl Sun JAXB Reference Implementation Runtime Sun Microsystems http://www.sun.com/ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.sun.com/cddl/cddl.html That location for that file can then be configured in the supplementalModels configuration element for the process mojo. The supplemental information is merged into the information provided from the repository.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-verifier-plugin/0000755000175000017500000000000011632765550025540 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-verifier-plugin/fml/0000755000175000017500000000000011632765551026317 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-verifier-plugin/fml/faq.fml0000644000175000017500000000210311055554323027552 0ustar twernertwerner Can it verify other things like URLs?

No.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-changes-plugin/0000755000175000017500000000000011632765552025337 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-changes-plugin/xdoc/0000755000175000017500000000000011632765552026274 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-changes-plugin/fml/0000755000175000017500000000000011632765552026115 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-changes-plugin/fml/faq.fml0000644000175000017500000000470411055554323027360 0ustar twernertwerner What's the difference between the changes-maven-plugin at Mojo and this one?

This plugin started out at the Mojo project. In March of 2006 the plugin was moved to Apache and the Maven sandbox. So it's the same plugin, but this one is newer.

I get a org.xml.sax.SAXParseException, when generating the JIRA Report. What can do about it?

If you have a lot of entities in the xml file returned from your JIRA installation, you might get an error like this one, when you run the JIRA Report: org.xml.sax.SAXParseException: Parser has reached the entity expansion limit "64,000" set by the Application. If that happens you need to tell the xml parser to use a higher limit. This can be accomplished by adding a command line parameter. In the following example we have set it to double the original value: mvn -DentityExpansionLimit=128000 ...

Unfortunately we have not been able to set this in Java. If someone knows how to do this, then please reopen MCHANGES-75, and tell us how. It would be nicer if this could be set using a parameter in the POM.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-idea-plugin/0000755000175000017500000000000011632765550024627 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-idea-plugin/fml/0000755000175000017500000000000011632765550025405 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-idea-plugin/fml/faq.fml0000644000175000017500000000350411055554323026647 0ustar twernertwerner Is this the IDEA Plugin that allows me to run Maven commands from within IntelliJ IDEA?

No. This is a Maven plugin to generate IntelliJ IDEA files for a Maven project. This is not an IDEA Plugin for Maven.

How does the IDEA plugin work on multi-projects?

Maven IDEA Plugin, by default, creates the project file (*.ipr) and the workspace file (*.iws) from where the root pom is located. Then module files (*.iml) are created for each of the projects inside the reactor.

If some projects depend on another project in the reactor, then the reference to the project is given instead of the hard-references to the local repository copies of the artifacts.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-install-plugin/0000755000175000017500000000000011632765551025374 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-install-plugin/fml/0000755000175000017500000000000011632765551026152 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-install-plugin/fml/faq.fml0000644000175000017500000000234011055554323027410 0ustar twernertwerner Can I use the install:install-file goal to install artifacts to my remote repository?

No. You may want to use deploy:deploy-file instead.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-clean-plugin/0000755000175000017500000000000011632765551025010 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-clean-plugin/fml/0000755000175000017500000000000011632765551025566 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-clean-plugin/fml/faq.fml0000644000175000017500000000531511055554323027031 0ustar twernertwerner I already ran mvn clean but the directory (put dir name here) is still there. What should I do?

Some files-generating plugins can generate their files outside of the default directories being deleted by the clean plugin. You should add the location of such files in the clean plugin configuration or change the configuration of those plugins to put their files inside the project.build.directory which is by default, the target directory.

On Windows, I got "Unable to delete directory". What's wrong?

For instance, clean could fail if you already have opened a command line with target as the current dir. Windows locks some ressources and you need to close the handles on these ressources. To skip these errors, you could call clean with the command line parameter -Dmaven.clean.failOnError=false. For more information, refer to Ignoring Errors page.

Sysinternals produced a number of utilities, like Process Explorer or Handle that help you to deal with Windows handles.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-help-plugin/0000755000175000017500000000000011632765551024656 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-help-plugin/fml/0000755000175000017500000000000011632765551025434 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-help-plugin/fml/faq.fml0000644000175000017500000000274511055512465026704 0ustar twernertwerner What is a Mojo

See the Maven FAQ: What is a Mojo.

Why mvn help:active-profiles won't show the active profiles under Maven 2.1?

See MPH-38 for more info.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-invoker-plugin/0000755000175000017500000000000011632765551025403 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-invoker-plugin/fml/0000755000175000017500000000000011632765551026161 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-invoker-plugin/fml/faq.fml0000644000175000017500000000667511056460046027435 0ustar twernertwerner Why do I need to use this plugin?

It is essential that you provide some form of integration testing for your projects and the Invoker Plugin tries to make is easy for you to create integration tests for your Maven Plugins, new Lifecycles, or any other type of Maven component that you've created. Currently the Invoker Plugin forks Maven to execute the specified projects, but it is hoped that soon we will integrate the Maven Embedder into the mix to allow you run your projects in process for great speed.

How can I assert that the build of an IT project fails?

Sometimes you might want to test that error conditions are properly dealt with, i.e. fail a build. To assert a failure for a particular IT project, put the following setting into the properties file denoted by the plugin's invokerPropertiesFile parameter:

invoker.buildResult=failure
Now, the failure of the IT build will be interpreted as a test success. Likewise, a successful IT build will be considered a test failure.

How can I share common code between the pre-/post-build scripts?

If you want to avoid copy&paste of lengthy code snippets within the hook scripts, you can move this code into a regular Java class. More precisely, you would place this utility code somewhere in your test source tree and set the plugin parameter addTestClassPath to true. For more details, please see the example Accessing Test Classes.

How can I invoke multiple Maven builds on the same IT project?

This is not supported in the plugin configuration but rather on a per project basis by means of the invoker properties. This way, you use properties like invoker.goals.2 to configure the goals for a second invocation of Maven. Have a look at the example about using Invoker Properties.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-one-plugin/0000755000175000017500000000000011632765551024507 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-one-plugin/fml/0000755000175000017500000000000011632765551025265 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-one-plugin/fml/faq.fml0000644000175000017500000000351011055554323026523 0ustar twernertwerner Will this plugin allow me to use Maven 1.x plugins in Maven 2?

No it will not, but it will allow you to package, install and deploy a Maven 1.x plugin using Maven 2.

What's the difference between one:deploy-maven-one-repository and deploy:deploy-file with repositoryLayout set to legacy?

If you'd use deploy:deploy-file then you'd need to configure the file, groupId, artifactId, version for it, whereas with this plugin you don't need to configure anything but the repository, as it gets the rest from the pom. It's more like deploy:deploy than it is deploy:deploy-file.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-changelog-plugin/0000755000175000017500000000000011632765550025654 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-changelog-plugin/fml/0000755000175000017500000000000011632765550026432 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-changelog-plugin/fml/faq.fml0000644000175000017500000002011111055554323027665 0ustar twernertwerner What is the difference between the Changelog plugin and the Changes plugin?

The Changelog plugin generates reports based on the changes in the Software Configuration Management or SCM while the Changes plugin generates reports either from a changes.xml file or from the JIRA issue management system. For more information about the changes plugin, see http://maven.apache.org/plugins/maven-changes-plugin

What is Software Configuration Management or SCM?

According to Roger Pressman (in his book) Software Engineering: A Practitioner's Approach, SCM is a "set of activities designed to control change by identifying the work products that are likely to change, establishing relationships among them, defining mechanisms for managing different versions of these work products, controlling the changes imposed, and auditing and reporting on the changes made."

Why do the dates look weird in the report when I use the dateFormat parameter?

The dateFormat parameter is used when parsing the dates from the log entries retrieved from your SCM system. It can not be used to format the dates in the report. If you try to do this the parsed dates will be wrong and the dates in the report even more so. They can look like this 0020-05-27 for a file that was changed on 14 december 2005.

How can I debug the SCM command?

When you generate the report, you will see output like this on the command line: [INFO] [changelog:changelog] [INFO] Generating changed sets xml to: .../target/changelog.xml [INFO] Executing: svn --non-interactive log -v -r "{2007-06-13 22:22:09 +0000}:{2007-07-14 22:22:09 +0000}" http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-site-plugin Copy the SCM command (everything after Executing:) and try to run it by itself on the command line. If it doesn't work on the command line there's probably something wrong with the <scm> element in your pom.xml.

My changelog report is blank, but it shouldn't be

The first thing to check is what data the changelog plugin managed to pull out of your SCM system. In the file target/changelog.xml you will find that data. Have a look and see if the data in the file seems correct. If it is not correct, then you are not getting the data you expected from your SCM system. Please check your changelog plugin configuration.

If that doesn't help, you can try to run the maven-scm-plugin from the command line. The maven-changelog-plugin uses Maven SCM under the hood and running the maven-scm-plugin is a great way of verifying that the <scm> element in your pom.xml file is correct. Try this on the command line: mvn scm:changelog It should show you the latest changes made in your SCM. It uses the default settings, but you can change these by specifying parameters on the command line. Read more about this in the scm-plugin documentation.

Where can I find a working configuration for this plugin?

The plugin itself is configured to generate a changelog report. This is done using the bare minimum of configuration. Have a look at the <scm> and <reporting>/<plugins> elements in the pom.xml of this plugin. The generated report is found here.

How do I use this plugin with Perforce?

You have to specify your clientspec in the <systemProperties> element of this plugin's <configuration> element. org.apache.maven.plugins maven-changelog-plugin maven.scm.perforce.clientspec.name your-client-spec-name

The Developer Activity report is blank, but the other reports are fine

You need to add <developer> elements in your pom.xml file. Their id:s need to match the userid:s that are used in your SCM system. Only checkins made by a developer found in the pom will be added to the Developer Activity report.

I think I've found a bug in this plugin, what do I do?

Please follow these steps in the order they come.

  1. Read all the FAQs on this page.
  2. Ask a question on the user list. Please supply the necessary information so that the people on the list can help you. This includes the <scm> element from your pom.xml, your plugin configuration plus a rich description of what happens and what you expected to happen.
  3. Create an issue in JIRA.
doxia-1.1.4/doxia-test-docs/src/main/resources/maven-ant-plugin/0000755000175000017500000000000011632765550024507 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ant-plugin/fml/0000755000175000017500000000000011632765550025265 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ant-plugin/fml/faq.fml0000644000175000017500000000261611055554323026532 0ustar twernertwerner Where are the generated Ant build files?

The files are generated in the Maven ${basedir} directory.

What are the generated key tasks?

The key tasks are: clean, compile, compile-tests, test, javadoc, package.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-deploy-plugin/0000755000175000017500000000000011632765551025222 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-deploy-plugin/fml/0000755000175000017500000000000011632765551026000 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-deploy-plugin/fml/faq.fml0000644000175000017500000000515611055554323027246 0ustar twernertwerner I get an Unsupported Protocol Error when deploying a 3rd party jar. What should I do?

If you are using the deploy:deploy-file goal and encounter this error:

"Error deploying artifact: Unsupported Protocol: 'ftp': Cannot find wagon which supports the requested protocol: ftp"

Then you need to place the appropriate wagon provider in your %M2_HOME%/lib. In this case the provider needed is ftp, so we have to place the wagon-ftp jar in the lib directory of your Maven 2 installation.

If the error description is something like this:

"Error deploying artifact: Unsupported Protocol: 'ftp': Cannot find wagon which supports the requested protocol: ftp org/apache/commons/net/ftp/FTP"

Then you need to place the commons-net jar in %M2_HOME%/lib.

I don't want to deploy one of the artifacts in my multi-module build. Can I skip deployment?

Yes, you can skip deployment of individual modules by configuring the deploy plugin as follows:

maven-deploy-plugin X.Y true

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-compiler-plugin/0000755000175000017500000000000011632765550025537 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-compiler-plugin/fml/0000755000175000017500000000000011632765550026315 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-compiler-plugin/fml/faq.fml0000644000175000017500000000404711055554323027562 0ustar twernertwerner Is there a way to get Maven to report the number of compile errors found?

Currently, this type of summary information is not built into the compiler plugin, but it would be possible to add. If this feature is important to you, add your vote to MNG-1854 .

How do I add my generated sources to the compile path of Maven, when using modello?

Modello generate the sources in the generate-sources phase and automatically adds the source directory for compilation in maven. So you don't have to copy the generated sources.

You have to declare the modello-plugin in the build of your plugin for source generation (in that way the sources are generated each time).

The Modello website can be found here .

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-ear-plugin/0000755000175000017500000000000011632765551024475 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ear-plugin/fml/0000755000175000017500000000000011632765551025253 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-ear-plugin/fml/faq.fml0000644000175000017500000000334711055554323026521 0ustar twernertwerner What is an EAR archive?

An EAR archive is used to deploy standalone EJBs, usually separated from the web application. Thus, there is no need for a web application to access these EJBs. The EJBs are still accessible though using EJB clients.

The EAR Plugin throws an exception when encountering artifact types it is unfamiliar with. Is this a bug?

The exception can be prevented by adding your custom artifact type to the artifactTypeMappings configuration. There is a mini-guide on how to do that in the modules configuration section.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-patch-plugin/0000755000175000017500000000000011632765551025025 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-patch-plugin/fml/0000755000175000017500000000000011632765551025603 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-patch-plugin/fml/faq.fml0000644000175000017500000000367511055554323027055 0ustar twernertwerner What would a patch plugin even be used for?

In certain environments direct source modification is not allowed so to make alterations to the source you need some patch application process. This plugin seeks to address those situations.

Why doesn't this work on Windows?

This plugin wraps the GNU patch tool, which must be in your PATH in order to function properly. A Windows installation usually does not ship with this tool so you will need to install it manually. You might be able to get this plugin working within Cygwin or by using the port Patch for Windows.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-docck-plugin/0000755000175000017500000000000011632765551025011 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-docck-plugin/fml/0000755000175000017500000000000011632765551025567 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-docck-plugin/fml/faq.fml0000644000175000017500000000355411063234277027037 0ustar twernertwerner Where did the standard came from?

The plugin documentation standard was created to address the frequent complaint of lack of documentation, specifically for the Maven plugins. The standard was based on suggestions made on the Maven dev mailing list with some refinements. It is a community consensus of what basic documentation a Maven plugin should have.

Why do we need a documentation standard?

The standard is not a set of rules but a guide to help plugin developers document their plugins better, for the benefit of the users of the plugin. The standard also reminds the plugin developers of the important details that needs to be documented, to help speed up the adoption of the plugin.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-doap-plugin/0000755000175000017500000000000011632765551024651 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-doap-plugin/fml/0000755000175000017500000000000011632765551025427 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-doap-plugin/fml/faq.fml0000644000175000017500000000562011055554323026671 0ustar twernertwerner What is DOAP?

DOAP stands for "Description of a Project" and you can find out everything there is to know about DOAP in its homepage and in this article.

What are the benefits of DOAP?

The Semantic Web provides mechanisms to process data provided in a form that is easily processed by machines. Thus, a DOAP is a machine readable document which facilitates projects research: it becomes much easier to seek information in the mass of data of the Web, since the data have a given foreseeable format.

Why would I use DOAP when I have a POM?

That's a very good question! The answer is that generating a DOAP file should take no effort if you are using Maven DOAP Plugin and it helps disseminate project information which can only be a good thing. Cataloging tools like SWiK or like DoapStore can benefit from you generating DOAP files and that can also only be a good thing. Even so, it is still important to spread as much information about projects around as possible so there is no downside to creating DOAP files.

What to do with the generated DOAP file?

Maven DOAP plugin has generated a DOAP file, what's next? See DOAP in Use part.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-eclipse-plugin/0000755000175000017500000000000011632765550025351 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-eclipse-plugin/fml/0000755000175000017500000000000011632765550026127 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-eclipse-plugin/fml/faq.fml0000644000175000017500000000460711055554323027376 0ustar twernertwerner Is this the Eclipse Plugin that allows me to run maven commands from within Eclipse IDE?

No. This is a maven plugin to generate Eclipse files for a maven project. This is not an Eclipse Plugin for Maven.

I already did mvn eclipse:eclipse but when I open Eclipse, my project is not there. Where is it?

You may also need to import the project created by Maven Eclipse Plugin. More information can be found here.

After running mvn eclipse:eclipse, the generated dependencies are pointing to a non-existing file. What needs to be done?

Before you can setup any maven project to your Eclipse IDE, you need to define first the location of your local repository to Eclipse. This is done by using: eclipse:add-maven-repo

Can I make the Eclipse plugin download and attach javadocs to my libraries?

As of version 2.4, there is a new flag, downloadJavadocs that behaves exactly like downloadSources except for javadocs. See more information here: Attach Library Sources.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-assembly-plugin/0000755000175000017500000000000011632765551025545 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-assembly-plugin/fml/0000755000175000017500000000000011632765551026323 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-assembly-plugin/fml/faq.fml0000644000175000017500000000614511055554323027570 0ustar twernertwerner If the Assembly Plugin is run during the package phase, do my assemblies get deployed during the deploy phase?

Yes. The assemblies created by the Assembly Plugin is attached to your project so it gets deployed too.

Can I use an artifact created by the assembly plugin as a dependency?

Yes. You can refer to it using the id of the assembly as the dependency classifier.

How do I use the Assembly Plugin to package my project's javadoc files?

The Javadoc Plugin can generate the javadoc files of your projects. Also, the Javadoc Plugin can package them!

Please see the Javadoc Plugin Documentation.

I have a dependencySet that includes some artifacts with classifiers, and others without classifiers. How can I setup the file mappings to handle both cases appropriately?

The best way to handle a mixed bag of dependencies with and without classifiers is to use the ${dashClassifier?} expression, added in version 2.2-beta-2 of the assembly plugin especially for this purpose. This expression will determine whether each artifact has a classifier, and if it does, it will substitute the artifact's classifier - prepended by a dash - in place of the expression.

For example, suppose you want to include two artifacts, commons-logging-1.0.4.jar, and yourserver-1.0-client.jar (where 'client' is the classifier of the second artifact). To do this, simply add the following to your dependencySet:

<outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
        
doxia-1.1.4/doxia-test-docs/src/main/resources/maven-gpg-plugin/0000755000175000017500000000000011632765551024503 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-gpg-plugin/fml/0000755000175000017500000000000011632765551025261 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-gpg-plugin/fml/faq.fml0000644000175000017500000000213311055554323026517 0ustar twernertwerner What is GnuPG?

You can read more about GnuPG at their web site.

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-source-plugin/0000755000175000017500000000000011632765551025226 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-source-plugin/fml/0000755000175000017500000000000011632765551026004 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-source-plugin/fml/faq.fml0000644000175000017500000000227111055554323027245 0ustar twernertwerner How can I generate a source jar of the test classes?

Use the source:test-jar goal to generate a jar file that contains the project test sources.

doxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/0000755000175000017500000000000011632765551023374 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/xdoc/0000755000175000017500000000000011632765551024331 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/xdoc/references/0000755000175000017500000000000011632765551026452 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/xdoc/references/xdoc-format.xml0000644000175000017500000001760011044067401031405 0ustar twernertwerner The Xdoc format Lukas Theussl

An 'xdoc' is an XML document conforming to a small and simple set of tags. Xdoc was the primary documentation format in Maven 1, Maven 2 largely replaced this by Apt, but xdoc is still supported.

Historically, the xdoc format can be traced back to the Anakia format, as once used by the Apache Jakarta project.

The Maven 1 Xdoc plugin introduced a few additions to the Anakia format, they are highlighted in the plugin documentation.

The following is a sample XDoc document:

Page Title John Doe

Hi!

Subsection!

code line 1 code line 2
]]>

Doxia will produce <h2> and <h3> headings for <section> and <subsection> elements, respectively. It is therefore perfectly valid to put some sub-headings (<h4>, <h5>, <h6>) inside a subsection. For instance,

A subsubsection]]>

will produce:

A subsubsection

The core doxia modules do not construct anchors from section/subsection names. If you want to reference a section, you should either provide an explicit anchor:

]]>

or use an id attribute for section and subsections (note that id's have to be unique within one xdoc source document):

]]>

Note that this differs from previous behavior, where anchors were constructed from section/subsection names, replacing special characters by underscores. This behavior presents two shortcomings:

  • If two sections or subsections have identical names (within one source document), you will get an ambiguity when referencing them. Also the resulting html document will not be valid XHTML. For other output formats (eg pdf), it might even be impossible to generate the target document.
  • For long section titles, this leads to rather cumbersome anchor names.

If automatic anchor generation is desired for a particular output format, it should be implemented / overridden by the corresponding low-level Sink.

Doxia is currently not able to validate your xdoc files as no schema or DTD exists yet (however this is planned before the 1.0 release). It is therefore necessary to check manually whether your source files are valid xdocs, this should ensure that the generated html files are valid XHTML1-transitional.

Here is a list of common mistakes to be aware of:

Wrong:

Here's a list:
  • item 1
  • item 2
of things to do.

]]>

Correct:

Here's a list:

  • item 1
  • item 2

of things to do.

]]>

Typical block level elements are list elements, <table>, <source>, <div>, <p> and <pre>.

Wrong:

Downloads
]]>

Correct:

Downloads

]]>

Typical inline elements are <a>, <strong>, <code>, <font>, <br> and <img>.

The <title> element has to come before <author>.

Wrong:

The following command executes the program: java -jar CoolApp.jar

]]>

Correct:

The following command executes the program:

java -jar CoolApp.jar]]>

However, you may put <source> elements inside list items or table rows.

doxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/xdoc/references/index.xml0000644000175000017500000001442211077332405030275 0ustar twernertwerner Doxia Markup Languages References Lukas Theussl Vincent Siveton

The following table gives an overview of the markup languages currently supported by Doxia. If a Parser is available for a given format, it means that you can write your documentation in this language and Doxia can generate output from it. If a Sink is available, it means you can generate output in this format.

The source directory is the directory under which Maven expects source documents in this format (e.g. src/site/apt/ for Apt), the extension is the default file extension, and the parser id is gives the unique identifier that is used by plexus to lookup the corresponding component.

Please consult the Modules Guide for links to reference documentation of external formats.

Format Short description Parser Sink Source Directory Extension Parser Id
Apt Almost Plain Text Yes Yes apt apt apt
Confluence Confluence Enterprise Wiki Yes Yes confluence confluence confluence
Simplified DocBook Simplified DocBook XML Standard Yes Yes docbook xml doc-book
FML FAQ Markup Language Yes Yes fml fml fml
iText iText PDF Library Yes Yes
LaTeX LaTeX typesetting system Yes Yes
RTF Microsoft Rich Text Format Yes Yes
TWiki TWiki Structured Wiki Yes Yes twiki twiki twiki
Xdoc XML Documentation Format Yes Yes xdoc xml xdoc
XHTML Extensible Hypertext Markup Language Yes Yes xhtml xhtml xhtml

doxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/xdoc/references/fml-format.xml0000644000175000017500000000461310662557666031254 0ustar twernertwerner The FML (FAQ Markup Language) format Lukas Theussl

An 'fml' is an XML document conforming to a small and simple set of tags. The format was first used in the Maven 1, version of the FAQ plugin.

The following is a sample FML document:

General What is Foo?

some markup goes here

some source code

some markup goes here

What is Bar?

some markup goes here

Installation How do I install Foo?

some markup goes here

]]>
doxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/fml/0000755000175000017500000000000011632765551024152 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/doxia-site/fml/faq.fml0000644000175000017500000001073511215432700025407 0ustar twernertwerner How to handle style in the APT markup language?

APT doesn't currently support style. It is in the roadmap.

How to export in PDF?

There are two modules available that can be used to generate pdf output: an iText module that uses the iText framework, and a FO module, that can be used e.g. in conjunction with Apache FOP to generate a pdf. Unfortunately, the iText team has discontinued the XML to PDF functionalities, so probably only the fo module is going to be supported in the future.

A pdf plugin for m2 is currently in development in the Doxia sandbox. You can get the source here.

Is it possible to create a book?

Doxia also has a fairly simple tool for writing books. It comes complete with a Maven plugin to produce PDFs, LaTeX documents and Xdoc for direct integration in your Maven site. The Doxia Book code is still limited but fully functional.

See Writing Books in Doxia for more information.

Why XML based sinks don't generate nicely formatted documents?

We decided to keep pretty printing out of the core modules. So, XML based sinks like Xdoc or XHTML are intentionally unformatted. You could always do this after the document generation or directly by creating a specialized end-user sink (see DOXIA-255).

Where are the Maven Doxia XSD schemas for Xdoc and FML files?

The Xdoc XSD is located here and the FML XSD is located here.

Your favorite IDE probably supports XSD schema's for Xdoc and FML files. You need to specify the following: <document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd"> ... </document> <faqs xmlns="http://maven.apache.org/FML/1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd"> ... </faqs>

doxia-1.1.4/doxia-test-docs/src/main/resources/maven-pmd-plugin/0000755000175000017500000000000011632765551024506 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-pmd-plugin/fml/0000755000175000017500000000000011632765551025264 5ustar twernertwernerdoxia-1.1.4/doxia-test-docs/src/main/resources/maven-pmd-plugin/fml/faq.fml0000644000175000017500000000255011055554323026525 0ustar twernertwerner The PMD report takes a long time to generate. Is there any way to skip the PMD or CPD reports temporarily?

Yes, each report supports a skip parameter which you can pass on the command line, -Dpmd.skip=true and -Dcpd.skip=true respectively.

doxia-1.1.4/doxia-core/0000755000175000017500000000000011632765554014627 5ustar twernertwernerdoxia-1.1.4/doxia-core/pom.xml0000644000175000017500000000702411470562366016143 0ustar twernertwerner 4.0.0 org.apache.maven.doxia doxia 1.1.4 ../pom.xml doxia-core Doxia :: Core Doxia core classes and interfaces. org.apache.maven.doxia doxia-sink-api org.apache.maven.doxia doxia-logging-api org.codehaus.plexus plexus-utils org.codehaus.plexus plexus-container-default xerces xercesImpl 2.9.1 commons-lang commons-lang 2.4 org.apache.httpcomponents httpclient 4.0.2 org.apache.maven.plugins maven-jar-plugin test-jar org.codehaus.modello modello-maven-plugin descriptor generate-sources java xpp3-reader xpp3-writer xsd docs pre-site xdoc xsd 1.0.1 src/main/mdo/document.mdo doxia-1.1.4/doxia-core/src/0000755000175000017500000000000011632765554015416 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/0000755000175000017500000000000011632765553016374 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/resources/0000755000175000017500000000000011632765553020406 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/resources/macro/0000755000175000017500000000000011632765553021507 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/resources/macro/snippet/0000755000175000017500000000000011632765553023171 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/resources/macro/snippet/testSnippet.txt0000644000175000017500000000026211163507633026244 0ustar twernertwerner preamble SNIPPET START firstId first snippet SNIPPET END firstId interlude another snippet to start: secondId second snippet another snippet to end: secondId conclusion doxia-1.1.4/doxia-core/src/test/java/0000755000175000017500000000000011632765552017314 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/0000755000175000017500000000000011632765552020103 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/0000755000175000017500000000000011632765552021324 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/0000755000175000017500000000000011632765552022432 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/0000755000175000017500000000000011632765553023537 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/0000755000175000017500000000000011632765552024637 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/0000755000175000017500000000000011632765552026321 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java0000644000175000017500000001052711163507633032426 0ustar twernertwernerpackage org.apache.maven.doxia.macro.snippet; /* * 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.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; import org.codehaus.plexus.PlexusTestCase; /** * Test snippet macro. * * @author ltheussl */ public class SnippetMacroTest extends PlexusTestCase { /** * Test of execute method, of class SnippetMacro. * * @throws MacroExecutionException if a macro fails during testing. */ public void testExecute() throws MacroExecutionException { File basedir = new File( getBasedir() ); Map macroParameters = new HashMap(); macroParameters.put( "file", "src/test/resources/macro/snippet/testSnippet.txt" ); SinkEventTestingSink sink = new SinkEventTestingSink(); MacroRequest request = new MacroRequest( macroParameters, basedir ); SnippetMacro macro = new SnippetMacro(); macro.execute( sink, request ); Iterator it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); String snippet = (String) event.getArgs()[0]; assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); assertTrue( snippet.indexOf( "preamble" ) != -1 ); assertTrue( snippet.indexOf( "first snippet" ) != -1 ); assertTrue( snippet.indexOf( "interlude" ) != -1 ); assertTrue( snippet.indexOf( "second snippet" ) != -1 ); assertTrue( snippet.indexOf( "conclusion" ) != -1 ); // again macroParameters.put( "id", "firstId" ); macroParameters.put( "verbatim", "" ); sink.reset(); request = new MacroRequest( macroParameters, basedir ); macro.execute( sink, request ); it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); snippet = (String) event.getArgs()[0]; assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); assertTrue( snippet.indexOf( "preamble" ) == -1 ); assertTrue( snippet.indexOf( "first snippet" ) != -1 ); assertTrue( snippet.indexOf( "interlude" ) == -1 ); assertTrue( snippet.indexOf( "second snippet" ) == -1 ); assertTrue( snippet.indexOf( "conclusion" ) == -1 ); // again macroParameters.put( "id", "secondId" ); macroParameters.put( "verbatim", "false" ); sink.reset(); request = new MacroRequest( macroParameters, basedir ); macro.execute( sink, request ); it = sink.getEventList().iterator(); event = (SinkEventElement) it.next(); assertEquals( "rawText", event.getName() ); snippet = (String) event.getArgs()[0]; assertFalse( it.hasNext() ); assertTrue( snippet.indexOf( "preamble" ) == -1 ); assertTrue( snippet.indexOf( "first snippet" ) == -1 ); assertTrue( snippet.indexOf( "interlude" ) == -1 ); assertTrue( snippet.indexOf( "second snippet" ) != -1 ); assertTrue( snippet.indexOf( "conclusion" ) == -1 ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/manager/0000755000175000017500000000000011632765552026251 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/manager/MacroManagerTest.java0000644000175000017500000000314411166632523032303 0ustar twernertwernerpackage org.apache.maven.doxia.macro.manager; /* * 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.macro.Macro; import org.codehaus.plexus.PlexusTestCase; /** @author Jason van Zyl */ public class MacroManagerTest extends PlexusTestCase { /** * Test MacroManager. * * @throws java.lang.Exception if any. */ public void testMacroManager() throws Exception { MacroManager mm = (MacroManager) lookup( MacroManager.ROLE ); assertNotNull( mm ); Macro macro = mm.getMacro( "snippet" ); assertNotNull( macro ); try { macro = mm.getMacro( "weirdId" ); fail( "should not exist!" ); } catch ( MacroNotFoundException macroNotFoundException ) { assertNotNull( macroNotFoundException ); } } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/EchoMacroTest.java0000644000175000017500000000512111163507633030172 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import junit.framework.TestCase; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; /** * Test echo macro. * * @author ltheussl */ public class EchoMacroTest extends TestCase { /** * Test of execute method, of class EchoMacro. */ public void testExecute() { Map macroParameters = new HashMap(); macroParameters.put( "paramName", "paramValue" ); macroParameters.put( "parser", "parserValue" ); macroParameters.put( "sourceContent", "sourceContentValue" ); SinkEventTestingSink sink = new SinkEventTestingSink(); MacroRequest request = new MacroRequest( macroParameters, new File( "." ) ); new EchoMacro().execute( sink, request ); Iterator it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "verbatim", event.getName() ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "echo" + Macro.EOL, (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "paramName ---> paramValue" + Macro.EOL, (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "verbatim_", event.getName() ); assertFalse( it.hasNext() ); } /** * Test log. */ public void testLog() { EchoMacro macro = new EchoMacro(); macro.enableLogging( null ); assertNotNull ( macro.getLog() ); assertNotNull ( macro.getLog() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/0000755000175000017500000000000011632765552025424 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java0000644000175000017500000002010011245330530030607 0ustar twernertwernerpackage org.apache.maven.doxia.macro.toc; /* * 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.File; import java.io.StringWriter; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import junit.framework.TestCase; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.parser.XhtmlBaseParser; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; import org.apache.maven.doxia.sink.XhtmlBaseSink; /** * Test toc macro. * * @author ltheussl * @version $Id: TocMacroTest.java 808200 2009-08-26 22:04:08Z vsiveton $ */ public class TocMacroTest extends TestCase { /** * Test of execute method, of class TocMacro. * * @throws MacroExecutionException if a macro fails during testing. */ public void testExecute() throws MacroExecutionException { String sourceContent = "

h21

h22

h3

h4

h23

"; XhtmlBaseParser parser = new XhtmlBaseParser(); parser.setSecondParsing( true ); Map macroParameters = new HashMap(); macroParameters.put( "parser", parser ); macroParameters.put( "sourceContent", sourceContent ); macroParameters.put( "section", "sec1" ); File basedir = new File( "" ); SinkEventTestingSink sink = new SinkEventTestingSink(); MacroRequest request = new MacroRequest( macroParameters, basedir ); TocMacro macro = new TocMacro(); macro.execute( sink, request ); Iterator it = sink.getEventList().iterator(); assertEquals( "list", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); // test parameters parser = new XhtmlBaseParser(); parser.setSecondParsing( true ); macroParameters.put( "parser", parser ); macroParameters.put( "section", "2" ); macroParameters.put( "fromDepth", "1" ); macroParameters.put( "toDepth", "2" ); macroParameters.put( "class", "myClass" ); macroParameters.put( "id", "myId" ); sink.reset(); request = new MacroRequest( macroParameters, basedir ); macro.execute( sink, request ); it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "list", event.getName() ); SinkEventAttributeSet atts = (SinkEventAttributeSet) event.getArgs()[0]; assertEquals( "myId", atts.getAttribute( "id" ) ); assertEquals( "myClass", atts.getAttribute( "class" ) ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "h22", (String) event.getArgs()[0] ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "h3", (String) event.getArgs()[0] ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** * Test DOXIA-366. * * @throws MacroExecutionException if a macro fails during testing. */ public void testTocStyle() throws MacroExecutionException { String sourceContent = "

h21

h22

h3

h4

h23

"; XhtmlBaseParser parser = new XhtmlBaseParser(); parser.setSecondParsing( true ); Map macroParameters = new HashMap(); macroParameters.put( "parser", parser ); macroParameters.put( "sourceContent", sourceContent ); macroParameters.put( "section", "sec1" ); File basedir = new File( "" ); StringWriter out = new StringWriter(); XhtmlBaseSink sink = new XhtmlBaseSink( out ); MacroRequest request = new MacroRequest( macroParameters, basedir ); TocMacro macro = new TocMacro(); macro.execute( sink, request ); assertTrue( out.toString().indexOf( "h21" ) != -1 ); assertTrue( out.toString().indexOf( "h22" ) != -1 ); assertTrue( out.toString().indexOf( "h3" ) != -1 ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/macro/SwfMacroTest.java0000644000175000017500000000610111163507633030052 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import junit.framework.TestCase; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; /** * Test swf macro. * * @author ltheussl */ public class SwfMacroTest extends TestCase { /** * Test of execute method, of class SwfMacro. * * @throws MacroExecutionException if a macro fails during testing. */ public void testExecute() throws MacroExecutionException { Map macroParameters = new HashMap(); macroParameters.put( "src", "src.swf" ); macroParameters.put( "id", "Movie" ); macroParameters.put( "width", "50" ); macroParameters.put( "height", "60" ); macroParameters.put( "quality", "best" ); macroParameters.put( "menu", "true" ); macroParameters.put( "loop", "3" ); macroParameters.put( "play", "false" ); macroParameters.put( "version", "6" ); macroParameters.put( "allowScript", "always" ); SinkEventTestingSink sink = new SinkEventTestingSink(); MacroRequest request = new MacroRequest( macroParameters, new File( "." ) ); SwfMacro macro = new SwfMacro(); macro.required( "src", "value" ); try { macro.required( "src", "" ); fail(); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } try { macro.required( "src", null ); fail(); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } macro.execute( sink, request ); Iterator it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "rawText", event.getName() ); assertFalse( it.hasNext() ); request = new MacroRequest( new HashMap(), new File( "." ) ); sink.reset(); macro.execute( sink, request ); it = sink.getEventList().iterator(); event = (SinkEventElement) it.next(); assertEquals( "rawText", event.getName() ); assertFalse( it.hasNext() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/document/0000755000175000017500000000000011632765553025355 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java0000644000175000017500000003205011214136275031604 0ustar twernertwernerpackage 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 java.io.File; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.Date; import java.util.List; 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.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.WriterFactory; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Test DocumentModel. * * @author ltheussl */ public class DocumentModelTest extends PlexusTestCase { /** ISO 8601 date format, i.e. yyyy-MM-dd **/ 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 ); assertTrue( copy.equals( 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 ) { assertTrue( model.equals( model ) ); assertFalse( model.equals( null ) ); 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 authors = cover.getAuthors(); assertEquals( 1, authors.size() ); verifyAuthor( (DocumentAuthor) 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 authors = meta.getAuthors(); assertEquals( 1, authors.size() ); verifyAuthor( (DocumentAuthor) 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" ); Writer w = null; try { w = WriterFactory.newXmlWriter( testFile ); new DocumentXpp3Writer().write( w, model ); } finally { IOUtil.close( w ); } DocumentModel documentModel; Reader reader = null; try { reader = ReaderFactory.newXmlReader( testFile ); documentModel = new DocumentXpp3Reader().read( reader ); } catch ( XmlPullParserException e ) { throw (IOException) new IOException( "Error parsing document descriptor" ).initCause( e ); } finally { IOUtil.close( reader ); } return documentModel; } }doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/util/0000755000175000017500000000000011632765553024514 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/util/DoxiaUtilsTest.java0000644000175000017500000002132611211316077030272 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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.text.ParseException; import java.util.Date; import java.util.GregorianCalendar; import org.codehaus.plexus.PlexusTestCase; /** * Test case for DoxiaUtils. * * @author ltheussl * @version $Id: DoxiaUtilsTest.java 781180 2009-06-02 21:40:15Z vsiveton $ */ public class DoxiaUtilsTest extends PlexusTestCase { /** * Verify the expected results. */ public void testIsInternalLink() { String link = "#anchor"; assertTrue( "Should be an internal link: " + link, DoxiaUtils.isInternalLink( link ) ); link = "http://maven.apache.org/index.html#anchor"; assertFalse( "Should NOT be an internal link: " + link, DoxiaUtils.isInternalLink( link ) ); link = "./index.html"; assertFalse( "Should NOT be an internal link: " + link, DoxiaUtils.isInternalLink( link ) ); } /** * Verify the expected results. */ public void testIsExternalLink() { String link = "http://maven.apache.org/"; assertTrue( "Should be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "https://maven.apache.org/"; assertTrue( "Should be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "HTTPS://MAVEN.APACHE.ORG/"; assertTrue( "Should be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "ftp:/maven.apache.org/"; assertTrue( "Should be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "mailto:maven@apache.org"; assertTrue( "Should be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "file:/index.html"; assertTrue( "Should be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "resource_type://domain:port/filepathname?query_string#anchor"; assertTrue( "Should be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "index.html"; assertFalse( "Should NOT be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "example.pdf"; assertFalse( "Should NOT be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "./index.html"; assertFalse( "Should NOT be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "../index.html"; assertFalse( "Should NOT be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); // Windows style separators "\" are not allowed link = "file:\\index.html"; assertFalse( "Should NOT be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = ".\\index.html"; assertFalse( "Should NOT be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); link = "..\\index.html"; assertFalse( "Should NOT be an external link: " + link, DoxiaUtils.isExternalLink( link ) ); } /** * Verify the expected results. */ public void testIsLocalLink() { String link = "index.html"; assertTrue( "Should be a local link: " + link, DoxiaUtils.isLocalLink( link ) ); link = "./index.html"; assertTrue( "Should be a local link: " + link, DoxiaUtils.isLocalLink( link ) ); link = "../index.html"; assertTrue( "Should be a local link: " + link, DoxiaUtils.isLocalLink( link ) ); link = "#anchor"; assertFalse( "Should NOT be a local link: " + link, DoxiaUtils.isLocalLink( link ) ); link = "http://maven.apache.org/"; assertFalse( "Should NOT be a local link: " + link, DoxiaUtils.isLocalLink( link ) ); } /** * Verify the expected results. */ public void testEncodeId() { assertEquals( DoxiaUtils.encodeId( null ), null ); assertEquals( DoxiaUtils.encodeId( "" ), "a" ); assertEquals( DoxiaUtils.encodeId( " " ), "a" ); assertEquals( DoxiaUtils.encodeId( " _ " ), "a_" ); assertEquals( DoxiaUtils.encodeId( "1" ), "a1" ); assertEquals( DoxiaUtils.encodeId( "1anchor" ), "a1anchor" ); assertEquals( DoxiaUtils.encodeId( "_anchor" ), "a_anchor" ); assertEquals( DoxiaUtils.encodeId( "a b-c123 " ), "a_b-c123" ); assertEquals( DoxiaUtils.encodeId( " anchor" ), "anchor" ); assertEquals( DoxiaUtils.encodeId( "myAnchor" ), "myAnchor" ); assertEquals( DoxiaUtils.encodeId( "my&Anchor" ), "my%26Anchor" ); assertEquals( DoxiaUtils.encodeId( "H\u00E5kon" ), "H%c3%a5kon" ); assertEquals( DoxiaUtils.encodeId( "H\u00E5kon", true ), "Hkon" ); assertEquals( DoxiaUtils.encodeId( "Theu\u00DFl" ), "Theu%c3%9fl" ); assertEquals( DoxiaUtils.encodeId( "Theu\u00DFl", true ), "Theul" ); } /** * Verify the expected results. */ public void testIsValidId() { assertFalse( DoxiaUtils.isValidId( null ) ); assertFalse( DoxiaUtils.isValidId( "" ) ); assertFalse( DoxiaUtils.isValidId( " " ) ); assertFalse( DoxiaUtils.isValidId( " _ " ) ); assertFalse( DoxiaUtils.isValidId( "1" ) ); assertFalse( DoxiaUtils.isValidId( "1anchor" ) ); assertFalse( DoxiaUtils.isValidId( "_anchor" ) ); assertFalse( DoxiaUtils.isValidId( "a b-c123 " ) ); assertFalse( DoxiaUtils.isValidId( " anchor" ) ); assertFalse( DoxiaUtils.isValidId( "my&Anchor" ) ); assertTrue( DoxiaUtils.isValidId( "myAnchor" ) ); assertTrue( DoxiaUtils.isValidId( "a_" ) ); assertTrue( DoxiaUtils.isValidId( "a-" ) ); assertTrue( DoxiaUtils.isValidId( "a:" ) ); assertTrue( DoxiaUtils.isValidId( "a." ) ); assertTrue( DoxiaUtils.isValidId( "index.html" ) ); assertFalse( DoxiaUtils.isValidId( "Theu\u00DFl" ) ); } /** * Verify the expected results. */ public void testParseDate() { final int year = 1973; final int month = 1; final int day = 27; try { final Date feb27 = new GregorianCalendar( year, month, day ).getTime(); assertEquals( feb27, DoxiaUtils.parseDate( "27.02.1973" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "27. 02. 1973" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "1973-02-27" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "1973/02/27" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "27 Feb 1973" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "27 Feb. 1973" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "Feb. 27, 1973" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "Feb 27, '73" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "February 27, 1973" ) ); assertEquals( feb27, DoxiaUtils.parseDate( "19730227" ) ); assertEquals( new GregorianCalendar( year, 0, 1 ).getTime(), DoxiaUtils.parseDate( "1973" ) ); final Date feb1 = new GregorianCalendar( year, 1, 1 ).getTime(); assertEquals( feb1, DoxiaUtils.parseDate( "February 1973" ) ); assertEquals( feb1, DoxiaUtils.parseDate( "Feb. 1973" ) ); assertEquals( feb1, DoxiaUtils.parseDate( "February '73" ) ); assertEquals( feb1, DoxiaUtils.parseDate( "Feb. '73" ) ); assertNotNull( DoxiaUtils.parseDate( "Today" ) ); assertNotNull( DoxiaUtils.parseDate( "NOW" ) ); } catch ( ParseException ex ) { fail( ex.getMessage() ); } try { DoxiaUtils.parseDate( "yesterday" ).getTime(); fail(); } catch ( ParseException ex ) { assertNotNull( ex ); } } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/util/ByLineReaderSourceTest.java0000644000175000017500000000364210767707462031715 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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 org.apache.maven.doxia.parser.ParseException; import junit.framework.TestCase; /** * Unit test for {@link org.apache.maven.doxia.util.ByLineReaderSource}. * * @author Juan F. Codagnone * @since Nov 1, 2005 */ public class ByLineReaderSourceTest extends TestCase { /** * @throws ParseException on error */ public final void testUse() throws ParseException { ByLineReaderSource r = new ByLineReaderSource( new StringReader( "1 \n2\n3" ) ); assertEquals( -1, r.getLineNumber() ); assertEquals( "", r.getName() ); assertEquals( "1 ", r.getNextLine() ); assertEquals( "2", r.getNextLine() ); r.ungetLine(); assertEquals( "2", r.getNextLine() ); r.ungetLine(); try { r.ungetLine(); fail(); } catch ( IllegalStateException e ) { // ok; } assertEquals( "2", r.getNextLine() ); assertEquals( "3", r.getNextLine() ); assertEquals( null, r.getNextLine() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/util/HtmlToolsTest.java0000644000175000017500000001526211206736532030142 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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.net.URLEncoder; import java.util.Locale; import org.codehaus.plexus.PlexusTestCase; /** * Test case for HtmlTools. * * @author Vincent Siveton * @version $Id: HtmlToolsTest.java 778640 2009-05-26 09:58:50Z vsiveton $ */ public class HtmlToolsTest extends PlexusTestCase { /** * Verify the expected results. */ public void testEscapeHTML() { assertEquals( HtmlTools.escapeHTML( null ), "" ); assertEquals( HtmlTools.escapeHTML( "" ), "" ); assertEquals( HtmlTools.escapeHTML( "\u0009" ), "\u0009" ); assertEquals( HtmlTools.escapeHTML( "\u0001" ), "\u0001" ); // Predefined entities assertEquals( HtmlTools.escapeHTML( "<" ), "<" ); assertEquals( HtmlTools.escapeHTML( ">" ), ">" ); assertEquals( HtmlTools.escapeHTML( "&" ), "&" ); assertEquals( HtmlTools.escapeHTML( "\"" ), """ ); assertEquals( HtmlTools.escapeHTML( "\'" ), "'" ); assertEquals( HtmlTools.escapeHTML( "\'", false ), "\'" ); // xml mode assertEquals( HtmlTools.escapeHTML( "&" ), "&amp;" ); assertEquals( HtmlTools.escapeHTML( "\u00e4", true ), "\u00e4" ); assertEquals( HtmlTools.escapeHTML( "\u00e4", false ), "ä" ); assertEquals( HtmlTools.escapeHTML( "\u0159", false ), "ř" ); assertEquals( HtmlTools.escapeHTML( "\uD835\uDFED", false ), "𝟭" ); } /** * Verify the expected results. */ public void testUnescapeHTML() { assertNull( HtmlTools.unescapeHTML( null ) ); assertEquals( "", HtmlTools.unescapeHTML( "" ) ); assertEquals( "\u0009", HtmlTools.unescapeHTML( "\u0009" ) ); assertEquals( "\u0001", HtmlTools.unescapeHTML( "\u0001" ) ); assertEquals( "<", HtmlTools.unescapeHTML( "<" ) ); assertEquals( ">", HtmlTools.unescapeHTML( ">" ) ); assertEquals( "&", HtmlTools.unescapeHTML( "&" ) ); assertEquals( "\"", HtmlTools.unescapeHTML( """ ) ); assertEquals( "'", HtmlTools.unescapeHTML( "'" ) ); assertEquals( "\'", HtmlTools.unescapeHTML( "'", true ) ); assertEquals( "&", HtmlTools.unescapeHTML( "&amp;" ) ); assertEquals( "<Français>", HtmlTools.unescapeHTML( "&lt;Fran&ccedil;ais&gt;" ) ); assertEquals( "\u0159", HtmlTools.unescapeHTML( "ř" ) ); assertEquals( "\uD808\uDF45", HtmlTools.unescapeHTML( "𒍅" ) ); assertEquals( "\uD835\uDFED", HtmlTools.unescapeHTML( "𝟭" ) ); assertEquals( "\uD808\uDF45\uD835\uDFED", HtmlTools.unescapeHTML( "𒍅𝟭" ) ); assertEquals( "𝟭 𝟭", HtmlTools.unescapeHTML( "𝟭 𝟭" ) ); assertEquals( "𝟭 \uD835\uDFED", HtmlTools.unescapeHTML( "𝟭 𝟭" ) ); assertEquals( "&#xQWER;", HtmlTools.unescapeHTML( "&#xQWER;" ) ); assertEquals( "\u00E5", HtmlTools.unescapeHTML( "å" ) ); assertEquals( "<>&\"\u00E5\u0159\uD835\uDFED", HtmlTools.unescapeHTML( "<>&"åř𝟭" ) ); } /** * Verify the expected results. */ public void testEncodeId() { assertEquals( HtmlTools.encodeId( null ), null ); assertEquals( HtmlTools.encodeId( "" ), "a" ); assertEquals( HtmlTools.encodeId( " " ), "a" ); assertEquals( HtmlTools.encodeId( " _ " ), "a_" ); assertEquals( HtmlTools.encodeId( "1" ), "a1" ); assertEquals( HtmlTools.encodeId( "1anchor" ), "a1anchor" ); assertEquals( HtmlTools.encodeId( "_anchor" ), "a_anchor" ); assertEquals( HtmlTools.encodeId( "a b-c123 " ), "a_b-c123" ); assertEquals( HtmlTools.encodeId( " anchor" ), "anchor" ); assertEquals( HtmlTools.encodeId( "myAnchor" ), "myAnchor" ); assertEquals( HtmlTools.encodeId( "H\u00E5kon" ), "Hkon" ); assertEquals( HtmlTools.encodeId( "Theu\u00DFl" ), "Theul" ); } /** * Verify the expected results. */ public void testEncodeURL() throws Exception { assertNull( HtmlTools.encodeURL( null ) ); assertEquals( HtmlTools.encodeURL( "" ), "" ); assertEquals( HtmlTools.encodeURL( "http://www.example.com/?This is a simple test." ), "http://www.example.com/?This%20is%20a%20simple%20test." ); assertEquals( HtmlTools.encodeURL( "http://www.example.com/?This is a simple & short test." ), "http://www.example.com/?This%20is%20a%20simple%20&%20short%20test." ); String url = "\uD808\uDF45"; assertEquals( HtmlTools.encodeURL( url ), URLEncoder.encode( url, "UTF-8" ).toLowerCase( Locale.ENGLISH ) ); } /** * Verify the expected results. */ public void testIsId() { assertFalse( HtmlTools.isId( null ) ); assertFalse( HtmlTools.isId( "" ) ); assertFalse( HtmlTools.isId( " " ) ); assertFalse( HtmlTools.isId( " _ " ) ); assertFalse( HtmlTools.isId( "1" ) ); assertFalse( HtmlTools.isId( "1anchor" ) ); assertFalse( HtmlTools.isId( "_anchor" ) ); assertFalse( HtmlTools.isId( "a b-c123 " ) ); assertFalse( HtmlTools.isId( " anchor" ) ); assertTrue( HtmlTools.isId( "myAnchor" ) ); assertTrue( HtmlTools.isId( "a_" ) ); assertTrue( HtmlTools.isId( "a-" ) ); assertTrue( HtmlTools.isId( "a:" ) ); assertTrue( HtmlTools.isId( "a." ) ); assertFalse( HtmlTools.isId( "Theu\u00DFl" ) ); } /** * Verify the expected results. */ public void testGetHtmlTag() { assertNull( HtmlTools.getHtmlTag( "" ) ); assertNull( HtmlTools.getHtmlTag( "weirdHtmlTag" ) ); assertNotNull( HtmlTools.getHtmlTag( "strong" ) ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765553025024 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/module/AbstractIdentityTest.java0000644000175000017500000001270411207760055031776 0ustar twernertwernerpackage org.apache.maven.doxia.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. */ import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import org.apache.maven.doxia.AbstractModuleTest; import org.apache.maven.doxia.logging.PlexusLoggerWrapper; 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.SinkTestDocument; import org.apache.maven.doxia.sink.TextSink; import org.codehaus.plexus.util.IOUtil; /** * If a module provides both Parser and Sink, this class * can be used to check that chaining them together * results in the identity transformation, ie the model is still the same * after being piped through a Parser and the corresponding Sink. * * @version $Id: AbstractIdentityTest.java 779957 2009-05-29 13:16:29Z vsiveton $ */ public abstract class AbstractIdentityTest extends AbstractModuleTest { /** Expected Identity String */ private String expected; /** * Set to true if the identity transformation should actually be asserted, * by default only the expected and actual results are written to a file, but not compared. */ private boolean assertIdentity; /** * Create a new instance of the parser to test. * * @return the parser to test. */ protected abstract Parser createParser(); /** * Return a new instance of the sink that is being tested. * * @param writer The writer for the sink. * @return A new sink. */ protected abstract Sink createSink( Writer writer ); /** * Pipes a full model generated by {@link SinkTestDocument} through * a Sink (generated by {@link #createSink(Writer)}) and a Parser * (generated by {@link #createParser()}) and checks if the result * is the same as the original model. By default, this doesn't actually * assert anything (use {@link #assertIdentity(boolean)} in the setUp() * of an implementation to switch on the test), but the two generated * output files, expected.txt and actual.txt, can be compared for differences. * * @throws IOException if there's a problem reading/writing a test file. * @throws ParseException if a model cannot be parsed. */ public void testIdentity() throws IOException, ParseException { // generate the expected model StringWriter writer = new StringWriter(); Sink sink = new TextSink( writer ); SinkTestDocument.generate( sink ); sink.close(); expected = writer.toString(); // write to file for comparison Writer fileWriter = getTestWriter( "expected" ); fileWriter.write( expected ); IOUtil.close( fileWriter ); // generate the actual model writer = new StringWriter(); sink = createSink( writer ); SinkTestDocument.generate( sink ); sink.close(); StringReader reader = new StringReader( writer.toString() ); writer = new StringWriter(); sink = new TextSink( writer ); Parser parser = createParser(); parser.enableLogging( new PlexusLoggerWrapper( getContainer().getLogger() ) ); parser.parse( reader, sink ); String actual = writer.toString(); // write to file for comparison fileWriter = getTestWriter( "actual" ); fileWriter.write( actual ); IOUtil.close( fileWriter ); // Disabled by default, it's unlikely that all our modules // will pass this test any time soon, but the generated // output files can still be compared. if ( assertIdentity ) { // TODO: make this work for at least apt and xdoc modules? assertEquals( "Identity test failed!", getExpected(), actual ); } } /** {@inheritDoc} */ protected String getOutputDir() { return "identity/"; } /** * The output files generated by this class are text files, * independend of the kind of module being tested. * * @return The String "txt". */ protected String outputExtension() { return "txt"; } /** * Set to true if the identity transformation should actually be asserted, * by default only the expected and actual results are written to a file, but not compared. * This should be called during setUp(). * * @param doAssert True to actually execute the test. */ protected void assertIdentity( boolean doAssert ) { this.assertIdentity = doAssert; } /** * @return the expected identity string */ protected String getExpected() { return expected; } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java0000644000175000017500000001545411105660512030144 0ustar twernertwernerpackage org.apache.maven.doxia; /* * 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.Markup; import org.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.util.WriterFactory; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.io.Writer; /** * Provide some common convenience methods to test Doxia modules (parsers and sinks). * * @version $Id: AbstractModuleTest.java 712574 2008-11-09 22:16:42Z hboutemy $ * @since 1.0 */ public abstract class AbstractModuleTest extends PlexusTestCase implements Markup { /** * Set the system properties: *
    *
  • line.separator to \n (Unix) to prevent * failure on windows.
  • *
*/ static { // Safety System.setProperty( "line.separator", "\n" ); } // ---------------------------------------------------------------------- // Methods for creating test reader and writer // ---------------------------------------------------------------------- /** * Returns a FileWriter to write to a file with the given name * in the test target output directory. * * @param baseName The name of the target file. * @param extension The file extension of the file to write. * @return A FileWriter. * @throws IOException If the FileWriter could not be generated. * @see WriterFactory#newWriter(File, String) */ protected Writer getTestWriter( String baseName, String extension ) throws IOException { File outputDirectory = new File( getBasedirFile(), outputBaseDir() + getOutputDir() ); if ( !outputDirectory.exists() ) { outputDirectory.mkdirs(); } return WriterFactory.newWriter( new File( outputDirectory, baseName + "." + extension ), "UTF-8" ); } /** * Returns an XML FileWriter to write to a file with the given name * in the test target output directory. * * @param baseName The name of the target file. * @return An XML FileWriter. * @throws IOException If the FileWriter could not be generated. * @see #getXmlTestWriter(String, String) */ protected Writer getXmlTestWriter( String baseName ) throws IOException { return getXmlTestWriter( baseName, outputExtension() ); } /** * Returns an XML FileWriter to write to a file with the given name * in the test target output directory. * * @param baseName The name of the target file. * @param extension The file extension of the file to write. * @return An XML FileWriter. * @throws IOException If the FileWriter could not be generated. * @see WriterFactory#newXmlWriter(File) */ protected Writer getXmlTestWriter( String baseName, String extension ) throws IOException { File outputDirectory = new File( getBasedirFile(), outputBaseDir() + getOutputDir() ); if ( !outputDirectory.exists() ) { outputDirectory.mkdirs(); } return WriterFactory.newXmlWriter( new File( outputDirectory, baseName + "." + extension ) ); } /** * Returns a FileWriter to write to a file with the given name * in the test target output directory. * * @param baseName The name of the target file. * @return A FileWriter. * @throws IOException If the FileWriter could not be generated. * @see #getTestWriter(String, String) */ protected Writer getTestWriter( String baseName ) throws IOException { return getTestWriter( baseName, outputExtension() ); } /** * Returns an InputStreamReader to read a resource from a file * in the test target output directory. * * @param baseName The name of the resource file to read. * @param extension The file extension of the resource file to read. * @return An InputStreamReader. */ protected Reader getTestReader( String baseName, String extension ) { InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( baseName + "." + extension ); assertNotNull( "Could not find resource: " + baseName + "." + extension, is ); InputStreamReader reader = new InputStreamReader( is ); return reader; } /** * Returns an InputStreamReader to read a resource from a file * in the test target output directory. * * @param baseName The name of the resource file to read. * @return An InputStreamReader. * @see #getTestReader(String, String) */ protected Reader getTestReader( String baseName ) { return getTestReader( baseName, outputExtension() ); } // ---------------------------------------------------------------------- // Utility methods // ---------------------------------------------------------------------- /** * Returns the common base directory. * * @return The common base directory as a File. */ protected File getBasedirFile() { return new File( getBasedir() ); } /** * Returns the base directory where all test output will go. * * @return The test output directory. */ protected final String outputBaseDir() { return "target/test-output/"; } // ---------------------------------------------------------------------- // Abstract methods the individual ModuleTests must provide // ---------------------------------------------------------------------- /** * Determines the default file extension for the current module. * * @return The default file extension. */ protected abstract String outputExtension(); /** * Returns the directory where test output will go. * Should be relative to outputBaseDir(). * * @return The test output directory, relative to outputBaseDir(). */ protected abstract String getOutputDir(); } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/parser/0000755000175000017500000000000011632765553025033 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java0000644000175000017500000007336211313470726031604 0ustar twernertwernerpackage org.apache.maven.doxia.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.Iterator; import org.apache.maven.doxia.logging.Log; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventElement; import org.apache.maven.doxia.sink.SinkEventTestingSink; import org.codehaus.plexus.PlexusTestCase; /** * Test for XhtmlBaseParser. * * @author ltheussl * @version $Id: XhtmlBaseParserTest.java 892639 2009-12-20 18:49:58Z ltheussl $ * @since 1.1 */ public class XhtmlBaseParserTest extends PlexusTestCase { private XhtmlBaseParser parser; private final SinkEventTestingSink sink = new SinkEventTestingSink(); /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); parser = new XhtmlBaseParser(); parser.getLog().setLogLevel( Log.LEVEL_ERROR ); sink.reset(); } /** {@inheritDoc} */ protected void tearDown() throws Exception { super.tearDown(); } /** @throws Exception */ public void testHeadingEventsList() throws Exception { String text = "

"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section3", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle3", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle3_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section4", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle4", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle4_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section5", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle5", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle5_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section5_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section4_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section3_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); // this one is missing because we enclose everything in

which is not valid xhtml, // needs to be tested in overriding parser, eg XhtmlParser, XdocParser. //assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testNestedHeadingEventsList() throws Exception { // DOXIA-241 String text = "

"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section3", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section4", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section5", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle5", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle5_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section5_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section4_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section3_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "section2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle2_", ( (SinkEventElement) it.next() ).getName() ); // these two are missing because we enclose everything in

which is not valid xhtml, // needs to be tested in overriding parser, eg XhtmlParser, XdocParser. //assertEquals( "section2_", ( (SinkEventElement) it.next() ).getName() ); //assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testFigureEventsList() throws Exception { String text = ""; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "figureGraphics", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testTableEventsList() throws Exception { // TODO: table caption, see DOXIA-177 String text = "
Header
cell
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "table", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testSignificantWhiteSpace() throws Exception { // NOTE significant white space String text = "

word word

"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement el = (SinkEventElement) it.next(); assertEquals( "text", el.getName() ); assertEquals( " ", (String) el.getArgs()[0] ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); // same test with EOL String eol = System.getProperty( "line.separator" ); text = "

word" + eol + "word

"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); el = (SinkEventElement) it.next(); assertEquals( "text", el.getName() ); // according to section 2.11 of the XML spec, parsers must normalize line breaks to "\n" assertEquals( "\n", (String) el.getArgs()[0] ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); // DOXIA-189: there should be no EOL after closing tag text = "

There should be no space after the last word.

"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); el = (SinkEventElement) it.next(); assertEquals( "text", el.getName() ); assertEquals( ".", (String) el.getArgs()[0] ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testPreFormattedText() throws Exception { String text = "
what
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); text = "
what]]>
"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); text = "
what
]]>"; sink.reset(); parser.parse( text, sink ); it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testPreEOL() throws Exception { // test EOLs within
: the sink MUST receive a text event for the EOL
        String text = "
what" + XhtmlBaseParser.EOL
                + "what
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "text", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() ); } /** @throws Exception */ public void testDoxia250() throws Exception { StringBuffer sb = new StringBuffer(); sb.append( "" ).append( XhtmlBaseParser.EOL ); sb.append( "" ).append( XhtmlBaseParser.EOL ); sb.append( "" ).append( XhtmlBaseParser.EOL ); sb.append( "" ).append( XhtmlBaseParser.EOL ); sb.append( "]>" ).append( XhtmlBaseParser.EOL ); sb.append( "&foo;&foo1;&foo2;&tritPos;" ); parser.setValidate( false ); parser.parse( sb.toString(), sink ); Iterator it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "bold", event.getName() ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "\u0159", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "\u00A0", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "\u0161", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "\uD835\uDFED", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "bold_", event.getName() ); } /** @throws Exception */ public void testEntities() throws Exception { final String text = "]>" + "

&&flo;ř&tritPos;𝟭

&&flo;ř&tritPos;𝟭&myCustom;

"; parser.setValidate( false ); parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() ); SinkEventElement textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "&", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\u0159", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\u0159", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\uD835\uDFED", (String) textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\uD835\uDFED", textEvt.getArgs()[0] ); assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "&", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\u0159", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\u0159", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\uD835\uDFED", (String) textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "\uD835\uDFED", textEvt.getArgs()[0] ); textEvt = (SinkEventElement) it.next(); assertEquals( "text", textEvt.getName() ); assertEquals( "A", textEvt.getArgs()[0] ); assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); } /** @throws Exception */ public void testDecoration() throws Exception { String text = "
usdelstrikesubsup
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "u", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "s", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "del", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "strike", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "sub", (String) event.getArgs()[0] ); event = (SinkEventElement) it.next(); assertEquals( "text", event.getName() ); assertEquals( "sup", (String) event.getArgs()[0] ); // assertTrue( ( (SinkEventAttributeSet) event.getArgs()[1] ) // .containsAttribute( SinkEventAttributeSet.VALIGN, "sup" ) ); // TODO } /** @throws Exception */ public void testLists() throws Exception { String text = "
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "list", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedList", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedListItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedListItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "numberedList_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionList", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionListItem", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definedTerm_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definition_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionListItem_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "definitionList_", ( (SinkEventElement) it.next() ).getName() ); } /** @throws Exception */ public void testStyles() throws Exception { String text = "
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "monospaced_", ( (SinkEventElement) it.next() ).getName() ); } /** @throws Exception */ public void testSimpleTags() throws Exception { String text = "


"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "lineBreak", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "horizontalRule", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureGraphics", ( (SinkEventElement) it.next() ).getName() ); } /** @throws Exception */ public void testSpecial() throws Exception { String text = "

  

"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "comment", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "pageBreak", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "nonBreakingSpace", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "nonBreakingSpace", ( (SinkEventElement) it.next() ).getName() ); // unknown events are not reported by the base parser assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() ); } /** @throws Exception */ public void testTable() throws Exception { String text = "
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "table", ( (SinkEventElement) it.next() ).getName() ); // DOXIA-374 SinkEventElement el = (SinkEventElement) it.next(); assertEquals( "tableRows", el.getName() ); assertFalse( ( (Boolean) el.getArgs()[1] ).booleanValue() ); assertEquals( "tableCaption", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCaption_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableHeaderCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() ); } /** @throws Exception */ public void testFigure() throws Exception { String text = "

"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); assertEquals( "figure", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureGraphics", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureCaption", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figureCaption_", ( (SinkEventElement) it.next() ).getName() ); assertEquals( "figure_", ( (SinkEventElement) it.next() ).getName() ); } /** @throws Exception */ public void testAnchorLink() throws Exception { String text = "
" + "" + "" + "" + "" + "" + "
"; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); SinkEventElement element = (SinkEventElement) it.next(); assertEquals( "link", element.getName() ); assertEquals( "", element.getArgs()[0] ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "link", element.getName() ); assertEquals( "valid", element.getArgs()[0] ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "link", element.getName() ); assertEquals( "#a1invalid", element.getArgs()[0] ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "link", element.getName() ); assertEquals( "http://www.fo.com/index.html#1invalid", element.getArgs()[0] ); assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "anchor", element.getName() ); assertEquals( "valid", element.getArgs()[0] ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "anchor", element.getName() ); assertEquals( "a1invalid", element.getArgs()[0] ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); element = (SinkEventElement) it.next(); assertEquals( "anchor", element.getName() ); assertEquals( "a1invalid", element.getArgs()[0] ); assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() ); } /** * Test entities in attributes. * * @throws java.lang.Exception if any. */ public void testAttributeEntities() throws Exception { String text = ""; parser.parse( text, sink ); Iterator it = sink.getEventList().iterator(); SinkEventElement event = (SinkEventElement) it.next(); assertEquals( "unknown", event.getName() ); assertEquals( "script", event.getArgs()[0] ); SinkEventAttributeSet attribs = (SinkEventAttributeSet) event.getArgs()[2]; // ampersand should be un-escaped assertEquals( "http://ex.com/ex.js?v=l&l=e", attribs.getAttribute( "src" ) ); assertEquals( "unknown", ( (SinkEventElement) it.next() ).getName() ); assertFalse( it.hasNext() ); sink.reset(); text = "\"image\"/"; parser.parse( text, sink ); it = sink.getEventList().iterator(); event = (SinkEventElement) it.next(); assertEquals( "figureGraphics", event.getName() ); attribs = (SinkEventAttributeSet) event.getArgs()[1]; // ampersand should be un-escaped assertEquals( "http://ex.com/ex.jpg?v=l&l=e", attribs.getAttribute( "src" ) ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTestCase.java0000644000175000017500000000441411151220275032234 0ustar twernertwernerpackage org.apache.maven.doxia.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.SinkAdapter; import org.codehaus.plexus.PlexusTestCase; import java.io.FileReader; import java.io.Reader; /** * Test the parsing of sample input files * * @author Carlos Sanchez * @author Emmanuel Venisse * @version $Id: AbstractParserTestCase.java 747735 2009-02-25 10:43:09Z ltheussl $ * @since 1.0 */ public abstract class AbstractParserTestCase extends PlexusTestCase { /** * Parser to use to convert input to sink events * * @return the parser to use */ protected abstract Parser getParser(); /** * Path of the model to test, relative to basedir * * @return the relative path */ protected abstract String getDocument(); /** * Sink to write the output of the parsing * * @return a SinkAdapter if not overridden */ protected Sink getSink() { return new SinkAdapter(); } /** * Parse the model in the path specified by {@link #getDocument()}, * with parser from {@link #getParser()}, and output to sink from {@link #getSink()} * * @throws Exception if any. */ public void testParser() throws Exception { Reader reader = new FileReader( getTestFile( getBasedir(), getDocument() ) ); getParser().parse( reader, getSink() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java0000644000175000017500000000717011134645700031447 0ustar twernertwernerpackage org.apache.maven.doxia.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.AbstractModuleTest; import org.apache.maven.doxia.sink.WellformednessCheckingSink; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.TextSink; import org.codehaus.plexus.util.IOUtil; import java.io.IOException; import java.io.Reader; import java.io.Writer; /** * Test the parsing of sample input files. *
* Note: you have to provide a sample "test." + outputExtension() * file in the test resources directory if you extend this class. * * @version $Id: AbstractParserTest.java 735474 2009-01-18 15:33:20Z vsiveton $ * @since 1.0 */ public abstract class AbstractParserTest extends AbstractModuleTest { /** * Create a new instance of the parser to test. * * @return the parser to test. */ protected abstract Parser createParser(); /** * Returns the directory where all parser test output will go. * * @return The test output directory. */ protected String getOutputDir() { return "parser/"; } /** * Parse a test document '"test." + outputExtension()' * with parser from {@link #createParser()}, and output to a new * {@link WellformednessCheckingSink}. Asserts that output is well-formed. * * @throws IOException if the test document cannot be read. * @throws ParseException if the test document cannot be parsed. */ public final void testParser() throws IOException, ParseException { WellformednessCheckingSink sink = new WellformednessCheckingSink(); Reader reader = null; try { reader = getTestReader( "test", outputExtension() ); createParser().parse( reader, sink ); assertTrue( "Parser output not well-formed, last offending element: " + sink.getOffender(), sink.isWellformed() ); } finally { IOUtil.close( reader ); } } /** * Parse a test document '"test." + outputExtension()' * with parser from {@link #createParser()}, and output to a text file, * using the {@link org.apache.maven.doxia.sink.TextSink TextSink}. * * @throws IOException if the test document cannot be read. * @throws ParseException if the test document cannot be parsed. */ public final void testDocument() throws IOException, ParseException { Writer writer = null; Reader reader = null; try { writer = getTestWriter( "test", "txt" ); reader = getTestReader( "test", outputExtension() ); Sink sink = new TextSink( writer ); createParser().parse( reader, sink ); } finally { IOUtil.close( reader ); IOUtil.close( writer ); } } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/0000755000175000017500000000000011632765553024503 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractXmlSinkTest.java0000644000175000017500000001026411166632332031250 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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 javax.swing.text.html.HTML.Tag; import junit.framework.TestCase; /** * * @author ltheussl */ public class AbstractXmlSinkTest extends TestCase { /** * Test of set/getNameSpace method, of class AbstractXmlSink. */ public void testNameSpace() { final Tag t = Tag.A; final String ns = "ns"; final XmlTestSink instance = new XmlTestSink(); instance.writeStartTag( t ); instance.writeEndTag( t ); assertEquals( "", instance.getText() ); instance.writeSimpleTag( t ); assertEquals( "", instance.getText() ); instance.setNameSpace( ns ); instance.writeStartTag( t ); instance.writeEndTag( t ); assertEquals( "", instance.getText() ); instance.writeSimpleTag( t ); assertEquals( "", instance.getText() ); assertEquals( ns, instance.getNameSpace() ); try { instance.writeStartTag( null ); fail( "null tag should fail!" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } try { instance.writeEndTag( null ); fail( "null tag should fail!" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } } /** * Test of writeStartTag method, of class AbstractXmlSink. */ public void testWriteStartTag() { final Tag t = Tag.A; final SinkEventAttributes att = new SinkEventAttributeSet( SinkEventAttributeSet.BOLD ); final XmlTestSink instance = new XmlTestSink(); instance.writeStartTag( t ); assertEquals( "", instance.getText() ); instance.writeStartTag( t, att ); assertEquals( "", instance.getText() ); instance.writeStartTag( t, att, false ); assertEquals( "", instance.getText() ); instance.writeStartTag( t, att, true ); assertEquals( "", instance.getText() ); } /** * Test of writeEOL method, of class AbstractXmlSink. */ public void testWriteEOL() { final XmlTestSink instance = new XmlTestSink(); instance.writeEOL(); assertEquals( System.getProperty( "line.separator" ), instance.getText() ); } /** * Test of writeSimpleTag method, of class AbstractXmlSink. */ public void testWriteSimpleTag() { final Tag t = Tag.A; final SinkEventAttributes att = new SinkEventAttributeSet( SinkEventAttributeSet.BOLD ); final XmlTestSink instance = new XmlTestSink(); instance.writeSimpleTag( t ); assertEquals( "", instance.getText() ); instance.writeSimpleTag( t, att ); assertEquals( "", instance.getText() ); } /** Test sink. */ private class XmlTestSink extends AbstractXmlSink { private final StringBuffer buffer = new StringBuffer( 0 ); public void reset() { buffer.setLength( 0 ); } public String getText() { String text = buffer.toString(); reset(); return text; } protected void write( String text ) { buffer.append( text ); } } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkAdapterTest.java0000644000175000017500000003114511163507633030407 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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 junit.framework.TestCase; /** * * @author ltheussl */ public class SinkAdapterTest extends TestCase { private final SinkAdapter instance = new SinkAdapter(); /** * Test of head method, of class SinkAdapter. */ public void testHead() { instance.head(); instance.head( null ); instance.head_(); } /** * Test of body method, of class SinkAdapter. */ public void testBody() { instance.body(); instance.body( null ); instance.body_(); } /** * Test of section1 method, of class SinkAdapter. */ public void testSection1() { final int level = SinkAdapter.SECTION_LEVEL_1; instance.section1(); instance.section1_(); instance.section( level, null ); instance.section_( level ); } /** * Test of section2 method, of class SinkAdapter. */ public void testSection2() { final int level = SinkAdapter.SECTION_LEVEL_2; instance.section2(); instance.section2_(); instance.section( level, null ); instance.section_( level ); } /** * Test of section3 method, of class SinkAdapter. */ public void testSection3() { final int level = SinkAdapter.SECTION_LEVEL_3; instance.section3(); instance.section3_(); instance.section( level, null ); instance.section_( level ); } /** * Test of section4 method, of class SinkAdapter. */ public void testSection4() { final int level = SinkAdapter.SECTION_LEVEL_4; instance.section4(); instance.section4_(); instance.section( level, null ); instance.section_( level ); } /** * Test of section5 method, of class SinkAdapter. */ public void testSection5() { final int level = SinkAdapter.SECTION_LEVEL_5; instance.section5(); instance.section5_(); instance.section( level, null ); instance.section_( level ); } /** * Test of list method, of class SinkAdapter. */ public void testList() { instance.list(); instance.list( null ); instance.list_(); } /** * Test of listItem method, of class SinkAdapter. */ public void testListItem() { instance.listItem(); instance.listItem( null ); instance.listItem_(); } /** * Test of numberedList method, of class SinkAdapter. */ public void testNumberedList() { final int numbering = SinkAdapter.NUMBERING_DECIMAL; instance.numberedList( numbering ); instance.numberedList( numbering, null ); instance.numberedList_(); } /** * Test of numberedListItem method, of class SinkAdapter. */ public void testNumberedListItem() { instance.numberedListItem(); instance.numberedListItem( null ); instance.numberedListItem_(); } /** * Test of definitionList method, of class SinkAdapter. */ public void testDefinitionList() { instance.definitionList(); instance.definitionList( null ); instance.definitionList_(); } /** * Test of definitionListItem method, of class SinkAdapter. */ public void testDefinitionListItem() { instance.definitionListItem(); instance.definitionListItem( null ); instance.definitionListItem_(); } /** * Test of definition method, of class SinkAdapter. */ public void testDefinition() { instance.definition(); instance.definition( null ); instance.definition_(); } /** * Test of figure method, of class SinkAdapter. */ public void testFigure() { instance.figure(); instance.figure( null ); instance.figure_(); } /** * Test of table method, of class SinkAdapter. */ public void testTable() { instance.table(); instance.table( null ); instance.table_(); } /** * Test of tableRows method, of class SinkAdapter. */ public void testTableRows() { final int[] justification = null; final boolean grid = false; instance.tableRows( justification, grid ); instance.tableRows_(); } /** * Test of tableRow method, of class SinkAdapter. */ public void testTableRow() { instance.tableRow(); instance.tableRow( null ); instance.tableRow_(); } /** * Test of title method, of class SinkAdapter. */ public void testTitle() { instance.title(); instance.title( null ); instance.title_(); } /** * Test of author method, of class SinkAdapter. */ public void testAuthor() { instance.author(); instance.author( null ); instance.author_(); } /** * Test of date method, of class SinkAdapter. */ public void testDate() { instance.date(); instance.date( null ); instance.date_(); } /** * Test of sectionTitle method, of class SinkAdapter. */ public void testSectionTitle() { final int level = SinkAdapter.SECTION_LEVEL_1; instance.sectionTitle(); instance.sectionTitle_(); instance.sectionTitle( level, null ); instance.sectionTitle_( level ); } /** * Test of sectionTitle1 method, of class SinkAdapter. */ public void testSectionTitle1() { final int level = SinkAdapter.SECTION_LEVEL_1; instance.sectionTitle1(); instance.sectionTitle1_(); instance.sectionTitle( level, null ); instance.sectionTitle_( level ); } /** * Test of sectionTitle2 method, of class SinkAdapter. */ public void testSectionTitle2() { final int level = SinkAdapter.SECTION_LEVEL_2; instance.sectionTitle2(); instance.sectionTitle2_(); instance.sectionTitle( level, null ); instance.sectionTitle_( level ); } /** * Test of sectionTitle3 method, of class SinkAdapter. */ public void testSectionTitle3() { final int level = SinkAdapter.SECTION_LEVEL_3; instance.sectionTitle3(); instance.sectionTitle3_(); instance.sectionTitle( level, null ); instance.sectionTitle_( level ); } /** * Test of sectionTitle4 method, of class SinkAdapter. */ public void testSectionTitle4() { final int level = SinkAdapter.SECTION_LEVEL_4; instance.sectionTitle4(); instance.sectionTitle4_(); instance.sectionTitle( level, null ); instance.sectionTitle_( level ); } /** * Test of sectionTitle5 method, of class SinkAdapter. */ public void testSectionTitle5() { final int level = SinkAdapter.SECTION_LEVEL_5; instance.sectionTitle5(); instance.sectionTitle5_(); instance.sectionTitle( level, null ); instance.sectionTitle_( level ); } /** * Test of paragraph method, of class SinkAdapter. */ public void testParagraph() { instance.paragraph(); instance.paragraph( null ); instance.paragraph_(); } /** * Test of verbatim method, of class SinkAdapter. */ public void testVerbatim() { instance.verbatim( null ); instance.verbatim( false ); instance.verbatim_(); } /** * Test of definedTerm method, of class SinkAdapter. */ public void testDefinedTerm() { instance.definedTerm(); instance.definedTerm( null ); instance.definedTerm_(); } /** * Test of figureCaption method, of class SinkAdapter. */ public void testFigureCaption() { instance.figureCaption(); instance.figureCaption( null ); instance.figureCaption_(); } /** * Test of tableCell method, of class SinkAdapter. */ public void testTableCell() { instance.tableCell(); instance.tableCell( (SinkEventAttributes) null ); instance.tableCell( (String) null ); instance.tableCell_(); } /** * Test of tableHeaderCell method, of class SinkAdapter. */ public void testTableHeaderCell() { instance.tableHeaderCell(); instance.tableHeaderCell( (SinkEventAttributes) null ); instance.tableHeaderCell( (String) null ); instance.tableHeaderCell_(); } /** * Test of tableCaption method, of class SinkAdapter. */ public void testTableCaption() { instance.tableCaption(); instance.tableCaption( null ); instance.tableCaption_(); } /** * Test of figureGraphics method, of class SinkAdapter. */ public void testFigureGraphics() { String name = ""; instance.figureGraphics( name ); instance.figureGraphics( name, null ); } /** * Test of horizontalRule method, of class SinkAdapter. */ public void testHorizontalRule() { instance.horizontalRule(); instance.horizontalRule( null ); } /** * Test of pageBreak method, of class SinkAdapter. */ public void testPageBreak() { instance.pageBreak(); } /** * Test of anchor method, of class SinkAdapter. */ public void testAnchor() { String name = ""; instance.anchor( name ); instance.anchor( name, null ); instance.anchor_(); } /** * Test of link method, of class SinkAdapter. */ public void testLink() { String name = ""; instance.link( name ); instance.link( name, null ); instance.link_(); } /** * Test of italic method, of class SinkAdapter. */ public void testItalic() { instance.italic(); instance.italic_(); } /** * Test of bold method, of class SinkAdapter. */ public void testBold() { instance.bold(); instance.bold_(); } /** * Test of monospaced method, of class SinkAdapter. */ public void testMonospaced() { instance.monospaced(); instance.monospaced_(); } /** * Test of lineBreak method, of class SinkAdapter. */ public void testLineBreaks() { instance.lineBreak(); instance.lineBreak( null ); } /** * Test of nonBreakingSpace method, of class SinkAdapter. */ public void testNonBreakingSpace() { instance.nonBreakingSpace(); } /** * Test of text method, of class SinkAdapter. */ public void testText() { String text = ""; instance.text( text ); instance.text( text, null ); } /** * Test of rawText method, of class SinkAdapter. */ public void testRawText() { String text = ""; instance.rawText( text ); } /** * Test of comment method, of class SinkAdapter. */ public void testComment() { instance.comment( "" ); } /** * Test of flush method, of class SinkAdapter. */ public void testFlush() { instance.flush(); } /** * Test of close method, of class SinkAdapter. */ public void testClose() { instance.close(); } /** * Test of section method, of class SinkAdapter. */ public void testSection() { int level = 0; instance.section( level, null ); instance.section_( level ); } /** * Test of unknown method, of class SinkAdapter. */ public void testUnknown() { String name = ""; Object[] requiredParams = null; instance.unknown( name, requiredParams, null ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/WellformednessCheckingSink.java0000644000175000017500000004050311244500235032601 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.LinkedList; import java.util.List; import java.util.Stack; /** * This sink is used for testing purposes in order to check wether * the input of some parser is well-formed. * * @author Lars Trieloff * @version $Id: WellformednessCheckingSink.java 807164 2009-08-24 11:59:25Z vsiveton $ */ public class WellformednessCheckingSink extends AbstractSink { private final Stack elements = new Stack(); private final List errors = new LinkedList(); /** {@inheritDoc} */ public void head() { startElement( "head" ); } /** {@inheritDoc} */ public void head_() { checkWellformedness( "head" ); } /** {@inheritDoc} */ public void body() { startElement( "body" ); } /** {@inheritDoc} */ public void body_() { checkWellformedness( "body" ); } /** {@inheritDoc} */ public void section1() { startElement( "section1" ); } /** {@inheritDoc} */ public void section1_() { checkWellformedness( "section1" ); } /** {@inheritDoc} */ public void section2() { startElement( "section2" ); } /** {@inheritDoc} */ public void section2_() { checkWellformedness( "section2" ); } /** {@inheritDoc} */ public void section3() { startElement( "section3" ); } /** {@inheritDoc} */ public void section3_() { checkWellformedness( "section3" ); } /** {@inheritDoc} */ public void section4() { startElement( "section4" ); } /** {@inheritDoc} */ public void section4_() { checkWellformedness( "section4" ); } /** {@inheritDoc} */ public void section5() { startElement( "section5" ); } /** {@inheritDoc} */ public void section5_() { checkWellformedness( "section5" ); } /** {@inheritDoc} */ public void list() { startElement( "list" ); } /** {@inheritDoc} */ public void list_() { checkWellformedness( "list" ); } /** {@inheritDoc} */ public void listItem() { startElement( "listItem" ); } /** {@inheritDoc} */ public void listItem_() { checkWellformedness( "listItem" ); } /** {@inheritDoc} */ public void numberedList( int numbering ) { startElement( "numberedList" ); } /** {@inheritDoc} */ public void numberedList_() { checkWellformedness( "numberedList" ); } /** {@inheritDoc} */ public void numberedListItem() { startElement( "numberedListItem" ); } /** {@inheritDoc} */ public void numberedListItem_() { checkWellformedness( "numberedListItem" ); } /** {@inheritDoc} */ public void definitionList() { startElement( "definitionList" ); } /** {@inheritDoc} */ public void definitionList_() { checkWellformedness( "definitionList" ); } /** {@inheritDoc} */ public void definitionListItem() { startElement( "definitionListItem" ); } /** {@inheritDoc} */ public void definitionListItem_() { checkWellformedness( "definitionListItem" ); } /** {@inheritDoc} */ public void definition() { startElement( "definition" ); } /** {@inheritDoc} */ public void definition_() { checkWellformedness( "definition" ); } /** {@inheritDoc} */ public void figure() { startElement( "figure" ); } /** {@inheritDoc} */ public void figure_() { checkWellformedness( "figure" ); } /** {@inheritDoc} */ public void table() { startElement( "table" ); } /** {@inheritDoc} */ public void table_() { checkWellformedness( "table" ); } /** {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { startElement( "tableRows" ); } /** {@inheritDoc} */ public void tableRows_() { checkWellformedness( "tableRows" ); } /** {@inheritDoc} */ public void tableRow() { startElement( "tableRow" ); } /** {@inheritDoc} */ public void tableRow_() { checkWellformedness( "tableRow" ); } /** {@inheritDoc} */ public void title() { startElement( "title" ); } /** {@inheritDoc} */ public void title_() { checkWellformedness( "title" ); } /** {@inheritDoc} */ public void author() { startElement( "author" ); } /** {@inheritDoc} */ public void author_() { checkWellformedness( "author" ); } /** {@inheritDoc} */ public void date() { startElement( "date" ); } /** {@inheritDoc} */ public void date_() { checkWellformedness( "date" ); } /** {@inheritDoc} */ public void sectionTitle() { startElement( "sectionTitle" ); } /** {@inheritDoc} */ public void sectionTitle_() { checkWellformedness( "sectionTitle" ); } /** {@inheritDoc} */ public void sectionTitle1() { startElement( "sectionTitle1" ); } /** {@inheritDoc} */ public void sectionTitle1_() { checkWellformedness( "sectionTitle1" ); } /** {@inheritDoc} */ public void sectionTitle2() { startElement( "sectionTitle2" ); } /** {@inheritDoc} */ public void sectionTitle2_() { checkWellformedness( "sectionTitle2" ); } /** {@inheritDoc} */ public void sectionTitle3() { startElement( "sectionTitle3" ); } /** {@inheritDoc} */ public void sectionTitle3_() { checkWellformedness( "sectionTitle3" ); } /** {@inheritDoc} */ public void sectionTitle4() { startElement( "sectionTitle4" ); } /** {@inheritDoc} */ public void sectionTitle4_() { checkWellformedness( "sectionTitle4" ); } /** {@inheritDoc} */ public void sectionTitle5() { startElement( "sectionTitle5" ); } /** {@inheritDoc} */ public void sectionTitle5_() { checkWellformedness( "sectionTitle5" ); } /** {@inheritDoc} */ public void paragraph() { startElement( "paragraph" ); } /** {@inheritDoc} */ public void paragraph_() { checkWellformedness( "paragraph" ); } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { startElement( "verbatim" ); } /** {@inheritDoc} */ public void verbatim_() { checkWellformedness( "verbatim" ); } /** {@inheritDoc} */ public void definedTerm() { startElement( "definedTerm" ); } /** {@inheritDoc} */ public void definedTerm_() { checkWellformedness( "definedTerm" ); } /** {@inheritDoc} */ public void figureCaption() { startElement( "figureCaption" ); } /** {@inheritDoc} */ public void figureCaption_() { checkWellformedness( "figureCaption" ); } /** {@inheritDoc} */ public void tableCell() { startElement( "tableCell" ); } /** {@inheritDoc} */ public void tableCell( String width ) { startElement( "tableCell" ); } /** {@inheritDoc} */ public void tableCell_() { checkWellformedness( "tableCell" ); } /** {@inheritDoc} */ public void tableHeaderCell() { startElement( "tableHeaderCell" ); } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { startElement( "tableHeaderCell" ); } /** {@inheritDoc} */ public void tableHeaderCell_() { checkWellformedness( "tableHeaderCell" ); } /** {@inheritDoc} */ public void tableCaption() { startElement( "tableCaption" ); } /** {@inheritDoc} */ public void tableCaption_() { checkWellformedness( "tableCaption" ); } /** {@inheritDoc} */ public void figureGraphics( String name ) { // nop } /** {@inheritDoc} */ public void horizontalRule() { // nop } /** {@inheritDoc} */ public void pageBreak() { // nop } /** {@inheritDoc} */ public void anchor( String name ) { startElement( "anchor" ); } /** {@inheritDoc} */ public void anchor_() { checkWellformedness( "anchor" ); } /** {@inheritDoc} */ public void link( String name ) { startElement( "link" ); } /** {@inheritDoc} */ public void link_() { checkWellformedness( "link" ); } /** {@inheritDoc} */ public void italic() { startElement( "italic" ); } /** {@inheritDoc} */ public void italic_() { checkWellformedness( "italic" ); } /** {@inheritDoc} */ public void bold() { startElement( "bold" ); } /** {@inheritDoc} */ public void bold_() { checkWellformedness( "bold" ); } /** {@inheritDoc} */ public void monospaced() { startElement( "monospaced" ); } /** {@inheritDoc} */ public void monospaced_() { checkWellformedness( "monospaced" ); } /** {@inheritDoc} */ public void lineBreak() { // nop } /** {@inheritDoc} */ public void nonBreakingSpace() { // nop } /** {@inheritDoc} */ public void text( String text ) { // nop } /** {@inheritDoc} */ public void rawText( String text ) { // nop } /** {@inheritDoc} */ public void comment( String comment ) { // nop } /** {@inheritDoc} */ public void flush() { // nop } /** {@inheritDoc} */ public void close() { this.elements.clear(); this.errors.clear(); } /** * Finds out wether the wellformedness-contraints of the model have been * violated. * * @return false for non-wellformed models */ public boolean isWellformed() { return errors.size() == 0; } /** * Gets the offending element that breaks the wellformedness as well * as the exepected element. * * @return the expected and acual elements */ public String getOffender() { if ( isWellformed() ) { return null; } return (String) errors.get( errors.size() - 1 ); } /** * Gets the list of errors found during wellformedness-check * * @return a list of String of error messages */ public List getOffenders() { return errors; } /** * Checks wether a newly encountered end-tag breaks the wellformedness * of the model. * * @param actual the local-name of the encountered element */ private void checkWellformedness( String actual ) { String expected = (String) elements.pop(); if ( !expected.equals( actual ) ) { errors.add( "Encountered closing: " + actual + ", expected " + expected ); } } /** * Starts a new element and puts it on the stack in order to calculate * wellformedness of the model at a later point of time. * * @param string the local-name of the start-tag */ private void startElement( String string ) { elements.push( string ); } /** {@inheritDoc} */ public void head( SinkEventAttributes attributes ) { head(); } /** {@inheritDoc} */ public void title( SinkEventAttributes attributes ) { title(); } /** {@inheritDoc} */ public void author( SinkEventAttributes attributes ) { author(); } /** {@inheritDoc} */ public void date( SinkEventAttributes attributes ) { date(); } /** {@inheritDoc} */ public void body( SinkEventAttributes attributes ) { body(); } /** {@inheritDoc} */ public void section( int level, SinkEventAttributes attributes ) { startElement( "section" + level ); } /** {@inheritDoc} */ public void section_( int level ) { checkWellformedness( "section" + level ); } /** {@inheritDoc} */ public void sectionTitle( int level, SinkEventAttributes attributes ) { startElement( "sectionTitle" + level ); } /** {@inheritDoc} */ public void sectionTitle_( int level ) { checkWellformedness( "sectionTitle" + level ); } /** {@inheritDoc} */ public void list( SinkEventAttributes attributes ) { list(); } /** {@inheritDoc} */ public void listItem( SinkEventAttributes attributes ) { listItem(); } /** {@inheritDoc} */ public void numberedList( int numbering, SinkEventAttributes attributes ) { numberedList( numbering ); } /** {@inheritDoc} */ public void numberedListItem( SinkEventAttributes attributes ) { numberedListItem(); } /** {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { definitionList(); } /** {@inheritDoc} */ public void definitionListItem( SinkEventAttributes attributes ) { definitionListItem(); } /** {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { definition(); } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { definedTerm(); } /** {@inheritDoc} */ public void figure( SinkEventAttributes attributes ) { figure(); } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { figureCaption(); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { figureGraphics( src ); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { table(); } /** {@inheritDoc} */ public void tableRow( SinkEventAttributes attributes ) { tableRow(); } /** {@inheritDoc} */ public void tableCell( SinkEventAttributes attributes ) { tableCell(); } /** {@inheritDoc} */ public void tableHeaderCell( SinkEventAttributes attributes ) { tableHeaderCell(); } /** {@inheritDoc} */ public void tableCaption( SinkEventAttributes attributes ) { tableCaption(); } /** {@inheritDoc} */ public void paragraph( SinkEventAttributes attributes ) { paragraph(); } /** {@inheritDoc} */ public void verbatim( SinkEventAttributes attributes ) { verbatim( false ); } /** {@inheritDoc} */ public void horizontalRule( SinkEventAttributes attributes ) { horizontalRule(); } /** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { anchor( name ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { link( name ); } /** {@inheritDoc} */ public void lineBreak( SinkEventAttributes attributes ) { lineBreak(); } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { text( text ); } /** {@inheritDoc} */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { // ignore } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/XhtmlBaseSinkTest.java0000644000175000017500000005475111351662460030725 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.StringWriter; import java.io.Writer; import org.codehaus.plexus.PlexusTestCase; /** * Test for XhtmlBaseSink. * * @author ltheussl * @version $Id: XhtmlBaseSinkTest.java 926049 2010-03-22 12:40:16Z ltheussl $ * @since 1.1 */ public class XhtmlBaseSinkTest extends PlexusTestCase { private final SinkEventAttributes attributes = new SinkEventAttributeSet( new String[] {SinkEventAttributes.STYLE, "bold"} ); private XhtmlBaseSink sink; private Writer writer; /** * Set up the writer. * * @throws java.lang.Exception if any. */ protected void setUp() throws Exception { super.setUp(); writer = new StringWriter(); } /** @throws Exception */ public void testSpaceAfterClosingTag() throws Exception { // DOXIA-189 try { sink = new XhtmlBaseSink( writer ); sink.paragraph(); sink.text( "There should be no space before the " ); sink.italic(); sink.text( "period" ); sink.italic_(); sink.text( "." ); sink.paragraph_(); } finally { if ( sink != null ) { sink.close(); } } String actual = writer.toString(); String expected = "

There should be no space before the period.

"; assertEquals( expected, actual ); } /** * @throws Exception if any */ public void testNestedTables() throws Exception { // DOXIA-177 try { sink = new XhtmlBaseSink( writer ); sink.table(); sink.tableRows( new int[] { Sink.JUSTIFY_CENTER }, false ); sink.tableRow(); sink.tableCell(); sink.text( "cell11" ); sink.tableCell_(); sink.tableCell(); sink.text( "cell12" ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); sink.tableCell(); sink.table( SinkEventAttributeSet.LEFT ); sink.tableRows( new int[] { Sink.JUSTIFY_LEFT }, false ); sink.tableRow(); sink.tableCell(); sink.text( "nestedTable1Cell11" ); sink.tableCell_(); sink.tableCell(); sink.text( "nestedTable1Cell12" ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); sink.tableCell(); sink.table( SinkEventAttributeSet.RIGHT ); sink.tableRows( new int[] { Sink.JUSTIFY_RIGHT }, false ); sink.tableRow(); sink.tableCell(); sink.text( "nestedTable2Cell11" ); sink.tableCell_(); sink.tableCell(); sink.text( "nestedTable2Cell12" ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); sink.tableCell(); sink.text( "nestedTable2Cell21" ); sink.tableCell_(); sink.tableCell(); sink.text( "nestedTable2Cell22" ); sink.tableCell_(); sink.tableRow_(); sink.tableRows_(); sink.tableCaption(); sink.text( "caption3" ); sink.tableCaption_(); sink.table_(); sink.tableCell_(); sink.tableCell(); sink.text( "nestedTable1Cell22" ); sink.tableCell_(); sink.tableRow_(); sink.tableRows_(); sink.tableCaption(); sink.text( "caption2" ); sink.tableCaption_(); sink.table_(); sink.tableCell_(); sink.tableCell(); sink.text( "cell22" ); sink.tableCell_(); sink.tableRow_(); sink.tableRows_(); sink.tableCaption(); sink.text( "caption1" ); sink.tableCaption_(); sink.table_(); } finally { sink.close(); } String actual = writer.toString(); assertTrue( actual.indexOf( "" + "" ) != 1 ); assertTrue( actual.indexOf( "
caption1
" + "" ) != 1 ); assertTrue( actual.indexOf( "
caption2
" + "" ) != 1 ); assertTrue( actual.indexOf( "" ) != 1 ); assertTrue( actual.indexOf( "" ) != 1 ); assertTrue( actual.indexOf( "" ) != 1 ); assertTrue( actual.indexOf( "" ) != 1 ); assertTrue( actual.indexOf( "" ) != 1 ); } /** * Test of section method, of class XhtmlBaseSink. */ public void testSection() { final int level = XhtmlBaseSink.SECTION_LEVEL_1; try { sink = new XhtmlBaseSink( writer ); sink.section( level, attributes ); sink.sectionTitle( level, attributes ); sink.sectionTitle_( level ); sink.section_( level ); } finally { sink.close(); } assertEquals( "

", writer.toString() ); } /** * Test of section1 method, of class XhtmlBaseSink. */ public void testSection1() { try { sink = new XhtmlBaseSink( writer ); sink.section1(); sink.sectionTitle1(); sink.sectionTitle1_(); sink.section1_(); } finally { sink.close(); } assertEquals( "

", writer.toString() ); } /** * Test of section2 method, of class XhtmlBaseSink. */ public void testSection2() { try { sink = new XhtmlBaseSink( writer ); sink.section2(); sink.sectionTitle2(); sink.sectionTitle2_(); sink.section2_(); } finally { sink.close(); } assertEquals( "

", writer.toString() ); } /** * Test of section3 method, of class XhtmlBaseSink. */ public void testSection3() { try { sink = new XhtmlBaseSink( writer ); sink.section3(); sink.sectionTitle3(); sink.sectionTitle3_(); sink.section3_(); } finally { sink.close(); } assertEquals( "

", writer.toString() ); } /** * Test of section4 method, of class XhtmlBaseSink. */ public void testSection4() { try { sink = new XhtmlBaseSink( writer ); sink.section4(); sink.sectionTitle4(); sink.sectionTitle4_(); sink.section4_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); } /** * Test of section5 method, of class XhtmlBaseSink. */ public void testSection5() { try { sink = new XhtmlBaseSink( writer ); sink.section5(); sink.sectionTitle5(); sink.sectionTitle5_(); sink.section5_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); } /** * Test of list method, of class XhtmlBaseSink. * @throws java.lang.Exception if any. */ public void testList() throws Exception { try { sink = new XhtmlBaseSink( writer ); sink.list(); sink.listItem(); sink.listItem_(); sink.list_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); writer = new StringWriter(); try { sink = new XhtmlBaseSink( writer ); sink.list( attributes ); sink.listItem( attributes ); sink.listItem_(); sink.list_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); } /** * Test of numberedList method, of class XhtmlBaseSink. */ public void testNumberedList() { final int numbering = XhtmlBaseSink.NUMBERING_DECIMAL; try { sink = new XhtmlBaseSink( writer ); sink.numberedList( numbering ); sink.numberedListItem(); sink.numberedListItem_(); sink.numberedList_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); writer = new StringWriter(); try { sink = new XhtmlBaseSink( writer ); sink.numberedList( numbering, attributes ); sink.numberedListItem( attributes ); sink.numberedListItem_(); sink.numberedList_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); } /** * Test of definitionList method, of class XhtmlBaseSink. */ public void testDefinitionList() { try { sink = new XhtmlBaseSink( writer ); sink.definitionList(); sink.definedTerm(); sink.definedTerm_(); sink.definition(); sink.definition_(); sink.definitionList_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); writer = new StringWriter(); try { sink = new XhtmlBaseSink( writer ); sink.definitionList( attributes ); sink.definedTerm( attributes ); sink.definedTerm_(); sink.definition( attributes ); sink.definition_(); sink.definitionList_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); } /** * Test of figure method, of class XhtmlBaseSink. */ public void testFigure() { final String src = "src.jpg"; try { sink = new XhtmlBaseSink( writer ); sink.figure( attributes ); sink.figureGraphics( src, attributes ); sink.figureCaption( attributes ); sink.figureCaption_(); sink.figure_(); } finally { sink.close(); } assertEquals( "
" + "

\"\"

" + "

", writer.toString() ); } /** * Test of figureGraphics method, of class XhtmlBaseSink. */ public void testFigureGraphics() { String src = "source.png"; try { sink = new XhtmlBaseSink( writer ); sink.figureGraphics( src, attributes ); } finally { sink.close(); } assertEquals( "\"\"", writer.toString() ); } /** * Test of paragraph method, of class XhtmlBaseSink. */ public void testParagraph() { try { sink = new XhtmlBaseSink( writer ); sink.paragraph(); sink.paragraph_(); } finally { sink.close(); } assertEquals( "

", writer.toString() ); writer = new StringWriter(); try { sink = new XhtmlBaseSink( writer ); sink.paragraph( attributes ); sink.paragraph_(); } finally { sink.close(); } assertEquals( "

", writer.toString() ); } /** * Test of verbatim method, of class XhtmlBaseSink. */ public void testVerbatim() { try { sink = new XhtmlBaseSink( writer ); sink.verbatim( true ); sink.verbatim_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); writer = new StringWriter(); try { sink = new XhtmlBaseSink( writer ); sink.verbatim( attributes ); sink.verbatim_(); } finally { sink.close(); } assertEquals( "
", writer.toString() ); } /** * Test of horizontalRule method, of class XhtmlBaseSink. */ public void testHorizontalRule() { try { sink = new XhtmlBaseSink( writer ); sink.horizontalRule(); sink.horizontalRule( attributes ); } finally { sink.close(); } assertEquals( "

", writer.toString() ); } /** * Test of table method, of class XhtmlBaseSink. */ public void testTable() { try { sink = new XhtmlBaseSink( writer ); sink.table( attributes ); sink.table_(); } finally { sink.close(); } assertEquals( "
caption3
cell11nestedTable1Cell11nestedTable2Cell11nestedTable1Cell22cell22
", writer.toString() ); } /** * Test of tableRows method, of class XhtmlBaseSink. */ public void testTableRows() { final int[] justification = null; final boolean grid = false; try { sink = new XhtmlBaseSink( writer ); sink.tableRows( justification, grid ); sink.tableRows_(); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of tableRow method, of class XhtmlBaseSink. */ public void testTableRow() { try { sink = new XhtmlBaseSink( writer ); sink.tableRow( attributes ); sink.tableRow_(); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of tableCell method, of class XhtmlBaseSink. */ public void testTableCell() { try { sink = new XhtmlBaseSink( writer ); sink.tableCell( attributes ); sink.tableCell_(); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of tableHeaderCell method, of class XhtmlBaseSink. */ public void testTableHeaderCell() { try { sink = new XhtmlBaseSink( writer ); sink.tableHeaderCell( attributes ); sink.tableHeaderCell_(); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of tableCaption method, of class XhtmlBaseSink. */ public void testTableCaption() { try { sink = new XhtmlBaseSink( writer ); sink.table(); sink.tableRows( null, false ); sink.tableCaption( attributes ); sink.text( "caption" ); sink.tableCaption_(); sink.tableRows_(); sink.table_(); } finally { sink.close(); } assertEquals( "
" + "
caption
", writer.toString() ); } /** * Test of anchor method, of class XhtmlBaseSink. */ public void testAnchor() { String name = "anchor"; try { sink = new XhtmlBaseSink( writer ); sink.anchor( name, attributes ); sink.anchor_(); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of link method, of class XhtmlBaseSink. */ public void testLink() { final String name = "link.html"; try { sink = new XhtmlBaseSink( writer ); sink.link( name, attributes ); sink.link_(); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of italic/bold/monospaced method, of class XhtmlBaseSink. */ public void testItalic() { try { sink = new XhtmlBaseSink( writer ); sink.italic(); sink.italic_(); sink.bold(); sink.bold_(); sink.monospaced(); sink.monospaced_(); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of lineBreak/pageBreak/nonBreakingSpace method, of class XhtmlBaseSink. */ public void testLineBreak() { try { sink = new XhtmlBaseSink( writer ); sink.lineBreak( attributes ); sink.pageBreak(); sink.nonBreakingSpace(); } finally { sink.close(); } assertEquals( "
 ", writer.toString() ); } /** * Test of text method, of class XhtmlBaseSink. */ public void testText() { String text = "a text & \u00c6"; try { sink = new XhtmlBaseSink( writer ); sink.text( text ); } finally { sink.close(); } assertEquals( "a text & Æ", writer.toString() ); writer = new StringWriter(); try { sink = new XhtmlBaseSink( writer ); sink.text( text, attributes ); } finally { sink.close(); } assertEquals( "a text & Æ", writer.toString() ); } /** * Test of rawText method, of class XhtmlBaseSink. */ public void testRawText() { String text = "raw text"; try { sink = new XhtmlBaseSink( writer ); sink.rawText( text ); } finally { sink.close(); } assertEquals( "raw text", writer.toString() ); } /** * Test of comment method, of class XhtmlBaseSink. */ public void testComment() { try { sink = new XhtmlBaseSink( writer ); sink.comment( "a comment" ); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test of unknown method, of class XhtmlBaseSink. */ public void testUnknown() { final String name = "unknown"; final Object[] requiredParams = null; try { sink = new XhtmlBaseSink( writer ); sink.unknown( name, requiredParams, attributes ); } finally { sink.close(); } assertEquals( "", writer.toString() ); } /** * Test entities in attribute values. */ public void testAttributeEntities() { final Object[] startTag = new Object[] { new Integer( XhtmlBaseSink.TAG_TYPE_START ) }; final Object[] endTag = new Object[] { new Integer( XhtmlBaseSink.TAG_TYPE_END ) }; final String script = XhtmlBaseSink.SCRIPT.toString(); final SinkEventAttributes src = new SinkEventAttributeSet( new String[] {SinkEventAttributes.SRC.toString(), "http://ex.com/ex.js?v=l&l=e"} ); try { sink = new XhtmlBaseSink( writer ); sink.unknown( script, startTag, src ); sink.unknown( script, endTag, null ); sink.figureGraphics( "http://ex.com/ex.jpg?v=l&l=e", src ); } finally { sink.close(); } String result = writer.toString(); assertTrue( result.indexOf( "ex.js?v=l&l=e" ) != -1 ); assertTrue( result.indexOf( "ex.jpg?v=l&l=e" ) != -1 ); } /** * Test of entity. */ public void testEntity() { // DOXIA-314 String text = "a text '𝟭'"; try { sink = new XhtmlBaseSink( writer ); sink.text( text ); } finally { sink.close(); } assertEquals( "a text '𝟭'", writer.toString() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkEventTestingSink.java0000644000175000017500000004124611163505460031432 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.LinkedList; import java.util.List; /** * This sink is used for testing purposes in order to check wether * the input of some parser is well-formed. * * @author ltheussl * @version $Id: SinkEventTestingSink.java 759581 2009-03-28 20:40:16Z ltheussl $ * @since 1.1 */ public class SinkEventTestingSink extends AbstractSink { /** The list of sink events. */ private final List events = new LinkedList(); /** * Return the collected list of SinkEventElements. * * @return the collected list of SinkEventElements. */ public List getEventList() { return this.events; } /** Clears the list of sink events. */ public void reset() { this.events.clear(); } // // sink methods // /** {@inheritDoc} */ public void head() { addEvent( "head" ); } /** {@inheritDoc} */ public void head_() { addEvent( "head_" ); } /** {@inheritDoc} */ public void body() { addEvent( "body" ); } /** {@inheritDoc} */ public void body_() { addEvent( "body_" ); } /** {@inheritDoc} */ public void section1() { addEvent( "section1" ); } /** {@inheritDoc} */ public void section1_() { addEvent( "section1_" ); } /** {@inheritDoc} */ public void section2() { addEvent( "section2" ); } /** {@inheritDoc} */ public void section2_() { addEvent( "section2_" ); } /** {@inheritDoc} */ public void section3() { addEvent( "section3" ); } /** {@inheritDoc} */ public void section3_() { addEvent( "section3_" ); } /** {@inheritDoc} */ public void section4() { addEvent( "section4" ); } /** {@inheritDoc} */ public void section4_() { addEvent( "section4_" ); } /** {@inheritDoc} */ public void section5() { addEvent( "section5" ); } /** {@inheritDoc} */ public void section5_() { addEvent( "section5_" ); } /** {@inheritDoc} */ public void list() { addEvent( "list" ); } /** {@inheritDoc} */ public void list_() { addEvent( "list_" ); } /** {@inheritDoc} */ public void listItem() { addEvent( "listItem" ); } /** {@inheritDoc} */ public void listItem_() { addEvent( "listItem_" ); } /** {@inheritDoc} */ public void numberedList( int numbering ) { addEvent( "numberedList", new Object[] {new Integer( numbering )} ); } /** {@inheritDoc} */ public void numberedList_() { addEvent( "numberedList_" ); } /** {@inheritDoc} */ public void numberedListItem() { addEvent( "numberedListItem" ); } /** {@inheritDoc} */ public void numberedListItem_() { addEvent( "numberedListItem_" ); } /** {@inheritDoc} */ public void definitionList() { addEvent( "definitionList" ); } /** {@inheritDoc} */ public void definitionList_() { addEvent( "definitionList_" ); } /** {@inheritDoc} */ public void definitionListItem() { addEvent( "definitionListItem" ); } /** {@inheritDoc} */ public void definitionListItem_() { addEvent( "definitionListItem_" ); } /** {@inheritDoc} */ public void definition() { addEvent( "definition" ); } /** {@inheritDoc} */ public void definition_() { addEvent( "definition_" ); } /** {@inheritDoc} */ public void figure() { addEvent( "figure" ); } /** {@inheritDoc} */ public void figure_() { addEvent( "figure_" ); } /** {@inheritDoc} */ public void table() { addEvent( "table" ); } /** {@inheritDoc} */ public void table_() { addEvent( "table_" ); } /** {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { addEvent( "tableRows", new Object[] {justification, new Boolean( grid )} ); } /** {@inheritDoc} */ public void tableRows_() { addEvent( "tableRows_" ); } /** {@inheritDoc} */ public void tableRow() { addEvent( "tableRow" ); } /** {@inheritDoc} */ public void tableRow_() { addEvent( "tableRow_" ); } /** {@inheritDoc} */ public void title() { addEvent( "title" ); } /** {@inheritDoc} */ public void title_() { addEvent( "title_" ); } /** {@inheritDoc} */ public void author() { addEvent( "author" ); } /** {@inheritDoc} */ public void author_() { addEvent( "author_" ); } /** {@inheritDoc} */ public void date() { addEvent( "date" ); } /** {@inheritDoc} */ public void date_() { addEvent( "date_" ); } /** {@inheritDoc} */ public void sectionTitle() { addEvent( "sectionTitle" ); } /** {@inheritDoc} */ public void sectionTitle_() { addEvent( "sectionTitle_" ); } /** {@inheritDoc} */ public void sectionTitle1() { addEvent( "sectionTitle1" ); } /** {@inheritDoc} */ public void sectionTitle1_() { addEvent( "sectionTitle1_" ); } /** {@inheritDoc} */ public void sectionTitle2() { addEvent( "sectionTitle2" ); } /** {@inheritDoc} */ public void sectionTitle2_() { addEvent( "sectionTitle2_" ); } /** {@inheritDoc} */ public void sectionTitle3() { addEvent( "sectionTitle3" ); } /** {@inheritDoc} */ public void sectionTitle3_() { addEvent( "sectionTitle3_" ); } /** {@inheritDoc} */ public void sectionTitle4() { addEvent( "sectionTitle4" ); } /** {@inheritDoc} */ public void sectionTitle4_() { addEvent( "sectionTitle4_" ); } /** {@inheritDoc} */ public void sectionTitle5() { addEvent( "sectionTitle5" ); } /** {@inheritDoc} */ public void sectionTitle5_() { addEvent( "sectionTitle5_" ); } /** {@inheritDoc} */ public void paragraph() { addEvent( "paragraph" ); } /** {@inheritDoc} */ public void paragraph_() { addEvent( "paragraph_" ); } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { addEvent( "verbatim", new Object[] {new Boolean( boxed )} ); } /** {@inheritDoc} */ public void verbatim_() { addEvent( "verbatim_" ); } /** {@inheritDoc} */ public void definedTerm() { addEvent( "definedTerm" ); } /** {@inheritDoc} */ public void definedTerm_() { addEvent( "definedTerm_" ); } /** {@inheritDoc} */ public void figureCaption() { addEvent( "figureCaption" ); } /** {@inheritDoc} */ public void figureCaption_() { addEvent( "figureCaption_" ); } /** {@inheritDoc} */ public void tableCell() { addEvent( "tableCell" ); } /** {@inheritDoc} */ public void tableCell( String width ) { addEvent( "tableCell", new Object[] {width} ); } /** {@inheritDoc} */ public void tableCell_() { addEvent( "tableCell_" ); } /** {@inheritDoc} */ public void tableHeaderCell() { addEvent( "tableHeaderCell" ); } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { addEvent( "tableHeaderCell", new Object[] {width} ); } /** {@inheritDoc} */ public void tableHeaderCell_() { addEvent( "tableHeaderCell_" ); } /** {@inheritDoc} */ public void tableCaption() { addEvent( "tableCaption" ); } /** {@inheritDoc} */ public void tableCaption_() { addEvent( "tableCaption_" ); } /** {@inheritDoc} */ public void figureGraphics( String name ) { addEvent( "figureGraphics", new Object[] {name} ); } /** {@inheritDoc} */ public void horizontalRule() { addEvent( "horizontalRule" ); } /** {@inheritDoc} */ public void pageBreak() { addEvent( "pageBreak" ); } /** {@inheritDoc} */ public void anchor( String name ) { addEvent( "anchor", new Object[] {name} ); } /** {@inheritDoc} */ public void anchor_() { addEvent( "anchor_" ); } /** {@inheritDoc} */ public void link( String name ) { addEvent( "link", new Object[] {name} ); } /** {@inheritDoc} */ public void link_() { addEvent( "link_" ); } /** {@inheritDoc} */ public void italic() { addEvent( "italic" ); } /** {@inheritDoc} */ public void italic_() { addEvent( "italic_" ); } /** {@inheritDoc} */ public void bold() { addEvent( "bold" ); } /** {@inheritDoc} */ public void bold_() { addEvent( "bold_" ); } /** {@inheritDoc} */ public void monospaced() { addEvent( "monospaced" ); } /** {@inheritDoc} */ public void monospaced_() { addEvent( "monospaced_" ); } /** {@inheritDoc} */ public void lineBreak() { addEvent( "lineBreak" ); } /** {@inheritDoc} */ public void nonBreakingSpace() { addEvent( "nonBreakingSpace" ); } /** {@inheritDoc} */ public void text( String text ) { addEvent( "text", new Object[] {text} ); } /** {@inheritDoc} */ public void rawText( String text ) { addEvent( "rawText", new Object[] {text} ); } /** {@inheritDoc} */ public void comment( String comment ) { addEvent( "comment", new Object[] {comment} ); } /** {@inheritDoc} */ public void flush() { addEvent( "flush" ); } /** {@inheritDoc} */ public void close() { addEvent( "close" ); } /** {@inheritDoc} */ public void head( SinkEventAttributes attributes ) { addEvent( "head", new Object[] {attributes} ); } /** {@inheritDoc} */ public void title( SinkEventAttributes attributes ) { addEvent( "title", new Object[] {attributes} ); } /** {@inheritDoc} */ public void author( SinkEventAttributes attributes ) { addEvent( "author", new Object[] {attributes} ); } /** {@inheritDoc} */ public void date( SinkEventAttributes attributes ) { addEvent( "date", new Object[] {attributes} ); } /** {@inheritDoc} */ public void body( SinkEventAttributes attributes ) { addEvent( "body", new Object[] {attributes} ); } /** {@inheritDoc} */ public void section( int level, SinkEventAttributes attributes ) { addEvent( "section" + level, new Object[] {attributes} ); } /** {@inheritDoc} */ public void section_( int level ) { addEvent( "section" + level + "_" ); } /** {@inheritDoc} */ public void sectionTitle( int level, SinkEventAttributes attributes ) { addEvent( "sectionTitle" + level, new Object[] {attributes} ); } /** {@inheritDoc} */ public void sectionTitle_( int level ) { addEvent( "sectionTitle" + level + "_" ); } /** {@inheritDoc} */ public void list( SinkEventAttributes attributes ) { addEvent( "list", new Object[] {attributes} ); } /** {@inheritDoc} */ public void listItem( SinkEventAttributes attributes ) { addEvent( "listItem", new Object[] {attributes} ); } /** {@inheritDoc} */ public void numberedList( int numbering, SinkEventAttributes attributes ) { addEvent( "numberedList", new Object[] {new Integer( numbering ), attributes} ); } /** {@inheritDoc} */ public void numberedListItem( SinkEventAttributes attributes ) { addEvent( "numberedListItem", new Object[] {attributes} ); } /** {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { addEvent( "definitionList", new Object[] {attributes} ); } /** {@inheritDoc} */ public void definitionListItem( SinkEventAttributes attributes ) { addEvent( "definitionListItem", new Object[] {attributes} ); } /** {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { addEvent( "definition", new Object[] {attributes} ); } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { addEvent( "definedTerm", new Object[] {attributes} ); } /** {@inheritDoc} */ public void figure( SinkEventAttributes attributes ) { addEvent( "figure", new Object[] {attributes} ); } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { addEvent( "figureCaption", new Object[] {attributes} ); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { addEvent( "figureGraphics", new Object[] {src, attributes} ); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { addEvent( "table", new Object[] {attributes} ); } /** {@inheritDoc} */ public void tableRow( SinkEventAttributes attributes ) { addEvent( "tableRow", new Object[] {attributes} ); } /** {@inheritDoc} */ public void tableCell( SinkEventAttributes attributes ) { addEvent( "tableCell", new Object[] {attributes} ); } /** {@inheritDoc} */ public void tableHeaderCell( SinkEventAttributes attributes ) { addEvent( "tableHeaderCell", new Object[] {attributes} ); } /** {@inheritDoc} */ public void tableCaption( SinkEventAttributes attributes ) { addEvent( "tableCaption", new Object[] {attributes} ); } /** {@inheritDoc} */ public void paragraph( SinkEventAttributes attributes ) { addEvent( "paragraph", new Object[] {attributes} ); } /** {@inheritDoc} */ public void verbatim( SinkEventAttributes attributes ) { addEvent( "verbatim", new Object[] {attributes} ); } /** {@inheritDoc} */ public void horizontalRule( SinkEventAttributes attributes ) { addEvent( "horizontalRule", new Object[] {attributes} ); } /** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { addEvent( "anchor", new Object[] {name, attributes} ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { addEvent( "link", new Object[] {name, attributes} ); } /** {@inheritDoc} */ public void lineBreak( SinkEventAttributes attributes ) { addEvent( "lineBreak", new Object[] {attributes} ); } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { addEvent( "text", new Object[] {text, attributes} ); } /** {@inheritDoc} */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { addEvent( "unknown", new Object[] {name, requiredParams, attributes} ); } // // private // /** * Adds a no-arg event to the list of events. * * @param string the name of the event. */ private void addEvent( String string ) { addEvent( string, null ); } /** * Adds an event to the list of events. * * @param string the name of the event. * @param arguments The array of arguments to the sink method. */ private void addEvent( String string, Object[] arguments ) { events.add( new SinkEventElement( string, arguments ) ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkEventElement.java0000644000175000017500000000471011202253554030552 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.commons.lang.builder.ToStringBuilder; /** * A single sink event, used for testing purposes in order to check * the order and effect of some parser events. * * @author ltheussl * @version $Id: SinkEventElement.java 773849 2009-05-12 11:03:08Z vsiveton $ * @since 1.1 */ public class SinkEventElement { /** The name of the sink event, ie the sink method name. */ private final String methodName; /** The array of arguments to the sink method. */ private final Object[] args; /** * A SinkEventElement is characterized by the method name and associated array of arguments. * * @param name The name of the sink event, ie the sink method name. * @param arguments The array of arguments to the sink method. * For a no-arg element this may be null or an empty array. */ public SinkEventElement( String name, Object[] arguments ) { if ( name == null ) { throw new NullPointerException( "Element name can't be null!" ); } this.methodName = name; this.args = arguments; } /** * Return the name of the this event. * * @return The name of the sink event. */ public String getName() { return this.methodName; } /** * Return the array of arguments to the sink method. * * @return the array of arguments to the sink method. */ public Object[] getArgs() { return this.args; } /** * {@inheritDoc} * @since 1.1.1 */ public String toString() { return ToStringBuilder.reflectionToString( this ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkTestDocument.java0000644000175000017500000003543611207725677030625 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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. */ /** * Static methods to generate standard Doxia sink events. * * @version $Id: SinkTestDocument.java 779902 2009-05-29 09:32:47Z ltheussl $ */ public class SinkTestDocument { /** Private constructor. */ private SinkTestDocument() { // do not instantiate } /** * Dumps a full model that mimics aptconvert's test.apt, * into the specified sink. The sink is flushed but not closed. * * @param sink The sink to receive the events. */ public static void generate( Sink sink ) { generateHead( sink ); sink.body(); // TODO: what is this supposed to do? //sink.sectionTitle(); //sink.text( "Section Title" ); //sink.sectionTitle_(); sink.paragraph(); sink.text( "Paragraph 1, line 1. Paragraph 1, line 2." ); sink.paragraph_(); sink.paragraph(); sink.text( "Paragraph 2, line 1. Paragraph 2, line 2." ); sink.paragraph_(); sink.section1(); sink.sectionTitle1(); sink.text( "Section title" ); sink.sectionTitle1_(); sink.section2(); sink.sectionTitle2(); sink.text( "Sub-section title" ); sink.sectionTitle2_(); sink.section3(); sink.sectionTitle3(); sink.text( "Sub-sub-section title" ); sink.sectionTitle3_(); sink.section4(); sink.sectionTitle4(); sink.text( "Sub-sub-sub-section title" ); sink.sectionTitle4_(); sink.section5(); sink.sectionTitle5(); sink.text( "Sub-sub-sub-sub-section title" ); sink.sectionTitle5_(); generateList( sink ); sink.verbatim( SinkEventAttributeSet.BOXED ); sink.text( "Verbatim text not contained in list item 3" ); sink.verbatim_(); generateNumberedList( sink ); sink.paragraph(); sink.text( "List numbering schemes: [[1]], [[a]], [[A]], [[i]], [[I]]." ); sink.paragraph_(); generateDefinitionList( sink ); sink.paragraph(); sink.text( "--- instead of +-- suppresses the box around verbatim text." ); sink.paragraph_(); generateFigure( sink ); generateTable( sink ); sink.paragraph(); sink.text( "No grid, no caption:" ); sink.paragraph_(); generateNoGridTable( sink ); generateHeaderTable( sink ); generateHorizontalRule( sink ); generatePageBreak( sink ); generateFonts( sink ); generateAnchors( sink ); generateLineBreak( sink ); generateNonBreakingSpace( sink ); generateSpecialCharacters( sink ); sink.comment( "A comment!" ); sink.section5_(); sink.section4_(); sink.section3_(); sink.section2_(); sink.section1_(); sink.body_(); sink.flush(); } /** * Dumps a header with title, author and date elements * into the specified sink. The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateHead( Sink sink ) { sink.head(); sink.title(); sink.text( "Title" ); sink.title_(); sink.author(); sink.text( "Author" ); sink.author_(); sink.date(); sink.text( "Date" ); sink.date_(); sink.head_(); } /** * Dumps a list into the specified sink. The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateList( Sink sink ) { sink.list(); sink.listItem(); sink.text( "List item 1." ); sink.listItem_(); sink.listItem(); sink.text( "List item 2." ); sink.paragraph(); sink.text( "Paragraph contained in list item 2." ); sink.paragraph_(); sink.list(); sink.listItem(); sink.text( "Sub-list item 1." ); sink.listItem_(); sink.listItem(); sink.text( "Sub-list item 2." ); sink.listItem_(); sink.list_(); sink.listItem_(); sink.listItem(); sink.text( "List item 3. Force end of list:" ); sink.listItem_(); sink.list_(); } /** * Dumps a numbered list into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateNumberedList( Sink sink ) { sink.numberedList( Sink.NUMBERING_DECIMAL ); sink.numberedListItem(); sink.text( "Numbered item 1." ); sink.numberedList( Sink.NUMBERING_UPPER_ALPHA ); sink.numberedListItem(); sink.text( "Numbered item A." ); sink.numberedListItem_(); sink.numberedListItem(); sink.text( "Numbered item B." ); sink.numberedListItem_(); sink.numberedList_(); sink.numberedListItem_(); sink.numberedListItem(); sink.text( "Numbered item 2." ); sink.numberedListItem_(); sink.numberedList_(); } /** * Dumps a definition list into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateDefinitionList( Sink sink ) { String eol = System.getProperty( "line.separator" ); sink.definitionList(); sink.definitionListItem(); sink.definedTerm(); sink.text( "Defined term 1" ); sink.definedTerm_(); sink.definition(); sink.text( "of definition list." ); sink.definition_(); sink.definitionListItem_(); sink.definitionListItem(); sink.definedTerm(); sink.text( "Defined term 2" ); sink.definedTerm_(); sink.definition(); sink.text( "of definition list." ); sink.verbatim( SinkEventAttributeSet.BOXED ); sink.text( "Verbatim text" + eol + " in a box " ); sink.verbatim_(); sink.definition_(); sink.definitionListItem_(); sink.definitionList_(); } /** * Dumps a figure with figure caption into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateFigure( Sink sink ) { sink.figure( null ); sink.figureGraphics( "figure.png", null ); sink.figureCaption( null ); sink.text( "Figure caption", null ); sink.figureCaption_(); sink.figure_(); } /** * Dumps a table with grid and caption into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateTable( Sink sink ) { int[] justify = { Sink.JUSTIFY_CENTER, Sink.JUSTIFY_LEFT, Sink.JUSTIFY_RIGHT }; sink.table(); sink.tableRows( justify, true ); sink.tableRow(); sink.tableCell(); sink.text( "Centered" ); sink.lineBreak(); sink.text( "cell 1,1" ); sink.tableCell_(); sink.tableCell(); sink.text( "Left-aligned" ); sink.lineBreak(); sink.text( "cell 1,2" ); sink.tableCell_(); sink.tableCell(); sink.text( "Right-aligned" ); sink.lineBreak(); sink.text( "cell 1,3" ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); sink.tableCell(); sink.text( "cell 2,1" ); sink.tableCell_(); sink.tableCell(); sink.text( "cell 2,2" ); sink.tableCell_(); sink.tableCell(); sink.text( "cell 2,3" ); sink.tableCell_(); sink.tableRow_(); sink.tableRows_(); sink.tableCaption(); sink.text( "Table caption" ); sink.tableCaption_(); sink.table_(); } /** * Dumps a table without grid into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateNoGridTable( Sink sink ) { int[] justify = { Sink.JUSTIFY_CENTER, Sink.JUSTIFY_CENTER }; sink.table(); sink.tableRows( justify, false ); sink.tableRow(); sink.tableCell(); sink.text( "cell" ); sink.tableCell_(); sink.tableCell(); sink.text( "cell" ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); sink.tableCell(); sink.text( "cell" ); sink.tableCell_(); sink.tableCell(); sink.text( "cell" ); sink.tableCell_(); sink.tableRow_(); sink.tableRows_(); sink.table_(); } /** * Dumps a table with a header row into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateHeaderTable( Sink sink ) { int[] justify = { Sink.JUSTIFY_CENTER, Sink.JUSTIFY_CENTER }; sink.table(); sink.tableRows( justify, true ); sink.tableRow(); sink.tableHeaderCell(); sink.text( "header" ); sink.tableHeaderCell_(); sink.tableHeaderCell(); sink.text( "header" ); sink.tableHeaderCell_(); sink.tableRow_(); sink.tableRow(); sink.tableCell(); sink.text( "cell" ); sink.tableCell_(); sink.tableCell(); sink.text( "cell" ); sink.tableCell_(); sink.tableRow_(); sink.tableRows_(); sink.table_(); } /** * Dumps a paragraph with italic, bold and monospaced text * into the specified sink. The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateFonts( Sink sink ) { sink.paragraph(); sink.italic(); sink.text( "Italic" ); sink.italic_(); sink.text( " font. " ); sink.bold(); sink.text( "Bold" ); sink.bold_(); sink.text( " font. " ); sink.monospaced(); sink.text( "Monospaced" ); sink.monospaced_(); sink.text( " font." ); sink.paragraph_(); } /** * Dumps a paragraph with anchor and link elements * into the specified sink. The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateAnchors( Sink sink ) { sink.paragraph(); sink.anchor( "Anchor" ); sink.text( "Anchor" ); sink.anchor_(); sink.text( ". Link to " ); sink.link( "#Anchor" ); sink.text( "Anchor" ); sink.link_(); sink.text( ". Link to " ); sink.link( "http://www.pixware.fr" ); sink.text( "http://www.pixware.fr" ); sink.link_(); sink.text( ". Link to " ); sink.link( "#Anchor" ); sink.text( "showing alternate text" ); sink.link_(); sink.text( ". Link to " ); sink.link( "http://www.pixware.fr" ); sink.text( "Pixware home page" ); sink.link_(); sink.text( "." ); sink.paragraph_(); } /** * Dumps a horizontal rule block into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateHorizontalRule( Sink sink ) { sink.paragraph(); sink.text( "Horizontal line:" ); sink.paragraph_(); sink.horizontalRule(); } /** * Dumps a pageBreak block into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generatePageBreak( Sink sink ) { sink.pageBreak(); sink.paragraph(); sink.text( "New page." ); sink.paragraph_(); } /** * Dumps a lineBreak block into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateLineBreak( Sink sink ) { sink.paragraph(); sink.text( "Force line" ); sink.lineBreak(); sink.text( "break." ); sink.paragraph_(); } /** * Dumps a nonBreakingSpace block into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateNonBreakingSpace( Sink sink ) { sink.paragraph(); sink.text( "Non" ); sink.nonBreakingSpace(); sink.text( "breaking" ); sink.nonBreakingSpace(); sink.text( "space." ); sink.paragraph_(); } /** * Dumps a special character block into the specified sink. * The sink is not flushed or closed. * * @param sink The sink to receive the events. */ public static void generateSpecialCharacters( Sink sink ) { sink.paragraph(); sink.text( "Escaped special characters:" ); sink.lineBreak(); sink.text( "~" ); sink.lineBreak(); sink.text( "=" ); sink.lineBreak(); sink.text( "-" ); sink.lineBreak(); sink.text( "+" ); sink.lineBreak(); sink.text( "*" ); sink.lineBreak(); sink.text( "[" ); sink.lineBreak(); sink.text( "]" ); sink.lineBreak(); sink.text( "<" ); sink.lineBreak(); sink.text( ">" ); sink.lineBreak(); sink.text( "{" ); sink.lineBreak(); sink.text( "}" ); sink.lineBreak(); sink.text( "\\" ); sink.paragraph_(); sink.paragraph(); sink.text( "Copyright symbol:" ); sink.lineBreak(); sink.text( "\u00a9" ); sink.paragraph_(); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTest.java0000644000175000017500000007560511207760454030604 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.AbstractModuleTest; import org.apache.maven.doxia.logging.PlexusLoggerWrapper; import org.codehaus.plexus.util.IOUtil; import java.io.CharArrayWriter; import java.io.IOException; import java.io.Writer; /** * Abstract base class to test sinks. * * @version $Id: AbstractSinkTest.java 779959 2009-05-29 13:20:44Z vsiveton $ * @since 1.0 */ public abstract class AbstractSinkTest extends AbstractModuleTest { private final CharArrayWriter testWriter = new CharArrayWriter(); private Sink sink; /** * Resets the writer and creates a new sink with it. * * {@inheritDoc} * * @throws java.lang.Exception if something goes wrong. */ protected void setUp() throws Exception { super.setUp(); testWriter.reset(); sink = createSink( testWriter ); sink.enableLogging( new PlexusLoggerWrapper( getContainer().getLogger() ) ); } // --------------------------------------------------------------------- // Common test cases // ---------------------------------------------------------------------- /** * Tests that the current sink is able to render the common test document. If the sink is an Xml sink defined * by {@link #isXmlSink()}, it uses an Xml Writer defined by {@link #getXmlTestWriter(String)}. If not, it uses * the Writer defined by {@link #getTestWriter(String)}. * * @see SinkTestDocument * @throws IOException If the target test document could not be generated. * @see #isXmlSink() * @see #getTestWriter(String) * @see #getXmlTestWriter(String) */ public final void testTestDocument() throws IOException { Writer writer = ( isXmlSink() ? getXmlTestWriter( "testDocument" ) : getTestWriter( "testDocument" ) ); Sink testSink = createSink( writer ); try { SinkTestDocument.generate( testSink ); } finally { testSink.close(); IOUtil.close( writer ); } } /** * Checks that the sequence [title(), text( title ), title_()], * invoked on the current sink, produces the same result as * {@link #getTitleBlock getTitleBlock}( title ). */ public void testTitle() { String title = "Grodek"; sink.title(); sink.text( title ); sink.title_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getTitleBlock( title ); assertEquals( "Wrong title!", expected, actual ); } /** * Checks that the sequence [author(), text( author ), author_()] * , invoked on the current sink, produces the same result as * {@link #getAuthorBlock getAuthorBlock}( author ). */ public void testAuthor() { String author = "Georg_Trakl"; sink.author(); sink.text( author ); sink.author_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getAuthorBlock( author ); assertEquals( "Wrong author!", expected, actual ); } /** * Checks that the sequence [date(), text( date ), date_()], * invoked on the current sink, produces the same result as * {@link #getDateBlock getDateBlock}( date ). */ public void testDate() { String date = "1914"; sink.date(); sink.text( date ); sink.date_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getDateBlock( date ); assertEquals( "Wrong date!", expected, actual ); } /** * Checks that the sequence [head(), head_()], * invoked on the current sink, produces the same result as * {@link #getHeadBlock getHeadBlock()}. */ public void testHead() { sink.head(); sink.head_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getHeadBlock(); assertEquals( "Wrong head!", expected, actual ); } /** * Checks that the sequence [body(), body_()], * invoked on the current sink, produces the same result as * {@link #getBodyBlock getBodyBlock()}. */ public void testBody() { sink.body(); sink.body_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getBodyBlock(); assertEquals( "Wrong body!", expected, actual ); } /** * Checks that the sequence [sectionTitle(), text( title ), * sectionTitle_()], invoked on the current sink, produces * the same result as * {@link #getSectionTitleBlock getSectionTitleBlock}( title ). */ public void testSectionTitle() { String title = "Title"; sink.sectionTitle(); sink.text( title ); sink.sectionTitle_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getSectionTitleBlock( title ); assertEquals( "Wrong sectionTitle!", expected, actual ); } /** * Checks that the sequence [section1(), sectionTitle1(), * text( title ), sectionTitle1_(), section1_()], * invoked on the current sink, produces the same result as * {@link #getSection1Block getSection1Block}( title ). */ public void testSection1() { String title = "Title1"; sink.section1(); sink.sectionTitle1(); sink.text( title ); sink.sectionTitle1_(); sink.section1_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getSection1Block( title ); assertEquals( "Wrong section1 block!", expected, actual ); } /** * Checks that the sequence [section2(), sectionTitle2(), * text( title ), sectionTitle2_(), section2_()], * invoked on the current sink, produces the same result as * {@link #getSection2Block getSection2Block}( title ). */ public void testSection2() { String title = "Title2"; sink.section2(); sink.sectionTitle2(); sink.text( title ); sink.sectionTitle2_(); sink.section2_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getSection2Block( title ); assertEquals( "Wrong section2 block!", expected, actual ); } /** * Checks that the sequence [section3(), sectionTitle3(), * text( title ), sectionTitle3_(), section3_()], * invoked on the current sink, produces the same result as * {@link #getSection3Block getSection3Block}( title ). */ public void testSection3() { String title = "Title3"; sink.section3(); sink.sectionTitle3(); sink.text( title ); sink.sectionTitle3_(); sink.section3_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getSection3Block( title ); assertEquals( "Wrong section3 block!", expected, actual ); } /** * Checks that the sequence [section4(), sectionTitle4(), * text( title ), sectionTitle4_(), section4_()], * invoked on the current sink, produces the same result as * {@link #getSection4Block getSection4Block}( title ). * */ public void testSection4() { String title = "Title4"; sink.section4(); sink.sectionTitle4(); sink.text( title ); sink.sectionTitle4_(); sink.section4_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getSection4Block( title ); assertEquals( "Wrong section4 block!", expected, actual ); } /** * Checks that the sequence [section5(), sectionTitle5(), * text( title ), sectionTitle5_(), section5_()], * invoked on the current sink, produces the same result as * {@link #getSection5Block getSection5Block}( title ). */ public void testSection5() { String title = "Title5"; sink.section5(); sink.sectionTitle5(); sink.text( title ); sink.sectionTitle5_(); sink.section5_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getSection5Block( title ); assertEquals( "Wrong section5 block!", expected, actual ); } /** * Checks that the sequence [list(), listItem(), text( item ), * listItem_(), list_()], invoked on the current sink, produces * the same result as {@link #getListBlock getListBlock}( item ). * */ public void testList() { String item = "list_item"; sink.list(); sink.listItem(); sink.text( item ); sink.listItem_(); sink.list_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getListBlock( item ); assertEquals( "Wrong list!", expected, actual ); } /** * Checks that the sequence * [numberedList( Sink.NUMBERING_LOWER_ROMAN ), numberedListItem(), * text( item ), numberedListItem_(), numberedList_()], * invoked on the current sink, produces the same result as * {@link #getNumberedListBlock getNumberedListBlock}( item ). */ public void testNumberedList() { String item = "numbered_list_item"; sink.numberedList( Sink.NUMBERING_LOWER_ROMAN ); sink.numberedListItem(); sink.text( item ); sink.numberedListItem_(); sink.numberedList_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getNumberedListBlock( item ); assertEquals( "Wrong numbered list!", expected, actual ); } /** * Checks that the sequence [definitionList(), definitionListItem(), * definedTerm(), text( definum ), definedTerm_(), definition(), * text( definition ), definition_(), definitionListItem_(), * definitionList_()], invoked on the current sink, produces the same * result as {@link #getDefinitionListBlock getDefinitionListBlock} * ( definum, definition ). */ public void testDefinitionList() { String definum = "definum"; String definition = "definition"; sink.definitionList(); sink.definitionListItem(); sink.definedTerm(); sink.text( definum ); sink.definedTerm_(); sink.definition(); sink.text( definition ); sink.definition_(); sink.definitionListItem_(); sink.definitionList_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getDefinitionListBlock( definum, definition ); assertEquals( "Wrong definition list!", expected, actual ); } /** * Checks that the sequence [figure(), figureGraphics( source ), * figureCaption(), text( caption ), figureCaption_(), figure_()], * invoked on the current sink, produces the same result as * {@link #getFigureBlock getFigureBlock}( source, caption ). */ public void testFigure() { String source = "figure.jpg"; String caption = "Figure_caption"; sink.figure(); sink.figureGraphics( source ); sink.figureCaption(); sink.text( caption ); sink.figureCaption_(); sink.figure_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getFigureBlock( source, caption ); assertEquals( "Wrong figure!", expected, actual ); } /** * Checks that the sequence [table(), * tableRows( Sink.JUSTIFY_CENTER, false ), tableRow(), tableCell(), * text( cell ), tableCell_(), tableRow_(), tableRows_(), tableCaption(), * text( caption ), tableCaption_(), table_()], * invoked on the current sink, produces the same result as * {@link #getTableBlock getTableBlock}( cell, caption ). */ public void testTable() { String cell = "cell"; String caption = "Table_caption"; int[] justify = { Sink.JUSTIFY_CENTER }; sink.table(); sink.tableRows( justify, false ); sink.tableRow(); sink.tableCell(); sink.text( cell ); sink.tableCell_(); sink.tableRow_(); sink.tableRows_(); sink.tableCaption(); sink.text( caption ); sink.tableCaption_(); sink.table_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getTableBlock( cell, caption ); assertEquals( "Wrong table!", expected, actual ); } /** * Checks that the sequence [paragraph(), text( text ), * paragraph_()], invoked on the current sink, produces * the same result as {@link #getParagraphBlock getParagraphBlock}( text ). */ public void testParagraph() { String text = "Text"; sink.paragraph(); sink.text( text ); sink.paragraph_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getParagraphBlock( text ); assertEquals( "Wrong paragraph!", expected, actual ); } /** * Checks that the sequence [verbatim( SinkEventAttributeSet.BOXED ), text( text ), * verbatim_()], invoked on the current sink, produces the * same result as {@link #getVerbatimBlock getVerbatimBlock}( text ). */ public void testVerbatim() { String text = "Text"; sink.verbatim( SinkEventAttributeSet.BOXED ); sink.text( text ); sink.verbatim_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getVerbatimBlock( text ); assertEquals( "Wrong verbatim!", expected, actual ); } /** * Checks that the sequence [horizontalRule()], * invoked on the current sink, produces the same result as * {@link #getHorizontalRuleBlock getHorizontalRuleBlock()}. */ public void testHorizontalRule() { sink.horizontalRule(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getHorizontalRuleBlock(); assertEquals( "Wrong horizontal rule!", expected, actual ); } /** * Checks that the sequence [pageBreak()], * invoked on the current sink, produces the same result as * {@link #getPageBreakBlock getPageBreakBlock()}. */ public void testPageBreak() { sink.pageBreak(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getPageBreakBlock(); assertEquals( "Wrong pageBreak!", expected, actual ); } /** * Checks that the sequence [anchor( anchor ), text( anchor ), * anchor_()], invoked on the current sink, produces the same * result as {@link #getAnchorBlock getAnchorBlock}( anchor ). */ public void testAnchor() { String anchor = "Anchor"; sink.anchor( anchor ); sink.text( anchor ); sink.anchor_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getAnchorBlock( anchor ); assertEquals( "Wrong anchor!", expected, actual ); } /** * Checks that the sequence [link( link ), text( text ), * link_()], invoked on the current sink, produces the same * result as {@link #getLinkBlock getLinkBlock}( link, text ). */ public void testLink() { String link = "#Link"; String text = "Text"; sink.link( link ); sink.text( text ); sink.link_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getLinkBlock( link, text ); assertEquals( "Wrong link!", expected, actual ); } /** * Checks that the sequence [italic(), text( text ), italic_()], * invoked on the current sink, produces the same result as * {@link #getItalicBlock getItalicBlock}( text ). */ public void testItalic() { String text = "Italic"; sink.italic(); sink.text( text ); sink.italic_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getItalicBlock( text ); assertEquals( "Wrong italic!", expected, actual ); } /** * Checks that the sequence [bold(), text( text ), bold_()], * invoked on the current sink, produces the same result as * {@link #getBoldBlock getBoldBlock}( text ). */ public void testBold() { String text = "Bold"; sink.bold(); sink.text( text ); sink.bold_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getBoldBlock( text ); assertEquals( "Wrong bold!", expected, actual ); } /** * Checks that the sequence [monospaced(), text( text ), * monospaced_()], invoked on the current sink, produces the same * result as {@link #getMonospacedBlock getMonospacedBlock}( text ). */ public void testMonospaced() { String text = "Monospaced"; sink.monospaced(); sink.text( text ); sink.monospaced_(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getMonospacedBlock( text ); assertEquals( "Wrong monospaced!", expected, actual ); } /** * Checks that the sequence [lineBreak()], * invoked on the current sink, produces the same result as * {@link #getLineBreakBlock getLineBreakBlock()}. */ public void testLineBreak() { sink.lineBreak(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getLineBreakBlock(); assertEquals( "Wrong lineBreak!", expected, actual ); } /** * Checks that the sequence [nonBreakingSpace()], * invoked on the current sink, produces the same result as * {@link #getNonBreakingSpaceBlock getNonBreakingSpaceBlock()}. */ public void testNonBreakingSpace() { sink.nonBreakingSpace(); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getNonBreakingSpaceBlock(); assertEquals( "Wrong nonBreakingSpace!", expected, actual ); } /** * Checks that the sequence [text( text )], * invoked on the current sink, produces the same result as * {@link #getTextBlock getTextBlock()}. */ public void testText() { String text = "~,_=,_-,_+,_*,_[,_],_<,_>,_{,_},_\\"; sink.text( text ); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getTextBlock( text ); assertEquals( "Wrong text!", expected, actual ); } /** * Checks that the sequence [rawText( text )], * invoked on the current sink, produces the same result as * {@link #getRawTextBlock getRawTextBlock}( text ). */ public void testRawText() { String text = "~,_=,_-,_+,_*,_[,_],_<,_>,_{,_},_\\"; sink.rawText( text ); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getRawTextBlock( text ); assertEquals( "Wrong rawText!", expected, actual ); } /** * Checks that the sequence [comment(comment)], * invoked on the current sink, produces the same result as * {@link #getCommentBlock getCommentBlock}( comment ). * @since 1.1.1 */ public void testComment() { String comment = "Simple comment with ----"; sink.comment( comment ); sink.flush(); sink.close(); String actual = testWriter.toString(); String expected = getCommentBlock( comment ); assertEquals( "Wrong comment!", expected, actual ); } // ---------------------------------------------------------------------- // Utility methods // ---------------------------------------------------------------------- /** * Returns the sink that is currently being tested. * @return The current test sink. */ protected Sink getSink() { return sink; } /** * Returns a String representation of all events that have been written to the sink. * @return The Sink content as a String. */ protected String getSinkContent() { return testWriter.toString(); } /** * Returns the directory where all sink test output will go. * @return The test output directory. */ protected String getOutputDir() { return "sink/"; } // ---------------------------------------------------------------------- // Abstract methods the individual SinkTests must provide // ---------------------------------------------------------------------- /** * This method allows to use the correct Writer in {@link #testTestDocument()}. * * @return true if the Sink is an XML one, false otherwise. * @see #testTestDocument() */ protected abstract boolean isXmlSink(); /** * Return a new instance of the sink that is being tested. * @param writer The writer for the sink. * @return A new sink. */ protected abstract Sink createSink( Writer writer ); /** * Returns a title block generated by this sink. * @param title The title to use. * @return The result of invoking a title block on the current sink. * @see #testTitle() */ protected abstract String getTitleBlock( String title ); /** * Returns an author block generated by this sink. * @param author The author to use. * @return The result of invoking an author block on the current sink. * @see #testAuthor() */ protected abstract String getAuthorBlock( String author ); /** * Returns a date block generated by this sink. * @param date The date to use. * @return The result of invoking a date block on the current sink. * @see #testDate() */ protected abstract String getDateBlock( String date ); /** * Returns a head block generated by this sink. * @return The result of invoking a head block on the current sink. * @see #testHead() */ protected abstract String getHeadBlock(); /** * Returns a body block generated by this sink. * @return The result of invoking a body block on the current sink. * @see #testBody() */ protected abstract String getBodyBlock(); /** * Returns a SectionTitle block generated by this sink. * @param title The title to use. * @return The result of invoking a SectionTitle block on the current sink. * @see #testSectionTitle() */ protected abstract String getSectionTitleBlock( String title ); /** * Returns a Section1 block generated by this sink. * @param title The title to use. * @return The result of invoking a Section1 block on the current sink. * @see #testSection1() */ protected abstract String getSection1Block( String title ); /** * Returns a Section2 block generated by this sink. * @param title The title to use. * @return The result of invoking a Section2 block on the current sink. * @see #testSection2() */ protected abstract String getSection2Block( String title ); /** * Returns a Section3 block generated by this sink. * @param title The title to use. * @return The result of invoking a Section3 block on the current sink. * @see #testSection3() */ protected abstract String getSection3Block( String title ); /** * Returns a Section4 block generated by this sink. * @param title The title to use. * @return The result of invoking a Section4 block on the current sink. * @see #testSection4() */ protected abstract String getSection4Block( String title ); /** * Returns a Section5 block generated by this sink. * @param title The title to use. * @return The result of invoking a Section5 block on the current sink. * @see #testSection5() */ protected abstract String getSection5Block( String title ); /** * Returns a list block generated by this sink. * @param item The item to use. * @return The result of invoking a list block on the current sink. * @see #testList() */ protected abstract String getListBlock( String item ); /** * Returns a NumberedList block generated by this sink. * @param item The item to use. * @return The result of invoking a NumberedList block on the current sink. * @see #testNumberedList() */ protected abstract String getNumberedListBlock( String item ); /** * Returns a DefinitionList block generated by this sink. * @param definum The term to define. * @param definition The definition. * @return The result of invoking a DefinitionList block on the current sink. * @see #testDefinitionList() */ protected abstract String getDefinitionListBlock( String definum, String definition ); /** * Returns a Figure block generated by this sink. * @param source The figure source string. * @param caption The caption to use (may be null). * @return The result of invoking a Figure block on the current sink. * @see #testFigure() */ protected abstract String getFigureBlock( String source, String caption ); /** * Returns a Table block generated by this sink. * @param cell A tabel cell to use. * @param caption The caption to use (may be null). * @return The result of invoking a Table block on the current sink. * @see #testTable() */ protected abstract String getTableBlock( String cell, String caption ); /** * Returns a Paragraph block generated by this sink. * @param text The text to use. * @return The result of invoking a Paragraph block on the current sink. * @see #testParagraph() */ protected abstract String getParagraphBlock( String text ); /** * Returns a Verbatim block generated by this sink. * @param text The text to use. * @return The result of invoking a Verbatim block on the current sink. * @see #testVerbatim() */ protected abstract String getVerbatimBlock( String text ); /** * Returns a HorizontalRule block generated by this sink. * @return The result of invoking a HorizontalRule block on the current sink. * @see #testHorizontalRule() */ protected abstract String getHorizontalRuleBlock(); /** * Returns a PageBreak block generated by this sink. * @return The result of invoking a PageBreak block on the current sink. * @see #testPageBreak() */ protected abstract String getPageBreakBlock(); /** * Returns a Anchor block generated by this sink. * @param anchor The anchor to use. * @return The result of invoking a Anchor block on the current sink. * @see #testAnchor() */ protected abstract String getAnchorBlock( String anchor ); /** * Returns a Link block generated by this sink. * @param link The link to use. * @param text The link text. * @return The result of invoking a Link block on the current sink. * @see #testLink() */ protected abstract String getLinkBlock( String link, String text ); /** * Returns a Italic block generated by this sink. * @param text The text to use. * @return The result of invoking a Italic block on the current sink. * @see #testItalic() */ protected abstract String getItalicBlock( String text ); /** * Returns a Bold block generated by this sink. * @param text The text to use. * @return The result of invoking a Bold block on the current sink. * @see #testBold() */ protected abstract String getBoldBlock( String text ); /** * Returns a Monospaced block generated by this sink. * @param text The text to use. * @return The result of invoking a Monospaced block on the current sink. * @see #testMonospaced() */ protected abstract String getMonospacedBlock( String text ); /** * Returns a LineBreak block generated by this sink. * @return The result of invoking a LineBreak block on the current sink. * @see #testLineBreak() */ protected abstract String getLineBreakBlock(); /** * Returns a NonBreakingSpace block generated by this sink. * @return The result of invoking a NonBreakingSpace block * on the current sink. * @see #testNonBreakingSpace() */ protected abstract String getNonBreakingSpaceBlock(); /** * Returns a Text block generated by this sink. * @param text The text to use. * @return The result of invoking a Text block on the current sink. * @see #testText() */ protected abstract String getTextBlock( String text ); /** * Returns a RawText block generated by this sink. * @param text The text to use. * @return The result of invoking a RawText block on the current sink. * @see #testRawText() */ protected abstract String getRawTextBlock( String text ); /** * Returns a comment block generated by this sink. * @param text The text to use. * @return The result of invoking a comment block on the current sink. * @see #testComment() * @since 1.1.1 */ protected abstract String getCommentBlock( String text ); } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkEventAttributeSetTest.java0000644000175000017500000002442711163507217032453 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.Enumeration; import javax.swing.text.AttributeSet; import junit.framework.TestCase; /** * Test SinkEventAttributeSet. * * @author ltheussl */ public class SinkEventAttributeSetTest extends TestCase { private SinkEventAttributeSet sinkEventAttributeSet; /** * @throws java.lang.Exception if any. */ protected void setUp() throws Exception { super.setUp(); this.sinkEventAttributeSet = new SinkEventAttributeSet(); } /** * Test of constructors, of class SinkEventAttributeSet. */ public void testConstructor() { try { SinkEventAttributeSet aset = new SinkEventAttributeSet( new String[] {"key"} ); fail( "missing attribute value!" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } } /** * Test of isEmpty method, of class SinkEventAttributeSet. */ public void testIsEmpty() { assertTrue( sinkEventAttributeSet.isEmpty() ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.BOLD ); assertFalse( sinkEventAttributeSet.isEmpty() ); } /** * Test of getAttributeCount method, of class SinkEventAttributeSet. */ public void testGetAttributeCount() { assertEquals( 0, sinkEventAttributeSet.getAttributeCount() ); sinkEventAttributeSet.addAttribute( "name1", "value1" ); assertEquals( 1, sinkEventAttributeSet.getAttributeCount() ); sinkEventAttributeSet.removeAttribute( "name2" ); assertEquals( 1, sinkEventAttributeSet.getAttributeCount() ); sinkEventAttributeSet.removeAttribute( "name1" ); assertEquals( 0, sinkEventAttributeSet.getAttributeCount() ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.BOLD ); assertEquals( 1, sinkEventAttributeSet.getAttributeCount() ); sinkEventAttributeSet.removeAttributes( SinkEventAttributeSet.BOXED ); assertEquals( 1, sinkEventAttributeSet.getAttributeCount() ); sinkEventAttributeSet.removeAttributes( SinkEventAttributeSet.BOLD ); assertEquals( 0, sinkEventAttributeSet.getAttributeCount() ); } /** * Test of isDefined method, of class SinkEventAttributeSet. */ public void testIsDefined() { assertFalse( sinkEventAttributeSet.isDefined( SinkEventAttributes.DECORATION ) ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.BOXED ); assertTrue( sinkEventAttributeSet.isDefined( SinkEventAttributes.DECORATION ) ); } /** * Test of isEqual method, of class SinkEventAttributeSet. */ public void testIsEqual() { SinkEventAttributes instance = new SinkEventAttributeSet( SinkEventAttributeSet.BOLD ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.BOLD ); assertTrue( instance.isEqual( sinkEventAttributeSet ) ); instance.addAttributes( SinkEventAttributeSet.BOXED ); assertFalse( instance.isEqual( sinkEventAttributeSet ) ); } /** * Test of equals method, of class SinkEventAttributeSet. */ public void testEquals() { assertFalse( sinkEventAttributeSet.equals( null ) ); assertTrue( sinkEventAttributeSet.equals( sinkEventAttributeSet ) ); SinkEventAttributes instance = new SinkEventAttributeSet( SinkEventAttributeSet.BOLD ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.BOLD ); assertTrue( instance.equals( sinkEventAttributeSet ) ); instance.addAttributes( SinkEventAttributeSet.BOXED ); assertFalse( instance.equals( sinkEventAttributeSet ) ); } /** * Test of copyAttributes method, of class SinkEventAttributeSet. */ public void testCopyAttributes() { sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.ITALIC ); AttributeSet instance = sinkEventAttributeSet.copyAttributes(); assertTrue( instance.isEqual( sinkEventAttributeSet ) ); } /** * Test of getAttributeNames method, of class SinkEventAttributeSet. */ public void testGetAttributeNames() { sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.UNDERLINE ); Enumeration result = sinkEventAttributeSet.getAttributeNames(); assertEquals( "decoration", result.nextElement() ); assertFalse( result.hasMoreElements() ); } /** * Test of getAttribute method, of class SinkEventAttributeSet. */ public void testGetAttribute() { sinkEventAttributeSet.addAttribute( "key", "value" ); assertTrue( sinkEventAttributeSet.getAttribute( "key" ).equals( "value" ) ); assertNull( sinkEventAttributeSet.getAttribute( "bla" ) ); } /** * Test of containsAttribute method, of class SinkEventAttributeSet. */ public void testContainsAttribute() { sinkEventAttributeSet.addAttribute( "key", "value" ); assertTrue( sinkEventAttributeSet.containsAttribute( "key", "value" ) ); assertFalse( sinkEventAttributeSet.containsAttribute( "key", "valu" ) ); } /** * Test of containsAttributes method, of class SinkEventAttributeSet. */ public void testContainsAttributes() { sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.JUSTIFY ); assertTrue( sinkEventAttributeSet.containsAttributes( SinkEventAttributeSet.JUSTIFY ) ); assertFalse( sinkEventAttributeSet.containsAttributes( SinkEventAttributeSet.BOXED ) ); } /** * Test of addAttribute method, of class SinkEventAttributeSet. */ public void testAddAttribute() { assertFalse( sinkEventAttributeSet.containsAttribute( "key", "value" ) ); sinkEventAttributeSet.addAttribute( "key", "value" ); assertTrue( sinkEventAttributeSet.containsAttribute( "key", "value" ) ); sinkEventAttributeSet.removeAttribute( "key" ); assertFalse( sinkEventAttributeSet.containsAttribute( "key", "value" ) ); } /** * Test of add/removeAttributes methods, of class SinkEventAttributeSet. */ public void testAddAttributes() { assertFalse( sinkEventAttributeSet.containsAttributes( SinkEventAttributeSet.JUSTIFY ) ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.JUSTIFY ); assertTrue( sinkEventAttributeSet.containsAttributes( SinkEventAttributeSet.JUSTIFY ) ); sinkEventAttributeSet.removeAttributes( SinkEventAttributeSet.JUSTIFY ); assertFalse( sinkEventAttributeSet.containsAttributes( SinkEventAttributeSet.JUSTIFY ) ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.JUSTIFY ); sinkEventAttributeSet.removeAttributes( SinkEventAttributeSet.JUSTIFY.getAttributeNames() ); assertFalse( sinkEventAttributeSet.containsAttributes( SinkEventAttributeSet.JUSTIFY ) ); sinkEventAttributeSet.setResolveParent( SinkEventAttributeSet.JUSTIFY ); assertTrue( sinkEventAttributeSet.containsAttributes( SinkEventAttributeSet.JUSTIFY ) ); sinkEventAttributeSet.removeAttributes( (AttributeSet) null ); // should do nothing } /** * Test of getResolveParent method, of class SinkEventAttributeSet. */ public void testGetResolveParent() { assertNull( sinkEventAttributeSet.getResolveParent() ); sinkEventAttributeSet.setResolveParent( SinkEventAttributeSet.CENTER ); assertNotNull( sinkEventAttributeSet.getResolveParent() ); } /** * Test of clone method, of class SinkEventAttributeSet. */ public void testClone() { Object result = sinkEventAttributeSet.clone(); assertTrue( sinkEventAttributeSet.equals( result ) ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.MONOSPACED ); assertFalse( sinkEventAttributeSet.equals( result ) ); result = sinkEventAttributeSet.clone(); assertTrue( sinkEventAttributeSet.equals( result ) ); sinkEventAttributeSet.setResolveParent( SinkEventAttributeSet.CENTER ); //assertFalse( sinkEventAttributeSet.equals( result ) ); result = sinkEventAttributeSet.clone(); assertTrue( sinkEventAttributeSet.equals( result ) ); sinkEventAttributeSet.setResolveParent( SinkEventAttributeSet.BOXED ); //assertFalse( sinkEventAttributeSet.equals( result ) ); } /** * Test of hashCode method, of class SinkEventAttributeSet. */ public void testHashCode() { int oldValue = sinkEventAttributeSet.hashCode(); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.BOLD ); int newValue = sinkEventAttributeSet.hashCode(); assertFalse( oldValue == newValue ); oldValue = newValue; sinkEventAttributeSet.setResolveParent( SinkEventAttributeSet.CENTER ); newValue = sinkEventAttributeSet.hashCode(); assertFalse( oldValue == newValue ); } /** * Test of toString method, of class SinkEventAttributeSet. */ public void testToString() { String expected = ""; assertEquals( expected, sinkEventAttributeSet.toString() ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.BOXED ); expected = " decoration=boxed"; assertEquals( expected, sinkEventAttributeSet.toString() ); sinkEventAttributeSet.addAttributes( SinkEventAttributeSet.CENTER ); expected = " decoration=boxed align=center"; assertEquals( expected, sinkEventAttributeSet.toString() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/TextSink.java0000644000175000017500000003747511117204530027114 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.io.Writer; /** * A simple text-based implementation of the Sink interface. * Useful for testing purposes. */ public class TextSink extends AbstractSink { /** For writing the result. */ private final Writer out; /** Constructor. * @param writer The writer for writing the result. */ public TextSink( Writer writer ) { this.out = writer; } /** {@inheritDoc} */ public void head() { writeln( "begin:head" ); } /** {@inheritDoc} */ public void head_() { writeln( "end:head" ); } /** {@inheritDoc} */ public void body() { writeln( "begin:body" ); } /** {@inheritDoc} */ public void body_() { writeln( "end:body" ); } /** {@inheritDoc} */ public void section1() { write( "begin:section1" ); } /** {@inheritDoc} */ public void section1_() { writeln( "end:section1" ); } /** {@inheritDoc} */ public void section2() { write( "begin:section2" ); } /** {@inheritDoc} */ public void section2_() { writeln( "end:section2" ); } /** {@inheritDoc} */ public void section3() { write( "begin:section3" ); } /** {@inheritDoc} */ public void section3_() { writeln( "end:section3" ); } /** {@inheritDoc} */ public void section4() { write( "begin:section4" ); } /** {@inheritDoc} */ public void section4_() { writeln( "end:section4" ); } /** {@inheritDoc} */ public void section5() { write( "begin:section5" ); } /** {@inheritDoc} */ public void section5_() { writeln( "end:section5" ); } /** {@inheritDoc} */ public void list() { writeln( "begin:list" ); } /** {@inheritDoc} */ public void list_() { writeln( "end:list" ); } /** {@inheritDoc} */ public void listItem() { write( "begin:listItem" ); } /** {@inheritDoc} */ public void listItem_() { writeln( "end:listItem" ); } /** {@inheritDoc} */ public void numberedList( int numbering ) { writeln( "begin:numberedList, numbering: " + numbering ); } /** {@inheritDoc} */ public void numberedList_() { writeln( "end:numberedList" ); } /** {@inheritDoc} */ public void numberedListItem() { write( "begin:numberedListItem" ); } /** {@inheritDoc} */ public void numberedListItem_() { writeln( "end:numberedListItem" ); } /** {@inheritDoc} */ public void definitionList() { writeln( "begin:definitionList" ); } /** {@inheritDoc} */ public void definitionList_() { writeln( "end:definitionList" ); } /** {@inheritDoc} */ public void definitionListItem() { write( "begin:definitionListItem" ); } /** {@inheritDoc} */ public void definitionListItem_() { writeln( "end:definitionListItem" ); } /** {@inheritDoc} */ public void definition() { write( "begin:definition" ); } /** {@inheritDoc} */ public void definition_() { writeln( "end:definition" ); } /** {@inheritDoc} */ public void figure() { write( "begin:figure" ); } /** {@inheritDoc} */ public void figure_() { writeln( "end:figure" ); } /** {@inheritDoc} */ public void table() { writeln( "begin:table" ); } /** {@inheritDoc} */ public void table_() { writeln( "end:table" ); } /** {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { writeln( "begin:tableRows" ); } /** {@inheritDoc} */ public void tableRows_() { writeln( "end:tableRows" ); } /** {@inheritDoc} */ public void tableRow() { write( "begin:tableRow" ); } /** {@inheritDoc} */ public void tableRow_() { writeln( "end:tableRow" ); } /** {@inheritDoc} */ public void title() { write( "begin:title" ); } /** {@inheritDoc} */ public void title_() { writeln( "end:title" ); } /** {@inheritDoc} */ public void author() { write( "begin:author" ); } /** {@inheritDoc} */ public void author_() { writeln( "end:author" ); } /** {@inheritDoc} */ public void date() { write( "begin:date" ); } /** {@inheritDoc} */ public void date_() { writeln( "end:date" ); } /** {@inheritDoc} */ public void sectionTitle() { write( "begin:sectionTitle" ); } /** {@inheritDoc} */ public void sectionTitle_() { writeln( "end:sectionTitle" ); } /** {@inheritDoc} */ public void sectionTitle1() { write( "begin:sectionTitle1" ); } /** {@inheritDoc} */ public void sectionTitle1_() { writeln( "end:sectionTitle1" ); } /** {@inheritDoc} */ public void sectionTitle2() { write( "begin:sectionTitle2" ); } /** {@inheritDoc} */ public void sectionTitle2_() { writeln( "end:sectionTitle2" ); } /** {@inheritDoc} */ public void sectionTitle3() { write( "begin:sectionTitle3" ); } /** {@inheritDoc} */ public void sectionTitle3_() { writeln( "end:sectionTitle3" ); } /** {@inheritDoc} */ public void sectionTitle4() { write( "begin:sectionTitle4" ); } /** {@inheritDoc} */ public void sectionTitle4_() { writeln( "end:sectionTitle4" ); } /** {@inheritDoc} */ public void sectionTitle5() { write( "begin:sectionTitle5" ); } /** {@inheritDoc} */ public void sectionTitle5_() { writeln( "end:sectionTitle5" ); } /** {@inheritDoc} */ public void paragraph() { write( "begin:paragraph" ); } /** {@inheritDoc} */ public void paragraph_() { writeln( "end:paragraph" ); } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { write( "begin:verbatim, boxed: " + boxed ); } /** {@inheritDoc} */ public void verbatim_() { writeln( "end:verbatim" ); } /** {@inheritDoc} */ public void definedTerm() { write( "begin:definedTerm" ); } /** {@inheritDoc} */ public void definedTerm_() { writeln( "end:definedTerm" ); } /** {@inheritDoc} */ public void figureCaption() { write( "begin:figureCaption" ); } /** {@inheritDoc} */ public void figureCaption_() { writeln( "end:figureCaption" ); } /** {@inheritDoc} */ public void tableCell() { write( "begin:tableCell" ); } /** {@inheritDoc} */ public void tableCell( String width ) { write( "begin:tableCell, width: " + width ); } /** {@inheritDoc} */ public void tableCell_() { writeln( "end:tableCell" ); } /** {@inheritDoc} */ public void tableHeaderCell() { write( "begin:tableHeaderCell" ); } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { write( "begin:tableHeaderCell, width: " + width ); } /** {@inheritDoc} */ public void tableHeaderCell_() { writeln( "end:tableHeaderCell" ); } /** {@inheritDoc} */ public void tableCaption() { write( "begin:tableCaption" ); } /** {@inheritDoc} */ public void tableCaption_() { writeln( "end:tableCaption" ); } /** {@inheritDoc} */ public void figureGraphics( String name ) { write( "figureGraphics, name: " + name ); } /** {@inheritDoc} */ public void horizontalRule() { write( "horizontalRule" ); } /** {@inheritDoc} */ public void pageBreak() { write( "pageBreak" ); } /** {@inheritDoc} */ public void anchor( String name ) { write( "begin:anchor, name: " + name ); } /** {@inheritDoc} */ public void anchor_() { writeln( "end:anchor" ); } /** {@inheritDoc} */ public void link( String name ) { write( "begin:link, name: " + name ); } /** {@inheritDoc} */ public void link_() { writeln( "end:link" ); } /** {@inheritDoc} */ public void italic() { write( "begin:italic" ); } /** {@inheritDoc} */ public void italic_() { writeln( "end:italic" ); } /** {@inheritDoc} */ public void bold() { write( "begin:bold" ); } /** {@inheritDoc} */ public void bold_() { writeln( "end:bold" ); } /** {@inheritDoc} */ public void monospaced() { write( "begin:monospaced" ); } /** {@inheritDoc} */ public void monospaced_() { writeln( "end:monospaced" ); } /** {@inheritDoc} */ public void lineBreak() { write( "lineBreak" ); } /** {@inheritDoc} */ public void nonBreakingSpace() { write( "nonBreakingSpace" ); } /** {@inheritDoc} */ public void text( String text ) { write( "text: " + text ); } /** {@inheritDoc} */ public void rawText( String text ) { write( "rawText: " + text ); } /** {@inheritDoc} */ public void comment( String comment ) { write( "comment: " + comment ); } /** {@inheritDoc} */ public void flush() { try { out.flush(); } catch ( IOException e ) { getLog().warn( "Could not flush sink: " + e.getMessage(), e ); } } /** {@inheritDoc} */ public void close() { try { out.close(); } catch ( IOException e ) { getLog().warn( "Could not close sink: " + e.getMessage(), e ); } } /** {@inheritDoc} */ public void head( SinkEventAttributes attributes ) { head(); } /** {@inheritDoc} */ public void title( SinkEventAttributes attributes ) { title(); } /** {@inheritDoc} */ public void author( SinkEventAttributes attributes ) { author(); } /** {@inheritDoc} */ public void date( SinkEventAttributes attributes ) { date(); } /** {@inheritDoc} */ public void body( SinkEventAttributes attributes ) { body(); } /** {@inheritDoc} */ public void section( int level, SinkEventAttributes attributes ) { write( "begin:section" + level ); } /** {@inheritDoc} */ public void section_( int level ) { writeln( "end:section" + level ); } /** {@inheritDoc} */ public void sectionTitle( int level, SinkEventAttributes attributes ) { write( "begin:sectionTitle" + level ); } /** {@inheritDoc} */ public void sectionTitle_( int level ) { writeln( "end:sectionTitle" + level ); } /** {@inheritDoc} */ public void list( SinkEventAttributes attributes ) { list(); } /** {@inheritDoc} */ public void listItem( SinkEventAttributes attributes ) { listItem(); } /** {@inheritDoc} */ public void numberedList( int numbering, SinkEventAttributes attributes ) { numberedList( numbering ); } /** {@inheritDoc} */ public void numberedListItem( SinkEventAttributes attributes ) { numberedListItem(); } /** {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { definitionList(); } /** {@inheritDoc} */ public void definitionListItem( SinkEventAttributes attributes ) { definitionListItem(); } /** {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { definition(); } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { definedTerm(); } /** {@inheritDoc} */ public void figure( SinkEventAttributes attributes ) { write( "begin:figure" + SinkUtils.getAttributeString( attributes ) ); } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { figureCaption(); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { figureGraphics( src ); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { table(); } /** {@inheritDoc} */ public void tableRow( SinkEventAttributes attributes ) { tableRow(); } /** {@inheritDoc} */ public void tableCell( SinkEventAttributes attributes ) { tableCell(); } /** {@inheritDoc} */ public void tableHeaderCell( SinkEventAttributes attributes ) { tableHeaderCell(); } /** {@inheritDoc} */ public void tableCaption( SinkEventAttributes attributes ) { tableCaption(); } /** {@inheritDoc} */ public void paragraph( SinkEventAttributes attributes ) { paragraph(); } /** {@inheritDoc} */ public void verbatim( SinkEventAttributes attributes ) { boolean boxed = false; if ( attributes != null && attributes.isDefined( SinkEventAttributes.DECORATION ) ) { boxed = "boxed".equals( attributes.getAttribute( SinkEventAttributes.DECORATION ).toString() ); } verbatim( boxed ); } /** {@inheritDoc} */ public void horizontalRule( SinkEventAttributes attributes ) { horizontalRule(); } /** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { anchor( name ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { link( name ); } /** {@inheritDoc} */ public void lineBreak( SinkEventAttributes attributes ) { lineBreak(); } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { text( text ); } /** {@inheritDoc} */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { write( "unknown: " + name ); } /** * Writes the given string + EOL. * * @param text The text to write. */ private void write( String text ) { try { out.write( text + EOL ); } catch ( IOException e ) { getLog().warn( "Could not write to sink: " + e.getMessage(), e ); } } /** * Writes the given string + two EOLs. * * @param text The text to write. */ private void writeln( String text ) { write( text ); write( EOL ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTestCase.java0000644000175000017500000001115711151220275031356 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.File; import java.io.FileWriter; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.io.Writer; import org.apache.maven.doxia.parser.Parser; import org.codehaus.plexus.PlexusTestCase; /** * @author Jason van Zyl * @version $Id: AbstractSinkTestCase.java 747735 2009-02-25 10:43:09Z ltheussl $ * @since 1.0 */ public abstract class AbstractSinkTestCase extends PlexusTestCase { private Writer testWriter; // --------------------------------------------------------------------- // Test case // ---------------------------------------------------------------------- /** * Parses the test apt document (obtained via {@link #getTestReader()}) with the Parser returned * by {@link #createParser()} into the Sink returned by {@link #createSink()}. * * @throws java.lang.Exception if anything goes wrong. */ public void testApt() throws Exception { Parser parser = createParser(); parser.parse( getTestReader(), createSink() ); } // ---------------------------------------------------------------------- // Abstract methods the individual SinkTests must provide // ---------------------------------------------------------------------- /** * Return the default extension of files created by the test Sink. * * @return the extension of files created by the test Sink. * @see #createSink() */ protected abstract String outputExtension(); /** * Return a Parser for testing. * * @return a test Parser. */ protected abstract Parser createParser(); /** * Return a Sink for testing. * * @return a test Sink. * @throws java.lang.Exception if the Sink cannot be constructed. */ protected abstract Sink createSink() throws Exception; // ---------------------------------------------------------------------- // Methods for creating the test reader and writer // ---------------------------------------------------------------------- /** * Returns a Writer to write a test output result. The Writer writes to a File * "target/output/test. + extension", where extension is returned by * {@link #outputExtension()}, in the current base directory. * * @return a Writer to write a test output result. * @throws java.lang.Exception if the Writer cannot be constructed. */ protected Writer getTestWriter() throws Exception { if ( testWriter == null ) { File outputDirectory = new File( getBasedirFile(), "target/output" ); if ( !outputDirectory.exists() ) { outputDirectory.mkdirs(); } testWriter = new FileWriter( new File( outputDirectory, "test." + outputExtension() ) ); } return testWriter; } /** * Returns a Reader that gives access to a common test apt file. * * @return a Reader to access the test apt resource file. * @throws java.lang.Exception if the Reader cannot be constructed. */ protected Reader getTestReader() throws Exception { InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( "test.apt" ); InputStreamReader reader = new InputStreamReader( is ); return reader; } // ---------------------------------------------------------------------- // Utility methods // ---------------------------------------------------------------------- /** * Return the current base diretory as a File. * * @return the current base diretory as a File. */ public File getBasedirFile() { return new File( getBasedir() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/render/0000755000175000017500000000000011632765552025761 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/render/RenderingContextTest.java0000644000175000017500000000435011151220275032730 0ustar twernertwernerpackage org.apache.maven.doxia.sink.render; /* * 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.File; import org.codehaus.plexus.PlexusTestCase; /** * @author olamy * @since 20 oct. 07 * @version $Id: RenderingContextTest.java 747735 2009-02-25 10:43:09Z ltheussl $ */ public class RenderingContextTest extends PlexusTestCase { /** * Test getRelativePath() with various file names. * * @throws java.lang.Exception if any. */ public void testFileNameWithDot() throws Exception { File baseDir = new File( getBasedir() + File.separatorChar + "test" + File.separatorChar + "resources" ); String docName = "file.with.dot.in.name.xml"; RenderingContext renderingContext = new RenderingContext( baseDir, docName, "", "xml" ); assertEquals( "file.with.dot.in.name.html", renderingContext.getOutputName() ); assertEquals( ".", renderingContext.getRelativePath() ); docName = "index.xml.vm"; renderingContext = new RenderingContext( baseDir, docName, "", "xml" ); assertEquals( "index.html", renderingContext.getOutputName() ); assertEquals( ".", renderingContext.getRelativePath() ); docName = "download.apt.vm"; renderingContext = new RenderingContext( baseDir, docName, "", "apt" ); assertEquals( "download.html", renderingContext.getOutputName() ); assertEquals( ".", renderingContext.getRelativePath() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkUtilsTest.java0000644000175000017500000000575511163507633030137 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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 javax.swing.text.AttributeSet; import javax.swing.text.MutableAttributeSet; import junit.framework.TestCase; /** * * @author ltheussl */ public class SinkUtilsTest extends TestCase { /** * Test of getAttributeString method, of class SinkUtils. */ public void testGetAttributeString() { assertEquals( "", SinkUtils.getAttributeString( null ) ); AttributeSet att = new SinkEventAttributeSet( SinkEventAttributeSet.BOXED ); String expResult = " decoration=\"boxed\""; String result = SinkUtils.getAttributeString( att ); assertEquals( expResult, result ); SinkEventAttributes at = new SinkEventAttributeSet( SinkEventAttributeSet.BOLD ); at.addAttributes( att ); expResult = " style=\"bold\" decoration=\"boxed\""; result = SinkUtils.getAttributeString( at ); assertEquals( expResult, result ); att = new SinkEventAttributeSet( new String[] {"color", "red", "margin-left", "20px"} ); at = new SinkEventAttributeSet(); at.addAttribute( SinkEventAttributeSet.STYLE, att ); expResult = " style=\"color: red; margin-left: 20px\""; result = SinkUtils.getAttributeString( at ); assertEquals( expResult, result ); } /** * Test of filterAttributes method, of class SinkUtils. */ public void testFilterAttributes() { assertNull( SinkUtils.filterAttributes( null, null ) ); AttributeSet attributes = new SinkEventAttributeSet( 1 ); String[] valids = null; MutableAttributeSet result = SinkUtils.filterAttributes( attributes, valids ); assertEquals( 0, result.getAttributeCount() ); valids = new String[] {}; result = SinkUtils.filterAttributes( attributes, valids ); assertEquals( 0, result.getAttributeCount() ); result = SinkUtils.filterAttributes( SinkEventAttributeSet.BOLD, SinkUtils.SINK_BASE_ATTRIBUTES ); assertEquals( 1, result.getAttributeCount() ); result = SinkUtils.filterAttributes( SinkEventAttributeSet.CENTER, SinkUtils.SINK_BASE_ATTRIBUTES ); assertEquals( 0, result.getAttributeCount() ); } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/xsd/0000755000175000017500000000000011632765553024335 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidatorTest.java0000644000175000017500000004231211214730343032115 0ustar twernertwernerpackage org.apache.maven.doxia.xsd; /* * 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.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.io.StringReader; import java.net.JarURLConnection; import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.jar.JarEntry; import java.util.jar.JarFile; import junit.framework.AssertionFailedError; import org.apache.maven.doxia.parser.AbstractXmlParser; import org.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.SelectorUtils; import org.codehaus.plexus.util.xml.XmlUtil; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; import org.xml.sax.SAXParseException; import org.xml.sax.XMLReader; import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.helpers.XMLReaderFactory; /** * Abstract class to validate XML files with DTD or XSD mainly for Doxia namespaces. * * @author Vincent Siveton * @version $Id: AbstractXmlValidatorTest.java 784395 2009-06-13 14:00:03Z vsiveton $ * @since 1.0 */ public abstract class AbstractXmlValidatorTest extends PlexusTestCase { /** The vm line separator */ protected static final String EOL = System.getProperty( "line.separator" ); /** Simple cache mechanism to load test documents. */ private static final Map CACHE_DOXIA_TEST_DOCUMENTS = new Hashtable(); /** Maven resource in the doxia-test-docs-XXX.jar */ private static final String MAVEN_RESOURCE_PATH = "META-INF/maven/org.apache.maven.doxia/doxia-test-docs/"; /** XMLReader to validate xml file */ private XMLReader xmlReader; /** {@inheritDoc} */ protected void setUp() throws Exception { super.setUp(); } /** {@inheritDoc} */ protected void tearDown() throws Exception { super.tearDown(); xmlReader = null; } /** * Validate tests documents with DTD or XSD using xerces. * * @throws Exception if any * @see #addNamespaces(String) * @see #getTestDocuments() */ public void testValidateFiles() throws Exception { for ( Iterator it = getTestDocuments().entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); if ( getContainer().getLogger().isDebugEnabled() ) { getContainer().getLogger().debug( "Validate '" + entry.getKey() + "'" ); } List errors = parseXML( entry.getValue().toString() ); for ( Iterator it2 = errors.iterator(); it2.hasNext(); ) { ErrorMessage error = (ErrorMessage) it2.next(); if ( isFailErrorMessage( error.getMessage() ) ) { fail( entry.getKey() + EOL + error.toString() ); } else { if ( getContainer().getLogger().isDebugEnabled() ) { getContainer().getLogger().debug( entry.getKey() + EOL + error.toString() ); } } } } } // ---------------------------------------------------------------------- // Protected methods // ---------------------------------------------------------------------- /** * @return a non null patterns to includes specific test files. * @see AbstractXmlValidatorTest#getTestDocuments() */ protected abstract String[] getIncludes(); /** * @param content xml content not null * @return xml content with the wanted Doxia namespace */ protected abstract String addNamespaces( String content ); /** * @return a map of test resources filtered by patterns from {@link #getIncludes()}. * @throws IOException if any * @see #getIncludes() * @see #getAllTestDocuments() */ protected Map getTestDocuments() throws IOException { if ( getIncludes() == null ) { return Collections.EMPTY_MAP; } Map testDocs = getAllTestDocuments(); Map ret = new Hashtable(); ret.putAll( testDocs ); for ( Iterator it = testDocs.keySet().iterator(); it.hasNext(); ) { String key = it.next().toString(); for ( int i = 0; i < getIncludes().length; i++ ) { if ( !SelectorUtils.matchPath( getIncludes()[i], key.toLowerCase( Locale.ENGLISH ) ) ) { ret.remove( key ); } } } return ret; } /** * Find test resources in the doxia-test-docs-XXX.jar or in an IDE project. * * @return a map of test resources defined as follow: *
    *
  • key, the full url of test documents, * i.e. jar:file:/.../doxia-test-docs-XXX.jar!/path/to/resource
  • *
  • value, the content for the resource defined by the key
  • *
* @throws IOException if any */ protected static Map getAllTestDocuments() throws IOException { if ( CACHE_DOXIA_TEST_DOCUMENTS != null && !CACHE_DOXIA_TEST_DOCUMENTS.isEmpty() ) { return CACHE_DOXIA_TEST_DOCUMENTS; } URL testJar = AbstractXmlValidatorTest.class.getClassLoader().getResource( MAVEN_RESOURCE_PATH ); if ( testJar == null ) { // maybe in an IDE project testJar = AbstractXmlValidatorTest.class.getClassLoader().getResource( "doxia-site" ); if ( testJar == null ) { throw new RuntimeException( "Could not find the Doxia test documents artefact i.e. doxia-test-docs-XXX.jar" ); } } if ( testJar.toString().startsWith( "jar" )) { JarURLConnection conn = (JarURLConnection) testJar.openConnection(); JarFile jarFile = conn.getJarFile(); for ( Enumeration e = jarFile.entries(); e.hasMoreElements(); ) { JarEntry entry = (JarEntry) e.nextElement(); if ( entry.getName().startsWith( "META-INF" ) ) { continue; } if ( entry.isDirectory() ) { continue; } InputStream in = null; try { in = AbstractXmlValidatorTest.class.getClassLoader().getResource( entry.getName() ).openStream(); String content = IOUtil.toString( in, "UTF-8" ); CACHE_DOXIA_TEST_DOCUMENTS.put( "jar:" + conn.getJarFileURL() + "!/" + entry.getName(), content ); } finally { IOUtil.close( in ); } } } else { // IDE projects File testDocsDir = new File( testJar.getFile() ).getParentFile(); List files = FileUtils.getFiles( testDocsDir, "**/*.*", FileUtils.getDefaultExcludesAsString(), true ); for ( Iterator it = files.iterator(); it.hasNext();) { File file = new File( it.next().toString() ); if ( file.getAbsolutePath().indexOf( "META-INF" ) != -1 ) { continue; } Reader reader = null; if ( XmlUtil.isXml( file )) { reader = ReaderFactory.newXmlReader( file ); } else { reader = ReaderFactory.newReader( file, "UTF-8" ); } String content = IOUtil.toString( reader ); CACHE_DOXIA_TEST_DOCUMENTS.put( file.toURI().toString(), content ); } } return CACHE_DOXIA_TEST_DOCUMENTS; } /** * Filter fail message. * * @param message not null * @return true if the given message will fail the test. * @since 1.1.1 */ protected boolean isFailErrorMessage( String message ) { if ( message .indexOf( "schema_reference.4: Failed to read schema document 'http://www.w3.org/2001/xml.xsd'" ) == -1 && message.indexOf( "cvc-complex-type.4: Attribute 'alt' must appear on element 'img'." ) == -1 && message.indexOf( "cvc-complex-type.2.4.a: Invalid content starting with element" ) == -1 && message.indexOf( "cvc-complex-type.2.4.a: Invalid content was found starting with element" ) == -1 && message.indexOf( "cvc-datatype-valid.1.2.1:" ) == -1 // Doxia allow space && message.indexOf( "cvc-attribute.3:" ) == -1 ) // Doxia allow space { return true; } return false; } // ---------------------------------------------------------------------- // Private methods // ---------------------------------------------------------------------- private XMLReader getXMLReader() { if ( xmlReader == null ) { try { xmlReader = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser" ); xmlReader.setFeature( "http://xml.org/sax/features/validation", true ); xmlReader.setFeature( "http://apache.org/xml/features/validation/schema", true ); xmlReader.setErrorHandler( new MessagesErrorHandler() ); xmlReader.setEntityResolver( new AbstractXmlParser.CachedFileEntityResolver() ); } catch ( SAXNotRecognizedException e ) { throw new AssertionFailedError( "SAXNotRecognizedException: " + e.getMessage() ); } catch ( SAXNotSupportedException e ) { throw new AssertionFailedError( "SAXNotSupportedException: " + e.getMessage() ); } catch ( SAXException e ) { throw new AssertionFailedError( "SAXException: " + e.getMessage() ); } } ( (MessagesErrorHandler) xmlReader.getErrorHandler() ).clearMessages(); return xmlReader; } /** * @param xmlContent * @return a list of ErrorMessage * @throws IOException is any * @throws SAXException if any */ private List parseXML( String xmlContent ) throws IOException, SAXException { xmlContent = addNamespaces( xmlContent ); MessagesErrorHandler errorHandler = (MessagesErrorHandler) getXMLReader().getErrorHandler(); getXMLReader().parse( new InputSource( new StringReader( xmlContent ) ) ); return errorHandler.getMessages(); } private static class ErrorMessage extends DefaultHandler { private final String level; private final String publicID; private final String systemID; private final int lineNumber; private final int columnNumber; private final String message; public ErrorMessage( String level, String publicID, String systemID, int lineNumber, int columnNumber, String message ) { super(); this.level = level; this.publicID = publicID; this.systemID = systemID; this.lineNumber = lineNumber; this.columnNumber = columnNumber; this.message = message; } /** * @return the level */ protected String getLevel() { return level; } /** * @return the publicID */ protected String getPublicID() { return publicID; } /** * @return the systemID */ protected String getSystemID() { return systemID; } /** * @return the lineNumber */ protected int getLineNumber() { return lineNumber; } /** * @return the columnNumber */ protected int getColumnNumber() { return columnNumber; } /** * @return the message */ protected String getMessage() { return message; } /** {@inheritDoc} */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( level ).append( EOL ); sb.append( " Public ID: " ).append( publicID ).append( EOL ); sb.append( " System ID: " ).append( systemID ).append( EOL ); sb.append( " Line number: " ).append( lineNumber ).append( EOL ); sb.append( " Column number: " ).append( columnNumber ).append( EOL ); sb.append( " Message: " ).append( message ).append( EOL ); return sb.toString(); } /** {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = 1; result = prime * result + columnNumber; result = prime * result + ( ( level == null ) ? 0 : level.hashCode() ); result = prime * result + lineNumber; result = prime * result + ( ( message == null ) ? 0 : message.hashCode() ); result = prime * result + ( ( publicID == null ) ? 0 : publicID.hashCode() ); result = prime * result + ( ( systemID == null ) ? 0 : systemID.hashCode() ); return result; } /** {@inheritDoc} */ public boolean equals( Object obj ) { if ( this == obj ) return true; if ( obj == null ) return false; if ( getClass() != obj.getClass() ) return false; ErrorMessage other = (ErrorMessage) obj; if ( columnNumber != other.columnNumber ) return false; if ( level == null ) { if ( other.level != null ) return false; } else if ( !level.equals( other.level ) ) return false; if ( lineNumber != other.lineNumber ) return false; if ( message == null ) { if ( other.message != null ) return false; } else if ( !message.equals( other.message ) ) return false; if ( publicID == null ) { if ( other.publicID != null ) return false; } else if ( !publicID.equals( other.publicID ) ) return false; if ( systemID == null ) { if ( other.systemID != null ) return false; } else if ( !systemID.equals( other.systemID ) ) return false; return true; } } private static class MessagesErrorHandler extends DefaultHandler { private final List messages; public MessagesErrorHandler() { messages = new ArrayList(); } /** {@inheritDoc} */ public void warning( SAXParseException e ) throws SAXException { addMessage( "Warning", e ); } /** {@inheritDoc} */ public void error( SAXParseException e ) throws SAXException { addMessage( "Error", e ); } /** {@inheritDoc} */ public void fatalError( SAXParseException e ) throws SAXException { addMessage( "Fatal error", e ); } private void addMessage( String pre, SAXParseException e ) { ErrorMessage error = new ErrorMessage( pre, e.getPublicId(), e.getSystemId(), e.getLineNumber(), e.getColumnNumber(), e.getMessage() ); messages.add( error ); } protected List getMessages() { return messages; } protected void clearMessages() { messages.clear(); } } } doxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/index/0000755000175000017500000000000011632765553024646 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/test/java/org/apache/maven/doxia/index/IndexEntryTest.java0000644000175000017500000000506311166633050030432 0ustar twernertwernerpackage org.apache.maven.doxia.index; /* * 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 junit.framework.TestCase; /** * @author Trygve Laugstøl * @version $Id: IndexEntryTest.java 762694 2009-04-07 11:16:56Z ltheussl $ */ public class IndexEntryTest extends TestCase { /** * Test IndexEntry. */ public void testIndexEntry() { IndexEntry root = new IndexEntry( null ); assertIndexEntry( root, null, 0, null, null ); // ----------------------------------------------------------------------- // Chapter 1 // ----------------------------------------------------------------------- IndexEntry chapter1 = new IndexEntry( root, "chapter-1" ); assertIndexEntry( root, null, 1, null, null ); assertIndexEntry( chapter1, root, 0, null, null ); // ----------------------------------------------------------------------- // Chapter 2 // ----------------------------------------------------------------------- IndexEntry chapter2 = new IndexEntry( root, "chapter-2" ); assertIndexEntry( root, null, 2, null, null ); assertIndexEntry( chapter1, root, 0, null, chapter2 ); assertIndexEntry( chapter2, root, 0, chapter1, null ); chapter2.setTitle( "Title 2" ); assertTrue( chapter2.toString().indexOf( "Title 2" ) != -1 ); } private void assertIndexEntry( IndexEntry entry, IndexEntry parent, int childCount, IndexEntry prevEntry, IndexEntry nextEntry ) { assertEquals( parent, entry.getParent() ); assertEquals( childCount, entry.getChildEntries().size() ); assertEquals( prevEntry, entry.getPrevEntry() ); assertEquals( nextEntry, entry.getNextEntry() ); } } doxia-1.1.4/doxia-core/src/site/0000755000175000017500000000000011632765554016362 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/site/apt/0000755000175000017500000000000011632765554017146 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/site/apt/using-document-xsd.apt0000644000175000017500000000273611215435237023406 0ustar twernertwerner ----- Using Schema Document 1.0.1 ----- Vincent Siveton ------ 2009-01-28 ------ ~~ 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 Using Schema Document 1.0.1 The Decoration XSD is located {{{http://maven.apache.org/xsd/document-1.0.1.xsd}here}}. Your favorite IDE probably supports XSD schema's for .xml files. You need to specify the following: +-----+ ... +-----+ doxia-1.1.4/doxia-core/src/site/site.xml0000644000175000017500000000260711140054106020027 0ustar twernertwerner doxia-1.1.4/doxia-core/src/main/0000755000175000017500000000000011632765554016342 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/mdo/0000755000175000017500000000000011632765553017120 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/mdo/document.mdo0000644000175000017500000012145511214045650021430 0ustar twernertwerner document Document This is a reference for the Document model used in Doxia.

An XSD is available at:

]]>
package org.apache.maven.doxia.document DocumentModel Describes the overall document model. 1.0.0+ outputName 1.0.0+ String true meta 1.0.0+ DocumentMeta true toc 1.0.0+ DocumentTOC true cover 1.0.0+ DocumentCover true DocumentMeta Metadata is general information about a document.

The metadata elements used here were mostly inspired by the Open Document Format Specification v. 1.1, which in turn borrows heavily upon the metadata standards developed by the Dublin Core Metadata Initiative.

]]>
1.0.0+ title 1.0.0+ String true author 1.0.0+ String true authors 1.0.0+ DocumentAuthor * true subject 1.0.0+ String true keywords 1.0.0+ String true keyWords 1.0.0+ String * true pageSize 1.0.0+ String true generator 1.0.0+ String true description 1.0.0+ String true initialCreator 1.0.0+ String true creator 1.0.0+ String true printedBy 1.0.0+ String true creationDate 1.0.0+ Date true creationdate 1.0.1+ creationDate is not set. @since 1.1.1 ]]> String true date 1.0.0+ Date true modifydate 1.0.1+ date is not set. @since 1.1.1 ]]> String true printDate 1.0.0+ Date true printdate 1.0.1+ printDate is not set. @since 1.1.1 ]]> String true template 1.0.0+ DocumentTemplate true hyperlinkBehaviour 1.0.0+ DocumentHyperlinkBehaviour true language 1.0.0+ String en-US true editingCycles 1.0.0+ long true editingDuration 1.0.0+ long true documentStatistic 1.0.0+ DocumentStatistic true confidential 1.0.0+ boolean true draft 1.0.0+ boolean true 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. yyyy-MM-dd **/ 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 getCreationDate() if setted, formatted using ISO-8601 English format, otherwise return * the creationdate. * @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 getDate() if setted, formatted using ISO-8601 English format, otherwise return * the modifydate. * @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 getPrintDate() if setted, formatted using ISO-8601 English format, otherwise return * the printdate. * @since 1.1.1 * @see #getPrintDate() */ public String getPrintdate() { if ( getPrintDate() != null ) { return ISO_8601_FORMAT.format( getPrintDate() ); } return this.printdate; } ]]>
DocumentAuthor An author of the document. 1.0.0+ firstName 1.0.0+ String true lastName 1.0.0+ String true name 1.0.1+ String true initials 1.0.0+ String true title 1.0.0+ String true position 1.0.0+ String true email 1.0.0+ String true phoneNumber 1.0.0+ String true faxNumber 1.0.0+ String true companyName 1.0.0+ String true street 1.0.0+ String true city 1.0.0+ String true postalCode 1.0.0+ String true country 1.0.0+ String true state 1.0.0+ String true name if defined, firsName lastName 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" ); } ]]> DocumentTemplate A template that was used to create the document. 1.0.0+ href 1.0.0+ String true title 1.0.0+ String true date 1.0.0+ Date true modifydate 1.0.1+ date is not set. @since 1.1.1 ]]> String true yyyy-MM-dd **/ 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 getDate() if setted, formatted using ISO-8601 English format, otherwise return * the modifydate. * @since 1.1.1 * @see #getDate() */ public String getModifydate() { if ( getDate() != null ) { return ISO_8601_FORMAT.format( getDate() ); } return this.modifydate; } ]]> DocumentHyperlinkBehaviour Specifies the default behavior for hyperlinks in the document. 1.0.0+ targetFrame Specifies the name of the default target frame in which to display a document referenced by a hyperlink.

This attribute can have one of the following values:

_self
The referenced document replaces the content of the current frame.
_blank
The referenced document is displayed in a new frame.
_parent
The referenced document is displayed in the parent frame of the current frame.
_top
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.
A frame name
The referenced document is displayed in the named frame. If the named frame does not exist, a new frame with that name is created.
]]>
1.0.0+ String _self true
DocumentStatistic Statistical attributes of the document. 1.0.0+ pageCount 1.0.0+ long true tableCount 1.0.0+ long true drawCount 1.0.0+ long true imageCount 1.0.0+ long true objectCount 1.0.0+ long true oleObjectCount 1.0.0+ long true paragraphCount 1.0.0+ long true wordCount 1.0.0+ long true characterCount 1.0.0+ long true rowCount 1.0.0+ long true frameCount 1.0.0+ long true sentenceCount 1.0.0+ long true syllableCount 1.0.0+ long true nonWhitespaceCharacterCount 1.0.0+ long true DocumentCover Contains meta-data information for the document cover page. 1.0.0+ coverTitle 1.0.0+ String true coverSubTitle 1.0.0+ String true coverVersion 1.0.0+ String true coverType 1.0.0+ String true coverDate 1.0.0+ Date true coverdate coverDate is not set. @since 1.1.1 ]]> 1.0.1+ String true authors 1.0.0+ DocumentAuthor * true author 1.0.1+ String true projectName 1.0.0+ String true projectLogo 1.0.0+ String true companyName 1.0.0+ String true companyLogo 1.0.0+ String true 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. yyyy-MM-dd **/ 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 getCoverDate() if setted, formatted using ISO-8601 English format, otherwise return * the coverdate. * @since 1.1.1 * @see #getCoverDate() */ public String getCoverdate() { if ( getCoverDate() != null ) { return ISO_8601_FORMAT.format( getCoverDate() ); } return this.coverdate; } ]]> DocumentTOC A Table Of Content for the document. 1.0.0+ name 1.0.0+ String true depth 1.0.0+ int true 0 items 1.0.0+ DocumentTOCItem * true DocumentTOCItem A menu item. 1.0.0+ name 1.0.0+ String true ref 1.0.0+ String true collapse 1.0.0+ boolean true items 1.0.0+ DocumentTOCItem * true
doxia-1.1.4/doxia-core/src/main/javadoc/0000755000175000017500000000000011632765554017751 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/javadoc/org/0000755000175000017500000000000011632765554020540 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/javadoc/org/apache/0000755000175000017500000000000011632765554021761 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/javadoc/org/apache/maven/0000755000175000017500000000000011632765554023067 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/javadoc/org/apache/maven/doxia/0000755000175000017500000000000011632765554024173 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/javadoc/org/apache/maven/doxia/package.html0000644000175000017500000001173011216135717026444 0ustar twernertwerner

Maven Doxia API.

The Doxia API is based on Sinks and Parser objects: its goal is to parse a given source model using a given parser, and emits Doxia events into the given sink.

Using Maven Doxia API

The following snippet shows how to use the Doxia API:

  File userDir = new FileSystem.getProperty "user.dir" ) );
  File inputFile = new FileuserDir, "test.apt" );
  File outputFile = new FileuserDir, "test.html" );

  Reader source = ReaderFactory.newReaderinputFile, "UTF-8" );

  SinkFactory sinkFactory = (SinkFactorylookupSinkFactory.ROLE, "html" )// Plexus lookup
  Sink sink = sinkFactory.createSinkoutputFile.getParentFile(), outputFile.getName() ) );

  Doxia doxia = (DoxialookupDoxia.ROLE )// Plexus lookup

  doxia.parsesource, "apt", sink );

Resources

doxia-1.1.4/doxia-core/src/main/java/0000755000175000017500000000000011632765553017262 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/0000755000175000017500000000000011632765553020051 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/0000755000175000017500000000000011632765553021272 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/0000755000175000017500000000000011632765553022400 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765554023505 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/0000755000175000017500000000000011632765553024605 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/snippet/0000755000175000017500000000000011632765553026267 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/snippet/SnippetReader.java0000644000175000017500000001331611375720354031675 0ustar twernertwernerpackage org.apache.maven.doxia.macro.snippet; /* * 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.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Locale; import org.codehaus.plexus.util.IOUtil; /** * Utility class for reading snippets. * * @version $Id: SnippetReader.java 947273 2010-05-22 09:16:28Z ltheussl $ */ public class SnippetReader { /** System-dependent EOL. */ private static final String EOL = System.getProperty( "line.separator" ); /** The source. */ private URL source; /** * Constructor. * * @param src The source. */ public SnippetReader( URL src ) { this.source = src; } /** * Reads the snippet with given id. * * @param snippetId The id of the snippet. * @return The snippet. * @throws java.io.IOException if something goes wrong. */ public StringBuffer readSnippet( String snippetId ) throws IOException { List lines = readLines( snippetId ); int minIndent = minIndent( lines ); StringBuffer result = new StringBuffer(); for ( Iterator iterator = lines.iterator(); iterator.hasNext(); ) { String line = (String) iterator.next(); result.append( line.substring( minIndent ) ); result.append( EOL ); } return result; } /** * Returns the minimal indent of all the lines in the given List. * * @param lines A List of lines. * @return the minimal indent. */ int minIndent( List lines ) { int minIndent = Integer.MAX_VALUE; for ( Iterator iterator = lines.iterator(); iterator.hasNext(); ) { String line = (String) iterator.next(); minIndent = Math.min( minIndent, indent( line ) ); } return minIndent; } /** * Returns the indent of the given line. * * @param line A line. * @return the indent. */ int indent( String line ) { char[] chars = line.toCharArray(); int indent = 0; for ( ; indent < chars.length; indent++ ) { if ( chars[indent] != ' ' ) { break; } } return indent; } /** * Reads the snippet and returns the lines in a List. * * @param snippetId The id of the snippet. * @return A List of lines. * @throws IOException if something goes wrong. */ private List readLines( String snippetId ) throws IOException { // TODO: DOXIA-386, use InputStreamReader(InputStream in, Charset cs) BufferedReader reader = new BufferedReader( new InputStreamReader( source.openStream() ) ); List lines = new ArrayList(); try { boolean capture = false; String line; while ( ( line = reader.readLine() ) != null ) { if ( snippetId == null || "".equals( snippetId.trim() ) ) { lines.add( line ); } else { if ( isStart( snippetId, line ) ) { capture = true; } else if ( isEnd( snippetId, line ) ) { break; } else if ( capture ) { lines.add( line ); } } } } finally { IOUtil.close( reader ); } return lines; } /** * Determines if the given line is a start demarcator. * * @param snippetId the id of the snippet. * @param line the line. * @return True, if the line is a start demarcator. */ protected boolean isStart( String snippetId, String line ) { return isDemarcator( snippetId, "START", line ); } /** * Determines if the given line is a demarcator. * * @param snippetId the id of the snippet. * @param what Identifier for the demarcator. * @param line the line. * @return True, if the line is a start demarcator. */ protected boolean isDemarcator( String snippetId, String what, String line ) { String upper = line.toUpperCase( Locale.ENGLISH ); return upper.indexOf( what.toUpperCase( Locale.ENGLISH ) ) != -1 && upper.indexOf( "SNIPPET" ) != -1 && line.indexOf( snippetId ) != -1; } /** * Determines if the given line is an end demarcator. * * @param snippetId the id of the snippet. * @param line the line. * @return True, if the line is an end demarcator. */ protected boolean isEnd( String snippetId, String line ) { return isDemarcator( snippetId, "END", line ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/snippet/SnippetMacro.java0000644000175000017500000001721211151220275031520 0ustar twernertwernerpackage org.apache.maven.doxia.macro.snippet; /* * 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.macro.AbstractMacro; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.StringUtils; import java.io.IOException; import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Map; import org.apache.maven.doxia.sink.SinkEventAttributeSet; /** * A macro that prints out the content of a file or a URL. * * @plexus.component role-hint="snippet" * @version $Id: SnippetMacro.java 747735 2009-02-25 10:43:09Z ltheussl $ */ public class SnippetMacro extends AbstractMacro { /** Holds the cache. */ private static Map cache = new HashMap(); private static final int HOUR = 60; /** One hour default cache. */ private long timeout = HOUR * HOUR * 1000; /** Holds the time cache. */ private static Map timeCached = new HashMap(); /** Debug. */ private boolean debug = false; /** {@inheritDoc} */ public void execute( Sink sink, MacroRequest request ) throws MacroExecutionException { String id = (String) request.getParameter( "id" ); String urlParam = (String) request.getParameter( "url" ); String fileParam = (String) request.getParameter( "file" ); boolean verbatim = true; String verbatimParam = (String) request.getParameter( "verbatim" ); if ( verbatimParam != null && !"".equals( verbatimParam ) ) { verbatim = Boolean.valueOf( verbatimParam ).booleanValue(); } URL url; if ( !StringUtils.isEmpty( urlParam ) ) { try { url = new URL( urlParam ); } catch ( MalformedURLException e ) { throw new IllegalArgumentException( urlParam + " is a malformed URL" ); } } else if ( !StringUtils.isEmpty( fileParam ) ) { File f = new File( fileParam ); if ( !f.isAbsolute() ) { f = new File( request.getBasedir(), fileParam ); } try { url = f.toURI().toURL(); } catch ( MalformedURLException e ) { throw new IllegalArgumentException( fileParam + " is a malformed URL" ); } } else { throw new IllegalArgumentException( "Either the 'url' or the 'file' param has to be given." ); } StringBuffer snippet; try { snippet = getSnippet( url, id ); } catch ( IOException e ) { throw new MacroExecutionException( "Error reading snippet", e ); } if ( verbatim ) { sink.verbatim( SinkEventAttributeSet.BOXED ); sink.text( snippet.toString() ); sink.verbatim_(); } else { sink.rawText( snippet.toString() ); } } /** * Return a snippet of the given url. * * @param url The URL to parse. * @param id The id of the snippet. * @return The snippet. * @throws IOException if something goes wrong. */ private StringBuffer getSnippet( URL url, String id ) throws IOException { StringBuffer result; String cachedSnippet = (String) getCachedSnippet( url, id ); if ( cachedSnippet != null ) { result = new StringBuffer( cachedSnippet ); if ( debug ) { result.append( "(Served from cache)" ); } } else { result = new SnippetReader( url ).readSnippet( id ); cacheSnippet( url, id, result.toString() ); if ( debug ) { result.append( "(Fetched from url, cache content " ).append( cache ).append( ")" ); } } return result; } /** * Return a snippet from the cache. * * @param url The URL to parse. * @param id The id of the snippet. * @return The snippet. */ private Object getCachedSnippet( URL url, String id ) { if ( isCacheTimedout( url, id ) ) { removeFromCache( url, id ); } return cache.get( globalSnippetId( url, id ) ); } /** * Return true if the snippet has been cached longer than * the current timeout. * * @param url The URL to parse. * @param id The id of the snippet. * @return True if timeout exceeded. */ boolean isCacheTimedout( URL url, String id ) { return timeInCache( url, id ) >= timeout; } /** * Return the time the snippet has been cached. * * @param url The URL to parse. * @param id The id of the snippet. * @return The cache time. */ long timeInCache( URL url, String id ) { return System.currentTimeMillis() - getTimeCached( url, id ); } /** * Return the absolute value of when the snippet has been cached. * * @param url The URL to parse. * @param id The id of the snippet. * @return The cache time. */ long getTimeCached( URL url, String id ) { String globalId = globalSnippetId( url, id ); return timeCached.containsKey( globalId ) ? ( (Long) timeCached.get( globalId ) ).longValue() : 0; } /** * Removes the snippet from the cache. * * @param url The URL to parse. * @param id The id of the snippet. */ private void removeFromCache( URL url, String id ) { String globalId = globalSnippetId( url, id ); timeCached.remove( globalId ); cache.remove( globalId ); } /** * Return a global identifier for the snippet. * * @param url The URL to parse. * @param id The id of the snippet. * @return An identifier, concatenated url and id, * or just url.toString() if id is empty or null. */ private String globalSnippetId( URL url, String id ) { if ( StringUtils.isEmpty( id ) ) { return url.toString(); } return url + " " + id; } /** * Puts the given snippet into the cache. * * @param url The URL to parse. * @param id The id of the snippet. * @param content The content of the snippet. */ public void cacheSnippet( URL url, String id, String content ) { cache.put( globalSnippetId( url, id ), content ); timeCached.put( globalSnippetId( url, id ), new Long( System.currentTimeMillis() ) ); } /** * Set the cache timeout. * * @param time The timeout to set. */ public void setCacheTimeout( int time ) { this.timeout = time; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/AbstractMacro.java0000644000175000017500000000643711202276630030171 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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.Iterator; import java.util.Map; import org.apache.maven.doxia.logging.Log; import org.apache.maven.doxia.logging.SystemStreamLog; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.codehaus.plexus.util.StringUtils; /** * Abstract base class to execute Macro. * * @author Jason van Zyl * @version $Id: AbstractMacro.java 773896 2009-05-12 13:46:00Z ltheussl $ * @since 1.0 */ public abstract class AbstractMacro implements Macro { /** Log instance. */ private Log logger; /** {@inheritDoc} */ public void enableLogging( Log log ) { this.logger = log; } /** * Returns a logger for this macro. * If no logger has been configured, a new SystemStreamLog is returned. * * @return Log * @since 1.1 */ protected Log getLog() { if ( logger == null ) { logger = new SystemStreamLog(); } return logger; } /** * Check if the given parameter is required. Throws an * IllegalArgumentException if paramValue is null or empty. * * @param paramName The name of the parameter to check. * @param paramValue The parameter value. * @since 1.1 */ protected void required( String paramName, String paramValue ) { if ( StringUtils.isEmpty( paramValue ) ) { throw new IllegalArgumentException( paramName + " is a required parameter!" ); } } /** * Convert the Map of macro parameters to an AttributeSet. * No check of validity is done, all parameters are added. * * @param parameters the macro parameters. * @return a SinkEventAttributeSet containing the same parameters, * or null if parameters is null. * * @since 1.1.1. */ protected static SinkEventAttributes getAttributesFromMap( Map parameters ) { if ( parameters == null ) { return null; } final int count = parameters.size(); if ( count <= 0 ) { return null; } final SinkEventAttributeSet atts = new SinkEventAttributeSet( count ); for ( Iterator it = parameters.keySet().iterator(); it.hasNext(); ) { final Object key = it.next(); atts.addAttribute( key, parameters.get( key ) ); } return atts; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/0000755000175000017500000000000011632765553026217 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/MacroManager.java0000644000175000017500000000306311150512221031371 0ustar twernertwernerpackage org.apache.maven.doxia.macro.manager; /* * 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.macro.Macro; /** * Handles MacroManager lookups. * * @author Jason van Zyl * @version $Id: MacroManager.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 */ public interface MacroManager { /** The Plexus lookup role. */ String ROLE = MacroManager.class.getName(); /** * Returns the MacroManager that corresponds to the given id. * * @param id The identifier. * @return The corresponding MacroManager. * @throws org.apache.maven.doxia.macro.manager.MacroNotFoundException if no MacroManager could be found * for the given id. */ Macro getMacro( String id ) throws MacroNotFoundException; } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/DefaultMacroManager.java0000644000175000017500000000316210661635336032721 0ustar twernertwernerpackage org.apache.maven.doxia.macro.manager; /* * 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.macro.Macro; import java.util.Map; /** * Default implementation of MacroManager * * @author Jason van Zyl * @version $Id: DefaultMacroManager.java 567311 2007-08-18 18:30:54Z vsiveton $ * @since 1.0 * @plexus.component */ public class DefaultMacroManager implements MacroManager { /** @plexus.requirement role="org.apache.maven.doxia.macro.Macro" */ private Map macros; /** {@inheritDoc} */ public Macro getMacro( String id ) throws MacroNotFoundException { Macro macro = (Macro) macros.get( id ); if ( macro == null ) { throw new MacroNotFoundException( "Cannot find macro with id = " + id ); } return macro; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/MacroNotFoundException.javadoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/MacroNotFoundException.jav0000644000175000017500000000503311021234043033270 0ustar twernertwernerpackage org.apache.maven.doxia.macro.manager; /* * 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. */ /** * Encapsulate an exception that indicates that a Macro * does not exist or could not be found. * * @author Jason van Zyl * @version $Id: MacroNotFoundException.java 662767 2008-06-03 12:25:07Z ltheussl $ * @since 1.0 */ public class MacroNotFoundException extends Exception { /** serialVersionUID */ static final long serialVersionUID = 295967936746221567L; /** * Construct a new MacroNotFoundException with the specified detail message. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. */ public MacroNotFoundException( String message ) { super( message ); } /** * Constructs a new MacroNotFoundException with the specified cause. * The error message is (cause == null ? null : cause.toString() ). * * @param cause the cause. This can be retrieved later by the * Throwable.getCause() method. (A null value is permitted, and indicates * that the cause is nonexistent or unknown.) */ public MacroNotFoundException( Throwable cause ) { super( cause ); } /** * Construct a new MacroNotFoundException with the specified * detail message and cause. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param cause the cause. This can be retrieved later by the * Throwable.getCause() method. (A null value is permitted, and indicates * that the cause is nonexistent or unknown.) */ public MacroNotFoundException( String message, Throwable cause ) { super( message, cause ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/0000755000175000017500000000000011632765553025372 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java0000644000175000017500000001605411202340703027725 0ustar twernertwernerpackage org.apache.maven.doxia.macro.toc; /* * 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.Iterator; import org.apache.maven.doxia.index.IndexEntry; import org.apache.maven.doxia.index.IndexingSink; import org.apache.maven.doxia.macro.AbstractMacro; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.util.HtmlTools; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.StringUtils; /** * Macro to display a Table Of Content in a given Sink. * The input parameters for this macro are: *
*
section
*
Display a TOC for the specified section only, or all sections if 0.
* Positive int, not mandatory, 0 by default.
*
fromDepth
*
Minimal depth of entries to display in the TOC. * Sections are depth 1, sub-sections depth 2, etc.
* Positive int, not mandatory, 0 by default.
*
toDepth
*
Maximum depth of entries to display in the TOC.
* Positive int, not mandatory, 5 by default.
*
* For instance, in an APT file, you could write: *
*
%{toc|section=2|fromDepth=2|toDepth=3}
*
Display a TOC for the second section in the document, including all * subsections (depth 2) and sub-subsections (depth 3).
*
%{toc}
*
display a TOC with all section and subsections * (similar to %{toc|section=0} )
*
* Moreover, you need to write APT link for section to allow anchor, * for instance: *
 * * {SubSection 1}
 * 
* * Similarly, in an XDOC file, you could write: *
 * <macro name="toc">
 *   <param name="section" value="1" />
 *   <param name="fromDepth" value="1" />
 *   <param name="toDepth" value="2" />
 * </macro>
 * 
* * @plexus.component role-hint="toc" * * @author Vincent Siveton * @version $Id: TocMacro.java 774013 2009-05-12 18:36:51Z ltheussl $ */ public class TocMacro extends AbstractMacro { /** The section to display. */ private int section; /** Start depth. */ private int fromDepth; /** End depth. */ private int toDepth; /** The default end depth. */ private static final int DEFAULT_DEPTH = 5; /** {@inheritDoc} */ public void execute( Sink sink, MacroRequest request ) throws MacroExecutionException { String source = (String) request.getParameter( "sourceContent" ); Parser parser = (Parser) request.getParameter( "parser" ); section = getInt( request, "section", 0 ); fromDepth = getInt( request, "fromDepth", 0 ); toDepth = getInt( request, "toDepth", DEFAULT_DEPTH ); if ( fromDepth > toDepth ) { return; } IndexEntry index = new IndexEntry( "index" ); IndexingSink tocSink = new IndexingSink( index ); try { parser.parse( new StringReader( source ), tocSink ); } catch ( ParseException e ) { throw new MacroExecutionException( "ParseException: " + e.getMessage(), e ); } if ( index.getChildEntries().size() > 0 ) { sink.list( getAttributesFromMap( request.getParameters() ) ); int i = 1; for ( Iterator it = index.getChildEntries().iterator(); it.hasNext(); ) { IndexEntry sectionIndex = (IndexEntry) it.next(); if ( ( i == section ) || ( section == 0 ) ) { writeSubSectionN( sink, sectionIndex, 1 ); } i++; } sink.list_(); } } /** * @param sink The sink to write to. * @param sectionIndex The section index. * @param n The toc depth. */ private void writeSubSectionN( Sink sink, IndexEntry sectionIndex, int n ) { if ( fromDepth <= n ) { sink.listItem(); sink.link( "#" + HtmlTools.encodeId( sectionIndex.getId() ) ); sink.text( sectionIndex.getTitle() ); sink.link_(); } if ( toDepth > n ) { if ( sectionIndex.getChildEntries().size() > 0 ) { if ( fromDepth <= n ) { sink.list(); } for ( Iterator it = sectionIndex.getChildEntries().iterator(); it.hasNext(); ) { IndexEntry subsectionIndex = (IndexEntry) it.next(); if ( n == toDepth - 1 ) { sink.listItem(); sink.link( "#" + HtmlTools.encodeId( subsectionIndex.getId() ) ); sink.text( subsectionIndex.getTitle() ); sink.link_(); sink.listItem_(); } else { writeSubSectionN( sink, subsectionIndex, n + 1 ); } } if ( fromDepth <= n ) { sink.list_(); } } } if ( fromDepth <= n ) { sink.listItem_(); } } /** * @param request The MacroRequest. * @param parameter The parameter. * @param defaultValue the default value. * @return the int value of a parameter in the request. * @throws MacroExecutionException if something goes wrong. */ private static int getInt( MacroRequest request, String parameter, int defaultValue ) throws MacroExecutionException { String value = (String) request.getParameter( parameter ); if ( StringUtils.isEmpty( value ) ) { return defaultValue; } int i; try { i = Integer.parseInt( value ); } catch ( NumberFormatException e ) { return defaultValue; } if ( i < 0 ) { throw new MacroExecutionException( "The " + parameter + "=" + i + " should be positive." ); } return i; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/Macro.java0000644000175000017500000000336011150512221026464 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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.logging.LogEnabled; import org.apache.maven.doxia.sink.Sink; /** * Base interface of a macro. * * @author Jason van Zyl * @version $Id: Macro.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 */ public interface Macro extends LogEnabled { /** The Plexus lookup role. */ String ROLE = Macro.class.getName(); /** The vm line separator */ String EOL = System.getProperty( "line.separator" ); /** * Execute the current macro using the given MacroRequest, * and emit events into the given sink. * * @param sink The sink to receive the events. * @param request The corresponding MacroRequest. * @throws org.apache.maven.doxia.macro.MacroExecutionException if an error occurred during execution. */ void execute( Sink sink, MacroRequest request ) throws MacroExecutionException; } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/SwfMacro.java0000644000175000017500000001553411163505130027157 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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.Iterator; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.util.StringUtils; /** * Macro for embedding Flash (SWF) within Maven documentation. * * @plexus.component role="org.apache.maven.doxia.macro.Macro" * role-hint="swf" * * @author Steve Motola * @author Vincent Siveton * @version $Id: SwfMacro.java 759580 2009-03-28 20:36:40Z ltheussl $ */ public class SwfMacro extends AbstractMacro { /** {@inheritDoc} */ public void execute( Sink sink, MacroRequest request ) throws MacroExecutionException { // parameter defaults String src = ""; String id = "swf"; String width = "400"; String height = "400"; String quality = "high"; String menu = "false"; String loop = "0"; String play = "true"; String version = "9,0,45,0"; String allowScript = "sameDomain"; // assign parameters for ( Iterator i = request.getParameters().keySet().iterator(); i.hasNext(); ) { String str = ""; String key = (String) i.next(); if ( key.equals( "src" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { src = str; } } if ( key.equals( "id" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { id = str; } } if ( key.equals( "width" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { width = str; } } if ( key.equals( "height" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { height = str; } } if ( key.equals( "quality" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { quality = str; } } if ( key.equals( "menu" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { menu = str; } } if ( key.equals( "loop" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { loop = str; } } if ( key.equals( "play" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { play = str; } } if ( key.equals( "version" ) ) { str = (String) request.getParameter( key ); // enable version shorthand // TODO: put in other shorthand versions if ( str.equals( "6" ) ) { version = "6,0,29,0"; } else { if ( str.equals( "9" ) ) { version = "9,0,45,0"; } else { if ( StringUtils.isNotEmpty( str ) ) { version = str; } } } } if ( key.equals( "allowScript" ) ) { str = (String) request.getParameter( key ); if ( StringUtils.isNotEmpty( str ) ) { allowScript = str; } } } StringBuffer content = new StringBuffer(); content.append( "
" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "" ); content.append( "" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "" ).append( EOL ); content.append( "
" ).append( EOL ); sink.rawText( content.toString() ); } }doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/MacroRequest.java0000644000175000017500000000440611150512221030037 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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.Map; import java.io.File; /** *

MacroRequest class.

* * @author Jason van Zyl * @version $Id: MacroRequest.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 */ public class MacroRequest { /** The current base directory. */ private File basedir; /** A map of parameters. */ private Map parameters; /** * Constructor. * * @param param A map of parameters. * @param base The current base directory. */ public MacroRequest( Map param, File base ) { this.parameters = param; this.basedir = base; } /** * Returns the current base directory. * * @return The base dir. */ public File getBasedir() { return basedir; } /** * Sets the current base directory. * * @param base The current base directory. */ public void setBasedir( File base ) { this.basedir = base; } /** * Returns the map of parameters. * * @return The map of parameters. */ public Map getParameters() { return parameters; } /** * Returns on object from the map of parameters * that corresponds to the given key. * * @param key The key to lookup the object. * @return The value object. */ public Object getParameter( String key ) { return parameters.get( key ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/MacroExecutionException.java0000644000175000017500000000417710765750233032260 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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. */ /** * Wrap an exception that occurs during the execution of a Doxia macro. * * @author Brett Porter * @version $Id: MacroExecutionException.java 636300 2008-03-12 12:46:19Z vsiveton $ * @since 1.0 */ public class MacroExecutionException extends Exception { /** serialVersionUID */ static final long serialVersionUID = -6314856898570018814L; /** * Construct a new MacroExecutionException with the specified detail message. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. */ public MacroExecutionException( String message ) { super( message ); } /** * Construct a new MacroExecutionException with the specified * detail message and cause. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param cause the cause. This can be retrieved later by the * Throwable.getCause() method. (A null value is permitted, and indicates * that the cause is nonexistent or unknown.) */ public MacroExecutionException( String message, Throwable cause ) { super( message, cause ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/macro/EchoMacro.java0000644000175000017500000000351611150512221027266 0ustar twernertwernerpackage org.apache.maven.doxia.macro; /* * 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.Iterator; import org.apache.maven.doxia.sink.SinkEventAttributeSet; /** * A simple macro that prints out the key and value of some supplied parameters. * * @plexus.component role-hint="echo" * @version $Id: EchoMacro.java 746978 2009-02-23 12:20:33Z vsiveton $ */ public class EchoMacro extends AbstractMacro { /** {@inheritDoc} */ public void execute( Sink sink, MacroRequest request ) { sink.verbatim( SinkEventAttributeSet.BOXED ); sink.text( "echo" + EOL ); for ( Iterator i = request.getParameters().keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); // TODO: DOXIA-242: separate or define internal params if ( "parser".equals( key ) || "sourceContent".equals( key ) ) { continue; } sink.text( key + " ---> " + request.getParameter( key ) + EOL ); } sink.verbatim_(); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/util/0000755000175000017500000000000011632765554024462 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java0000644000175000017500000001266211150512221027467 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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.codehaus.plexus.util.IOUtil; import java.io.BufferedWriter; import java.io.IOException; import java.io.Writer; /** * Allows to specify the line-length of an output writer. * * @version $Id: LineBreaker.java 746978 2009-02-23 12:20:33Z vsiveton $ */ public class LineBreaker { /** The default maximal line length. */ public static final int DEFAULT_MAX_LINE_LENGTH = 78; /** The system dependent EOL. */ private static final String EOL = System.getProperty( "line.separator" ); /** The destination writer. */ private Writer destination; /** The writer to use. */ private BufferedWriter writer; /** The maximal line length. */ private int maxLineLength; /** The current line length. */ private int lineLength = 0; /** The string buffer to store the current text. */ private StringBuffer word = new StringBuffer( 1024 ); /** * Constructs a new LineBreaker with DEFAULT_MAX_LINE_LENGTH. * * @param out The writer to use. */ public LineBreaker( Writer out ) { this( out, DEFAULT_MAX_LINE_LENGTH ); } /** * Constructs a new LineBreaker with the given max line length. * * @param out The writer to use. * @param max The maximal line length. */ public LineBreaker( Writer out, int max ) { if ( max <= 0 ) { throw new IllegalArgumentException( "maxLineLength <= 0" ); } destination = out; this.maxLineLength = max; writer = new BufferedWriter( out ); } /** * Returns the current destination writer. * * @return The destination. */ public Writer getDestination() { return destination; } /** * Writes the given text to the writer. White space is not preserved. * * @param text The text to write. * @throws java.io.IOException if there's a problem writing the text. */ public void write( String text ) throws IOException { write( text, /*preserveSpace*/false ); } /** * Writes the given text to the writer. * * @param text The text to write. * @param preserveSpace True to preserve white space. */ public void write( String text, boolean preserveSpace ) { int length = text.length(); try { for ( int i = 0; i < length; ++i ) { char c = text.charAt( i ); switch ( c ) { case ' ': if ( preserveSpace ) { word.append( c ); } else { writeWord(); } break; case '\r': // if \r\n (windows) then just pass along \n if ( i + 1 < length && text.charAt( i + 1 ) == '\n' ) { break; } case '\n': writeWord(); writer.write( EOL ); lineLength = 0; break; default: word.append( c ); } } } catch ( Exception e ) { // TODO: log } } /** * Write out the current StringBuffer and flush the writer. * Any IOException will be swallowed. */ public void flush() { try { writeWord(); writer.flush(); } catch ( IOException e ) { // TODO: log } } /** * Writes the current StringBuffer to the writer. * * @throws IOException if an exception occurs during writing. */ private void writeWord() throws IOException { int length = word.length(); if ( length > 0 ) { if ( lineLength > 0 ) { if ( lineLength + 1 + length > maxLineLength ) { writer.write( EOL ); lineLength = 0; } else { writer.write( ' ' ); ++lineLength; } } writer.write( word.toString() ); word.setLength( 0 ); lineLength += length; } } /** * Close the writer. */ public void close() { IOUtil.close( writer ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/util/ByLineReaderSource.java0000644000175000017500000000673611203262772031013 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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. */ /* * Originally from org.apache.doxia.module.apt.AptReaderSource. It was modified * to get unget support */ import java.io.IOException; import java.io.LineNumberReader; import java.io.Reader; import org.apache.maven.doxia.parser.ParseException; import org.codehaus.plexus.util.IOUtil; /** * {@link ByLineSource} default implementation * * @version $Id: ByLineReaderSource.java 775115 2009-05-15 12:54:18Z ltheussl $ */ public class ByLineReaderSource implements ByLineSource { /** * reader */ private LineNumberReader reader; /** * current line number */ private int lineNumber; /** * holds the last line returned by getNextLine() */ private String lastLine; /** * true if ungetLine() was called and no getNextLine() was * called */ private boolean ungetted = false; /** * Creates the ByLineReaderSource. * * @param in real source :) */ public ByLineReaderSource( final Reader in ) { reader = new LineNumberReader( in ); lineNumber = -1; } /** {@inheritDoc} */ public final String getNextLine() throws ParseException { if ( reader == null ) { return null; } if ( ungetted ) { ungetted = false; return lastLine; } String line; try { line = reader.readLine(); if ( line == null ) { reader.close(); reader = null; } else { lineNumber = reader.getLineNumber(); } } catch ( IOException e ) { throw new ParseException( e, lineNumber, 0 ); } lastLine = line; return line; } /** {@inheritDoc} */ public final String getName() { return ""; } /** {@inheritDoc} */ public final int getLineNumber() { return lineNumber; } /** {@inheritDoc} */ public final void close() { IOUtil.close( reader ); reader = null; } /** {@inheritDoc} */ public final void ungetLine() { if ( ungetted ) { throw new IllegalStateException( "we support only one level of ungetLine()" ); } ungetted = true; } /** {@inheritDoc} */ public final void unget( final String s ) { if ( s == null ) { throw new IllegalArgumentException( "argument can't be null" ); } if ( s.length() != 0 ) { ungetLine(); lastLine = s; } } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/util/XmlValidator.java0000644000175000017500000002023011372510716027715 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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.io.StringReader; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.xml.XMLConstants; import org.apache.maven.doxia.logging.Log; import org.apache.maven.doxia.markup.XmlMarkup; import org.apache.maven.doxia.parser.AbstractXmlParser.CachedFileEntityResolver; import org.apache.maven.doxia.parser.ParseException; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; import org.xml.sax.XMLReader; import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.helpers.XMLReaderFactory; /** * A class to validate xml documents. * * @version $Id$ * @since 1.1.3 */ public class XmlValidator { /** * Doctype pattern i.e. ".*]*)>.*" * see http://www.w3.org/TR/REC-xml/#NT-doctypedecl. */ private static final Pattern PATTERN_DOCTYPE = Pattern.compile( ".*" + XmlMarkup.DOCTYPE_START + "([^>]*)>.*" ); /** Tag pattern as defined in http://www.w3.org/TR/REC-xml/#NT-Name */ private static final Pattern PATTERN_TAG = Pattern.compile( ".*<([A-Za-z][A-Za-z0-9:_.-]*)([^>]*)>.*" ); /** lazy xmlReader to validate xml content*/ private XMLReader xmlReader; private Log logger; /** * Constructor. * * @param log a logger, not null. */ public XmlValidator( Log log ) { this.logger = log; } /** * Validate an XML content with SAX. * * @param content a not null xml content * @throws ParseException if any. */ public void validate( String content ) throws ParseException { try { // 1 if there's a doctype boolean hasDoctype = false; Matcher matcher = PATTERN_DOCTYPE.matcher( content ); if ( matcher.find() ) { hasDoctype = true; } // 2 check for an xmlns instance boolean hasXsd = false; matcher = PATTERN_TAG.matcher( content ); if ( matcher.find() ) { String value = matcher.group( 2 ); if ( value.indexOf( XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI ) != -1 ) { hasXsd = true; } } // 3 validate content getLog().debug( "Validating the content..." ); getXmlReader( hasXsd && hasDoctype ).parse( new InputSource( new StringReader( content ) ) ); } catch ( IOException e ) { throw new ParseException( "Error validating the model: " + e.getMessage(), e ); } catch ( SAXException e ) { throw new ParseException( "Error validating the model: " + e.getMessage(), e ); } } /** * @param hasDtdAndXsd to flag the ErrorHandler. * @return an xmlReader instance. * @throws SAXException if any */ private XMLReader getXmlReader( boolean hasDtdAndXsd ) throws SAXException { if ( xmlReader == null ) { MessagesErrorHandler errorHandler = new MessagesErrorHandler( getLog() ); xmlReader = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser" ); xmlReader.setFeature( "http://xml.org/sax/features/validation", true ); xmlReader.setFeature( "http://apache.org/xml/features/validation/schema", true ); xmlReader.setErrorHandler( errorHandler ); xmlReader.setEntityResolver( new CachedFileEntityResolver() ); } ( (MessagesErrorHandler) xmlReader.getErrorHandler() ).setHasDtdAndXsd( hasDtdAndXsd ); return xmlReader; } private Log getLog() { return logger; } /** * Convenience class to beautify SAXParseException messages. */ static class MessagesErrorHandler extends DefaultHandler { private static final int TYPE_UNKNOWN = 0; private static final int TYPE_WARNING = 1; private static final int TYPE_ERROR = 2; private static final int TYPE_FATAL = 3; private static final String EOL = XmlMarkup.EOL; /** @see org/apache/xerces/impl/msg/XMLMessages.properties#MSG_ELEMENT_NOT_DECLARED */ private static final Pattern ELEMENT_TYPE_PATTERN = Pattern.compile( "Element type \".*\" must be declared.", Pattern.DOTALL ); private final Log log; private boolean hasDtdAndXsd; public MessagesErrorHandler( Log log ) { this.log = log; } /** * @param hasDtdAndXsd the hasDtdAndXsd to set */ protected void setHasDtdAndXsd( boolean hasDtdAndXsd ) { this.hasDtdAndXsd = hasDtdAndXsd; } /** {@inheritDoc} */ public void warning( SAXParseException e ) throws SAXException { processException( TYPE_WARNING, e ); } /** {@inheritDoc} */ public void error( SAXParseException e ) throws SAXException { // Workaround for Xerces complaints when an XML with XSD needs also a to specify entities // like   // See http://xsd.stylusstudio.com/2001Nov/post08021.htm if ( !hasDtdAndXsd ) { processException( TYPE_ERROR, e ); return; } Matcher m = ELEMENT_TYPE_PATTERN.matcher( e.getMessage() ); if ( !m.find() ) { processException( TYPE_ERROR, e ); } } /** {@inheritDoc} */ public void fatalError( SAXParseException e ) throws SAXException { processException( TYPE_FATAL, e ); } private void processException( int type, SAXParseException e ) throws SAXException { StringBuffer message = new StringBuffer(); switch ( type ) { case TYPE_WARNING: message.append( "Warning:" ); break; case TYPE_ERROR: message.append( "Error:" ); break; case TYPE_FATAL: message.append( "Fatal error:" ); break; case TYPE_UNKNOWN: default: message.append( "Unknown:" ); break; } message.append( EOL ); message.append( " Public ID: " + e.getPublicId() ).append( EOL ); message.append( " System ID: " + e.getSystemId() ).append( EOL ); message.append( " Line number: " + e.getLineNumber() ).append( EOL ); message.append( " Column number: " + e.getColumnNumber() ).append( EOL ); message.append( " Message: " + e.getMessage() ).append( EOL ); final String logMessage = message.toString(); switch ( type ) { case TYPE_WARNING: log.warn( logMessage ); break; case TYPE_UNKNOWN: case TYPE_ERROR: case TYPE_FATAL: default: throw new SAXException( logMessage ); } } } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/util/ByLineSource.java0000644000175000017500000000420311216135717027655 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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; /** * The token are the new lines :) * * @author Juan F. Codagnone * @since Nov 4, 2005 * @version $Id: ByLineSource.java 785531 2009-06-17 09:47:59Z ltheussl $ */ public interface ByLineSource { /** *

getNextLine.

* * @return the next line. null if we reached the end. * @throws org.apache.maven.doxia.parser.ParseException on I/O error */ String getNextLine() throws ParseException; /** *

getName.

* * @return the name of the input. could be the filename for example. */ String getName(); /** *

getLineNumber.

* * @return the current line number. */ int getLineNumber(); /** *

ungetLine.

* * This should throw a java.lang.IllegalStateException if called more than * one time without calling getNextLine(). */ void ungetLine(); /** *

unget.

* * @param s some text to push back to the parser. * This should throw a java.lang.IllegalStateException if called more than * one time without calling getNextLine(). */ void unget( String s ); /** * close the source. */ void close(); } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/util/DoxiaUtils.java0000644000175000017500000003177411213220542027400 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URL; import java.text.ParseException; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import javax.imageio.ImageIO; import javax.swing.text.MutableAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributeSet; /** * General Doxia utility methods. The methods in this class should not assume * any specific Doxia module or document format. * * @author ltheussl * @since 1.1 * @version $Id: DoxiaUtils.java 782648 2009-06-08 14:34:10Z ltheussl $ */ public class DoxiaUtils { private static final int MINUS_ONE = 0xFF; /** * Checks if the given string corresponds to an internal link, * ie it is a link to an anchor within the same document. * * @param link The link to check. * @return True if the link starts with "#". * * @see #isExternalLink(String) * @see #isLocalLink(String) */ public static boolean isInternalLink( String link ) { return link.startsWith( "#" ); } /** * Checks if the given string corresponds to an external URI, * ie is not a link within the same document nor a relative link * to another document (a local link) of the same site. * * @param link The link to check. * @return True if the link (ignoring case) starts with either "http:/", * "https:/", "ftp:/", "mailto:", "file:/", or contains the string "://". * Note that Windows style separators "\" are not allowed * for URIs, see http://www.ietf.org/rfc/rfc2396.txt , section 2.4.3. * * @see #isInternalLink(String) * @see #isLocalLink(String) */ public static boolean isExternalLink( String link ) { String text = link.toLowerCase( Locale.ENGLISH ); return ( text.startsWith( "http:/" ) || text.startsWith( "https:/" ) || text.startsWith( "ftp:/" ) || text.startsWith( "mailto:" ) || text.startsWith( "file:/" ) || text.indexOf( "://" ) != -1 ); } /** * Checks if the given string corresponds to a relative link to another document * within the same site, ie it is neither an {@link #isInternalLink(String) internal} * nor an {@link #isExternalLink(String) external} link. * * @param link The link to check. * @return True if the link is neither an external nor an internal link. * * @see #isExternalLink(String) * @see #isInternalLink(String) */ public static boolean isLocalLink( String link ) { return ( !isExternalLink( link ) && !isInternalLink( link ) ); } /** * Construct a valid Doxia id. * *

* This method is equivalent to {@link #encodeId(java.lang.String, boolean) encodeId( id, false )}. *

* * @param id The id to be encoded. * @return The trimmed and encoded id, or null if id is null. * @see #encodeId(java.lang.String, boolean) */ public static String encodeId( String id ) { return encodeId( id, false ); } /** * Construct a valid Doxia id. * *

* A valid Doxia id obeys the same constraints as an HTML ID or NAME token. * According to the * HTML 4.01 specification section 6.2 SGML basic types: *

*

* ID and NAME tokens must begin with a letter ([A-Za-z]) and may be * followed by any number of letters, digits ([0-9]), hyphens ("-"), * underscores ("_"), colons (":"), and periods ("."). *

*

* According to XHTML 1.0 * section C.8. Fragment Identifiers: *

*

* When defining fragment identifiers to be backward-compatible, only * strings matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should be used. *

*

* To achieve this we need to convert the id String. Two conversions * are necessary and one is done to get prettier ids: *

*
    *
  1. Remove whitespace at the start and end before starting to process
  2. *
  3. If the first character is not a letter, prepend the id with the letter 'a'
  4. *
  5. Any spaces are replaced with an underscore '_'
  6. *
  7. * Any characters not matching the above pattern are either dropped, * or replaced according to the rules specified in the * HTML specs. *
  8. *
*

* For letters, the case is preserved in the conversion. *

* *

* Here are some examples: *

*
     * DoxiaUtils.encodeId( null )        = null
     * DoxiaUtils.encodeId( "" )          = "a"
     * DoxiaUtils.encodeId( "  " )        = "a"
     * DoxiaUtils.encodeId( " _ " )       = "a_"
     * DoxiaUtils.encodeId( "1" )         = "a1"
     * DoxiaUtils.encodeId( "1anchor" )   = "a1anchor"
     * DoxiaUtils.encodeId( "_anchor" )   = "a_anchor"
     * DoxiaUtils.encodeId( "a b-c123 " ) = "a_b-c123"
     * DoxiaUtils.encodeId( "   anchor" ) = "anchor"
     * DoxiaUtils.encodeId( "myAnchor" )  = "myAnchor"
     * 
* * @param id The id to be encoded. * @param chop true if non-ASCII characters should be ignored. * If false, any non-ASCII characters will be replaced as specified above. * @return The trimmed and encoded id, or null if id is null. * If id is not null, the return value is guaranteed to be a valid Doxia id. * * @since 1.1.1 */ public static String encodeId( String id, boolean chop ) { if ( id == null ) { return null; } id = id.trim(); int length = id.length(); if ( length == 0 ) { return "a"; } StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = id.charAt( i ); if ( ( i == 0 ) && ( !isAsciiLetter( c ) ) ) { buffer.append( 'a' ); } if ( c == ' ' ) { buffer.append( '_' ); } else if ( isAsciiLetter( c ) || isAsciiDigit( c ) || ( c == '-' ) || ( c == '_' ) || ( c == ':' ) || ( c == '.' ) ) { buffer.append( c ); } else if ( !chop ) { byte[] bytes; try { bytes = String.valueOf( c ).getBytes( "UTF8" ); } catch ( UnsupportedEncodingException cannotHappen ) { bytes = new byte[0]; } for ( int j = 0; j < bytes.length; ++j ) { String hex = byteToHex( bytes[j] ); buffer.append( '%' ); if ( hex.length() == 1 ) { buffer.append( '0' ); } buffer.append( hex ); } } } return buffer.toString(); } /** * Convert a byte to it's hexadecimal equivalent. * * @param b the byte value. * @return the result of Integer.toHexString( b & 0xFF ). * * @since 1.1.1 */ public static String byteToHex( byte b ) { return Integer.toHexString( b & MINUS_ONE ); } /** * Determines if the specified text is a valid id according to the rules * laid out in {@link #encodeId(String)}. * * @param text The text to be tested. * @return true if the text is a valid id, otherwise false. * @see #encodeId(String) */ public static boolean isValidId( String text ) { if ( text == null || text.length() == 0 ) { return false; } for ( int i = 0; i < text.length(); ++i ) { char c = text.charAt( i ); if ( isAsciiLetter( c ) ) { continue; } if ( ( i == 0 ) || ( c == ' ' ) || ( !isAsciiDigit( c ) && c != '-' && c != '_' && c != ':' && c != '.' ) ) { return false; } } return true; } private static final SimpleDateFormat DATE_PARSER = new SimpleDateFormat( "", Locale.ENGLISH ); private static final ParsePosition DATE_PARSE_POSITION = new ParsePosition( 0 ); private static final String[] DATE_PATTERNS = new String[] { "yyyy-MM-dd", "yyyy/MM/dd", "yyyyMMdd", "yyyy", "dd.MM.yyyy", "dd MMM yyyy", "dd MMM. yyyy", "MMMM yyyy", "MMM. dd, yyyy", "MMM. yyyy", "MMMM dd, yyyy", "MMM d, ''yy", "MMM. ''yy", "MMMM ''yy" }; /** *

Parses a string representing a date by trying different date patterns.

* *

The following date patterns are tried (in the given order):

* *
"yyyy-MM-dd", "yyyy/MM/dd", "yyyyMMdd", "yyyy", "dd.MM.yyyy", "dd MMM yyyy",
     *  "dd MMM. yyyy", "MMMM yyyy", "MMM. dd, yyyy", "MMM. yyyy", "MMMM dd, yyyy",
     *  "MMM d, ''yy", "MMM. ''yy", "MMMM ''yy"
* *

A parse is only sucessful if it parses the whole of the input string. * If no parse patterns match, a ParseException is thrown.

* *

As a special case, the strings "today" and "now" * (ignoring case) return the current date.

* * @param str the date to parse, not null. * @return the parsed date, or the current date if the input String (ignoring case) was * "today" or "now". * @throws ParseException if no pattern matches. * * @since 1.1.1. */ public static Date parseDate( String str ) throws ParseException { if ( "today".equals( str.toLowerCase( Locale.ENGLISH ) ) || "now".equals( str.toLowerCase( Locale.ENGLISH ) ) ) { return new Date(); } for ( int i = 0; i < DATE_PATTERNS.length; i++ ) { DATE_PARSER.applyPattern( DATE_PATTERNS[i] ); DATE_PARSE_POSITION.setIndex( 0 ); final Date date = DATE_PARSER.parse( str, DATE_PARSE_POSITION ); if ( date != null && DATE_PARSE_POSITION.getIndex() == str.length() ) { return date; } } throw new ParseException( "Unable to parse date: " + str, -1 ); } // // private // private static boolean isAsciiLetter( char c ) { return ( ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) ); } private static boolean isAsciiDigit( char c ) { return ( c >= '0' && c <= '9' ); } /** * Determine width and height of an image. If successful, the returned SinkEventAttributes * contain width and height attribute keys whose values are the width and height of the image (as a String). * * @param logo a String containing either a URL or a path to an image file. * @return a set of SinkEventAttributes, or null if no ImageReader was found to read the image. * @throws java.io.IOException if an error occurs during reading. * @since 1.1.1 */ public static MutableAttributeSet getImageAttributes( String logo ) throws IOException { BufferedImage img = null; if ( isExternalLink( logo ) ) { img = ImageIO.read( new URL( logo ) ); } else { img = ImageIO.read( new File( logo ) ); } if ( img == null ) { return null; } MutableAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( SinkEventAttributeSet.WIDTH, Integer.toString( img.getWidth() ) ); atts.addAttribute( SinkEventAttributeSet.HEIGHT, Integer.toString( img.getHeight() ) ); // add other attributes? return atts; } private DoxiaUtils() { // utility class } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/util/HtmlTools.java0000644000175000017500000004123011216135717027240 0ustar twernertwernerpackage org.apache.maven.doxia.util; /* * 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.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; import javax.swing.text.html.HTML.Tag; import org.apache.commons.lang.StringEscapeUtils; import org.apache.maven.doxia.markup.HtmlMarkup; import org.codehaus.plexus.util.StringUtils; /** * The HtmlTools class defines methods to HTML handling. * * @author Vincent Siveton * @version $Id: HtmlTools.java 785531 2009-06-17 09:47:59Z ltheussl $ * @since 1.0 */ public class HtmlTools { private static final Tag[] ALL_TAGS = { HtmlMarkup.A, HtmlMarkup.ABBR, HtmlMarkup.ACRONYM, HtmlMarkup.ADDRESS, HtmlMarkup.APPLET, HtmlMarkup.AREA, HtmlMarkup.B, HtmlMarkup.BASE, HtmlMarkup.BASEFONT, HtmlMarkup.BDO, HtmlMarkup.BIG, HtmlMarkup.BLOCKQUOTE, HtmlMarkup.BODY, HtmlMarkup.BR, HtmlMarkup.BUTTON, HtmlMarkup.CAPTION, HtmlMarkup.CENTER, HtmlMarkup.CITE, HtmlMarkup.CODE, HtmlMarkup.COL, HtmlMarkup.COLGROUP, HtmlMarkup.DD, HtmlMarkup.DEL, HtmlMarkup.DFN, HtmlMarkup.DIR, HtmlMarkup.DIV, HtmlMarkup.DL, HtmlMarkup.DT, HtmlMarkup.EM, HtmlMarkup.FIELDSET, HtmlMarkup.FONT, HtmlMarkup.FORM, HtmlMarkup.FRAME, HtmlMarkup.FRAMESET, HtmlMarkup.H1, HtmlMarkup.H2, HtmlMarkup.H3, HtmlMarkup.H4, HtmlMarkup.H5, HtmlMarkup.H6, HtmlMarkup.HEAD, HtmlMarkup.HR, HtmlMarkup.HTML, HtmlMarkup.I, HtmlMarkup.IFRAME, HtmlMarkup.IMG, HtmlMarkup.INPUT, HtmlMarkup.INS, HtmlMarkup.ISINDEX, HtmlMarkup.KBD, HtmlMarkup.LABEL, HtmlMarkup.LEGEND, HtmlMarkup.LI, HtmlMarkup.LINK, HtmlMarkup.MAP, HtmlMarkup.MENU, HtmlMarkup.META, HtmlMarkup.NOFRAMES, HtmlMarkup.NOSCRIPT, HtmlMarkup.OBJECT, HtmlMarkup.OL, HtmlMarkup.OPTGROUP, HtmlMarkup.OPTION, HtmlMarkup.P, HtmlMarkup.PARAM, HtmlMarkup.PRE, HtmlMarkup.Q, HtmlMarkup.S, HtmlMarkup.SAMP, HtmlMarkup.SCRIPT, HtmlMarkup.SELECT, HtmlMarkup.SMALL, HtmlMarkup.SPAN, HtmlMarkup.STRIKE, HtmlMarkup.STRONG, HtmlMarkup.STYLE, HtmlMarkup.SUB, HtmlMarkup.SUP, HtmlMarkup.TABLE, HtmlMarkup.TBODY, HtmlMarkup.TD, HtmlMarkup.TEXTAREA, HtmlMarkup.TFOOT, HtmlMarkup.TH, HtmlMarkup.THEAD, HtmlMarkup.TITLE, HtmlMarkup.TR, HtmlMarkup.TT, HtmlMarkup.U, HtmlMarkup.UL, HtmlMarkup.VAR }; private static final Hashtable TAG_HASHTABLE = new Hashtable( ALL_TAGS.length ); private static final int ASCII = 0x7E; static { for ( int i = 0; i < ALL_TAGS.length; i++ ) { TAG_HASHTABLE.put( ALL_TAGS[i].toString(), ALL_TAGS[i] ); } } /** * Returns a tag for a defined HTML tag name. This is one of * the tags defined in {@link org.apache.maven.doxia.markup.HtmlMarkup}. * If the given name does not represent one of the defined tags, then * null will be returned. * * @param tagName the String name requested. * @return a tag constant corresponding to the tagName, * or null if not found. * @see http://www.w3.org/TR/html401/index/elements.html * @since 1.1 */ public static Tag getHtmlTag( String tagName ) { Object t = TAG_HASHTABLE.get( tagName ); return ( t == null ? null : (Tag) t ); } /** * Escape special HTML characters in a String in xml mode. * * Note: this method doesn't escape non-ascii characters by numeric characters references. * * @param text the String to escape, may be null. * @return The escaped text or the empty string if text == null. * @see #escapeHTML(String,boolean) */ public static String escapeHTML( String text ) { return escapeHTML( text, true ); } /** * Escape special HTML characters in a String. * *
     * < becomes &lt;
     * > becomes &gt;
     * & becomes &amp;
     * " becomes &quot;
     * ' becomes &apos; if xmlMode = true
     * 
* * If xmlMode is true, every other character than the above remains unchanged, * if xmlMode is false, non-ascii characters get replaced by their hex code. * * Note: all characters are encoded, i.e.: *
     * \u0159       = &#x159;
     * \uD835\uDFED = &#x1d7ed;
     * 
* * @param text The String to escape, may be null. * @param xmlMode true to replace also ' to &apos, false to replace non-ascii * characters by numeric characters references. * @return The escaped text or the empty string if text == null. * @since 1.1 * @see http://www.w3.org/TR/2000/REC-xml-20001006#sec-predefined-ent * @see http://www.w3.org/TR/html401/charset.html#h-5.3 */ public static final String escapeHTML( String text, boolean xmlMode ) { if ( text == null ) { return ""; } int length = text.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; ++i ) { char c = text.charAt( i ); switch ( c ) { case '<': buffer.append( "<" ); break; case '>': buffer.append( ">" ); break; case '&': buffer.append( "&" ); break; case '\"': buffer.append( """ ); break; default: if ( xmlMode ) { if ( c == '\'' ) { buffer.append( "'" ); } else { buffer.append( c ); } } else { if ( c <= ASCII ) { // ASCII. buffer.append( c ); } else { buffer.append( "&#x" ); if ( isHighSurrogate( c ) ) { buffer.append( Integer.toHexString( toCodePoint( c, text.charAt( ++i ) ) ) ); } else { buffer.append( Integer.toHexString( c ) ); } buffer.append( ';' ); } } } } return buffer.toString(); } /** * Unescapes HTML entities in a string in non xml mode. * * @param text the String to unescape, may be null. * @return a new unescaped String, null if null string input. * @since 1.1.1. * @see #unescapeHTML(String, boolean) */ public static String unescapeHTML( String text ) { return unescapeHTML( text, false ); } /** * Unescapes HTML entities in a string. * *

Unescapes a string containing entity escapes to a string * containing the actual Unicode characters corresponding to the * escapes. Supports HTML 4.0 entities.

* *

For example, the string "&lt;Fran&ccedil;ais&gt;" * will become "<Français>".

* * Note: all unicode entities are decoded, i.e.: *
     * &#x159;   = \u0159
     * &#x1d7ed; = \uD835\uDFED
     * 
* * @param text the String to unescape, may be null. * @param xmlMode set to true to replace &apos by '. * @return a new unescaped String, null if null string input. * @since 1.1.1. */ public static String unescapeHTML( String text, boolean xmlMode ) { if ( text == null ) { return null; } String unescaped; if ( xmlMode ) { unescaped = StringEscapeUtils.unescapeXml( text ); } else { // StringEscapeUtils.unescapeHtml returns entities it doesn't recognize unchanged unescaped = StringEscapeUtils.unescapeHtml( text ); } String tmp = unescaped; List entities = new ArrayList(); while ( true ) { int i = tmp.indexOf( "&#x" ); if ( i == -1 ) { break; } tmp = tmp.substring( i + 3 ); if ( tmp.indexOf( ';' ) != -1 ) { String entity = tmp.substring( 0, tmp.indexOf( ';' ) ); try { Integer.parseInt( entity, 16 ); entities.add( entity ); } catch ( NumberFormatException e ) { // nop } } } for ( int i = 0; i < entities.size(); i++ ) { String entity = (String) entities.get( i ); int codePoint = Integer.parseInt( entity, 16 ); unescaped = StringUtils.replace( unescaped, "&#x" + entity + ";", new String( toChars( codePoint ) ) ); } return unescaped; } /** * Encode an url * * @param url the String to encode, may be null * @return the text encoded, null if null String input */ public static String encodeURL( String url ) { if ( url == null ) { return null; } StringBuffer encoded = new StringBuffer(); int length = url.length(); char[] unicode = new char[1]; for ( int i = 0; i < length; ++i ) { char c = url.charAt( i ); switch ( c ) { case ';': case '/': case '?': case ':': case '@': case '&': case '=': case '+': case '$': case ',': case '[': case ']': // RFC 2732 (IPV6) case '-': case '_': case '.': case '!': case '~': case '*': case '\'': case '(': case ')': case '#': // XLink mark encoded.append( c ); break; default: if ( ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) || ( c >= '0' && c <= '9' ) ) { encoded.append( c ); } else { byte[] bytes; try { if ( isHighSurrogate( c ) ) { int codePoint = toCodePoint( c, url.charAt( ++i ) ); unicode = toChars( codePoint ); bytes = ( new String( unicode, 0, unicode.length ) ).getBytes( "UTF8" ); } else { unicode[0] = c; bytes = ( new String( unicode, 0, 1 ) ).getBytes( "UTF8" ); } } catch ( UnsupportedEncodingException cannotHappen ) { bytes = new byte[0]; } for ( int j = 0; j < bytes.length; ++j ) { String hex = DoxiaUtils.byteToHex( bytes[j] ); encoded.append( '%' ); if ( hex.length() == 1 ) { encoded.append( '0' ); } encoded.append( hex ); } } } } return encoded.toString(); } /** * Construct a valid id. * *

* Note: this method is identical to * {@link DoxiaUtils#encodeId(String,boolean) DoxiaUtils.encodeId( id, true)}, * the rules to encode an id are laid out there. *

* * @param id The id to be encoded. * @return The trimmed and encoded id, or null if id is null. * @see DoxiaUtils#encodeId(java.lang.String,boolean) */ public static String encodeId( String id ) { return DoxiaUtils.encodeId( id, true ); } /** * Determines if the specified text is a valid id according to the rules * laid out in {@link #encodeId(String)}. * * @param text The text to be tested. * @return true if the text is a valid id, otherwise false. * @see #encodeId(String). */ public static boolean isId( String text ) { return DoxiaUtils.isValidId( text ); } private HtmlTools() { // utility class } // // Imported code from ASF Harmony project rev 770909 // http://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java // private static final char LUNATE_SIGMA = 0x3FF; private static final char NON_PRIVATE_USE_HIGH_SURROGATE = 0xD800; private static final char LOW_SURROGATE = 0xDC00; private static int toCodePoint( char high, char low ) { // See RFC 2781, Section 2.2 // http://www.faqs.org/rfcs/rfc2781.html int h = ( high & LUNATE_SIGMA ) << 10; int l = low & LUNATE_SIGMA; return ( h | l ) + MIN_SUPPLEMENTARY_CODE_POINT; } private static final char MIN_HIGH_SURROGATE = '\uD800'; private static final char MAX_HIGH_SURROGATE = '\uDBFF'; private static boolean isHighSurrogate( char ch ) { return ( MIN_HIGH_SURROGATE <= ch && MAX_HIGH_SURROGATE >= ch ); } private static final int MIN_CODE_POINT = 0x000000; private static final int MAX_CODE_POINT = 0x10FFFF; private static final int MIN_SUPPLEMENTARY_CODE_POINT = 0x10000; private static boolean isValidCodePoint( int codePoint ) { return ( MIN_CODE_POINT <= codePoint && MAX_CODE_POINT >= codePoint ); } private static boolean isSupplementaryCodePoint( int codePoint ) { return ( MIN_SUPPLEMENTARY_CODE_POINT <= codePoint && MAX_CODE_POINT >= codePoint ); } /** * Converts the given code point to an equivalent character array. * * @param codePoint the code point to convert. * @return If codePoint is a supplementary code point, returns a character array of length 2, * otherwise a character array of length 1 containing only the original int as a char. */ public static char[] toChars( int codePoint ) { if ( !isValidCodePoint( codePoint ) ) { throw new IllegalArgumentException(); } if ( isSupplementaryCodePoint( codePoint ) ) { int cpPrime = codePoint - MIN_SUPPLEMENTARY_CODE_POINT; int high = NON_PRIVATE_USE_HIGH_SURROGATE | ( ( cpPrime >> 10 ) & LUNATE_SIGMA ); int low = LOW_SURROGATE | ( cpPrime & LUNATE_SIGMA ); return new char[] { (char) high, (char) low }; } return new char[] { (char) codePoint }; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/0000755000175000017500000000000011632765553024771 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/0000755000175000017500000000000011632765554025736 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/0000755000175000017500000000000011632765554027350 5ustar twernertwerner././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/SiteModuleManager.javadoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/SiteModuleManager.ja0000644000175000017500000000340711150512221033205 0ustar twernertwernerpackage org.apache.maven.doxia.module.site.manager; /* * 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.site.SiteModule; import java.util.Collection; /** * Handles SiteModule lookups. * * @author Jason van Zyl * @version $Id: SiteModuleManager.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 */ public interface SiteModuleManager { /** The Plexus lookup role. */ String ROLE = SiteModuleManager.class.getName(); /** * Returns a collection of SiteModules. * * @return The SiteModules. */ Collection getSiteModules(); /** * Returns the SiteModule that corresponds to the given id. * * @param id The identifier. * @return The corresponding SiteModule. * @throws org.apache.maven.doxia.module.site.manager.SiteModuleNotFoundException if no SiteModule could be found * for the given id. */ SiteModule getSiteModule( String id ) throws SiteModuleNotFoundException; } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/DefaultSiteModuleManager.javadoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/DefaultSiteModuleMan0000644000175000017500000000446111066163237033302 0ustar twernertwernerpackage org.apache.maven.doxia.module.site.manager; /* * 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.Collection; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import org.apache.maven.doxia.module.site.SiteModule; /** * Simple implementation of the SiteModuleManager interface. * * @author Jason van Zyl * @version $Id: DefaultSiteModuleManager.java 698165 2008-09-23 12:52:47Z vsiveton $ * @since 1.0 * @plexus.component */ public class DefaultSiteModuleManager implements SiteModuleManager { /** * @plexus.requirement role="org.apache.maven.doxia.module.site.SiteModule" */ private Map siteModules; private Collection siteModulesValues; /** {@inheritDoc} */ public Collection getSiteModules() { if ( siteModulesValues == null ) { Map siteModulesTmp = new LinkedHashMap(); for ( Iterator it = siteModules.values().iterator(); it.hasNext(); ) { Object obj = it.next(); siteModulesTmp.put( obj.getClass(), obj ); } siteModulesValues = siteModulesTmp.values(); } return siteModulesValues; } /** {@inheritDoc} */ public SiteModule getSiteModule( String id ) throws SiteModuleNotFoundException { SiteModule siteModule = (SiteModule) siteModules.get( id ); if ( siteModule == null ) { throw new SiteModuleNotFoundException( "Cannot find site module id = " + id ); } return siteModule; } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/SiteModuleNotFoundException.javadoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/SiteModuleNotFoundEx0000644000175000017500000000513211021234043033270 0ustar twernertwernerpackage org.apache.maven.doxia.module.site.manager; /* * 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. */ /** * Encapsulate a Doxia exception that indicates that a SiteModule * does not exist or could not be found. * * @author Jason van Zyl * @version $Id: SiteModuleNotFoundException.java 662767 2008-06-03 12:25:07Z ltheussl $ * @since 1.0 */ public class SiteModuleNotFoundException extends Exception { /** serialVersionUID */ static final long serialVersionUID = 295967936746221567L; /** * Construct a new SiteModuleNotFoundException with the * specified detail message. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. */ public SiteModuleNotFoundException( String message ) { super( message ); } /** * Constructs a new SiteModuleNotFoundException with the specified cause. * The error message is (cause == null ? null : cause.toString() ). * * @param cause the cause. This can be retrieved later by the * Throwable.getCause() method. (A null value is permitted, and indicates * that the cause is nonexistent or unknown.) */ public SiteModuleNotFoundException( Throwable cause ) { super( cause ); } /** * Construct a new SiteModuleNotFoundException with the specified * detail message and cause. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param cause The cause. This can be retrieved later by the * Throwable.getCause() method. (A null value is permitted, and indicates * that the cause is nonexistent or unknown.) */ public SiteModuleNotFoundException( String message, Throwable cause ) { super( message, cause ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/AbstractSiteModule.java0000644000175000017500000000422211213710143032312 0ustar twernertwernerpackage org.apache.maven.doxia.module.site; /* * 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. */ /** * An abstract base class that implements the SiteModule interface. * * @author Jason van Zyl * @version $Id: AbstractSiteModule.java 783285 2009-06-10 10:52:19Z vsiveton $ * @since 1.0 */ public abstract class AbstractSiteModule implements SiteModule { /** The source directory. */ private final String sourceDirectory; /** The default file extension. */ private final String extension; /** The default file extension. */ private final String parserId; /** * Constructor with null. */ public AbstractSiteModule() { this( null, null, null ); } /** * @param sourceDirectory not null * @param extension not null * @param parserId not null * @since 1.1.1 */ protected AbstractSiteModule( String sourceDirectory, String extension, String parserId ) { super(); this.sourceDirectory = sourceDirectory; this.extension = extension; this.parserId = parserId; } /** {@inheritDoc} */ public String getSourceDirectory() { return sourceDirectory; } /** {@inheritDoc} */ public String getExtension() { return extension; } /** {@inheritDoc} */ public String getParserId() { return parserId; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/module/site/SiteModule.java0000644000175000017500000000317711150512221030633 0ustar twernertwernerpackage org.apache.maven.doxia.module.site; /* * 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. */ /** * Provides definitions for a Doxia module. This is used by the doxia site tools. * * @author Jason van Zyl * @version $Id: SiteModule.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 */ public interface SiteModule { /** The Plexus lookup role. */ String ROLE = SiteModule.class.getName(); /** * Returns the directory that contains source files for a given module. * * @return The source directory. */ String getSourceDirectory(); /** * Returns the default file extension for a given module. * * @return The default file extension. */ String getExtension(); /** * Returns the parser id for a given module. * * @return The parser id. */ String getParserId(); } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/DefaultDoxia.java0000644000175000017500000000471310755311026026710 0ustar twernertwernerpackage org.apache.maven.doxia; /* * 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.logging.PlexusLoggerWrapper; import org.apache.maven.doxia.parser.ParseException; import org.apache.maven.doxia.parser.Parser; import org.apache.maven.doxia.parser.manager.ParserManager; import org.apache.maven.doxia.parser.manager.ParserNotFoundException; import org.apache.maven.doxia.sink.Sink; import org.codehaus.plexus.logging.AbstractLogEnabled; import java.io.Reader; /** * Simple implementation of the Doxia interface: * uses a ParserManager to lookup a parser. * * @author Jason van Zyl * @version $Id: DefaultDoxia.java 628059 2008-02-15 13:22:30Z vsiveton $ * @since 1.0 * @plexus.component */ public class DefaultDoxia extends AbstractLogEnabled implements Doxia { /** @plexus.requirement */ private ParserManager parserManager; // ---------------------------------------------------------------------- // This remains because the sinks are not threadsafe which they probably // should be. In some places a constructor is used to initialize a sink // which can probably be done away with. // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void parse( Reader source, String parserId, Sink sink ) throws ParserNotFoundException, ParseException { Parser parser = parserManager.getParser( parserId ); parser.enableLogging( new PlexusLoggerWrapper( getLogger() ) ); parser.parse( source, sink ); } /** {@inheritDoc} */ public Parser getParser( String parserId ) throws ParserNotFoundException { return parserManager.getParser( parserId ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/0000755000175000017500000000000011632765554025001 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/XhtmlBaseParser.java0000644000175000017500000007363211313470726030711 0ustar twernertwernerpackage org.apache.maven.doxia.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.io.Reader; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; import javax.swing.text.html.HTML.Attribute; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.markup.HtmlMarkup; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.sink.SinkEventAttributes; import org.apache.maven.doxia.util.DoxiaUtils; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; /** * Common base parser for xhtml events. * * @author Jason van Zyl * @author ltheussl * @version $Id: XhtmlBaseParser.java 892639 2009-12-20 18:49:58Z ltheussl $ * @since 1.1 */ public class XhtmlBaseParser extends AbstractXmlParser implements HtmlMarkup { /** True if a <script></script> block is read. CDATA sections within are handled as rawText. */ private boolean scriptBlock; /** Used to distinguish <a href=""> from <a name="">. */ private boolean isLink; /** Used to distinguish <a href=""> from <a name="">. */ private boolean isAnchor; /** Used for nested lists. */ private int orderedListDepth = 0; /** Counts section level. */ private int sectionLevel; /** Verbatim flag, true whenever we are inside a <pre> tag. */ private boolean inVerbatim; /** Used to recognize the case of img inside figure. */ private boolean inFigure; /** Decoration properties, eg for texts. */ private final SinkEventAttributeSet decoration = new SinkEventAttributeSet(); /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ private Map warnMessages; /** {@inheritDoc} */ public void parse( Reader source, Sink sink ) throws ParseException { init(); try { super.parse( source, sink ); } finally { logWarnings(); setSecondParsing( false ); init(); } } /** *

* Goes through a common list of possible html start tags. These include only tags that can go into * the body of a xhtml document and so should be re-usable by different xhtml-based parsers. *

*

* The currently handled tags are: *

*

* * <h2>, <h3>, <h4>, <h5>, <h6>, <p>, <pre>, * <ul>, <ol>, <li>, <dl>, <dt>, <dd>, <b>, <strong>, * <i>, <em>, <code>, <samp>, <tt>, <a>, <table>, <tr>, * <th>, <td>, <caption>, <br/>, <hr/>, <img/>. * *

* * @param parser A parser. * @param sink the sink to receive the events. * @return True if the event has been handled by this method, i.e. the tag was recognized, false otherwise. */ protected boolean baseStartTag( XmlPullParser parser, Sink sink ) { boolean visited = true; SinkEventAttributeSet attribs = getAttributesFromParser( parser ); if ( parser.getName().equals( HtmlMarkup.H2.toString() ) ) { handleSectionStart( sink, Sink.SECTION_LEVEL_1, attribs ); } else if ( parser.getName().equals( HtmlMarkup.H3.toString() ) ) { handleSectionStart( sink, Sink.SECTION_LEVEL_2, attribs ); } else if ( parser.getName().equals( HtmlMarkup.H4.toString() ) ) { handleSectionStart( sink, Sink.SECTION_LEVEL_3, attribs ); } else if ( parser.getName().equals( HtmlMarkup.H5.toString() ) ) { handleSectionStart( sink, Sink.SECTION_LEVEL_4, attribs ); } else if ( parser.getName().equals( HtmlMarkup.H6.toString() ) ) { handleSectionStart( sink, Sink.SECTION_LEVEL_5, attribs ); } else if ( parser.getName().equals( HtmlMarkup.U.toString() ) ) { decoration.addAttribute( SinkEventAttributes.DECORATION, "underline" ); } else if ( parser.getName().equals( HtmlMarkup.S.toString() ) || parser.getName().equals( HtmlMarkup.STRIKE.toString() ) || parser.getName().equals( "del" ) ) { decoration.addAttribute( SinkEventAttributes.DECORATION, "line-through" ); } else if ( parser.getName().equals( HtmlMarkup.SUB.toString() ) ) { decoration.addAttribute( SinkEventAttributes.VALIGN, "sub" ); } else if ( parser.getName().equals( HtmlMarkup.SUP.toString() ) ) { decoration.addAttribute( SinkEventAttributes.VALIGN, "sup" ); } else if ( parser.getName().equals( HtmlMarkup.P.toString() ) ) { handlePStart( sink, attribs ); } else if ( parser.getName().equals( HtmlMarkup.DIV.toString() ) ) { visited = handleDivStart( parser, attribs, sink ); } else if ( parser.getName().equals( HtmlMarkup.PRE.toString() ) ) { handlePreStart( attribs, sink ); } else if ( parser.getName().equals( HtmlMarkup.UL.toString() ) ) { sink.list( attribs ); } else if ( parser.getName().equals( HtmlMarkup.OL.toString() ) ) { handleOLStart( parser, sink, attribs ); } else if ( parser.getName().equals( HtmlMarkup.LI.toString() ) ) { handleLIStart( sink, attribs ); } else if ( parser.getName().equals( HtmlMarkup.DL.toString() ) ) { sink.definitionList( attribs ); } else if ( parser.getName().equals( HtmlMarkup.DT.toString() ) ) { sink.definitionListItem( attribs ); sink.definedTerm( attribs ); } else if ( parser.getName().equals( HtmlMarkup.DD.toString() ) ) { sink.definition( attribs ); } else if ( ( parser.getName().equals( HtmlMarkup.B.toString() ) ) || ( parser.getName().equals( HtmlMarkup.STRONG.toString() ) ) ) { sink.bold(); } else if ( ( parser.getName().equals( HtmlMarkup.I.toString() ) ) || ( parser.getName().equals( HtmlMarkup.EM.toString() ) ) ) { handleFigureCaptionStart( sink, attribs ); } else if ( ( parser.getName().equals( HtmlMarkup.CODE.toString() ) ) || ( parser.getName().equals( HtmlMarkup.SAMP.toString() ) ) || ( parser.getName().equals( HtmlMarkup.TT.toString() ) ) ) { sink.monospaced(); } else if ( parser.getName().equals( HtmlMarkup.A.toString() ) ) { handleAStart( parser, sink, attribs ); } else if ( parser.getName().equals( HtmlMarkup.TABLE.toString() ) ) { handleTableStart( sink, attribs, parser ); } else if ( parser.getName().equals( HtmlMarkup.TR.toString() ) ) { sink.tableRow( attribs ); } else if ( parser.getName().equals( HtmlMarkup.TH.toString() ) ) { sink.tableHeaderCell( attribs ); } else if ( parser.getName().equals( HtmlMarkup.TD.toString() ) ) { sink.tableCell( attribs ); } else if ( parser.getName().equals( HtmlMarkup.CAPTION.toString() ) ) { sink.tableCaption( attribs ); } else if ( parser.getName().equals( HtmlMarkup.BR.toString() ) ) { sink.lineBreak( attribs ); } else if ( parser.getName().equals( HtmlMarkup.HR.toString() ) ) { sink.horizontalRule( attribs ); } else if ( parser.getName().equals( HtmlMarkup.IMG.toString() ) ) { handleImgStart( parser, sink, attribs ); } else if ( parser.getName().equals( HtmlMarkup.SCRIPT.toString() ) ) { handleUnknown( parser, sink, TAG_TYPE_START ); scriptBlock = true; } else { visited = false; } return visited; } /** *

* Goes through a common list of possible html end tags. * These should be re-usable by different xhtml-based parsers. * The tags handled here are the same as for {@link #baseStartTag(XmlPullParser,Sink)}, * except for the empty elements (<br/>, <hr/>, <img/>). *

* * @param parser A parser. * @param sink the sink to receive the events. * @return True if the event has been handled by this method, false otherwise. */ protected boolean baseEndTag( XmlPullParser parser, Sink sink ) { boolean visited = true; if ( parser.getName().equals( HtmlMarkup.P.toString() ) ) { if ( !inFigure ) { sink.paragraph_(); } } else if ( parser.getName().equals( HtmlMarkup.U.toString() ) || parser.getName().equals( HtmlMarkup.S.toString() ) || parser.getName().equals( HtmlMarkup.STRIKE.toString() ) || parser.getName().equals( "del" ) ) { decoration.removeAttribute( SinkEventAttributes.DECORATION ); } else if ( parser.getName().equals( HtmlMarkup.SUB.toString() ) || parser.getName().equals( HtmlMarkup.SUP.toString() ) ) { decoration.removeAttribute( SinkEventAttributes.VALIGN ); } else if ( parser.getName().equals( HtmlMarkup.DIV.toString() ) ) { if ( inFigure ) { sink.figure_(); this.inFigure = false; } else { visited = false; } } else if ( parser.getName().equals( HtmlMarkup.PRE.toString() ) ) { verbatim_(); sink.verbatim_(); } else if ( parser.getName().equals( HtmlMarkup.UL.toString() ) ) { sink.list_(); } else if ( parser.getName().equals( HtmlMarkup.OL.toString() ) ) { sink.numberedList_(); orderedListDepth--; } else if ( parser.getName().equals( HtmlMarkup.LI.toString() ) ) { handleListItemEnd( sink ); } else if ( parser.getName().equals( HtmlMarkup.DL.toString() ) ) { sink.definitionList_(); } else if ( parser.getName().equals( HtmlMarkup.DT.toString() ) ) { sink.definedTerm_(); } else if ( parser.getName().equals( HtmlMarkup.DD.toString() ) ) { sink.definition_(); sink.definitionListItem_(); } else if ( ( parser.getName().equals( HtmlMarkup.B.toString() ) ) || ( parser.getName().equals( HtmlMarkup.STRONG.toString() ) ) ) { sink.bold_(); } else if ( ( parser.getName().equals( HtmlMarkup.I.toString() ) ) || ( parser.getName().equals( HtmlMarkup.EM.toString() ) ) ) { handleFigureCaptionEnd( sink ); } else if ( ( parser.getName().equals( HtmlMarkup.CODE.toString() ) ) || ( parser.getName().equals( HtmlMarkup.SAMP.toString() ) ) || ( parser.getName().equals( HtmlMarkup.TT.toString() ) ) ) { sink.monospaced_(); } else if ( parser.getName().equals( HtmlMarkup.A.toString() ) ) { handleAEnd( sink ); } // ---------------------------------------------------------------------- // Tables // ---------------------------------------------------------------------- else if ( parser.getName().equals( HtmlMarkup.TABLE.toString() ) ) { sink.tableRows_(); sink.table_(); } else if ( parser.getName().equals( HtmlMarkup.TR.toString() ) ) { sink.tableRow_(); } else if ( parser.getName().equals( HtmlMarkup.TH.toString() ) ) { sink.tableHeaderCell_(); } else if ( parser.getName().equals( HtmlMarkup.TD.toString() ) ) { sink.tableCell_(); } else if ( parser.getName().equals( HtmlMarkup.CAPTION.toString() ) ) { sink.tableCaption_(); } else if ( parser.getName().equals( HtmlMarkup.H2.toString() ) ) { sink.sectionTitle1_(); } else if ( parser.getName().equals( HtmlMarkup.H3.toString() ) ) { sink.sectionTitle2_(); } else if ( parser.getName().equals( HtmlMarkup.H4.toString() ) ) { sink.sectionTitle3_(); } else if ( parser.getName().equals( HtmlMarkup.H5.toString() ) ) { sink.sectionTitle4_(); } else if ( parser.getName().equals( HtmlMarkup.H6.toString() ) ) { sink.sectionTitle5_(); } else if ( parser.getName().equals( HtmlMarkup.SCRIPT.toString() ) ) { handleUnknown( parser, sink, TAG_TYPE_END ); scriptBlock = false; } else { visited = false; } return visited; } /** * {@inheritDoc} * * Just calls {@link #baseStartTag(XmlPullParser,Sink)}, this should be * overridden by implementing parsers to include additional tags. */ protected void handleStartTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { if ( !baseStartTag( parser, sink ) ) { if ( getLog().isWarnEnabled() ) { String position = "[" + parser.getLineNumber() + ":" + parser.getColumnNumber() + "]"; String tag = "<" + parser.getName() + ">"; getLog().warn( "Unrecognized xml tag: " + tag + " at " + position ); } } } /** * {@inheritDoc} * * Just calls {@link #baseEndTag(XmlPullParser,Sink)}, this should be * overridden by implementing parsers to include additional tags. */ protected void handleEndTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { if ( !baseEndTag( parser, sink ) ) { // unrecognized tag is already logged in StartTag } } /** {@inheritDoc} */ protected void handleText( XmlPullParser parser, Sink sink ) throws XmlPullParserException { String text = getText( parser ); /* * NOTE: Don't do any whitespace trimming here. Whitespace normalization has already been performed by the * parser so any whitespace that makes it here is significant. * * NOTE: text within script tags is ignored, scripting code should be embedded in CDATA. */ if ( StringUtils.isNotEmpty( text ) && !isScriptBlock() ) { sink.text( text, decoration ); } } /** {@inheritDoc} */ protected void handleComment( XmlPullParser parser, Sink sink ) throws XmlPullParserException { String text = getText( parser ).trim(); if ( "PB".equals( text ) ) { sink.pageBreak(); } else { sink.comment( text ); } } /** {@inheritDoc} */ protected void handleCdsect( XmlPullParser parser, Sink sink ) throws XmlPullParserException { String text = getText( parser ); if ( isScriptBlock() ) { sink.unknown( CDATA, new Object[] {new Integer( CDATA_TYPE ), text}, null ); } else { sink.text( text ); } } /** * Make sure sections are nested consecutively. * *

* HTML doesn't have any sections, only sectionTitles (<h2> etc), that means we have to * open close any sections that are missing in between. *

* *

* For instance, if the following sequence is parsed: *

     * <h3></h3>
     * <h6></h6>
     * 
* we have to insert two section starts before we open the <h6>. * In the following sequence *
     * <h6></h6>
     * <h3></h3>
     * 
* we have to close two sections before we open the <h3>. *

* *

The current level is set to newLevel afterwards.

* * @param newLevel the new section level, all upper levels have to be closed. * @param sink the sink to receive the events. */ protected void consecutiveSections( int newLevel, Sink sink ) { closeOpenSections( newLevel, sink ); openMissingSections( newLevel, sink ); this.sectionLevel = newLevel; } /** * Close open sections. * * @param newLevel the new section level, all upper levels have to be closed. * @param sink the sink to receive the events. */ private void closeOpenSections( int newLevel, Sink sink ) { while ( this.sectionLevel >= newLevel ) { if ( sectionLevel == Sink.SECTION_LEVEL_5 ) { sink.section5_(); } else if ( sectionLevel == Sink.SECTION_LEVEL_4 ) { sink.section4_(); } else if ( sectionLevel == Sink.SECTION_LEVEL_3 ) { sink.section3_(); } else if ( sectionLevel == Sink.SECTION_LEVEL_2 ) { sink.section2_(); } else if ( sectionLevel == Sink.SECTION_LEVEL_1 ) { sink.section1_(); } this.sectionLevel--; } } /** * Open missing sections. * * @param newLevel the new section level, all lower levels have to be opened. * @param sink the sink to receive the events. */ private void openMissingSections( int newLevel, Sink sink ) { while ( this.sectionLevel < newLevel - 1 ) { this.sectionLevel++; if ( sectionLevel == Sink.SECTION_LEVEL_5 ) { sink.section5(); } else if ( sectionLevel == Sink.SECTION_LEVEL_4 ) { sink.section4(); } else if ( sectionLevel == Sink.SECTION_LEVEL_3 ) { sink.section3(); } else if ( sectionLevel == Sink.SECTION_LEVEL_2 ) { sink.section2(); } else if ( sectionLevel == Sink.SECTION_LEVEL_1 ) { sink.section1(); } } } /** * Return the current section level. * * @return the current section level. */ protected int getSectionLevel() { return this.sectionLevel; } /** * Set the current section level. * * @param newLevel the new section level. */ protected void setSectionLevel( int newLevel ) { this.sectionLevel = newLevel; } /** * Stop verbatim mode. */ protected void verbatim_() { this.inVerbatim = false; } /** * Start verbatim mode. */ protected void verbatim() { this.inVerbatim = true; } /** * Checks if we are currently inside a <pre> tag. * * @return true if we are currently in verbatim mode. */ protected boolean isVerbatim() { return this.inVerbatim; } /** * Checks if we are currently inside a <script> tag. * * @return true if we are currently inside <script> tags. * * @since 1.1.1. */ protected boolean isScriptBlock() { return this.scriptBlock; } /** * Checks if the given id is a valid Doxia id and if not, returns a transformed one. * * @param id The id to validate. * @return A transformed id or the original id if it was already valid. * @see DoxiaUtils#encodeId(String) */ protected String validAnchor( String id ) { if ( !DoxiaUtils.isValidId( id ) ) { String linkAnchor = DoxiaUtils.encodeId( id, true ); String msg = "Modified invalid link: '" + id + "' to '" + linkAnchor + "'"; logMessage( "modifiedLink", msg ); return linkAnchor; } return id; } /** {@inheritDoc} */ protected void init() { super.init(); this.scriptBlock = false; this.isLink = false; this.isAnchor = false; this.orderedListDepth = 0; this.sectionLevel = 0; this.inVerbatim = false; this.inFigure = false; while( this.decoration.getAttributeNames().hasMoreElements() ) { this.decoration.removeAttribute( this.decoration.getAttributeNames().nextElement() ); } this.warnMessages = null; } private void handleAEnd( Sink sink ) { if ( isLink ) { sink.link_(); isLink = false; } else if ( isAnchor ) { sink.anchor_(); isAnchor = false; } } private void handleAStart( XmlPullParser parser, Sink sink, SinkEventAttributeSet attribs ) { String href = parser.getAttributeValue( null, Attribute.HREF.toString() ); if ( href != null ) { int hashIndex = href.indexOf( "#" ); if ( hashIndex != -1 && !DoxiaUtils.isExternalLink( href ) ) { String hash = href.substring( hashIndex + 1 ); if ( !DoxiaUtils.isValidId( hash ) ) { href = href.substring( 0, hashIndex ) + "#" + DoxiaUtils.encodeId( hash, true ); String msg = "Modified invalid link: '" + hash + "' to '" + href + "'"; logMessage( "modifiedLink", msg ); } } sink.link( href, attribs ); isLink = true; } else { String name = parser.getAttributeValue( null, Attribute.NAME.toString() ); if ( name != null ) { sink.anchor( validAnchor( name ), attribs ); isAnchor = true; } else { String id = parser.getAttributeValue( null, Attribute.ID.toString() ); if ( id != null ) { sink.anchor( validAnchor( id ), attribs ); isAnchor = true; } } } } private boolean handleDivStart( XmlPullParser parser, SinkEventAttributeSet attribs, Sink sink ) { boolean visited = true; String divclass = parser.getAttributeValue( null, Attribute.CLASS.toString() ); if ( "figure".equals( divclass ) ) { this.inFigure = true; SinkEventAttributeSet atts = new SinkEventAttributeSet( attribs ); atts.removeAttribute( SinkEventAttributes.CLASS ); sink.figure( atts ); } else { visited = false; } return visited; } private void handleFigureCaptionEnd( Sink sink ) { if ( inFigure ) { sink.figureCaption_(); } else { sink.italic_(); } } private void handleFigureCaptionStart( Sink sink, SinkEventAttributeSet attribs ) { if ( inFigure ) { sink.figureCaption( attribs ); } else { sink.italic(); } } private void handleImgStart( XmlPullParser parser, Sink sink, SinkEventAttributeSet attribs ) { String src = parser.getAttributeValue( null, Attribute.SRC.toString() ); if ( src != null ) { sink.figureGraphics( src, attribs ); } } private void handleLIStart( Sink sink, SinkEventAttributeSet attribs ) { if ( orderedListDepth == 0 ) { sink.listItem( attribs ); } else { sink.numberedListItem( attribs ); } } private void handleListItemEnd( Sink sink ) { if ( orderedListDepth == 0 ) { sink.listItem_(); } else { sink.numberedListItem_(); } } private void handleOLStart( XmlPullParser parser, Sink sink, SinkEventAttributeSet attribs ) { int numbering = Sink.NUMBERING_DECIMAL; // this will have to be generalized if we handle styles String style = parser.getAttributeValue( null, Attribute.STYLE.toString() ); if ( style != null ) { if ( "list-style-type: upper-alpha".equals( style ) ) { numbering = Sink.NUMBERING_UPPER_ALPHA; } else if ( "list-style-type: lower-alpha".equals( style ) ) { numbering = Sink.NUMBERING_LOWER_ALPHA; } else if ( "list-style-type: upper-roman".equals( style ) ) { numbering = Sink.NUMBERING_UPPER_ROMAN; } else if ( "list-style-type: lower-roman".equals( style ) ) { numbering = Sink.NUMBERING_LOWER_ROMAN; } else if ( "list-style-type: decimal".equals( style ) ) { numbering = Sink.NUMBERING_DECIMAL; } } sink.numberedList( numbering, attribs ); orderedListDepth++; } private void handlePStart( Sink sink, SinkEventAttributeSet attribs ) { if ( !inFigure ) { sink.paragraph( attribs ); } } /* * The PRE element tells visual user agents that the enclosed text is * "preformatted". When handling preformatted text, visual user agents: * - May leave white space intact. * - May render text with a fixed-pitch font. * - May disable automatic word wrap. * - Must not disable bidirectional processing. * Non-visual user agents are not required to respect extra white space * in the content of a PRE element. */ private void handlePreStart( SinkEventAttributeSet attribs, Sink sink ) { verbatim(); attribs.removeAttribute( SinkEventAttributes.DECORATION ); sink.verbatim( attribs ); } private void handleSectionStart( Sink sink, int level, SinkEventAttributeSet attribs ) { consecutiveSections( level, sink ); sink.section( level, attribs ); sink.sectionTitle( level, attribs ); } private void handleTableStart( Sink sink, SinkEventAttributeSet attribs, XmlPullParser parser ) { sink.table( attribs ); String border = parser.getAttributeValue( null, Attribute.BORDER.toString() ); boolean grid = true; if ( border == null || "0".equals( border ) ) { grid = false; } String align = parser.getAttributeValue( null, Attribute.ALIGN.toString() ); int[] justif = {Sink.JUSTIFY_LEFT}; if ( "center".equals( align ) ) { justif[0] = Sink.JUSTIFY_CENTER; } else if ( "right".equals( align ) ) { justif[0] = Sink.JUSTIFY_RIGHT; } sink.tableRows( justif, grid ); } /** * If debug mode is enabled, log the msg as is, otherwise add unique msg in warnMessages. * * @param key not null * @param msg not null * @see #parse(Reader, Sink) * @since 1.1.1 */ private void logMessage( String key, String msg ) { msg = "[XHTML Parser] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } /** * @since 1.1.1 */ private void logWarnings() { if ( getLog().isWarnEnabled() && this.warnMessages != null && !isSecondParsing() ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } this.warnMessages = null; } } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/0000755000175000017500000000000011632765554026413 5ustar twernertwerner././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/DefaultParserManager.javadoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/DefaultParserManager.java0000644000175000017500000000324111150512221033262 0ustar twernertwernerpackage org.apache.maven.doxia.parser.manager; /* * 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.Parser; import java.util.Map; /** * Simple implementation of the ParserManager interface. * * @author Jason van Zyl * @version $Id: DefaultParserManager.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 * @plexus.component */ public class DefaultParserManager implements ParserManager { /** * @plexus.requirement role="org.apache.maven.doxia.parser.Parser" */ private Map parsers; /** {@inheritDoc} */ public Parser getParser( String id ) throws ParserNotFoundException { Parser parser = (Parser) parsers.get( id ); if ( parser == null ) { throw new ParserNotFoundException( "Cannot find parser with id = " + id ); } return parser; } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/ParserNotFoundException.javadoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/ParserNotFoundException.j0000644000175000017500000000503411021234043033330 0ustar twernertwernerpackage org.apache.maven.doxia.parser.manager; /* * 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. */ /** * Encapsulate a Doxia exception that indicates that a parser * does not exist or could not be found. * * @author Jason van Zyl * @version $Id: ParserNotFoundException.java 662767 2008-06-03 12:25:07Z ltheussl $ * @since 1.0 */ public class ParserNotFoundException extends Exception { /** serialVersionUID */ static final long serialVersionUID = 295967936746221567L; /** * Construct a new ParserNotFoundException with the specified detail message. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. */ public ParserNotFoundException( String message ) { super( message ); } /** * Constructs a new exception with the specified cause. The error * message is (cause == null ? null : cause.toString() ). * * @param cause the cause. This can be retrieved later by the * Throwable.getCause() method. (A null value is permitted, and indicates * that the cause is nonexistent or unknown.) */ public ParserNotFoundException( Throwable cause ) { super( cause ); } /** * Construct a new ParserNotFoundException with the specified * detail message and cause. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param cause the cause. This can be retrieved later by the * Throwable.getCause() method. (A null value is permitted, and indicates * that the cause is nonexistent or unknown.) */ public ParserNotFoundException( String message, Throwable cause ) { super( message, cause ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/ParserManager.java0000644000175000017500000000304511150512221031757 0ustar twernertwernerpackage org.apache.maven.doxia.parser.manager; /* * 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.Parser; /** * Handles parser lookups. * * @author Jason van Zyl * @version $Id: ParserManager.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 */ public interface ParserManager { /** The Plexus lookup role. */ String ROLE = ParserManager.class.getName(); /** * Returns the parser that corresponds to the given id. * * @param id The identifier. * @return The corresponding parser. * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException if no parser could be found * for the given id. */ Parser getParser( String id ) throws ParserNotFoundException; } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java0000644000175000017500000001240511375443016030554 0ustar twernertwernerpackage org.apache.maven.doxia.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.io.File; import java.io.StringReader; import org.apache.maven.doxia.logging.Log; import org.apache.maven.doxia.logging.SystemStreamLog; import org.apache.maven.doxia.macro.Macro; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.macro.MacroRequest; import org.apache.maven.doxia.macro.manager.MacroManager; import org.apache.maven.doxia.macro.manager.MacroNotFoundException; import org.apache.maven.doxia.sink.Sink; /** * An abstract base class that defines some convenience methods for parsers. * Provides a macro mechanism to give dynamic functionalities for the parsing. * * @author Jason van Zyl * @version $Id: AbstractParser.java 946932 2010-05-21 08:36:30Z ltheussl $ * @since 1.0 * @plexus.component */ public abstract class AbstractParser implements Parser { /** Indicates that a second parsing is required. */ private boolean secondParsing = false; /** @plexus.requirement */ private MacroManager macroManager; /** Log instance. */ private Log logger; /** {@inheritDoc} */ public int getType() { return UNKNOWN_TYPE; } /** * Execute a macro on the given sink. * * @param macroId An id to lookup the macro. * @param request The corresponding MacroRequest. * @param sink The sink to receive the events. * @throws org.apache.maven.doxia.macro.MacroExecutionException if an error occurred during execution. * @throws org.apache.maven.doxia.macro.manager.MacroNotFoundException if the macro could not be found. */ // Made public right now because of the structure of the APT parser and // all its inner classes. public void executeMacro( String macroId, MacroRequest request, Sink sink ) throws MacroExecutionException, MacroNotFoundException { Macro macro = getMacroManager().getMacro( macroId ); macro.enableLogging( getLog() ); macro.execute( sink, request ); } /** * Returns the current base directory. * * @return The base directory. * * @deprecated this does not work in multi-module builds, see DOXIA-373 */ protected File getBasedir() { // TODO: This is baaad, it should come in with the request. // (this is only used for macro requests, see AptParser) String basedir = System.getProperty( "basedir" ); if ( basedir != null ) { return new File( basedir ); } return new File( new File( "" ).getAbsolutePath() ); } /** * Convenience method to parse an arbitrary string and emit events into the given sink. * * @param string A string that provides the source input. * @param sink A sink that consumes the Doxia events. * @throws org.apache.maven.doxia.parser.ParseException if the string could not be parsed. * @since 1.1 */ public void parse( String string, Sink sink ) throws ParseException { parse( new StringReader( string ), sink ); } /** * Set secondParsing to true, if we need a second parsing. * * @param second True for second parsing. */ public void setSecondParsing( boolean second ) { this.secondParsing = second; } /** * Indicates if we are currently parsing a second time. * * @return true if we are currently parsing a second time. * @since 1.1 */ protected boolean isSecondParsing() { return secondParsing; } /** {@inheritDoc} */ public void enableLogging( Log log ) { this.logger = log; } /** * Returns the current logger for this parser. * If no logger has been configured yet, a new SystemStreamLog is returned. * * @return Log * @since 1.1 */ protected Log getLog() { if ( logger == null ) { logger = new SystemStreamLog(); } return logger; } /** * Gets the current {@link MacroManager}. * * @return The current {@link MacroManager}. * @since 1.1 */ protected MacroManager getMacroManager() { return macroManager; } /** * Initialize the parser. This is called first by * {@link #parse(java.io.Reader, org.apache.maven.doxia.sink.Sink)} and can be used * to set the parser into a clear state so it can be re-used. * * @since 1.1.2 */ protected void init() { // nop } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/Parser.java0000644000175000017500000000434511150512221027056 0ustar twernertwernerpackage org.apache.maven.doxia.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.logging.LogEnabled; import org.apache.maven.doxia.sink.Sink; import java.io.Reader; /** * A Parser is responsible for parsing any document in a supported front-end * format, and emitting the standard Doxia events, which can then be consumed * by any Doxia Sink. * * @author Jason van Zyl * @version $Id: Parser.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.0 */ public interface Parser extends LogEnabled { /** The Plexus lookup role. */ String ROLE = Parser.class.getName(); /** Unknown parser type */ int UNKNOWN_TYPE = 0; /** Text parser type */ int TXT_TYPE = 1; /** XML parser type */ int XML_TYPE = 2; /** * Parses the given source model and emits Doxia events into the given sink. * * @param source not null reader that provides the source document. * You could use newReader methods from {@link org.codehaus.plexus.util.ReaderFactory}. * @param sink A sink that consumes the Doxia events. * @throws org.apache.maven.doxia.parser.ParseException if the model could not be parsed. */ void parse( Reader source, Sink sink ) throws ParseException; /** * The parser type value could be {@link #UNKNOWN_TYPE}, {@link #TXT_TYPE} or * {@link #XML_TYPE}. * * @return the type of Parser */ int getType(); } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractTextParser.java0000644000175000017500000000251710767707462031440 0ustar twernertwernerpackage org.apache.maven.doxia.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.markup.TextMarkup; /** * An abstract class that defines some convenience methods for Text parsers. * * @author Vincent Siveton * @version $Id: AbstractTextParser.java 638290 2008-03-18 09:45:22Z bentmann $ * @since 1.0 */ public abstract class AbstractTextParser extends AbstractParser implements TextMarkup { /** {@inheritDoc} */ public final int getType() { return TXT_TYPE; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/ParseException.java0000644000175000017500000002143611151246713030566 0ustar twernertwernerpackage org.apache.maven.doxia.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. */ /** * Encapsulate a Doxia parse error. * * @author Jason van Zyl * @version $Id: ParseException.java 747780 2009-02-25 13:55:23Z vsiveton $ * @since 1.0 */ public class ParseException extends Exception { /** serialVersionUID */ static final long serialVersionUID = 295967936746221567L; /** The file that caused the ParseException. */ private String fileName; /** Line number where the parse exception occurred. */ private int lineNumber; /** Column number where the parse exception occurred. */ private int columnNumber; /** * Construct a new ParseException with the specified detail message. *
* Note: no line or column number will be used. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. */ public ParseException( String message ) { this( null, message, null, -1, -1 ); } /** * Construct a new ParseException with the specified detail message and cause. *
* Note: no line or column number will be used. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param e the cause. This can be retrieved later by the Throwable.getCause() method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) */ public ParseException( String message, Exception e ) { this( e, message, null, -1, -1 ); } /** * Construct a new ParseException with the specified detail message, * line number and column number. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @param column The column number where the parsing failed. * This can later be retrieved by the getColumnNumber() method. * @since 1.1 */ public ParseException( String message, int line, int column ) { this( null, message, null, line, column ); } /** * Construct a new ParseException with the specified detail message and cause, * line number and column number. * * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param e the cause. This can be retrieved later by the Throwable.getCause() method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @param column The column number where the parsing failed. * This can later be retrieved by the getColumnNumber() method. * @since 1.1 */ public ParseException( String message, Exception e, int line, int column ) { this( e, message, null, line, column ); } /** * Constructs a new exception with the specified cause. The error message is * (cause == null ? null : cause.toString() ). * * @param e the cause. This can be retrieved later by the Throwable.getCause() method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @deprecated Using {@link #ParseException(Exception, int, int)} to specify the line and column number. */ public ParseException( Exception e ) { this( e, null, null, -1, -1 ); } /** * Constructs a new exception with the specified cause, line number and column number. The error message is * (cause == null ? null : cause.toString() ). * * @param e the cause. This can be retrieved later by the Throwable.getCause() method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @param column The column number where the parsing failed. * This can later be retrieved by the getColumnNumber() method. * @since 1.1 */ public ParseException( Exception e, int line, int column ) { this( e, null, null, line, column ); } /** * Construct a new ParseException with the specified cause, * filename and linenumber. * * @param e the cause. This can be retrieved later by the Throwable.getCause() method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @param file Name of a file that couldn't be parsed. * This can later be retrieved by the getFileName() method. * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @deprecated Using {@link #ParseException(Exception, String, int, int)} to specify the column number. */ public ParseException( Exception e, String file, int line ) { this( e, null, file, line, -1 ); } /** * Construct a new ParseException with the specified cause, * filename, line number and column number. * * @param e the cause. This can be retrieved later by the Throwable.getCause() method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @param file Name of a file that couldn't be parsed. * This can later be retrieved by the getFileName() method. * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @param column The column number where the parsing failed. * This can later be retrieved by the getColumnNumber() method. */ public ParseException( Exception e, String file, int line, int column ) { this( e, null, file, line, column ); } /** * Construct a new ParseException with the specified cause, detail message, * filename, line number and column number. * * @param e the cause. This can be retrieved later by the Throwable.getCause() method. * (A null value is permitted, and indicates that the cause is nonexistent or unknown.) * @param message The detailed message. * This can later be retrieved by the Throwable.getMessage() method. * @param file Name of a file that couldn't be parsed. * This can later be retrieved by the getFileName() method. * @param line The line number where the parsing failed. * This can later be retrieved by the getLineNumber() method. * @param column The column number where the parsing failed. * This can later be retrieved by the getColumnNumber() method. * @since 1.1 */ public ParseException( Exception e, String message, String file, int line, int column ) { super( ( message == null ) ? ( ( e == null ) ? null : e.getMessage() ) : message, e ); this.fileName = file; this.lineNumber = line; this.columnNumber = column; } /** *

Getter for the field fileName.

* * @return the file name that caused the ParseException. */ public String getFileName() { return fileName; } /** *

Getter for the field lineNumber.

* * @return the line number where the ParseException occurred. */ public int getLineNumber() { return lineNumber; } /** *

Getter for the field columnNumber.

* * @return the column number where the ParseException occurred. * @since 1.1 */ public int getColumnNumber() { return columnNumber; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java0000644000175000017500000007200611470551025031234 0ustar twernertwernerpackage org.apache.maven.doxia.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.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.StringReader; import java.net.URL; import java.util.Hashtable; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Locale; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpRequestRetryHandler; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; import org.apache.http.util.EntityUtils; import org.apache.maven.doxia.macro.MacroExecutionException; import org.apache.maven.doxia.markup.XmlMarkup; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.doxia.sink.SinkEventAttributeSet; import org.apache.maven.doxia.util.HtmlTools; import org.apache.maven.doxia.util.XmlValidator; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.MXParser; import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; /** * An abstract class that defines some convenience methods for XML parsers. * * @author Vincent Siveton * @version $Id: AbstractXmlParser.java 1035744 2010-11-16 18:48:53Z dennisl $ * @since 1.0 */ public abstract class AbstractXmlParser extends AbstractParser implements XmlMarkup { /** * Entity pattern for HTML entity, i.e. &nbsp; * "|^\\s]+)(\\s)+\"(\\s)*(&[a-zA-Z]{2,6};)(\\s)*\"(\\s)*> *
* see http://www.w3.org/TR/REC-xml/#NT-EntityDecl. */ private static final Pattern PATTERN_ENTITY_1 = Pattern.compile( ENTITY_START + "(\\s)+([^>|^\\s]+)(\\s)+\"(\\s)*(&[a-zA-Z]{2,6};)(\\s)*\"(\\s)*>" ); /** * Entity pattern for Unicode entity, i.e. &#38; * "|^\\s]+)(\\s)+\"(\\s)*(&(#x?[0-9a-fA-F]{1,5};)*)(\\s)*\"(\\s)*>" *
* see http://www.w3.org/TR/REC-xml/#NT-EntityDecl. */ private static final Pattern PATTERN_ENTITY_2 = Pattern.compile( ENTITY_START + "(\\s)+([^>|^\\s]+)(\\s)+\"(\\s)*(&(#x?[0-9a-fA-F]{1,5};)*)(\\s)*\"(\\s)*>" ); private boolean ignorableWhitespace; private boolean collapsibleWhitespace; private boolean trimmableWhitespace; private Map entities; private boolean validate = false; /** {@inheritDoc} */ public void parse( Reader source, Sink sink ) throws ParseException { init(); // 1 first parsing if validation is required if ( isValidate() ) { String content; try { content = IOUtil.toString( new BufferedReader( source ) ); } catch ( IOException e ) { throw new ParseException( "Error reading the model: " + e.getMessage(), e ); } new XmlValidator( getLog() ).validate( content ); source = new StringReader( content ); } // 2 second parsing to process try { XmlPullParser parser = new MXParser(); parser.setInput( source ); sink.enableLogging( getLog() ); parseXml( parser, sink ); } catch ( XmlPullParserException ex ) { throw new ParseException( "Error parsing the model: " + ex.getMessage(), ex, ex.getLineNumber(), ex.getColumnNumber() ); } catch ( MacroExecutionException ex ) { throw new ParseException( "Macro execution failed: " + ex.getMessage(), ex ); } setSecondParsing( false ); init(); } /** * {@inheritDoc} * * Convenience method to parse an arbitrary string and emit any xml events into the given sink. */ public void parse( String string, Sink sink ) throws ParseException { super.parse( string, sink ); } /** {@inheritDoc} */ public final int getType() { return XML_TYPE; } /** * Converts the attributes of the current start tag of the given parser to a SinkEventAttributeSet. * * @param parser A parser, not null. * @return a SinkEventAttributeSet or null if the current parser event is not a start tag. * @since 1.1 */ protected SinkEventAttributeSet getAttributesFromParser( XmlPullParser parser ) { int count = parser.getAttributeCount(); if ( count < 0 ) { return null; } SinkEventAttributeSet atts = new SinkEventAttributeSet( count ); for ( int i = 0; i < count; i++ ) { atts.addAttribute( parser.getAttributeName( i ), parser.getAttributeValue( i ) ); } return atts; } /** * Parse the model from the XmlPullParser into the given sink. * * @param parser A parser, not null. * @param sink the sink to receive the events. * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if there's a problem parsing the model * @throws org.apache.maven.doxia.macro.MacroExecutionException if there's a problem executing a macro */ private void parseXml( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException { int eventType = parser.getEventType(); while ( eventType != XmlPullParser.END_DOCUMENT ) { if ( eventType == XmlPullParser.START_TAG ) { handleStartTag( parser, sink ); } else if ( eventType == XmlPullParser.END_TAG ) { handleEndTag( parser, sink ); } else if ( eventType == XmlPullParser.TEXT ) { String text = getText( parser ); if ( isIgnorableWhitespace() ) { if ( !text.trim().equals( "" ) ) { handleText( parser, sink ); } } else { handleText( parser, sink ); } } else if ( eventType == XmlPullParser.CDSECT ) { handleCdsect( parser, sink ); } else if ( eventType == XmlPullParser.COMMENT ) { handleComment( parser, sink ); } else if ( eventType == XmlPullParser.ENTITY_REF ) { handleEntity( parser, sink ); } else if ( eventType == XmlPullParser.IGNORABLE_WHITESPACE ) { // nop } else if ( eventType == XmlPullParser.PROCESSING_INSTRUCTION ) { // nop } else if ( eventType == XmlPullParser.DOCDECL ) { addLocalEntities( parser, parser.getText() ); for ( Iterator it = CachedFileEntityResolver.ENTITY_CACHE.values().iterator(); it.hasNext(); ) { byte[] res = (byte[]) it.next(); addDTDEntities( parser, new String( res ) ); } } try { eventType = parser.nextToken(); } catch ( IOException io ) { throw new XmlPullParserException( "IOException: " + io.getMessage(), parser, io ); } } } /** * Goes through the possible start tags. * * @param parser A parser, not null. * @param sink the sink to receive the events. * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if there's a problem parsing the model * @throws org.apache.maven.doxia.macro.MacroExecutionException if there's a problem executing a macro */ protected abstract void handleStartTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException; /** * Goes through the possible end tags. * * @param parser A parser, not null. * @param sink the sink to receive the events. * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if there's a problem parsing the model * @throws org.apache.maven.doxia.macro.MacroExecutionException if there's a problem executing a macro */ protected abstract void handleEndTag( XmlPullParser parser, Sink sink ) throws XmlPullParserException, MacroExecutionException; /** * Handles text events. * *

This is a default implementation, if the parser points to a non-empty text element, * it is emitted as a text event into the specified sink.

* * @param parser A parser, not null. * @param sink the sink to receive the events. Not null. * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if there's a problem parsing the model */ protected void handleText( XmlPullParser parser, Sink sink ) throws XmlPullParserException { String text = getText( parser ); /* * NOTE: Don't do any whitespace trimming here. Whitespace normalization has already been performed by the * parser so any whitespace that makes it here is significant. */ if ( StringUtils.isNotEmpty( text ) ) { sink.text( text ); } } /** * Handles CDATA sections. * *

This is a default implementation, all data are emitted as text * events into the specified sink.

* * @param parser A parser, not null. * @param sink the sink to receive the events. Not null. * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if there's a problem parsing the model */ protected void handleCdsect( XmlPullParser parser, Sink sink ) throws XmlPullParserException { sink.text( getText( parser ) ); } /** * Handles comments. * *

This is a default implementation, all data are emitted as comment * events into the specified sink.

* * @param parser A parser, not null. * @param sink the sink to receive the events. Not null. * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if there's a problem parsing the model */ protected void handleComment( XmlPullParser parser, Sink sink ) throws XmlPullParserException { sink.comment( getText( parser ).trim() ); } /** * Handles entities. * *

This is a default implementation, all entities are resolved and emitted as text * events into the specified sink, except:

*
    *
  • the entities with names #160, nbsp and #x00A0 * are emitted as nonBreakingSpace() events.
  • *
* * @param parser A parser, not null. * @param sink the sink to receive the events. Not null. * @throws org.codehaus.plexus.util.xml.pull.XmlPullParserException if there's a problem parsing the model */ protected void handleEntity( XmlPullParser parser, Sink sink ) throws XmlPullParserException { String text = getText( parser ); String name = parser.getName(); if ( "#160".equals( name ) || "nbsp".equals( name ) || "#x00A0".equals( name ) ) { sink.nonBreakingSpace(); } else { String unescaped = HtmlTools.unescapeHTML( text ); sink.text( unescaped ); } } /** * Handles an unkown event. * *

This is a default implementation, all events are emitted as unknown * events into the specified sink.

* * @param parser the parser to get the event from. * @param sink the sink to receive the event. * @param type the tag event type. This should be one of HtmlMarkup.TAG_TYPE_SIMPLE, * HtmlMarkup.TAG_TYPE_START, HtmlMarkup.TAG_TYPE_END or HtmlMarkup.ENTITY_TYPE. * It will be passed as the first argument of the required parameters to the Sink * {@link org.apache.maven.doxia.sink.Sink#unknown(String, Object[], org.apache.maven.doxia.sink.SinkEventAttributes)} * method. */ protected void handleUnknown( XmlPullParser parser, Sink sink, int type ) { Object[] required = new Object[] { new Integer( type ) }; SinkEventAttributeSet attribs = getAttributesFromParser( parser ); sink.unknown( parser.getName(), required, attribs ); } /** *

isIgnorableWhitespace.

* * @return true if whitespace will be ignored, false otherwise. * @see #setIgnorableWhitespace(boolean) * @since 1.1 */ protected boolean isIgnorableWhitespace() { return ignorableWhitespace; } /** * Specify that whitespace will be ignored. I.e.: *
<tr> <td/> </tr>
* is equivalent to *
<tr><td/></tr>
* * @param ignorable true to ignore whitespace, false otherwise. * @since 1.1 */ protected void setIgnorableWhitespace( boolean ignorable ) { this.ignorableWhitespace = ignorable; } /** *

isCollapsibleWhitespace.

* * @return true if text will collapse, false otherwise. * @see #setCollapsibleWhitespace(boolean) * @since 1.1 */ protected boolean isCollapsibleWhitespace() { return collapsibleWhitespace; } /** * Specify that text will be collapsed. I.e.: *
Text   Text
* is equivalent to *
Text Text
* * @param collapsible true to allow collapsible text, false otherwise. * @since 1.1 */ protected void setCollapsibleWhitespace( boolean collapsible ) { this.collapsibleWhitespace = collapsible; } /** *

isTrimmableWhitespace.

* * @return true if text will be trim, false otherwise. * @see #setTrimmableWhitespace(boolean) * @since 1.1 */ protected boolean isTrimmableWhitespace() { return trimmableWhitespace; } /** * Specify that text will be collapsed. I.e.: *
<p> Text </p>
* is equivalent to *
<p>Text</p>
* * @param trimmable true to allow trimmable text, false otherwise. * @since 1.1 */ protected void setTrimmableWhitespace( boolean trimmable ) { this.trimmableWhitespace = trimmable; } /** *

getText.

* * @param parser A parser, not null. * @return the {@link XmlPullParser#getText()} taking care of trimmable or collapsible configuration. * @see XmlPullParser#getText() * @see #isCollapsibleWhitespace() * @see #isTrimmableWhitespace() * @since 1.1 */ protected String getText( XmlPullParser parser ) { String text = parser.getText(); if ( isTrimmableWhitespace() ) { text = text.trim(); } if ( isCollapsibleWhitespace() ) { StringBuffer newText = new StringBuffer(); String[] elts = StringUtils.split( text, " \r\n" ); for ( int i = 0; i < elts.length; i++ ) { newText.append( elts[i] ); if ( ( i + 1 ) < elts.length ) { newText.append( " " ); } } text = newText.toString(); } return text; } /** * Return the defined entities in a local doctype. I.e.: *
     * <!DOCTYPE foo [
     *   <!ENTITY bar "&#x160;">
     *   <!ENTITY bar1 "&#x161;">
     * ]>
     * 
* * @return a map of the defined entities in a local doctype. * @since 1.1 */ protected Map getLocalEntities() { if ( entities == null ) { entities = new LinkedHashMap(); } return entities; } /** *

isValidate.

* * @return true if XML content will be validate, false otherwise. * @since 1.1 */ public boolean isValidate() { return validate; } /** * Specify a flag to validate or not the XML content. * * @param validate the validate to set * @see #parse(Reader, Sink) * @since 1.1 */ public void setValidate( boolean validate ) { this.validate = validate; } // ---------------------------------------------------------------------- // Private methods // ---------------------------------------------------------------------- /** * Add an entity given by entityName and entityValue to {@link #entities}. *
* By default, we exclude the default XML entities: &amp;, &lt;, &gt;, &quot; and &apos;. * * @param parser not null * @param entityName not null * @param entityValue not null * @throws XmlPullParserException if any * @see {@link XmlPullParser#defineEntityReplacementText(String, String)} */ private void addEntity( XmlPullParser parser, String entityName, String entityValue ) throws XmlPullParserException { if ( entityName.endsWith( "amp" ) || entityName.endsWith( "lt" ) || entityName.endsWith( "gt" ) || entityName.endsWith( "quot" ) || entityName.endsWith( "apos" ) ) { return; } parser.defineEntityReplacementText( entityName, entityValue ); getLocalEntities().put( entityName, entityValue ); } /** * Handle entities defined in a local doctype as the following: *
     * <!DOCTYPE foo [
     *   <!ENTITY bar "&#x160;">
     *   <!ENTITY bar1 "&#x161;">
     * ]>
     * 
* * @param parser not null * @param text not null * @throws XmlPullParserException if any */ private void addLocalEntities( XmlPullParser parser, String text ) throws XmlPullParserException { int entitiesCount = StringUtils.countMatches( text, ENTITY_START ); if ( entitiesCount > 0 ) { // text should be foo [...] int start = text.indexOf( "[" ); int end = text.lastIndexOf( "]" ); if ( start != -1 && end != -1 ) { text = text.substring( start + 1, end ); addDTDEntities( parser, text ); } } } /** * Handle entities defined in external doctypes as the following: *
     * <!DOCTYPE foo [
     *   <!-- These are the entity sets for ISO Latin 1 characters for the XHTML -->
     *   <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN"
     *          "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
     *   %HTMLlat1;
     * ]>
     * 
* * @param parser not null * @param text not null * @throws XmlPullParserException if any */ private void addDTDEntities( XmlPullParser parser, String text ) throws XmlPullParserException { int entitiesCount = StringUtils.countMatches( text, ENTITY_START ); if ( entitiesCount > 0 ) { text = StringUtils.replace( text, ENTITY_START, "\n" + ENTITY_START ); BufferedReader reader = new BufferedReader( new StringReader( text ) ); String line; String tmpLine = ""; try { Matcher matcher; while ( ( line = reader.readLine() ) != null ) { tmpLine += "\n" + line; matcher = PATTERN_ENTITY_1.matcher( tmpLine ); if ( matcher.find() && matcher.groupCount() == 7 ) { String entityName = matcher.group( 2 ); String entityValue = matcher.group( 5 ); addEntity( parser, entityName, entityValue ); tmpLine = ""; } else { matcher = PATTERN_ENTITY_2.matcher( tmpLine ); if ( matcher.find() && matcher.groupCount() == 8 ) { String entityName = matcher.group( 2 ); String entityValue = matcher.group( 5 ); addEntity( parser, entityName, entityValue ); tmpLine = ""; } } } } catch ( IOException e ) { // nop } finally { IOUtil.close( reader ); } } } /** * Implementation of the callback mechanism EntityResolver. * Using a mechanism of cached files in temp dir to improve performance when using the XMLReader. */ public static class CachedFileEntityResolver implements EntityResolver { /** Map with systemId as key and the content of systemId as byte[]. */ protected static final Map ENTITY_CACHE = new Hashtable(); /** {@inheritDoc} */ public InputSource resolveEntity( String publicId, String systemId ) throws SAXException, IOException { byte[] res = (byte[]) ENTITY_CACHE.get( systemId ); // already cached? if ( res == null ) { String systemName = FileUtils.getFile( systemId ).getName(); File temp = new File( System.getProperty( "java.io.tmpdir" ), systemName ); // maybe already as a temp file? if ( !temp.exists() ) { // is systemId a file or an url? if ( systemId.toLowerCase( Locale.ENGLISH ).startsWith( "file" ) ) { // Doxia XSDs are included in the jars, so try to find the resource systemName from // the classpath... String resource = "/" + systemName; URL url = getClass().getResource( resource ); if ( url != null ) { res = toByteArray( url ); } else { throw new SAXException( "Could not find the SYSTEM entity: " + systemId + " because '" + resource + "' is not available of the classpath." ); } } else { res = toByteArray( new URL( systemId ) ); } // write systemId as temp file copy( res, temp ); } else { // TODO How to refresh Doxia XSDs from temp dir? res = toByteArray( temp.toURI().toURL() ); } ENTITY_CACHE.put( systemId, res ); } InputSource is = new InputSource( new ByteArrayInputStream( res ) ); is.setPublicId( publicId ); is.setSystemId( systemId ); return is; } /** * If url is not an http/https urls, call {@link IOUtil#toByteArray(java.io.InputStream)} to get the url * content. * Otherwise, use HttpClient to get the http content. * Wrap all internal exceptions to throw SAXException. * * @param url not null * @return return an array of byte * @throws SAXException if any */ private static byte[] toByteArray( URL url ) throws SAXException { if ( !( url.getProtocol().equalsIgnoreCase( "http" ) || url.getProtocol().equalsIgnoreCase( "https" ) ) ) { InputStream is = null; try { is = url.openStream(); if ( is == null ) { throw new SAXException( "Cannot open stream from the url: " + url.toString() ); } return IOUtil.toByteArray( is ); } catch ( IOException e ) { throw new SAXException( "IOException: " + e.getMessage(), e ); } finally { IOUtil.close( is ); } } // it is an HTTP url, using HttpClient... DefaultHttpClient client = new DefaultHttpClient(); HttpGet method = new HttpGet( url.toString() ); // Set a user-agent that doesn't contain the word "java", otherwise it will be blocked by the W3C // The default user-agent is "Apache-HttpClient/4.0.2 (java 1.5)" method.setHeader( "user-agent", "Apache-Doxia/1.1.4" ); HttpRequestRetryHandler retryHandler = new DefaultHttpRequestRetryHandler( 3, false ); client.setHttpRequestRetryHandler(retryHandler); HttpEntity entity = null; try { HttpResponse response = client.execute( method ); int statusCode = response.getStatusLine().getStatusCode(); if ( statusCode != HttpStatus.SC_OK ) { throw new IOException( "The status code when accessing the URL '" + url.toString() + "' was " + statusCode + ", which is not allowed. The server gave this reason for the failure '" + response.getStatusLine().getReasonPhrase() + "'."); } entity = response.getEntity(); return EntityUtils.toByteArray( entity ); } catch ( ClientProtocolException e ) { throw new SAXException( "ClientProtocolException: Fatal protocol violation: " + e.getMessage(), e ); } catch ( IOException e ) { throw new SAXException( "IOException: Fatal transport error: " + e.getMessage(), e ); } finally { if ( entity != null ) { try { entity.consumeContent(); } catch ( IOException e ) { // Ignore } } } } /** * Wrap {@link IOUtil#copy(byte[], OutputStream)} to throw SAXException. * * @param res not null array of byte * @param f the file where to write the bytes * @throws SAXException if any * @see {@link IOUtil#copy(byte[], OutputStream)} */ private void copy( byte[] res, File f ) throws SAXException { if ( f.isDirectory() ) { throw new SAXException( "'" + f.getAbsolutePath() + "' is a directory, can not write it." ); } OutputStream os = null; try { os = new FileOutputStream( f ); IOUtil.copy( res, os ); } catch ( IOException e ) { throw new SAXException( "IOException: " + e.getMessage(), e ); } finally { IOUtil.close( os ); } } } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/markup/0000755000175000017500000000000011632765553025003 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/markup/TextMarkup.java0000644000175000017500000000253710767707462027764 0ustar twernertwernerpackage org.apache.maven.doxia.markup; /* * 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. */ /** * List of constants used by Text markup syntax. * * @author Vincent Siveton * @version $Id: TextMarkup.java 638290 2008-03-18 09:45:22Z bentmann $ * @since 1.0 */ public interface TextMarkup extends Markup { // ---------------------------------------------------------------------- // Text separator characters // ---------------------------------------------------------------------- /** pipe character: '|' */ char PIPE = '|'; } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/markup/Markup.java0000644000175000017500000000443611014267211027072 0ustar twernertwernerpackage org.apache.maven.doxia.markup; /* * 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. */ /** * List of constants used by all markup syntax. * * @author Vincent Siveton * @version $Id: Markup.java 657808 2008-05-19 12:11:53Z ltheussl $ * @since 1.0 */ public interface Markup { /** The vm line separator */ String EOL = System.getProperty( "line.separator" ); // ---------------------------------------------------------------------- // Generic separator characters // ---------------------------------------------------------------------- /** equal character: '=' */ char EQUAL = '='; /** end character: '>' */ char GREATER_THAN = '>'; /** left curly bracket character: '{' */ char LEFT_CURLY_BRACKET = '{'; /** left square bracket character: '[' */ char LEFT_SQUARE_BRACKET = '['; /** start character: '<' */ char LESS_THAN = '<'; /** minus character: '-' */ char MINUS = '-'; /** plus character: '+' */ char PLUS = '+'; /** double quote character: '\"' */ char QUOTE = '\"'; /** right curly bracket character: '}' */ char RIGHT_CURLY_BRACKET = '}'; /** right square bracket character: ']' */ char RIGHT_SQUARE_BRACKET = ']'; /** slash character: '/' */ char SLASH = '/'; /** space character: ' ' */ char SPACE = ' '; /** star character: '*' */ char STAR = '*'; /** colon character: ':' */ char COLON = ':'; /** semicolon character: ';' */ char SEMICOLON = ';'; } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/markup/HtmlMarkup.java0000644000175000017500000002457711207503365027736 0ustar twernertwernerpackage org.apache.maven.doxia.markup; /* * 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 javax.swing.text.html.HTML.Tag; /** * List of Html tags. *

* This should contain all valid XHTML 1.0 tags, comprising the tags in * {@link javax.swing.text.html.HTML.Tag} plus several others. *

* * @see http://www.w3.org/TR/html401/index/elements.html * * @author ltheussl * @version $Id: HtmlMarkup.java 779585 2009-05-28 12:43:33Z ltheussl $ * @since 1.0 */ public interface HtmlMarkup extends XmlMarkup { /** A simple HTML tag. Eg <br/>. */ int TAG_TYPE_SIMPLE = 1; /** A start HTML tag. Eg <p>. */ int TAG_TYPE_START = 2; /** An end HTML tag. Eg </p>. */ int TAG_TYPE_END = 3; /** * An HTML entity. Eg &lt;. * * @since 1.1.1. */ int ENTITY_TYPE = 4; /** * A CDATA type event. * * @since 1.1.1. */ int CDATA_TYPE = 5; // ---------------------------------------------------------------------- // All XHTML 1.0 tags // ---------------------------------------------------------------------- /** Xhtml tag for a. */ Tag A = Tag.A; /** Xhtml tag for abbr. */ Tag ABBR = new Tag() { /** {@inheritDoc} */ public String toString() { return "abbr"; } }; /** Xhtml tag for acronym. */ Tag ACRONYM = new Tag() { /** {@inheritDoc} */ public String toString() { return "acronym"; } }; /** Xhtml tag for address. */ Tag ADDRESS = Tag.ADDRESS; /** Xhtml tag for applet. */ Tag APPLET = Tag.APPLET; /** Xhtml tag for area. */ Tag AREA = Tag.AREA; /** Xhtml tag for b. */ Tag B = Tag.B; /** Xhtml tag for base. */ Tag BASE = Tag.BASE; /** Xhtml tag for basefont. */ Tag BASEFONT = Tag.BASEFONT; /** Xhtml tag for bdo. */ Tag BDO = new Tag() { /** {@inheritDoc} */ public String toString() { return "bdo"; } }; /** Xhtml tag for big. */ Tag BIG = Tag.BIG; /** Xhtml tag for blockquote. */ Tag BLOCKQUOTE = Tag.BLOCKQUOTE; /** Xhtml tag for body. */ Tag BODY = Tag.BODY; /** Xhtml tag for br. */ Tag BR = Tag.BR; /** Xhtml tag for button. */ Tag BUTTON = new Tag() { /** {@inheritDoc} */ public String toString() { return "button"; } }; /** Xhtml tag for caption. */ Tag CAPTION = Tag.CAPTION; /** Xhtml tag for center. */ Tag CENTER = Tag.CENTER; /** Xhtml tag for cite. */ Tag CITE = Tag.CITE; /** Xhtml tag for code. */ Tag CODE = Tag.CODE; /** Xhtml tag for col. */ Tag COL = new Tag() { /** {@inheritDoc} */ public String toString() { return "col"; } }; /** Xhtml tag for colgroup. */ Tag COLGROUP = new Tag() { /** {@inheritDoc} */ public String toString() { return "colgroup"; } }; /** Xhtml tag for dd. */ Tag DD = Tag.DD; /** Xhtml tag for del. */ Tag DEL = new Tag() { /** {@inheritDoc} */ public String toString() { return "del"; } }; /** Xhtml tag for dfn. */ Tag DFN = Tag.DFN; /** Xhtml tag for dir. */ Tag DIR = Tag.DIR; /** Xhtml tag for div. */ Tag DIV = Tag.DIV; /** Xhtml tag for dl. */ Tag DL = Tag.DL; /** Xhtml tag for dt. */ Tag DT = Tag.DT; /** Xhtml tag for em. */ Tag EM = Tag.EM; /** Xhtml tag for fieldset. */ Tag FIELDSET = new Tag() { /** {@inheritDoc} */ public String toString() { return "fieldset"; } }; /** Xhtml tag for font. */ Tag FONT = Tag.FONT; /** Xhtml tag for form. */ Tag FORM = Tag.FORM; /** Xhtml tag for frame. */ Tag FRAME = Tag.FRAME; /** Xhtml tag for frameset. */ Tag FRAMESET = Tag.FRAMESET; /** Xhtml tag for h1. */ Tag H1 = Tag.H1; /** Xhtml tag for h2. */ Tag H2 = Tag.H2 ; /** Xhtml tag for h3. */ Tag H3 = Tag.H3; /** Xhtml tag for h4. */ Tag H4 = Tag.H4; /** Xhtml tag for h5. */ Tag H5 = Tag.H5; /** Xhtml tag for h6. */ Tag H6 = Tag.H6; /** Xhtml tag for head. */ Tag HEAD = Tag.HEAD; /** Xhtml tag for hr. */ Tag HR = Tag.HR; /** Xhtml tag for html. */ Tag HTML = Tag.HTML; /** Xhtml tag for i. */ Tag I = Tag.I; /** Xhtml tag for iframe. */ Tag IFRAME = new Tag() { /** {@inheritDoc} */ public String toString() { return "iframe"; } }; /** Xhtml tag for img. */ Tag IMG = Tag.IMG; /** Xhtml tag for input. */ Tag INPUT = Tag.INPUT; /** Xhtml tag for ins. */ Tag INS = new Tag() { /** {@inheritDoc} */ public String toString() { return "ins"; } }; /** Xhtml tag for isindex. */ Tag ISINDEX = Tag.ISINDEX; /** Xhtml tag for kbd. */ Tag KBD = Tag.KBD; /** Xhtml tag for label. */ Tag LABEL = new Tag() { /** {@inheritDoc} */ public String toString() { return "label"; } }; /** Xhtml tag for legend. */ Tag LEGEND = new Tag() { /** {@inheritDoc} */ public String toString() { return "legend"; } }; /** Xhtml tag for li. */ Tag LI = Tag.LI; /** Xhtml tag for link. */ Tag LINK = Tag.LINK; /** Xhtml tag for map. */ Tag MAP = Tag.MAP; /** Xhtml tag for menu. */ Tag MENU = Tag.MENU; /** Xhtml tag for meta. */ Tag META = Tag.META; /** Xhtml tag for noframes. */ Tag NOFRAMES = Tag.NOFRAMES; /** Xhtml tag for noscript. */ Tag NOSCRIPT = new Tag() { /** {@inheritDoc} */ public String toString() { return "noscript"; } }; /** Xhtml tag for object. */ Tag OBJECT = Tag.OBJECT; /** Xhtml tag for ol. */ Tag OL = Tag.OL; /** Xhtml tag for optgroup. */ Tag OPTGROUP = new Tag() { /** {@inheritDoc} */ public String toString() { return "optgroup"; } }; /** Xhtml tag for option. */ Tag OPTION = Tag.OPTION; /** Xhtml tag for p. */ Tag P = Tag.P; /** Xhtml tag for param. */ Tag PARAM = Tag.PARAM; /** Xhtml tag for pre. */ Tag PRE = Tag.PRE; /** Xhtml tag for q. */ Tag Q = new Tag() { /** {@inheritDoc} */ public String toString() { return "q"; } }; /** Xhtml tag for s. */ Tag S = Tag.S; /** Xhtml tag for samp. */ Tag SAMP = Tag.SAMP; /** Xhtml tag for script. */ Tag SCRIPT = Tag.SCRIPT; /** Xhtml tag for select. */ Tag SELECT = Tag.SELECT; /** Xhtml tag for small. */ Tag SMALL = Tag.SMALL; /** Xhtml tag for span. */ Tag SPAN = Tag.SPAN; /** Xhtml tag for strike. */ Tag STRIKE = Tag.STRIKE; /** Xhtml tag for strong. */ Tag STRONG = Tag.STRONG; /** Xhtml tag for style. */ Tag STYLE = Tag.STYLE; /** Xhtml tag for sub. */ Tag SUB = Tag.SUB; /** Xhtml tag for sup. */ Tag SUP = Tag.SUP; /** Xhtml tag for table. */ Tag TABLE = Tag.TABLE; /** Xhtml tag for tbody. */ Tag TBODY = new Tag() { /** {@inheritDoc} */ public String toString() { return "tbody"; } }; /** Xhtml tag for td. */ Tag TD = Tag.TD; /** Xhtml tag for textarea. */ Tag TEXTAREA = Tag.TEXTAREA; /** Xhtml tag for tfoot. */ Tag TFOOT = new Tag() { /** {@inheritDoc} */ public String toString() { return "tfoot"; } }; /** Xhtml tag for th. */ Tag TH = Tag.TH; /** Xhtml tag for thead. */ Tag THEAD = new Tag() { /** {@inheritDoc} */ public String toString() { return "thead"; } }; /** Xhtml tag for title. */ Tag TITLE = Tag.TITLE; /** Xhtml tag for tr. */ Tag TR = Tag.TR; /** Xhtml tag for tt. */ Tag TT = Tag.TT; /** Xhtml tag for u. */ Tag U = Tag.U; /** Xhtml tag for ul. */ Tag UL = Tag.UL; /** Xhtml tag for var. */ Tag VAR = Tag.VAR ; } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/markup/XmlMarkup.java0000644000175000017500000000361611216135717027563 0ustar twernertwernerpackage org.apache.maven.doxia.markup; /* * 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. */ /** * List of constants used by Xml markup syntax. * * @author Vincent Siveton * @version $Id: XmlMarkup.java 785531 2009-06-17 09:47:59Z ltheussl $ * @since 1.0 */ public interface XmlMarkup extends Markup { /** XML namespace: "http://www.w3.org/2001/XMLSchema-instance" */ String XML_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance"; // ---------------------------------------------------------------------- // Xml separator characters // ---------------------------------------------------------------------- /** bang character: '!' */ char BANG = '!'; // ---------------------------------------------------------------------- // Xml constants // ---------------------------------------------------------------------- /** CDATA. String: "CDATA". */ String CDATA = "CDATA"; /** DOCTYPE start. String: "<!DOCTYPE". */ String DOCTYPE_START = "newReader
methods from {@link org.codehaus.plexus.util.ReaderFactory}. * @param parserId Identifier for the parser to use. * @param sink A sink that consumes the Doxia events. * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException * if no parser could be found for the given id. * @throws org.apache.maven.doxia.parser.ParseException if the model could not be parsed. */ void parse( Reader source, String parserId, Sink sink ) throws ParserNotFoundException, ParseException; /** * Return a parser for the given parserId. * * @param parserId Identifier for the parser to use. * @return the parser defining by parserId. * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException * if no parser could be found for the given id. */ Parser getParser( String parserId ) throws ParserNotFoundException; } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/0000755000175000017500000000000011632765553024450 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkEventAttributeSet.java0000644000175000017500000002577011163510073031554 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.Collections; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.Map; import javax.swing.text.AttributeSet; /** * Implementation of MutableAttributeSet using a LinkedHashMap. * * @author ltheussl * @version $Id: SinkEventAttributeSet.java 759587 2009-03-28 21:01:47Z ltheussl $ * @since 1.1 */ public class SinkEventAttributeSet implements SinkEventAttributes, Cloneable { /** * An unmodifiable attribute set containing only an underline attribute. */ public static final SinkEventAttributes UNDERLINE; /** * An unmodifiable attribute set containing only an overline attribute. */ public static final SinkEventAttributes OVERLINE; /** * An unmodifiable attribute set containing only a linethrough attribute. */ public static final SinkEventAttributes LINETHROUGH; /** * An unmodifiable attribute set containing only a boxed attribute. */ public static final SinkEventAttributes BOXED; /** * An unmodifiable attribute set containing only a bold attribute. */ public static final SinkEventAttributes BOLD; /** * An unmodifiable attribute set containing only an italic attribute. */ public static final SinkEventAttributes ITALIC; /** * An unmodifiable attribute set containing only a monospaced attribute. */ public static final SinkEventAttributes MONOSPACED; /** * An unmodifiable attribute set containing only a left attribute. */ public static final SinkEventAttributes LEFT; /** * An unmodifiable attribute set containing only a right attribute. */ public static final SinkEventAttributes RIGHT; /** * An unmodifiable attribute set containing only a center attribute. */ public static final SinkEventAttributes CENTER; /** * An unmodifiable attribute set containing only a justify attribute. */ public static final SinkEventAttributes JUSTIFY; static { UNDERLINE = new SinkEventAttributeSet( new String[] {DECORATION, "underline"} ).unmodifiable(); OVERLINE = new SinkEventAttributeSet( new String[] {DECORATION, "overline"} ).unmodifiable(); LINETHROUGH = new SinkEventAttributeSet( new String[] {DECORATION, "line-through"} ).unmodifiable(); BOXED = new SinkEventAttributeSet( new String[] {DECORATION, "boxed"} ).unmodifiable(); BOLD = new SinkEventAttributeSet( new String[] {STYLE, "bold"} ).unmodifiable(); ITALIC = new SinkEventAttributeSet( new String[] {STYLE, "italic"} ).unmodifiable(); MONOSPACED = new SinkEventAttributeSet( new String[] {STYLE, "monospaced"} ).unmodifiable(); LEFT = new SinkEventAttributeSet( new String[] {ALIGN, "left"} ).unmodifiable(); RIGHT = new SinkEventAttributeSet( new String[] {ALIGN, "right"} ).unmodifiable(); CENTER = new SinkEventAttributeSet( new String[] {ALIGN, "center"} ).unmodifiable(); JUSTIFY = new SinkEventAttributeSet( new String[] {ALIGN, "justify"} ).unmodifiable(); } private Map attribs; private AttributeSet resolveParent; /** * Constructs a new, empty SinkEventAttributeSet with default size 5. */ public SinkEventAttributeSet() { this( 5 ); } /** * Constructs a new, empty SinkEventAttributeSet with the specified initial size. * * @param size the initial number of attribs. */ public SinkEventAttributeSet( int size ) { attribs = new LinkedHashMap( size ); } /** * Constructs a new SinkEventAttributeSet with the attribute name-value * mappings as given by the specified String array. * * @param attributes the specified String array. If the length of this array * is not an even number, an IllegalArgumentException is thrown. */ public SinkEventAttributeSet( String[] attributes ) { int n = attributes.length; if ( ( n % 2 ) != 0 ) { throw new IllegalArgumentException( "Missing attribute!" ); } attribs = new LinkedHashMap( n / 2 ); for ( int i = 0; i < n; i = i + 2 ) { attribs.put( attributes[i], attributes[i + 1] ); } } /** * Constructs a new SinkEventAttributeSet with the same attribute name-value * mappings as in the specified AttributeSet. * * @param attributes the specified AttributeSet. */ public SinkEventAttributeSet( AttributeSet attributes ) { attribs = new LinkedHashMap( attributes.getAttributeCount() ); Enumeration names = attributes.getAttributeNames(); while ( names.hasMoreElements() ) { Object name = names.nextElement(); attribs.put( name, attributes.getAttribute( name ) ); } } /** * Replace this AttributeSet by an unmodifiable view of itself. * Any subsequent attempt to add, remove or modify the underlying mapping * will result in an UnsupportedOperationException. * * @return an unmodifiable view of this AttributeSet. * * @since 1.1.1 */ public SinkEventAttributeSet unmodifiable() { this.attribs = Collections.unmodifiableMap( attribs ); return this; } /** * Checks whether the set of attribs is empty. * * @return true if the set is empty. */ public boolean isEmpty() { return attribs.isEmpty(); } /** {@inheritDoc} */ public int getAttributeCount() { return attribs.size(); } /** {@inheritDoc} */ public boolean isDefined( Object attrName ) { return attribs.containsKey( attrName ); } /** {@inheritDoc} */ public boolean isEqual( AttributeSet attr ) { return ( ( getAttributeCount() == attr.getAttributeCount() ) && containsAttributes( attr ) ); } /** {@inheritDoc} */ public AttributeSet copyAttributes() { return ( (AttributeSet) clone() ); } /** {@inheritDoc} */ public Enumeration getAttributeNames() { return Collections.enumeration( attribs.keySet() ); } /** {@inheritDoc} */ public Object getAttribute( Object key ) { Object value = attribs.get( key ); if ( value == null ) { AttributeSet parent = getResolveParent(); if ( parent != null ) { value = parent.getAttribute( key ); } } return value; } /** {@inheritDoc} */ public boolean containsAttribute( Object name, Object value ) { return value.equals( getAttribute( name ) ); } /** {@inheritDoc} */ public boolean containsAttributes( AttributeSet attributes ) { boolean result = true; Enumeration names = attributes.getAttributeNames(); while ( result && names.hasMoreElements() ) { Object name = names.nextElement(); result = attributes.getAttribute( name ).equals( getAttribute( name ) ); } return result; } /** * {@inheritDoc} * * Adds an attribute with the given name and value. */ public void addAttribute( Object name, Object value ) { attribs.put( name.toString(), value ); } /** {@inheritDoc} */ public void addAttributes( AttributeSet attributes ) { if ( attributes == null || attributes.getAttributeCount() == 0 ) { return; } Enumeration names = attributes.getAttributeNames(); while ( names.hasMoreElements() ) { Object name = names.nextElement(); addAttribute( name, attributes.getAttribute( name ) ); } } /** {@inheritDoc} */ public void removeAttribute( Object name ) { attribs.remove( name ); } /** {@inheritDoc} */ public void removeAttributes( Enumeration names ) { while ( names.hasMoreElements() ) { removeAttribute( names.nextElement() ); } } /** {@inheritDoc} */ public void removeAttributes( AttributeSet attributes ) { if ( attributes == null ) { return; } else if ( attributes == this ) { attribs.clear(); } else { Enumeration names = attributes.getAttributeNames(); while ( names.hasMoreElements() ) { Object name = names.nextElement(); Object value = attributes.getAttribute( name ); if ( value.equals( getAttribute( name ) ) ) { removeAttribute( name ); } } } } /** {@inheritDoc} */ public AttributeSet getResolveParent() { return this.resolveParent; } /** {@inheritDoc} */ public void setResolveParent( AttributeSet parent ) { this.resolveParent = parent; } /** {@inheritDoc} */ public Object clone() { SinkEventAttributeSet attr = new SinkEventAttributeSet( attribs.size() ); attr.attribs = new LinkedHashMap( attribs ); if ( resolveParent != null ) { attr.resolveParent = resolveParent.copyAttributes(); } return attr; } /** {@inheritDoc} */ public int hashCode() { final int parentHash = ( resolveParent == null ? 0 : resolveParent.hashCode() ); return attribs.hashCode() + parentHash; } /** {@inheritDoc} */ public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj instanceof SinkEventAttributeSet ) { return isEqual( (SinkEventAttributeSet) obj ); } return false; } /** {@inheritDoc} */ public String toString() { StringBuffer s = new StringBuffer(); Enumeration names = getAttributeNames(); while ( names.hasMoreElements() ) { String key = names.nextElement().toString(); String value = getAttribute( key ).toString(); s.append( ' ' ).append( key ).append( '=' ).append( value ); } return s.toString(); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java0000644000175000017500000001225411166632332030356 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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 javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.XmlMarkup; /** * An abstract Sink for xml markup syntax. * * @author Vincent Siveton * @version $Id: AbstractXmlSink.java 762690 2009-04-07 11:11:22Z ltheussl $ * @since 1.0 */ public abstract class AbstractXmlSink extends SinkAdapter implements XmlMarkup { /** Default namespace prepended to all tags */ private String nameSpace; /** * Sets the default namespace that is prepended to all tags written by this sink. * * @param ns the default namespace. * @since 1.1 */ public void setNameSpace( String ns ) { this.nameSpace = ns; } /** * Return the default namespace that is prepended to all tags written by this sink. * * @return the current default namespace. * @since 1.1 */ public String getNameSpace() { return this.nameSpace; } /** * Starts a Tag. For instance: *
     * <tag>
     * 
* * @param t a non null tag * @see #writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet) */ protected void writeStartTag( Tag t ) { writeStartTag ( t, null ); } /** * Starts a Tag with attributes. For instance: *
     * <tag attName="attValue">
     * 
* * @param t a non null tag. * @param att a set of attributes. May be null. * @see #writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, boolean). */ protected void writeStartTag( Tag t, MutableAttributeSet att ) { writeStartTag ( t, att, false ); } /** * Starts a Tag with attributes. For instance: *
     * <tag attName="attValue">
     * 
* * @param t a non null tag. * @param att a set of attributes. May be null. * @param isSimpleTag boolean to write as a simple tag. */ protected void writeStartTag( Tag t, MutableAttributeSet att, boolean isSimpleTag ) { if ( t == null ) { throw new IllegalArgumentException( "A tag is required" ); } StringBuffer sb = new StringBuffer(); sb.append( LESS_THAN ); if ( nameSpace != null ) { sb.append( nameSpace ).append( ':' ); } sb.append( t.toString() ); sb.append( SinkUtils.getAttributeString( att ) ); if ( isSimpleTag ) { sb.append( SPACE ).append( SLASH ); } sb.append( GREATER_THAN ); write( sb.toString() ); } /** * Writes a system EOL. * * @since 1.1 */ protected void writeEOL() { write( EOL ); } /** * Ends a Tag without writing an EOL. For instance:
</tag>
. * * @param t a tag. */ protected void writeEndTag( Tag t ) { if ( t == null ) { throw new IllegalArgumentException( "A tag is required" ); } StringBuffer sb = new StringBuffer(); sb.append( LESS_THAN ); sb.append( SLASH ); if ( nameSpace != null ) { sb.append( nameSpace ).append( ':' ); } sb.append( t.toString() ); sb.append( GREATER_THAN ); write( sb.toString() ); } /** * Starts a simple Tag. For instance: *
     * <tag />
     * 
* * @param t a non null tag * @see #writeSimpleTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet) */ protected void writeSimpleTag( Tag t ) { writeSimpleTag( t, null ); } /** * Starts a simple Tag with attributes. For instance: *
     * <tag attName="attValue" />
     * 
* * @param t a non null tag. * @param att a set of attributes. May be null. * @see #writeStartTag(javax.swing.text.html.HTML.Tag, javax.swing.text.MutableAttributeSet, boolean). */ protected void writeSimpleTag( Tag t, MutableAttributeSet att ) { writeStartTag ( t, att, true ); } /** * Write a text to the sink. * * @param text the given text to write */ protected abstract void write( String text ); } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java0000644000175000017500000015323111351662460030023 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import java.util.Set; import java.util.TreeSet; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML.Attribute; import javax.swing.text.html.HTML.Tag; import org.apache.maven.doxia.markup.HtmlMarkup; import org.apache.maven.doxia.markup.Markup; import org.apache.maven.doxia.util.DoxiaUtils; import org.apache.maven.doxia.util.HtmlTools; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; /** * Abstract base xhtml sink implementation. * * @author Jason van Zyl * @author ltheussl * @version $Id: XhtmlBaseSink.java 926049 2010-03-22 12:40:16Z ltheussl $ * @since 1.1 */ public class XhtmlBaseSink extends AbstractXmlSink implements HtmlMarkup { // ---------------------------------------------------------------------- // Instance fields // ---------------------------------------------------------------------- /** The PrintWriter to write the result. */ private final PrintWriter writer; /** Used to collect text events mainly for the head events. */ private StringBuffer textBuffer = new StringBuffer(); /** An indication on if we're inside a head. */ private boolean headFlag; /** An indication on if we're inside an image caption flag. */ private boolean figureCaptionFlag; /** An indication on if we're inside a paragraph flag. */ private boolean paragraphFlag; /** An indication on if we're in verbatim mode. */ private boolean verbatimFlag; /** Stack of alignment int[] of table cells. */ private final LinkedList cellJustifStack; /** Stack of justification of table cells. */ private final LinkedList isCellJustifStack; /** Stack of current table cell. */ private final LinkedList cellCountStack; /** Used to style successive table rows differently. */ private boolean evenTableRow = true; /** The stack of StringWriter to write the table result temporary, so we could play with the output DOXIA-177. */ private final LinkedList tableContentWriterStack; private final LinkedList tableCaptionWriterStack; private final LinkedList tableCaptionXMLWriterStack; /** The stack of table caption */ private final LinkedList tableCaptionStack; /** used to store attributes passed to table(). */ protected MutableAttributeSet tableAttributes; /** Used to distinguish old-style figure handling. */ private boolean legacyFigure; /** Used to distinguish old-style figure handling. */ private boolean legacyFigureCaption; /** Indicates that an image is part of a figure. */ private boolean inFigure; /** Flag to know if {@link #tableRows(int[], boolean)} is called or not. It is mainly to be backward compatible * with some plugins (like checkstyle) which uses: *
     * sink.table();
     * sink.tableRow();
     * 
* instead of *
     * sink.table();
     * sink.tableRows( justify, true );
     * sink.tableRow();
     * 
* */ protected boolean tableRows = false; /** Map of warn messages with a String as key to describe the error type and a Set as value. * Using to reduce warn messages. */ private Map warnMessages; // ---------------------------------------------------------------------- // Constructor // ---------------------------------------------------------------------- /** * Constructor, initialize the PrintWriter. * * @param out The writer to write the result. */ public XhtmlBaseSink( Writer out ) { this.writer = new PrintWriter( out ); this.cellJustifStack = new LinkedList(); this.isCellJustifStack = new LinkedList(); this.cellCountStack = new LinkedList(); this.tableContentWriterStack = new LinkedList(); this.tableCaptionWriterStack = new LinkedList(); this.tableCaptionXMLWriterStack = new LinkedList(); this.tableCaptionStack = new LinkedList(); init(); } // ---------------------------------------------------------------------- // Accessor methods // ---------------------------------------------------------------------- /** * To use mainly when playing with the head events. * * @return the current buffer of text events. */ protected StringBuffer getTextBuffer() { return this.textBuffer; } /** *

Setter for the field headFlag.

* * @param headFlag an header flag. */ protected void setHeadFlag( boolean headFlag ) { this.headFlag = headFlag; } /** *

isHeadFlag.

* * @return the current headFlag. */ protected boolean isHeadFlag() { return this.headFlag ; } /** *

Setter for the field verbatimFlag.

* * @param verb a verbatim flag. */ protected void setVerbatimFlag( boolean verb ) { this.verbatimFlag = verb; } /** *

isVerbatimFlag.

* * @return the current verbatim flag. */ protected boolean isVerbatimFlag() { return this.verbatimFlag ; } /** *

Setter for the field cellJustif.

* * @param justif the new cell justification array. */ protected void setCellJustif( int[] justif ) { this.cellJustifStack.addLast( justif ); this.isCellJustifStack.addLast( Boolean.TRUE ); } /** *

Getter for the field cellJustif.

* * @return the current cell justification array. */ protected int[] getCellJustif() { return (int[]) this.cellJustifStack.getLast(); } /** *

Setter for the field cellCount.

* * @param count the new cell count. */ protected void setCellCount( int count ) { this.cellCountStack.addLast( new Integer( count ) ); } /** *

Getter for the field cellCount.

* * @return the current cell count. */ protected int getCellCount() { return Integer.parseInt( this.cellCountStack.getLast().toString() ); } /** * Reset all variables. * * @deprecated since 1.1.2, use {@link #init()} instead of. */ protected void resetState() { init(); } /** {@inheritDoc} */ protected void init() { super.init(); resetTextBuffer(); this.headFlag = false; this.verbatimFlag = false; this.evenTableRow = true; this.cellJustifStack.clear(); this.isCellJustifStack.clear(); this.cellCountStack.clear(); this.tableContentWriterStack.clear(); this.tableCaptionWriterStack.clear(); this.tableCaptionXMLWriterStack.clear(); this.tableCaptionStack.clear(); this.headFlag = false; this.figureCaptionFlag = false; this.paragraphFlag = false; this.verbatimFlag = false; this.evenTableRow = true; this.tableAttributes = null; this.legacyFigure = false; this.legacyFigureCaption = false; this.inFigure = false; this.tableRows = false; this.warnMessages = null; } /** * Reset the text buffer. */ protected void resetTextBuffer() { this.textBuffer = new StringBuffer(); } // ---------------------------------------------------------------------- // Sections // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void section( int level, SinkEventAttributes attributes ) { onSection( level, attributes ); } /** {@inheritDoc} */ public void sectionTitle( int level, SinkEventAttributes attributes ) { onSectionTitle( level, attributes ); } /** {@inheritDoc} */ public void sectionTitle_( int level ) { onSectionTitle_( level ); } /** {@inheritDoc} */ public void section_( int level ) { onSection_( level ); } /** {@inheritDoc} */ public void section1() { onSection( SECTION_LEVEL_1, null ); } /** {@inheritDoc} */ public void sectionTitle1() { onSectionTitle( SECTION_LEVEL_1, null ); } /** {@inheritDoc} */ public void sectionTitle1_() { onSectionTitle_( SECTION_LEVEL_1 ); } /** {@inheritDoc} */ public void section1_() { onSection_( SECTION_LEVEL_1 ); } /** {@inheritDoc} */ public void section2() { onSection( SECTION_LEVEL_2, null ); } /** {@inheritDoc} */ public void sectionTitle2() { onSectionTitle( SECTION_LEVEL_2, null ); } /** {@inheritDoc} */ public void sectionTitle2_() { onSectionTitle_( SECTION_LEVEL_2 ); } /** {@inheritDoc} */ public void section2_() { onSection_( SECTION_LEVEL_2 ); } /** {@inheritDoc} */ public void section3() { onSection( SECTION_LEVEL_3, null ); } /** {@inheritDoc} */ public void sectionTitle3() { onSectionTitle( SECTION_LEVEL_3, null ); } /** {@inheritDoc} */ public void sectionTitle3_() { onSectionTitle_( SECTION_LEVEL_3 ); } /** {@inheritDoc} */ public void section3_() { onSection_( SECTION_LEVEL_3 ); } /** {@inheritDoc} */ public void section4() { onSection( SECTION_LEVEL_4, null ); } /** {@inheritDoc} */ public void sectionTitle4() { onSectionTitle( SECTION_LEVEL_4, null ); } /** {@inheritDoc} */ public void sectionTitle4_() { onSectionTitle_( SECTION_LEVEL_4 ); } /** {@inheritDoc} */ public void section4_() { onSection_( SECTION_LEVEL_4 ); } /** {@inheritDoc} */ public void section5() { onSection( SECTION_LEVEL_5, null ); } /** {@inheritDoc} */ public void sectionTitle5() { onSectionTitle( SECTION_LEVEL_5, null ); } /** {@inheritDoc} */ public void sectionTitle5_() { onSectionTitle_( SECTION_LEVEL_5 ); } /** {@inheritDoc} */ public void section5_() { onSection_( SECTION_LEVEL_5 ); } /** * Starts a section. The default class style is section. * * @param depth The level of the section. * @param attributes some attributes. May be null. * @see javax.swing.text.html.HTML.Tag#DIV */ protected void onSection( int depth, SinkEventAttributes attributes ) { if ( depth >= SECTION_LEVEL_1 && depth <= SECTION_LEVEL_5 ) { MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.CLASS, "section" ); // NOTE: any class entry in attributes will overwrite the above att.addAttributes( SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ) ); att.removeAttribute( Attribute.ID.toString() ); writeStartTag( HtmlMarkup.DIV, att ); } } /** * Ends a section. * * @param depth The level of the section. * @see javax.swing.text.html.HTML.Tag#DIV */ protected void onSection_( int depth ) { if ( depth >= SECTION_LEVEL_1 && depth <= SECTION_LEVEL_5 ) { writeEndTag( HtmlMarkup.DIV ); } } /** * Starts a section title. * * @param depth The level of the section title. * @param attributes some attributes. May be null. * @see javax.swing.text.html.HTML.Tag#H2 * @see javax.swing.text.html.HTML.Tag#H3 * @see javax.swing.text.html.HTML.Tag#H4 * @see javax.swing.text.html.HTML.Tag#H5 * @see javax.swing.text.html.HTML.Tag#H6 */ protected void onSectionTitle( int depth, SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_SECTION_ATTRIBUTES ); if ( depth == SECTION_LEVEL_1 ) { writeStartTag( HtmlMarkup.H2, atts ); } else if ( depth == SECTION_LEVEL_2 ) { writeStartTag( HtmlMarkup.H3, atts ); } else if ( depth == SECTION_LEVEL_3 ) { writeStartTag( HtmlMarkup.H4, atts ); } else if ( depth == SECTION_LEVEL_4 ) { writeStartTag( HtmlMarkup.H5, atts ); } else if ( depth == SECTION_LEVEL_5 ) { writeStartTag( HtmlMarkup.H6, atts ); } } /** * Ends a section title. * * @param depth The level of the section title. * @see javax.swing.text.html.HTML.Tag#H2 * @see javax.swing.text.html.HTML.Tag#H3 * @see javax.swing.text.html.HTML.Tag#H4 * @see javax.swing.text.html.HTML.Tag#H5 * @see javax.swing.text.html.HTML.Tag#H6 */ protected void onSectionTitle_( int depth ) { if ( depth == SECTION_LEVEL_1 ) { writeEndTag( HtmlMarkup.H2 ); } else if ( depth == SECTION_LEVEL_2 ) { writeEndTag( HtmlMarkup.H3 ); } else if ( depth == SECTION_LEVEL_3 ) { writeEndTag( HtmlMarkup.H4 ); } else if ( depth == SECTION_LEVEL_4 ) { writeEndTag( HtmlMarkup.H5 ); } else if ( depth == SECTION_LEVEL_5 ) { writeEndTag( HtmlMarkup.H6 ); } } // ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#UL */ public void list() { list( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#UL */ public void list( SinkEventAttributes attributes ) { if ( paragraphFlag ) { // The content of element type "p" must match // "(a|br|span|bdo|object|applet|img|map|iframe|tt|i|b|u|s|strike|big|small|font|basefont|em|strong| // dfn|code|q|samp|kbd|var|cite|abbr|acronym|sub|sup|input|select|textarea|label|button|ins|del|script)". paragraph_(); } MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); writeStartTag( HtmlMarkup.UL, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#UL */ public void list_() { writeEndTag( HtmlMarkup.UL ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#LI */ public void listItem() { listItem( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#LI */ public void listItem( SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); writeStartTag( HtmlMarkup.LI, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#LI */ public void listItem_() { writeEndTag( HtmlMarkup.LI ); } /** * The default list style depends on the numbering. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#OL */ public void numberedList( int numbering ) { numberedList( numbering, null ); } /** * The default list style depends on the numbering. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#OL */ public void numberedList( int numbering, SinkEventAttributes attributes ) { if ( paragraphFlag ) { // The content of element type "p" must match // "(a|br|span|bdo|object|applet|img|map|iframe|tt|i|b|u|s|strike|big|small|font|basefont|em|strong| // dfn|code|q|samp|kbd|var|cite|abbr|acronym|sub|sup|input|select|textarea|label|button|ins|del|script)". paragraph_(); } String style; switch ( numbering ) { case NUMBERING_UPPER_ALPHA: style = "upper-alpha"; break; case NUMBERING_LOWER_ALPHA: style = "lower-alpha"; break; case NUMBERING_UPPER_ROMAN: style = "upper-roman"; break; case NUMBERING_LOWER_ROMAN: style = "lower-roman"; break; case NUMBERING_DECIMAL: default: style = "decimal"; } MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_SECTION_ATTRIBUTES ); if ( atts == null ) { atts = new SinkEventAttributeSet( 1 ); } atts.addAttribute( Attribute.STYLE, "list-style-type: " + style ); writeStartTag( HtmlMarkup.OL, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#OL */ public void numberedList_() { writeEndTag( HtmlMarkup.OL ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#LI */ public void numberedListItem() { numberedListItem( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#LI */ public void numberedListItem( SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); writeStartTag( HtmlMarkup.LI, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#LI */ public void numberedListItem_() { writeEndTag( HtmlMarkup.LI ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DL */ public void definitionList() { definitionList( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DL */ public void definitionList( SinkEventAttributes attributes ) { if ( paragraphFlag ) { // The content of element type "p" must match // "(a|br|span|bdo|object|applet|img|map|iframe|tt|i|b|u|s|strike|big|small|font|basefont|em|strong| // dfn|code|q|samp|kbd|var|cite|abbr|acronym|sub|sup|input|select|textarea|label|button|ins|del|script)". paragraph_(); } MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); writeStartTag( HtmlMarkup.DL, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DL */ public void definitionList_() { writeEndTag( HtmlMarkup.DL ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DT */ public void definedTerm( SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); writeStartTag( HtmlMarkup.DT, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DT */ public void definedTerm() { definedTerm( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DT */ public void definedTerm_() { writeEndTag( HtmlMarkup.DT ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DD */ public void definition() { definition( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DD */ public void definition( SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); writeStartTag( HtmlMarkup.DD, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DD */ public void definition_() { writeEndTag( HtmlMarkup.DD ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#IMG * @deprecated Use {@link #figure(SinkEventAttributes)}, this method is only kept for * backward compatibility. Note that the behavior is different though, as this method * writes an img tag, while correctly the img tag should be written by figureGraphics(). */ public void figure() { write( String.valueOf( LESS_THAN ) + HtmlMarkup.IMG ); legacyFigure = true; } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#IMG */ public void figure( SinkEventAttributes attributes ) { inFigure = true; MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); if ( atts == null ) { atts = new SinkEventAttributeSet( 1 ); } if ( !atts.isDefined( SinkEventAttributes.CLASS ) ) { atts.addAttribute( SinkEventAttributes.CLASS, "figure" ); } writeStartTag( HtmlMarkup.DIV, atts ); } /** {@inheritDoc} */ public void figure_() { if ( legacyFigure ) { if ( !figureCaptionFlag ) { // Attribute "alt" is required and must be specified for element type "img". write( String.valueOf( SPACE ) + Attribute.ALT + EQUAL + QUOTE + QUOTE ); } write( String.valueOf( SPACE ) + SLASH + GREATER_THAN ); legacyFigure = false; } else { writeEndTag( HtmlMarkup.DIV ); inFigure = false; } figureCaptionFlag = false; } /** * {@inheritDoc} * @deprecated Use {@link #figureGraphics(String,SinkEventAttributes)}, * this method is only kept for backward compatibility. Note that the behavior is * different though, as this method does not write the img tag, only the src attribute. */ public void figureGraphics( String name ) { write( String.valueOf( SPACE ) + Attribute.SRC + EQUAL + QUOTE + escapeHTML( name ) + QUOTE ); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { if ( inFigure ) { MutableAttributeSet atts = new SinkEventAttributeSet( 1 ); atts.addAttribute( SinkEventAttributes.ALIGN, "center" ); writeStartTag( HtmlMarkup.P, atts ); } MutableAttributeSet filtered = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_IMG_ATTRIBUTES ); if ( filtered != null ) { filtered.removeAttribute( Attribute.SRC.toString() ); } int count = ( attributes == null ? 1 : attributes.getAttributeCount() + 1 ); MutableAttributeSet atts = new SinkEventAttributeSet( count ); atts.addAttribute( Attribute.SRC, escapeHTML( src ) ); atts.addAttributes( filtered ); if ( atts.getAttribute( Attribute.ALT.toString() ) == null ) { atts.addAttribute( Attribute.ALT.toString(), "" ); } writeStartTag( HtmlMarkup.IMG, atts, true ); if ( inFigure ) { writeEndTag( HtmlMarkup.P ); } } /** * {@inheritDoc} * @deprecated Use {@link #figureCaption(SinkEventAttributes)}, * this method is only kept for backward compatibility. Note that the behavior is * different though, as this method only writes an alt attribute. */ public void figureCaption() { figureCaptionFlag = true; write( String.valueOf( SPACE ) + Attribute.ALT + EQUAL + QUOTE ); legacyFigureCaption = true; } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { if ( legacyFigureCaption ) { write( String.valueOf( SPACE ) + Attribute.ALT + EQUAL + QUOTE ); legacyFigureCaption = false; figureCaptionFlag = true; } else { SinkEventAttributeSet atts = new SinkEventAttributeSet( 1 ); atts.addAttribute( SinkEventAttributes.ALIGN, "center" ); atts.addAttributes( SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ) ); paragraph( atts ); italic(); } } /** {@inheritDoc} */ public void figureCaption_() { if ( legacyFigureCaption ) { write( String.valueOf( QUOTE ) ); } else { italic_(); paragraph_(); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#P */ public void paragraph() { paragraph( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#P */ public void paragraph( SinkEventAttributes attributes ) { paragraphFlag = true; MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_SECTION_ATTRIBUTES ); writeStartTag( HtmlMarkup.P, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#P */ public void paragraph_() { if ( paragraphFlag ) { writeEndTag( HtmlMarkup.P ); paragraphFlag = false; } } /** * The default class style for boxed is source. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DIV * @see javax.swing.text.html.HTML.Tag#PRE */ public void verbatim( boolean boxed ) { if ( boxed ) { verbatim( SinkEventAttributeSet.BOXED ); } else { verbatim( null ); } } /** * The default class style for boxed is source. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DIV * @see javax.swing.text.html.HTML.Tag#PRE */ public void verbatim( SinkEventAttributes attributes ) { if ( paragraphFlag ) { // The content of element type "p" must match // "(a|br|span|bdo|object|applet|img|map|iframe|tt|i|b|u|s|strike|big|small|font|basefont|em|strong| // dfn|code|q|samp|kbd|var|cite|abbr|acronym|sub|sup|input|select|textarea|label|button|ins|del|script)". paragraph_(); } verbatimFlag = true; MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_VERBATIM_ATTRIBUTES ); if ( atts == null ) { atts = new SinkEventAttributeSet(); } boolean boxed = false; if ( atts.isDefined( SinkEventAttributes.DECORATION ) ) { boxed = "boxed".equals( atts.getAttribute( SinkEventAttributes.DECORATION ).toString() ); } if ( boxed ) { atts.addAttribute( Attribute.CLASS, "source" ); } atts.removeAttribute( SinkEventAttributes.DECORATION ); String width = (String) atts.getAttribute( Attribute.WIDTH.toString() ); atts.removeAttribute( Attribute.WIDTH.toString() ); writeStartTag( HtmlMarkup.DIV, atts ); if ( width != null ) { atts.addAttribute( Attribute.WIDTH.toString(), width ); } atts.removeAttribute( Attribute.ALIGN.toString() ); atts.removeAttribute( Attribute.CLASS.toString() ); writeStartTag( HtmlMarkup.PRE, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#DIV * @see javax.swing.text.html.HTML.Tag#PRE */ public void verbatim_() { writeEndTag( HtmlMarkup.PRE ); writeEndTag( HtmlMarkup.DIV ); verbatimFlag = false; } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#HR */ public void horizontalRule() { horizontalRule( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#HR */ public void horizontalRule( SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_HR_ATTRIBUTES ); writeSimpleTag( HtmlMarkup.HR, atts ); } /** {@inheritDoc} */ public void table() { // start table with tableRows table( null ); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { this.tableContentWriterStack.addLast( new StringWriter() ); this.tableRows = false; if ( paragraphFlag ) { // The content of element type "p" must match // "(a|br|span|bdo|object|applet|img|map|iframe|tt|i|b|u|s|strike|big|small|font|basefont|em|strong| // dfn|code|q|samp|kbd|var|cite|abbr|acronym|sub|sup|input|select|textarea|label|button|ins|del|script)". paragraph_(); } // start table with tableRows if ( attributes == null ) { this.tableAttributes = new SinkEventAttributeSet( 0 ); } else { this.tableAttributes = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_TABLE_ATTRIBUTES ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TABLE */ public void table_() { this.tableRows = false; writeEndTag( HtmlMarkup.TABLE ); if ( !this.cellCountStack.isEmpty() ) { this.cellCountStack.removeLast().toString(); } if ( this.tableContentWriterStack.isEmpty() ) { if ( getLog().isWarnEnabled() ) { getLog().warn( "No table content." ); } return; } String tableContent = this.tableContentWriterStack.removeLast().toString(); String tableCaption = null; if ( !this.tableCaptionStack.isEmpty() && this.tableCaptionStack.getLast() != null ) { tableCaption = this.tableCaptionStack.removeLast().toString(); } if ( tableCaption != null ) { // DOXIA-177 StringBuffer sb = new StringBuffer(); sb.append( tableContent.substring( 0, tableContent.indexOf( Markup.GREATER_THAN ) + 1 ) ); sb.append( tableCaption ); sb.append( tableContent.substring( tableContent.indexOf( Markup.GREATER_THAN ) + 1 ) ); write( sb.toString() ); } else { write( tableContent ); } } /** * The default class style is bodyTable. * The default align is center. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TABLE */ public void tableRows( int[] justification, boolean grid ) { this.tableRows = true; setCellJustif( justification ); if ( this.tableAttributes == null ) { this.tableAttributes = new SinkEventAttributeSet( 0 ); } MutableAttributeSet att = new SinkEventAttributeSet(); if ( !this.tableAttributes.isDefined( Attribute.BORDER.toString() ) ) { att.addAttribute( Attribute.BORDER, ( grid ? "1" : "0" ) ); } if ( !this.tableAttributes.isDefined( Attribute.CLASS.toString() ) ) { att.addAttribute( Attribute.CLASS, "bodyTable" ); } att.addAttributes( this.tableAttributes ); this.tableAttributes.removeAttributes( this.tableAttributes ); writeStartTag( HtmlMarkup.TABLE, att ); this.cellCountStack.addLast( new Integer( 0 ) ); } /** {@inheritDoc} */ public void tableRows_() { this.tableRows = false; if ( !this.cellJustifStack.isEmpty() ) { this.cellJustifStack.removeLast(); } if ( !this.isCellJustifStack.isEmpty() ) { this.isCellJustifStack.removeLast(); } this.evenTableRow = true; } /** * The default class style is a or b depending the row id. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TR */ public void tableRow() { // To be backward compatible if ( !this.tableRows ) { tableRows( null, false ); } tableRow( null ); } /** * The default class style is a or b depending the row id. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TR */ public void tableRow( SinkEventAttributes attributes ) { MutableAttributeSet att = new SinkEventAttributeSet(); if ( evenTableRow ) { att.addAttribute( Attribute.CLASS, "a" ); } else { att.addAttribute( Attribute.CLASS, "b" ); } att.addAttributes( SinkUtils.filterAttributes( attributes, SinkUtils.SINK_TR_ATTRIBUTES ) ); writeStartTag( HtmlMarkup.TR, att ); evenTableRow = !evenTableRow; if ( !this.cellCountStack.isEmpty() ) { this.cellCountStack.removeLast(); this.cellCountStack.addLast( new Integer( 0 ) ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TR */ public void tableRow_() { writeEndTag( HtmlMarkup.TR ); } /** {@inheritDoc} */ public void tableCell() { tableCell( (SinkEventAttributeSet) null ); } /** {@inheritDoc} */ public void tableHeaderCell() { tableHeaderCell( (SinkEventAttributeSet) null ); } /** {@inheritDoc} */ public void tableCell( String width ) { MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.WIDTH, width ); tableCell( false, att ); } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.WIDTH, width ); tableCell( true, att ); } /** {@inheritDoc} */ public void tableCell( SinkEventAttributes attributes ) { tableCell( false, attributes ); } /** {@inheritDoc} */ public void tableHeaderCell( SinkEventAttributes attributes ) { tableCell( true, attributes ); } /** * @param headerRow true if it is an header row * @param attributes the cell attributes * @see javax.swing.text.html.HTML.Tag#TH * @see javax.swing.text.html.HTML.Tag#TD */ private void tableCell( boolean headerRow, MutableAttributeSet attributes ) { Tag t = ( headerRow ? HtmlMarkup.TH : HtmlMarkup.TD ); MutableAttributeSet att = new SinkEventAttributeSet(); if ( attributes == null ) { attributes = new SinkEventAttributeSet( 0 ); } att.addAttributes( SinkUtils.filterAttributes( attributes, SinkUtils.SINK_TD_ATTRIBUTES ) ); writeStartTag( t, att ); } /** {@inheritDoc} */ public void tableCell_() { tableCell_( false ); } /** {@inheritDoc} */ public void tableHeaderCell_() { tableCell_( true ); } /** * Ends a table cell. * * @param headerRow true if it is an header row * @see javax.swing.text.html.HTML.Tag#TH * @see javax.swing.text.html.HTML.Tag#TD */ private void tableCell_( boolean headerRow ) { Tag t = ( headerRow ? HtmlMarkup.TH : HtmlMarkup.TD ); writeEndTag( t ); if ( !this.isCellJustifStack.isEmpty() && this.isCellJustifStack.getLast().equals( Boolean.TRUE ) && !this.cellCountStack.isEmpty() ) { int cellCount = Integer.parseInt( this.cellCountStack.removeLast().toString() ); this.cellCountStack.addLast( new Integer( ++cellCount ) ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#CAPTION */ public void tableCaption() { tableCaption( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#CAPTION */ public void tableCaption( SinkEventAttributes attributes ) { StringWriter sw = new StringWriter(); this.tableCaptionWriterStack.addLast( sw ); this.tableCaptionXMLWriterStack.addLast( new PrettyPrintXMLWriter( sw ) ); // TODO: tableCaption should be written before tableRows (DOXIA-177) MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_SECTION_ATTRIBUTES ); writeStartTag( HtmlMarkup.CAPTION, atts ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#CAPTION */ public void tableCaption_() { writeEndTag( HtmlMarkup.CAPTION ); if ( !this.tableCaptionXMLWriterStack.isEmpty() && this.tableCaptionXMLWriterStack.getLast() != null ) { this.tableCaptionStack.addLast( this.tableCaptionWriterStack.removeLast().toString() ); this.tableCaptionXMLWriterStack.removeLast(); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#A */ public void anchor( String name ) { anchor( name, null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#A */ public void anchor( String name, SinkEventAttributes attributes ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } if ( headFlag ) { return; } MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BASE_ATTRIBUTES ); String id = name; if ( !DoxiaUtils.isValidId( id ) ) { id = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + id + "'"; logMessage( "modifiedLink", msg ); } MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.NAME, id ); att.addAttributes( atts ); writeStartTag( HtmlMarkup.A, att ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#A */ public void anchor_() { if ( !headFlag ) { writeEndTag( HtmlMarkup.A ); } } /** {@inheritDoc} */ public void link( String name ) { link( name, null ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { if ( attributes == null ) { link( name, null, null ); } else { String target = (String) attributes.getAttribute( Attribute.TARGET.toString() ); MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_LINK_ATTRIBUTES ); link( name, target, atts ); } } /** * Adds a link with an optional target. * The default style class for external link is externalLink. * * @param href the link href. * @param target the link target, may be null. * @param attributes an AttributeSet, may be null. * This is supposed to be filtered already. * @see javax.swing.text.html.HTML.Tag#A */ private void link( String href, String target, MutableAttributeSet attributes ) { if ( href == null ) { throw new NullPointerException( "Link name cannot be null!" ); } if ( headFlag ) { return; } MutableAttributeSet att = new SinkEventAttributeSet(); if ( DoxiaUtils.isExternalLink( href ) ) { att.addAttribute( Attribute.CLASS, "externalLink" ); } att.addAttribute( Attribute.HREF, HtmlTools.escapeHTML( href ) ); if ( target != null ) { att.addAttribute( Attribute.TARGET, target ); } if ( attributes != null ) { attributes.removeAttribute( Attribute.HREF.toString() ); attributes.removeAttribute( Attribute.TARGET.toString() ); att.addAttributes( attributes ); } writeStartTag( HtmlMarkup.A, att ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#A */ public void link_() { if ( !headFlag ) { writeEndTag( HtmlMarkup.A ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#I */ public void italic() { if ( !headFlag ) { writeStartTag( HtmlMarkup.I ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#I */ public void italic_() { if ( !headFlag ) { writeEndTag( HtmlMarkup.I ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#B */ public void bold() { if ( !headFlag ) { writeStartTag( HtmlMarkup.B ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#B */ public void bold_() { if ( !headFlag ) { writeEndTag( HtmlMarkup.B ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TT */ public void monospaced() { if ( !headFlag ) { writeStartTag( HtmlMarkup.TT ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TT */ public void monospaced_() { if ( !headFlag ) { writeEndTag( HtmlMarkup.TT ); } } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#BR */ public void lineBreak() { lineBreak( null ); } /** * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#BR */ public void lineBreak( SinkEventAttributes attributes ) { if ( headFlag || isVerbatimFlag() ) { getTextBuffer().append( EOL ); } else { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_BR_ATTRIBUTES ); writeSimpleTag( HtmlMarkup.BR, atts ); } } /** {@inheritDoc} */ public void pageBreak() { comment( "PB" ); } /** {@inheritDoc} */ public void nonBreakingSpace() { if ( headFlag ) { getTextBuffer().append( ' ' ); } else { write( " " ); } } /** {@inheritDoc} */ public void text( String text ) { if ( headFlag ) { getTextBuffer().append( text ); } else if ( verbatimFlag ) { verbatimContent( text ); } else { content( text ); } } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { if ( attributes == null ) { text( text ); } else { if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "underline" ) ) { writeStartTag( HtmlMarkup.U ); } if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "line-through" ) ) { writeStartTag( HtmlMarkup.S ); } if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sub" ) ) { writeStartTag( HtmlMarkup.SUB ); } if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sup" ) ) { writeStartTag( HtmlMarkup.SUP ); } text( text ); if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sup" ) ) { writeEndTag( HtmlMarkup.SUP ); } if ( attributes.containsAttribute( SinkEventAttributes.VALIGN, "sub" ) ) { writeEndTag( HtmlMarkup.SUB ); } if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "line-through" ) ) { writeEndTag( HtmlMarkup.S ); } if ( attributes.containsAttribute( SinkEventAttributes.DECORATION, "underline" ) ) { writeEndTag( HtmlMarkup.U ); } } } /** {@inheritDoc} */ public void rawText( String text ) { if ( headFlag ) { getTextBuffer().append( text ); } else { write( text ); } } /** {@inheritDoc} */ public void comment( String comment ) { if ( StringUtils.isNotEmpty( comment ) && comment.indexOf( "--" ) != -1 ) { String originalComment = comment; // http://www.w3.org/TR/2000/REC-xml-20001006#sec-comments while ( comment.indexOf( "--" ) != -1 ) { comment = StringUtils.replace( comment, "--", "- -" ); } getLog() .warn( "[Xhtml Sink] Modified invalid comment: '" + originalComment + "' to '" + comment + "'" ); } StringBuffer buf = new StringBuffer( comment.length() + 9 ); buf.append( LESS_THAN ).append( BANG ).append( MINUS ).append( MINUS ).append( SPACE ); buf.append( comment ); buf.append( SPACE ).append( MINUS ).append( MINUS ).append( GREATER_THAN ); write( buf.toString() ); } /** * {@inheritDoc} * * Adding an unkown event, ie an event that was not recognized by a parser. * If {@link org.apache.maven.doxia.util.HtmlTools#getHtmlTag(String) HtmlTools.getHtmlTag( name )} * does not return null, the corresponding tag will be written. */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { if ( requiredParams == null || !( requiredParams[0] instanceof Integer ) ) { String msg = "No type information for unknown event: '" + name + "', ignoring!"; logMessage( "noTypeInfo", msg ); return; } int tagType = ( (Integer) requiredParams[0] ).intValue(); if ( tagType == ENTITY_TYPE ) { rawText( name ); return; } if ( tagType == CDATA_TYPE ) { rawText( EOL + "//" + EOL ); return; } Tag tag = HtmlTools.getHtmlTag( name ); if ( tag == null ) { String msg = "No HTML tag found for unknown event: '" + name + "', ignoring!"; logMessage( "noHtmlTag", msg ); } else { if ( tagType == TAG_TYPE_SIMPLE ) { writeSimpleTag( tag, escapeAttributeValues( attributes ) ); } else if ( tagType == TAG_TYPE_START ) { writeStartTag( tag, escapeAttributeValues( attributes ) ); } else if ( tagType == TAG_TYPE_END ) { writeEndTag( tag ); } else { String msg = "No type information for unknown event: '" + name + "', ignoring!"; logMessage( "noTypeInfo", msg ); } } } private SinkEventAttributes escapeAttributeValues( SinkEventAttributes attributes ) { SinkEventAttributeSet set = new SinkEventAttributeSet( attributes.getAttributeCount() ); Enumeration names = attributes.getAttributeNames(); while ( names.hasMoreElements() ) { Object name = names.nextElement(); set.addAttribute( name, escapeHTML( attributes.getAttribute( name ).toString() ) ); } return set; } /** {@inheritDoc} */ public void flush() { writer.flush(); } /** {@inheritDoc} */ public void close() { writer.close(); if ( getLog().isWarnEnabled() && this.warnMessages != null ) { for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); Set set = (Set) entry.getValue(); for ( Iterator it2 = set.iterator(); it2.hasNext(); ) { String msg = (String) it2.next(); getLog().warn( msg ); } } this.warnMessages = null; } init(); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * Write HTML escaped text to output. * * @param text The text to write. */ protected void content( String text ) { // small hack due to DOXIA-314 text = escapeHTML( text ); text = StringUtils.replace( text, "&#", "&#" ); write( text ); } /** * Write HTML escaped text to output. * * @param text The text to write. */ protected void verbatimContent( String text ) { write( escapeHTML( text ) ); } /** * 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, false ); } /** * Forward to HtmlTools.encodeURL( text ). * * @param text the String to encode, may be null. * @return the text encoded, null if null String input. * @see org.apache.maven.doxia.util.HtmlTools#encodeURL(String) */ protected static String encodeURL( String text ) { return HtmlTools.encodeURL( text ); } /** {@inheritDoc} */ protected void write( String text ) { if ( !this.tableCaptionXMLWriterStack.isEmpty() && this.tableCaptionXMLWriterStack.getLast() != null ) { ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).writeText( unifyEOLs( text ) ); } else if ( !this.tableContentWriterStack.isEmpty() && this.tableContentWriterStack.getLast() != null ) { ( (StringWriter) this.tableContentWriterStack.getLast() ).write( unifyEOLs( text ) ); } else { writer.write( unifyEOLs( text ) ); } } /** {@inheritDoc} */ protected void writeStartTag( Tag t, MutableAttributeSet att, boolean isSimpleTag ) { if ( this.tableCaptionXMLWriterStack.isEmpty() ) { super.writeStartTag ( t, att, isSimpleTag ); } else { String tag = ( getNameSpace() != null ? getNameSpace() + ":" : "" ) + t.toString(); ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).startElement( tag ); if ( att != null ) { Enumeration names = att.getAttributeNames(); while ( names.hasMoreElements() ) { Object key = names.nextElement(); Object value = att.getAttribute( key ); ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ) .addAttribute( key.toString(), value.toString() ); } } if ( isSimpleTag ) { ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).endElement(); } } } /** {@inheritDoc} */ protected void writeEndTag( Tag t ) { if ( this.tableCaptionXMLWriterStack.isEmpty() ) { super.writeEndTag( t ); } else { ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).endElement(); } } /** * If debug mode is enabled, log the msg as is, otherwise add unique msg in warnMessages. * * @param key not null * @param msg not null * @see #close() * @since 1.1.1 */ private void logMessage( String key, String msg ) { msg = "[XHTML Sink] " + msg; if ( getLog().isDebugEnabled() ) { getLog().debug( msg ); return; } if ( warnMessages == null ) { warnMessages = new HashMap(); } Set set = (Set) warnMessages.get( key ); if ( set == null ) { set = new TreeSet(); } set.add( msg ); warnMessages.put( key, set ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractSink.java0000644000175000017500000000607111244500235027666 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.logging.Log; import org.apache.maven.doxia.logging.SystemStreamLog; import org.apache.maven.doxia.markup.Markup; /** * An abstract base class that defines some convenience methods for sinks. * * @author ltheussl * @author Vincent Siveton * @version $Id: AbstractSink.java 807164 2009-08-24 11:59:25Z vsiveton $ * @since 1.1 */ public abstract class AbstractSink implements Sink, Markup { private Log logger; /** {@inheritDoc} */ public void enableLogging( Log log ) { this.logger = log; } /** * Returns a logger for this sink. * If no logger has been configured, a new SystemStreamLog is returned. * * @return Log */ protected Log getLog() { if ( logger == null ) { logger = new SystemStreamLog(); } return logger; } /** * Parses the given String and replaces all occurrences of * '\n', '\r' and '\r\n' with the system EOL. All Sinks should * make sure that text output is filtered through this method. * * @param text the text to scan. * @return a String that contains only System EOLs. */ protected static String unifyEOLs( String text ) { if ( text == null ) { return null; } int length = text.length(); StringBuffer buffer = new StringBuffer( length ); for ( int i = 0; i < length; i++ ) { if ( text.charAt( i ) == '\r' ) { if ( ( i + 1 ) < length && text.charAt( i + 1 ) == '\n' ) { i++; } buffer.append( EOL ); } else if ( text.charAt( i ) == '\n' ) { buffer.append( EOL ); } else { buffer.append( text.charAt( i ) ); } } return buffer.toString(); } /** * This is called in {@link #head()} or in {@link #close()}, and can be used * to set the sink into a clear state so it can be re-used. * * @since 1.1.2 */ protected void init() { // nop } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkAdapter.java0000644000175000017500000003511211151264317027506 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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 javax.swing.text.MutableAttributeSet; /** * Empty implementation of the Sink interface. Useful for testing purposes. * * @since 1.0 * @author Jason van Zyl * @author Vincent Siveton * @version $Id: SinkAdapter.java 747837 2009-02-25 15:50:39Z ltheussl $ */ public class SinkAdapter extends AbstractSink { /** {@inheritDoc} */ public void head() { // nop } /** {@inheritDoc} */ public void head_() { // nop } /** {@inheritDoc} */ public void body() { // nop } /** {@inheritDoc} */ public void body_() { // nop } /** {@inheritDoc} */ public void section1() { // nop } /** {@inheritDoc} */ public void section1_() { // nop } /** {@inheritDoc} */ public void section2() { // nop } /** {@inheritDoc} */ public void section2_() { // nop } /** {@inheritDoc} */ public void section3() { // nop } /** {@inheritDoc} */ public void section3_() { // nop } /** {@inheritDoc} */ public void section4() { // nop } /** {@inheritDoc} */ public void section4_() { // nop } /** {@inheritDoc} */ public void section5() { // nop } /** {@inheritDoc} */ public void section5_() { // nop } /** {@inheritDoc} */ public void list() { // nop } /** {@inheritDoc} */ public void list_() { // nop } /** {@inheritDoc} */ public void listItem() { // nop } /** {@inheritDoc} */ public void listItem_() { // nop } /** {@inheritDoc} */ public void numberedList( int numbering ) { // nop } /** {@inheritDoc} */ public void numberedList_() { // nop } /** {@inheritDoc} */ public void numberedListItem() { // nop } /** {@inheritDoc} */ public void numberedListItem_() { // nop } /** {@inheritDoc} */ public void definitionList() { // nop } /** {@inheritDoc} */ public void definitionList_() { // nop } /** {@inheritDoc} */ public void definitionListItem() { // nop } /** {@inheritDoc} */ public void definitionListItem_() { // nop } /** {@inheritDoc} */ public void definition() { // nop } /** {@inheritDoc} */ public void definition_() { // nop } /** {@inheritDoc} */ public void figure() { // nop } /** {@inheritDoc} */ public void figure_() { // nop } /** {@inheritDoc} */ public void table() { // nop } /** {@inheritDoc} */ public void table_() { // nop } /** {@inheritDoc} */ public void tableRows( int[] justification, boolean grid ) { // nop } /** {@inheritDoc} */ public void tableRows_() { // nop } /** {@inheritDoc} */ public void tableRow() { // nop } /** {@inheritDoc} */ public void tableRow_() { // nop } /** {@inheritDoc} */ public void title() { // nop } /** {@inheritDoc} */ public void title_() { // nop } /** {@inheritDoc} */ public void author() { // nop } /** {@inheritDoc} */ public void author_() { // nop } /** {@inheritDoc} */ public void date() { // nop } /** {@inheritDoc} */ public void date_() { // nop } /** {@inheritDoc} */ public void sectionTitle() { // nop } /** {@inheritDoc} */ public void sectionTitle_() { // nop } /** {@inheritDoc} */ public void sectionTitle1() { // nop } /** {@inheritDoc} */ public void sectionTitle1_() { // nop } /** {@inheritDoc} */ public void sectionTitle2() { // nop } /** {@inheritDoc} */ public void sectionTitle2_() { // nop } /** {@inheritDoc} */ public void sectionTitle3() { // nop } /** {@inheritDoc} */ public void sectionTitle3_() { // nop } /** {@inheritDoc} */ public void sectionTitle4() { // nop } /** {@inheritDoc} */ public void sectionTitle4_() { // nop } /** {@inheritDoc} */ public void sectionTitle5() { // nop } /** {@inheritDoc} */ public void sectionTitle5_() { // nop } /** {@inheritDoc} */ public void paragraph() { // nop } /** {@inheritDoc} */ public void paragraph_() { // nop } /** {@inheritDoc} */ public void verbatim( boolean boxed ) { // nop } /** {@inheritDoc} */ public void verbatim_() { // nop } /** {@inheritDoc} */ public void definedTerm() { // nop } /** {@inheritDoc} */ public void definedTerm_() { // nop } /** {@inheritDoc} */ public void figureCaption() { // nop } /** {@inheritDoc} */ public void figureCaption_() { // nop } /** {@inheritDoc} */ public void tableCell() { // nop } /** {@inheritDoc} */ public void tableCell( String width ) { // nop } /** {@inheritDoc} */ public void tableCell_() { // nop } /** {@inheritDoc} */ public void tableHeaderCell() { // nop } /** {@inheritDoc} */ public void tableHeaderCell( String width ) { // nop } /** {@inheritDoc} */ public void tableHeaderCell_() { // nop } /** {@inheritDoc} */ public void tableCaption() { // nop } /** {@inheritDoc} */ public void tableCaption_() { // nop } /** {@inheritDoc} */ public void figureGraphics( String name ) { // nop } /** {@inheritDoc} */ public void horizontalRule() { // nop } /** {@inheritDoc} */ public void pageBreak() { // nop } /** {@inheritDoc} */ public void anchor( String name ) { // nop } /** {@inheritDoc} */ public void anchor_() { // nop } /** {@inheritDoc} */ public void link( String name ) { // nop } /** {@inheritDoc} */ public void link_() { // nop } /** {@inheritDoc} */ public void italic() { // nop } /** {@inheritDoc} */ public void italic_() { // nop } /** {@inheritDoc} */ public void bold() { // nop } /** {@inheritDoc} */ public void bold_() { // nop } /** {@inheritDoc} */ public void monospaced() { // nop } /** {@inheritDoc} */ public void monospaced_() { // nop } /** {@inheritDoc} */ public void lineBreak() { // nop } /** {@inheritDoc} */ public void nonBreakingSpace() { // nop } /** {@inheritDoc} */ public void text( String text ) { // nop } /** {@inheritDoc} */ public void rawText( String text ) { // nop } /** {@inheritDoc} */ public void comment( String comment ) { // nop } /** {@inheritDoc} */ public void flush() { // nop } /** {@inheritDoc} */ public void close() { // nop } /** {@inheritDoc} */ public void head( SinkEventAttributes attributes ) { head(); } /** {@inheritDoc} */ public void title( SinkEventAttributes attributes ) { title(); } /** {@inheritDoc} */ public void author( SinkEventAttributes attributes ) { author(); } /** {@inheritDoc} */ public void date( SinkEventAttributes attributes ) { date(); } /** {@inheritDoc} */ public void body( SinkEventAttributes attributes ) { body(); } /** {@inheritDoc} */ public void section( int level, SinkEventAttributes attributes ) { if ( level == SECTION_LEVEL_1 ) { section1(); } else if ( level == SECTION_LEVEL_2 ) { section2(); } else if ( level == SECTION_LEVEL_3 ) { section3(); } else if ( level == SECTION_LEVEL_4 ) { section4(); } else if ( level == SECTION_LEVEL_5 ) { section5(); } } /** {@inheritDoc} */ public void section_( int level ) { if ( level == SECTION_LEVEL_1 ) { section1_(); } else if ( level == SECTION_LEVEL_2 ) { section2_(); } else if ( level == SECTION_LEVEL_3 ) { section3_(); } else if ( level == SECTION_LEVEL_4 ) { section4_(); } else if ( level == SECTION_LEVEL_5 ) { section5_(); } } /** {@inheritDoc} */ public void sectionTitle( int level, SinkEventAttributes attributes ) { if ( level == SECTION_LEVEL_1 ) { sectionTitle1(); } else if ( level == SECTION_LEVEL_2 ) { sectionTitle2(); } else if ( level == SECTION_LEVEL_3 ) { sectionTitle3(); } else if ( level == SECTION_LEVEL_4 ) { sectionTitle4(); } else if ( level == SECTION_LEVEL_5 ) { sectionTitle5(); } } /** {@inheritDoc} */ public void sectionTitle_( int level ) { if ( level == SECTION_LEVEL_1 ) { sectionTitle1_(); } else if ( level == SECTION_LEVEL_2 ) { sectionTitle2_(); } else if ( level == SECTION_LEVEL_3 ) { sectionTitle3_(); } else if ( level == SECTION_LEVEL_4 ) { sectionTitle4_(); } else if ( level == SECTION_LEVEL_5 ) { sectionTitle5_(); } } /** {@inheritDoc} */ public void list( SinkEventAttributes attributes ) { list(); } /** {@inheritDoc} */ public void listItem( SinkEventAttributes attributes ) { listItem(); } /** {@inheritDoc} */ public void numberedList( int numbering, SinkEventAttributes attributes ) { numberedList( numbering ); } /** {@inheritDoc} */ public void numberedListItem( SinkEventAttributes attributes ) { numberedListItem(); } /** {@inheritDoc} */ public void definitionList( SinkEventAttributes attributes ) { definitionList(); } /** {@inheritDoc} */ public void definitionListItem( SinkEventAttributes attributes ) { definitionListItem(); } /** {@inheritDoc} */ public void definition( SinkEventAttributes attributes ) { definition(); } /** {@inheritDoc} */ public void definedTerm( SinkEventAttributes attributes ) { definedTerm(); } /** {@inheritDoc} */ public void figure( SinkEventAttributes attributes ) { figure(); } /** {@inheritDoc} */ public void figureCaption( SinkEventAttributes attributes ) { figureCaption(); } /** {@inheritDoc} */ public void figureGraphics( String src, SinkEventAttributes attributes ) { figureGraphics( src ); } /** {@inheritDoc} */ public void table( SinkEventAttributes attributes ) { table(); } /** {@inheritDoc} */ public void tableRow( SinkEventAttributes attributes ) { tableRow(); } /** {@inheritDoc} */ public void tableCell( SinkEventAttributes attributes ) { tableCell(); } /** {@inheritDoc} */ public void tableHeaderCell( SinkEventAttributes attributes ) { tableHeaderCell(); } /** {@inheritDoc} */ public void tableCaption( SinkEventAttributes attributes ) { tableCaption(); } /** {@inheritDoc} */ public void paragraph( SinkEventAttributes attributes ) { paragraph(); } /** {@inheritDoc} */ public void verbatim( SinkEventAttributes attributes ) { MutableAttributeSet atts = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_VERBATIM_ATTRIBUTES ); boolean boxed = false; if ( atts != null && atts.isDefined( SinkEventAttributes.DECORATION ) ) { boxed = "boxed".equals( atts.getAttribute( SinkEventAttributes.DECORATION ).toString() ); } verbatim( boxed ); } /** {@inheritDoc} */ public void horizontalRule( SinkEventAttributes attributes ) { horizontalRule(); } /** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { anchor( name ); } /** {@inheritDoc} */ public void link( String name, SinkEventAttributes attributes ) { link( name ); } /** {@inheritDoc} */ public void lineBreak( SinkEventAttributes attributes ) { lineBreak(); } /** {@inheritDoc} */ public void text( String text, SinkEventAttributes attributes ) { text( text ); } /** {@inheritDoc} */ public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes ) { // nop } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractTextSinkFactory.java0000644000175000017500000000575011150512221032060 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.File; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import org.codehaus.plexus.util.WriterFactory; /** * An abstract SinkFactory for Text markup syntax. UTF-8 is used * when no encoding is specified. * * @author HervĂ© Boutemy * @author Benjamin Bentmann * @version $Id: AbstractTextSinkFactory.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.1 */ public abstract class AbstractTextSinkFactory implements SinkFactory { /** * Create a text Sink for a given encoding. * * @param writer The writer for the sink output, never null. * @param encoding The character encoding used by the writer. * @return a Sink for text output in the given encoding. */ protected abstract Sink createSink( Writer writer, String encoding ); /** {@inheritDoc} */ public Sink createSink( File outputDir, String outputName ) throws IOException { return createSink( outputDir, outputName, WriterFactory.UTF_8 ); } /** {@inheritDoc} */ public Sink createSink( File outputDir, String outputName, String encoding ) throws IOException { if ( outputDir == null ) { throw new IllegalArgumentException( "outputDir cannot be null." ); } if ( !outputDir.exists() ) { outputDir.mkdirs(); } else { if ( !outputDir.isDirectory() ) { throw new IllegalArgumentException( "The dir '" + outputDir + "' is not a directory." ); } } Writer writer = WriterFactory.newWriter( new File( outputDir, outputName ), encoding ); return createSink( writer, encoding ); } /** {@inheritDoc} */ public Sink createSink( OutputStream out ) throws IOException { return createSink( out, WriterFactory.UTF_8 ); } /** {@inheritDoc} */ public Sink createSink( OutputStream out, String encoding ) throws IOException { return createSink( new OutputStreamWriter( out, encoding ), encoding ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkUtils.java0000644000175000017500000002360611132225264027230 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.Enumeration; import java.util.Arrays; import javax.swing.text.AttributeSet; import javax.swing.text.MutableAttributeSet; import org.apache.maven.doxia.markup.Markup; /** * Collection of common utility methods for sinks. * * @author ltheussl * @version $Id: SinkUtils.java 733395 2009-01-10 23:09:40Z ltheussl $ * @since 1.1 */ public class SinkUtils { /** Do not instantiate. */ private SinkUtils() { // Utility class } /** * The set of base attributes. */ public static final String[] SINK_BASE_ATTRIBUTES = { SinkEventAttributes.CLASS, SinkEventAttributes.ID, SinkEventAttributes.LANG, SinkEventAttributes.STYLE, SinkEventAttributes.TITLE }; /** * The attributes that are supported for the br tag. */ public static final String[] SINK_BR_ATTRIBUTES = { SinkEventAttributes.CLASS, SinkEventAttributes.ID, SinkEventAttributes.STYLE, SinkEventAttributes.TITLE }; /** * The attributes that are supported for the <img> tag. */ public static final String[] SINK_IMG_ATTRIBUTES; /** * The attributes that are supported for the section tags, like <p>, <h2>, <div>. */ public static final String[] SINK_SECTION_ATTRIBUTES; /** * The attributes that are supported for the <div> and <pre> tags. */ public static final String[] SINK_VERBATIM_ATTRIBUTES; /** * The attributes that are supported for the <hr> tag. */ public static final String[] SINK_HR_ATTRIBUTES; /** * The attributes that are supported for the <a> tag. */ public static final String[] SINK_LINK_ATTRIBUTES; /** * The attributes that are supported for the <table> tag. */ public static final String[] SINK_TABLE_ATTRIBUTES; /** * The attributes that are supported for the <td> and <th> tags. */ public static final String[] SINK_TD_ATTRIBUTES; /** * The attributes that are supported for the <tr> tag. */ public static final String[] SINK_TR_ATTRIBUTES; private static final String[] IMG_ATTRIBUTES = { SinkEventAttributes.ALIGN, SinkEventAttributes.ALT, SinkEventAttributes.BORDER, SinkEventAttributes.HEIGHT, SinkEventAttributes.HSPACE, SinkEventAttributes.ISMAP, SinkEventAttributes.SRC, SinkEventAttributes.USEMAP, SinkEventAttributes.VSPACE, SinkEventAttributes.WIDTH }; private static final String[] HR_ATTRIBUTES = { SinkEventAttributes.ALIGN, SinkEventAttributes.NOSHADE, SinkEventAttributes.SIZE, SinkEventAttributes.WIDTH }; private static final String[] LINK_ATTRIBUTES = { SinkEventAttributes.CHARSET, SinkEventAttributes.COORDS, SinkEventAttributes.HREF, SinkEventAttributes.HREFLANG, SinkEventAttributes.REL, SinkEventAttributes.REV, SinkEventAttributes.SHAPE, SinkEventAttributes.TARGET, SinkEventAttributes.TYPE }; private static final String[] TABLE_ATTRIBUTES = { SinkEventAttributes.ALIGN, SinkEventAttributes.BGCOLOR, SinkEventAttributes.BORDER, SinkEventAttributes.CELLPADDING, SinkEventAttributes.CELLSPACING, SinkEventAttributes.FRAME, SinkEventAttributes.RULES, SinkEventAttributes.SUMMARY, SinkEventAttributes.WIDTH }; private static final String[] TABLE_CELL_ATTRIBUTES = { SinkEventAttributes.ABBRV, SinkEventAttributes.ALIGN, SinkEventAttributes.AXIS, SinkEventAttributes.BGCOLOR, SinkEventAttributes.COLSPAN, SinkEventAttributes.HEADERS, SinkEventAttributes.HEIGHT, SinkEventAttributes.NOWRAP, SinkEventAttributes.ROWSPAN, SinkEventAttributes.SCOPE, SinkEventAttributes.VALIGN, SinkEventAttributes.WIDTH }; static { SINK_IMG_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, IMG_ATTRIBUTES ); SINK_SECTION_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, new String[] {SinkEventAttributes.ALIGN} ); SINK_VERBATIM_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, new String[] {SinkEventAttributes.ALIGN, SinkEventAttributes.DECORATION, SinkEventAttributes.WIDTH} ); SINK_HR_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, HR_ATTRIBUTES ); SINK_LINK_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, LINK_ATTRIBUTES ); SINK_TABLE_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, TABLE_ATTRIBUTES ); SINK_TR_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, new String[] {SinkEventAttributes.ALIGN, SinkEventAttributes.BGCOLOR, SinkEventAttributes.VALIGN} ); SINK_TD_ATTRIBUTES = join( SINK_BASE_ATTRIBUTES, TABLE_CELL_ATTRIBUTES ); } private static String[] join( String[] a, String[] b ) { String[] temp = new String[a.length + b.length]; System.arraycopy( a, 0, temp, 0, a.length ); System.arraycopy( b, 0, temp, a.length, b.length ); Arrays.sort( temp ); // necessary for binary searches in filterAttributes() return temp; } /** * Utility method to get an AttributeSet as a String. * The resulting String is in the form ' name1="value1" name2="value2" ...', * ie it can be appended directly to an xml start tag. Attribute values that are itself * AttributeSets are ignored unless the Attribute name is SinkEventAttributeSet.STYLE, * in which case they are written as outlined at * {@link org.apache.maven.doxia.sink.SinkEventAttributes#STYLE SinkEventAttributes.STYLE}. * All other keys and values are written as Strings. * * @param att The AttributeSet. May be null, in which case an empty String is returned. * @return the AttributeSet as a String in a form that can be appended to an xml start tag. */ public static String getAttributeString( AttributeSet att ) { if ( att == null ) { return ""; } StringBuffer sb = new StringBuffer(); Enumeration names = att.getAttributeNames(); while ( names.hasMoreElements() ) { Object key = names.nextElement(); Object value = att.getAttribute( key ); if ( value instanceof AttributeSet ) { // Other AttributeSets are ignored if ( SinkEventAttributes.STYLE.equals( key.toString() ) ) { sb.append( Markup.SPACE ).append( key.toString() ).append( Markup.EQUAL ) .append( Markup.QUOTE ).append( asCssString( (AttributeSet) value ) ) .append( Markup.QUOTE ); } } else { sb.append( Markup.SPACE ).append( key.toString() ).append( Markup.EQUAL ) .append( Markup.QUOTE ).append( value.toString() ).append( Markup.QUOTE ); } } return sb.toString(); } private static String asCssString( AttributeSet att ) { StringBuffer sb = new StringBuffer(); Enumeration names = att.getAttributeNames(); while ( names.hasMoreElements() ) { Object key = names.nextElement(); Object value = att.getAttribute( key ); // don't go recursive if ( !( value instanceof AttributeSet ) ) { sb.append( key.toString() ).append( Markup.COLON ) .append( Markup.SPACE ).append( value.toString() ); if ( names.hasMoreElements() ) { sb.append( Markup.SEMICOLON ).append( Markup.SPACE ); } } } return sb.toString(); } /** * Filters the given AttributeSet. * Removes all attributes whose name (key) is not contained in the sorted array valids. * * @param attributes The AttributeSet to filter. The String values of Attribute names * are compared to the elements of the valids array. * @param valids a sorted array of attribute names that are to be kept in the resulting AttributeSet. * Note: a binary search is employed, so the array has to be sorted for correct results. * @return A filtered MutableAttributeSet object. Returns null if the input AttributeSet is null. * If the array of valids is either null or empty, an empty AttributeSet is returned. */ public static MutableAttributeSet filterAttributes( AttributeSet attributes, String[] valids ) { if ( attributes == null ) { return null; } if ( valids == null || valids.length == 0 ) { return new SinkEventAttributeSet( 0 ); } MutableAttributeSet atts = new SinkEventAttributeSet( attributes.getAttributeCount() ); Enumeration names = attributes.getAttributeNames(); while ( names.hasMoreElements() ) { String key = names.nextElement().toString(); if ( Arrays.binarySearch( valids, key ) >= 0 ) { atts.addAttribute( key, attributes.getAttribute( key ) ); } } return atts; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractBinarySinkFactory.java0000644000175000017500000000454011150512221032354 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import org.codehaus.plexus.util.WriterFactory; /** * An abstract SinkFactory for binary output. * * @author HervĂ© Boutemy * @version $Id: AbstractBinarySinkFactory.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.1 */ public abstract class AbstractBinarySinkFactory implements SinkFactory { /** {@inheritDoc} */ public Sink createSink( File outputDir, String outputName ) throws IOException { return createSink( outputDir, outputName, WriterFactory.UTF_8 ); } /** {@inheritDoc} */ public Sink createSink( File outputDir, String outputName, String encoding ) throws IOException { if ( outputDir == null ) { throw new IllegalArgumentException( "outputDir cannot be null." ); } if ( !outputDir.exists() ) { outputDir.mkdirs(); } else { if ( !outputDir.isDirectory() ) { throw new IllegalArgumentException( "The dir '" + outputDir + "' is not a directory." ); } } OutputStream out = new FileOutputStream( new File( outputDir, outputName ) ); return createSink( out, encoding ); } /** {@inheritDoc} */ public Sink createSink( OutputStream out ) throws IOException { return createSink( out, WriterFactory.UTF_8 ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractTextSink.java0000644000175000017500000000230611151246713030535 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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; /** * An abstract Sink for text markup syntax. * * @author Vincent Siveton * @version $Id: AbstractTextSink.java 747780 2009-02-25 13:55:23Z vsiveton $ */ public abstract class AbstractTextSink extends SinkAdapter implements TextMarkup { // nop } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/PipelineSink.java0000644000175000017500000000532711167436114027703 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.List; import java.util.Iterator; /** * May be used to invoke the same method on a List of Sinks. * * @author Trygve Laugstøl * @version $Id: PipelineSink.java 763762 2009-04-09 18:19:56Z ltheussl $ */ public class PipelineSink implements InvocationHandler { private List pipeline; /** * Constructs a PipelineSink for a given List of Sinks. * * @param pipeline A List of Sinks. */ public PipelineSink( List pipeline ) { this.pipeline = pipeline; } /** * Add a Sink to the List of Sinks. * * @param sink the Sink to add. */ public void addSink( Sink sink ) { pipeline.add( sink ); } /** * {@inheritDoc} * * Invoke a Method on this PipelineSink. * * @throws IllegalAccessException if any. * @throws InvocationTargetException if any. */ public Object invoke( Object proxy, Method method, Object[] args ) throws IllegalAccessException, InvocationTargetException { for ( Iterator it = pipeline.iterator(); it.hasNext(); ) { Sink sink = (Sink) it.next(); method.invoke( sink, args ); } return null; } /** * Returns an instance of a PipelineSink as a Sink. * * @param pipeline A List of Sinks. * @return a {@link org.apache.maven.doxia.sink.Sink} object. */ public static Sink newInstance( List pipeline ) { return (Sink) Proxy.newProxyInstance( PipelineSink.class.getClassLoader(), new Class[]{Sink.class}, new PipelineSink( pipeline ) ); } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSinkFactory.java0000644000175000017500000000375711150512221031701 0ustar twernertwernerpackage org.apache.maven.doxia.sink; /* * 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; /** * An abstract SinkFactory for XML markup syntax. UTF-8 is used * when no encoding is specified. * * @author Vincent Siveton * @version $Id: AbstractXmlSinkFactory.java 746978 2009-02-23 12:20:33Z vsiveton $ * @since 1.1 */ public abstract class AbstractXmlSinkFactory extends AbstractTextSinkFactory { /** * Create a text Sink for a given encoding and for a given language identifier. * * @param writer The writer for the sink output, never null. * @param encoding The character encoding used by the writer. * @param languageId language identifier for the root element as defined by * IETF BCP 47, Tags for the Identification of Languages; * in addition, the empty string may be specified. * @return a Sink for XML output in the given encoding. * @see http://www.w3.org/TR/REC-xml/#sec-lang-tag */ protected abstract Sink createSink( Writer writer, String encoding, String languageId ); } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/render/0000755000175000017500000000000011632765553025727 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/sink/render/RenderingContext.java0000644000175000017500000001235711216135717032053 0ustar twernertwernerpackage org.apache.maven.doxia.sink.render; /* * 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.File; import java.util.HashMap; import java.util.Locale; import java.util.Map; import org.codehaus.plexus.util.PathTool; import org.codehaus.plexus.util.StringUtils; /** *

RenderingContext class.

* * @author Jason van Zyl * @version $Id: RenderingContext.java 785531 2009-06-17 09:47:59Z ltheussl $ * @since 1.1 */ public class RenderingContext { private final File basedir; private final String inputName; private final String outputName; private final String parserId; private final String relativePath; private final String extension; private Map attributes; /** *

Constructor for RenderingContext.

* * @param basedir a {@link java.io.File} object. * @param document a {@link java.lang.String} object. */ public RenderingContext( File basedir, String document ) { this( basedir, document, null ); } /** *

Constructor for RenderingContext.

* * @param basedir a {@link java.io.File} object. * @param document a {@link java.lang.String} object. * @param parserId a {@link java.lang.String} object. */ public RenderingContext( File basedir, String document, String parserId ) { this( basedir, document, parserId, null ); } /** *

Constructor for RenderingContext.

* * @param basedir a {@link java.io.File} object. * @param document a {@link java.lang.String} object. * @param parserId a {@link java.lang.String} object. * @param extension a {@link java.lang.String} object. */ public RenderingContext( File basedir, String document, String parserId, String extension ) { this.basedir = basedir; this.extension = extension; if ( StringUtils.isNotEmpty( extension ) ) { // here we now the parserId we can play with this // index.xml -> index.html // index.xml.vm -> index.html // download.apt.vm --> download.html int startIndexOfExtension = document.toLowerCase( Locale.ENGLISH ).indexOf( "." + extension.toLowerCase( Locale.ENGLISH ) ); String fileNameWithoutExt = document.substring( 0, startIndexOfExtension ); this.outputName = fileNameWithoutExt + ".html"; } else { this.outputName = document.substring( 0, document.indexOf( "." ) ).replace( '\\', '/' ) + ".html"; } this.relativePath = PathTool.getRelativePath( basedir.getPath(), new File( basedir, document ).getPath() ); this.inputName = document; this.parserId = parserId; this.attributes = new HashMap(); } /** *

Getter for the field basedir.

* * @return a {@link java.io.File} object. */ public File getBasedir() { return basedir; } /** *

Getter for the field inputName.

* * @return a {@link java.lang.String} object. */ public String getInputName() { return inputName; } /** *

Getter for the field outputName.

* * @return a {@link java.lang.String} object. */ public String getOutputName() { return outputName; } /** *

Getter for the field parserId.

* * @return a {@link java.lang.String} object. */ public String getParserId() { return parserId; } /** *

Getter for the field relativePath.

* * @return a {@link java.lang.String} object. */ public String getRelativePath() { return relativePath; } /** *

setAttribute.

* * @param key a {@link java.lang.String} object. * @param value a {@link java.lang.String} object. */ public void setAttribute( String key, String value ) { attributes.put( key, value ); } /** *

getAttribute.

* * @param key a {@link java.lang.String} object. * @return a {@link java.lang.String} object. */ public String getAttribute( String key ) { return (String) attributes.get( key ); } /** *

Getter for the field extension.

* * @return a {@link java.lang.String} object. */ public String getExtension() { return extension; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/index/0000755000175000017500000000000011632765554024614 5ustar twernertwernerdoxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java0000644000175000017500000001527411245330530030040 0ustar twernertwernerpackage org.apache.maven.doxia.index; /* * 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.Stack; import org.apache.maven.doxia.util.HtmlTools; import org.apache.maven.doxia.sink.SinkAdapter; /** * A sink implementation for index. * * @author Trygve Laugstøl * @author Vincent Siveton * @version $Id: IndexingSink.java 808200 2009-08-26 22:04:08Z vsiveton $ */ public class IndexingSink extends SinkAdapter { /** Section 1. */ private static final int TYPE_SECTION_1 = 1; /** Section 2. */ private static final int TYPE_SECTION_2 = 2; /** Section 3. */ private static final int TYPE_SECTION_3 = 3; /** Section 4. */ private static final int TYPE_SECTION_4 = 4; /** Section 5. */ private static final int TYPE_SECTION_5 = 5; /** Defined term. */ private static final int TYPE_DEFINED_TERM = 6; /** Figure. */ private static final int TYPE_FIGURE = 7; /** Table. */ private static final int TYPE_TABLE = 8; /** Title. */ private static final int TITLE = 9; /** The current type. */ private int type; /** The current title. */ private String title; /** The stack. */ private final Stack stack; /** The current type. */ private IndexEntry currentEntry; /** * Default constructor. * * @param sectionEntry The first index entry. */ public IndexingSink( IndexEntry sectionEntry ) { stack = new Stack(); stack.push( sectionEntry ); init(); } /** *

Getter for the field title.

* * @return the title */ public String getTitle() { return title; } // ---------------------------------------------------------------------- // Sink Overrides // ---------------------------------------------------------------------- /** {@inheritDoc} */ public void title() { this.type = TITLE; } /** {@inheritDoc} */ public void sectionTitle1() { this.currentEntry = null; this.type = TYPE_SECTION_1; } /** {@inheritDoc} */ public void title_() { this.type = 0; } public void sectionTitle1_() { this.type = 0; } /** {@inheritDoc} */ public void section1_() { pop(); } /** {@inheritDoc} */ public void sectionTitle2() { this.currentEntry = null; this.type = TYPE_SECTION_2; } public void sectionTitle2_() { this.type = 0; } /** {@inheritDoc} */ public void section2_() { pop(); } /** {@inheritDoc} */ public void sectionTitle3() { this.currentEntry = null; this.type = TYPE_SECTION_3; } public void sectionTitle3_() { this.type = 0; } /** {@inheritDoc} */ public void section3_() { pop(); } /** {@inheritDoc} */ public void sectionTitle4() { this.currentEntry = null; this.type = TYPE_SECTION_4; } public void sectionTitle4_() { this.type = 0; } /** {@inheritDoc} */ public void section4_() { pop(); } /** {@inheritDoc} */ public void sectionTitle5() { this.currentEntry = null; this.type = TYPE_SECTION_5; } public void sectionTitle5_() { this.type = 0; } /** {@inheritDoc} */ public void section5_() { pop(); } // public void definedTerm() // { // type = TYPE_DEFINED_TERM; // } // // public void figureCaption() // { // type = TYPE_FIGURE; // } // // public void tableCaption() // { // type = TYPE_TABLE; // } /** {@inheritDoc} */ public void text( String text ) { switch ( this.type ) { case TITLE: this.title = text; break; case TYPE_SECTION_1: case TYPE_SECTION_2: case TYPE_SECTION_3: case TYPE_SECTION_4: case TYPE_SECTION_5: // ----------------------------------------------------------------------- // Sanitize the id. The most important step is to remove any blanks // ----------------------------------------------------------------------- if ( this.currentEntry == null ) { this.currentEntry = new IndexEntry( peek(), HtmlTools.encodeId( text ) ); this.currentEntry.setTitle( text ); push( currentEntry ); } else { IndexEntry entry = (IndexEntry) stack.lastElement(); String title = currentEntry.getTitle() + text; title = title.replaceAll( "[\\r\\n]+", "" ); entry.setId( HtmlTools.encodeId( title ) ); entry.setTitle( title ); } break; // Dunno how to handle these yet case TYPE_DEFINED_TERM: case TYPE_FIGURE: case TYPE_TABLE: default: break; } } /** * Pushes an IndexEntry onto the top of this stack. * * @param entry to put. */ public void push( IndexEntry entry ) { stack.push( entry ); } /** * Removes the IndexEntry at the top of this stack. */ public void pop() { stack.pop(); } /** *

peek.

* * @return Looks at the IndexEntry at the top of this stack. */ public IndexEntry peek() { return (IndexEntry) stack.peek(); } /** {@inheritDoc} */ public void close() { super.close(); init(); } /** {@inheritDoc} */ protected void init() { this.type = 0; this.title = null; } } doxia-1.1.4/doxia-core/src/main/java/org/apache/maven/doxia/index/IndexEntry.java0000644000175000017500000001536711244765230027552 0ustar twernertwernerpackage org.apache.maven.doxia.index; /* * 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; import java.util.Iterator; import java.util.Collections; import org.codehaus.plexus.util.StringUtils; /** *

IndexEntry class.

* * @author Trygve Laugstøl * @version $Id: IndexEntry.java 807625 2009-08-25 13:43:52Z vsiveton $ */ public class IndexEntry { /** The parent entry. */ private final IndexEntry parent; /** The id of the entry. */ private String id; /** The entry title. */ private String title; /** The child entries. */ private List childEntries = new ArrayList(); /** System-dependent EOL. */ private static final String EOL = System.getProperty( "line.separator" ); /** * Constructor. * * @param newId The id. May be null. */ public IndexEntry( String newId ) { this( null, newId ); } /** * Constructor. * * @param newParent The parent. May be null. * @param newId The id. May be null. */ public IndexEntry( IndexEntry newParent, String newId ) { this.parent = newParent; this.id = newId; if ( parent != null ) { parent.childEntries.add( this ); } } /** * Returns the parent entry. * * @return the parent entry. */ public IndexEntry getParent() { return parent; } /** * Returns the id. * * @return the id. */ public String getId() { return id; } /** * Set the id. * * @since 1.1.2 */ protected void setId( String id ) { this.id = id; } /** * Returns the title. * * @return the title. */ public String getTitle() { return title; } /** * Sets the title. * * @param newTitle the title. */ public void setTitle( String newTitle ) { this.title = newTitle; } /** * Returns an unmodifiableList of the child entries. * * @return child entries. */ public List getChildEntries() { return Collections.unmodifiableList( childEntries ); } /** * Sets the child entries or creates a new ArrayList if entries == null. * * @param entries the entries. */ public void setChildEntries( List entries ) { if ( entries == null ) { childEntries = new ArrayList(); } this.childEntries = entries; } // ----------------------------------------------------------------------- // Utils // ----------------------------------------------------------------------- /** * Returns the next entry. * * @return the next entry, or null if there is none. */ public IndexEntry getNextEntry() { if ( parent == null ) { return null; } List entries = parent.getChildEntries(); int index = entries.indexOf( this ); if ( index + 1 >= entries.size() ) { return null; } return (IndexEntry) entries.get( index + 1 ); } /** * Returns the previous entry. * * @return the previous entry, or null if there is none. */ public IndexEntry getPrevEntry() { if ( parent == null ) { return null; } List entries = parent.getChildEntries(); int index = entries.indexOf( this ); if ( index == 0 ) { return null; } return (IndexEntry) entries.get( index - 1 ); } /** * Returns the first entry. * * @return the first entry, or null if there is none. */ public IndexEntry getFirstEntry() { List entries = getChildEntries(); if ( entries.size() == 0 ) { return null; } return (IndexEntry) entries.get( 0 ); } /** * Returns the last entry. * * @return the last entry, or null if there is none. */ public IndexEntry getLastEntry() { List entries = getChildEntries(); if ( entries.size() == 0 ) { return null; } return (IndexEntry) entries.get( entries.size() - 1 ); } /** * Returns the root entry. * * @return the root entry, or null if there is none. */ public IndexEntry getRootEntry() { List entries = getChildEntries(); if ( entries.size() == 0 ) { return null; } else if ( entries.size() > 1 ) { throw new RuntimeException( "This index has more than one root entry" ); } else { return (IndexEntry) entries.get( 0 ); } } // ----------------------------------------------------------------------- // Object Overrides // ----------------------------------------------------------------------- /** * {@inheritDoc} * * Returns a string representation of the object. */ public String toString() { return toString( 0 ); } /** * Returns a string representation of all objects to the given depth. * * @param depth The depth to descent to. * @return A string. */ public String toString( int depth ) { StringBuffer message = new StringBuffer(); message.append( "Id: " ).append( id ); if ( StringUtils.isNotEmpty( title ) ) { message.append( ", title: " ).append( title ); } message.append( EOL ); String indent = ""; for ( int i = 0; i < depth; i++ ) { indent += " "; } for ( Iterator it = getChildEntries().iterator(); it.hasNext(); ) { IndexEntry entry = (IndexEntry) it.next(); message.append( indent ).append( entry.toString( depth + 1 ) ); } return message.toString(); } } doxia-1.1.4/doxia-maven-plugin/0000755000175000017500000000000011632765550016275 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/pom.xml0000644000175000017500000001471311470562366017620 0ustar twernertwerner 4.0.0 org.apache.maven.doxia doxia 1.1.4 ../pom.xml doxia-maven-plugin maven-plugin Doxia :: Maven Plugin A Maven plugin for Doxia. 2.0.2 org.apache.maven maven-plugin-api 2.0 ${project.groupId} doxia-book ${projectVersion} ${project.groupId} doxia-core ${projectVersion} ${project.groupId} doxia-logging-api ${projectVersion} org.apache.maven.doxia doxia-module-apt ${projectVersion} org.apache.maven.doxia doxia-module-docbook-simple ${projectVersion} org.apache.maven.doxia doxia-module-itext ${projectVersion} org.apache.maven.doxia doxia-module-latex ${projectVersion} org.apache.maven.doxia doxia-module-xdoc ${projectVersion} org.apache.maven.doxia doxia-module-xhtml ${projectVersion} org.apache.maven.doxia doxia-decoration-model 1.1.2 org.codehaus.plexus plexus-utils org.apache.maven.shared maven-doxia-tools 1.0.1 org.apache.maven.doxia doxia-decoration-model org.apache.maven.plugins maven-plugin-plugin 2.5.1 org.apache.maven.plugins maven-shade-plugin 1.2.2 org.apache.maven.plugins maven-shade-plugin package shade ${project.build.finalName} false true org.apache.maven.doxia:doxia-sink-api org.apache.maven.doxia:doxia-logging-api org.codehaus.mojo clirr-maven-plugin 1.1 org/apache/maven/doxia/logging/** org/apache/maven/doxia/sink/** org/codehaus/doxia/sink/** org.apache.maven.plugins maven-plugin-plugin generated-helpmojo helpmojo org.apache.maven.plugins maven-plugin-plugin 2.5.1 doxia-1.1.4/doxia-maven-plugin/src/0000755000175000017500000000000011632765550017064 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/site/0000755000175000017500000000000011632765550020030 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/site/apt/0000755000175000017500000000000011632765550020614 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/site/apt/usage.apt.vm0000644000175000017500000000246711237300613023042 0ustar twernertwerner ----- Usage ----- Lukas Theussl ----- Usage Below is a sample pom.xml illustrate how to use it. +------------------------------------------------------ org.apache.maven.doxia doxia-maven-plugin ${project.version} pre-site render-books src/books/example-book src/books/example-book.xml latex xdoc pdf rtf +------------------------------------------------------ See also the sample given on the main Doxia {{{http://maven.apache.org/doxia/book/index.html}site}}. doxia-1.1.4/doxia-maven-plugin/src/site/apt/index.apt0000644000175000017500000000647111237301120022415 0ustar twernertwerner ----- Doxia Maven Plugin ----- Lukas Theussl ----- ~~ 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 Introduction Doxia allows you to write books like user manuals and guides in any format supported by Doxia. Combined with the Doxia Book Maven you are able to include the manuals directly in your generated site with links to the off-line friendly formats like XDoc, PDF, RTF and LaTeX. * Goals Overview The Doxia Maven Plugin has one goal: * {{{./render-books-mojo.html}doxia:render-books}} to create books in different output formats. First you need a simple book descriptor which is used to specify the layout of your book, i.e. the ordering of the sections and the names for the chapters. See {{{http://maven.apache.org/doxia/book/index.html}The Book Descriptor Reference}} for a reference to the descriptor. * Usage General instructions on how to use the Doxia Maven Plugin can be found on the {{{./usage.html}usage page}}. Some more specific use cases are described in the examples given below. Last but not least, users occasionally contribute additional examples, tips or errata to the {{{http://docs.codehaus.org/display/MAVENUSER/PDF+Plugin}plugin's wiki page}}. In case you still have questions regarding the plugin's usage, please have a look at the {{{./faq.html}FAQ}} and feel free to contact the {{{./mail-lists.html}user mailing list}}. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the {{{./mail-lists.html}mail archive}}. If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our {{{./issue-tracking.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our {{{./source-repository.html}source repository}} and will find supplementary information in the {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}. * Examples An Xdoc output example which has been rendered into this site can be viewed {{{http://maven.apache.org/doxia/doxia-example-book/index.html}here}}. doxia-1.1.4/doxia-maven-plugin/src/site/site.xml0000644000175000017500000000263511237301120021500 0ustar twernertwerner doxia-1.1.4/doxia-maven-plugin/src/main/0000755000175000017500000000000011632765550020010 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/main/java/0000755000175000017500000000000011632765550020731 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/main/java/org/0000755000175000017500000000000011632765550021520 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/0000755000175000017500000000000011632765550022741 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/maven/0000755000175000017500000000000011632765550024047 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/0000755000175000017500000000000011632765550025153 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/0000755000175000017500000000000011632765550026451 5ustar twernertwernerdoxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/Format.java0000644000175000017500000000246211142164566030544 0ustar twernertwernerpackage org.apache.maven.doxia.plugin; /* * 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. */ /** * A model for a supported output format. * * @author Trygve Laugstøl * @version $Id: Format.java 740545 2009-02-04 01:03:50Z vsiveton $ * @since 1.0 */ public class Format { /** A unique identifier for the format. */ private String id; /** * Returns the (unique) identifier of this format. * * @return the identifier. */ public String getId() { return id; } } doxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/Book.java0000644000175000017500000000443511142164566030210 0ustar twernertwernerpackage org.apache.maven.doxia.plugin; /* * 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; /** * A model for a Book. * * @author Trygve Laugstøl * @version $Id: Book.java 740545 2009-02-04 01:03:50Z vsiveton $ * @since 1.0 */ public class Book { /** Path to the book descriptor file. */ private String descriptor; /** The list of formats to produce. */ private List formats; /** The base directory of source files. */ private String directory; /** Files to include. */ private List includes; /** Files to exclude. */ private List excludes; /** * Returns the path to the book descriptor file. * * @return the book descriptor file. */ public String getDescriptor() { return descriptor; } /** * Returns the list of {@link Format}s to produce. * * @return the list of formats. */ public List getFormats() { return formats; } /** * Returns the base directory of source files. * * @return the base directory. */ public String getDirectory() { return directory; } /** * Returns the list of files to include. * * @return the list of files to include. */ public List getIncludes() { return includes; } /** * Returns the list of files to exclude. * * @return the list of files to exclude. */ public List getExcludes() { return excludes; } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootdoxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.javadoxia-1.1.4/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java0000644000175000017500000002565611242734614033353 0ustar twernertwernerpackage org.apache.maven.doxia.plugin; /* * 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.book.BookDoxia; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.InvalidBookDescriptorException; import org.apache.maven.doxia.book.model.BookModel; import org.apache.maven.doxia.book.services.validation.ValidationResult; import org.apache.maven.doxia.tools.SiteTool; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.List; import java.util.Locale; /** * A Mojo to create books in different output formats. * * @goal render-books * @author Trygve Laugstøl * @version $Id: DoxiaRenderBooksMojo.java 805701 2009-08-19 08:36:28Z ltheussl $ * @since 1.0 */ public class DoxiaRenderBooksMojo extends AbstractMojo { /** System EOL. */ private static final String LINE_SEPARATOR = System.getProperty( "line.separator" ); // ---------------------------------------------------------------------- // Mojo components // ---------------------------------------------------------------------- /** * BookDoxia component * * @component */ private BookDoxia bookDoxia; /** * SiteTool. * * @component */ protected SiteTool siteTool; // ---------------------------------------------------------------------- // Mojo parameters // ---------------------------------------------------------------------- /** * A list of books. * * @parameter * @required */ private List books; /** * Base directory of the project. * * @parameter default-value="${basedir}" */ private File basedir; /** * Directory containing the generated project docs. * * @parameter default-value="${project.build.directory}/generated-site" */ private File generatedDocs; /** * A comma separated list of locales supported by Maven. The first valid token will be the default Locale * for this instance of the Java Virtual Machine. * * @parameter default-value="${locales}" */ protected String locales; /** * Specifies the input encoding. * * @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}" */ private String inputEncoding; /** * Specifies the output encoding. * * @parameter expression="${outputEncoding}" default-value="${project.reporting.outputEncoding}" */ private String outputEncoding; // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- /** * {@inheritDoc} * * Executes the Mojo. */ public void execute() throws MojoExecutionException, MojoFailureException { for ( Iterator it = books.iterator(); it.hasNext(); ) { Book book = (Book) it.next(); // ---------------------------------------------------------------------- // Validate // ---------------------------------------------------------------------- if ( StringUtils.isEmpty( book.getDescriptor() ) ) { throw new MojoFailureException( "Invalid configuration: " + "The book is required to have a descriptor set." ); } if ( StringUtils.isEmpty( book.getDirectory() ) ) { throw new MojoFailureException( "Invalid configuration: " + "The book is required to have a directory set." ); } if ( book.getFormats() == null || book.getFormats().size() == 0 ) { throw new MojoFailureException( "Invalid configuration: " + "The book is required to have at least one format set." ); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- File descriptor = new File( basedir, book.getDescriptor() ); String includes = ""; if ( book.getIncludes() != null ) { for ( Iterator j = book.getIncludes().iterator(); j.hasNext(); ) { String include = (String) j.next(); includes += include + ","; } } else { includes = "**/*"; } String excludes = ""; if ( book.getExcludes() != null ) { for ( Iterator j = book.getExcludes().iterator(); j.hasNext(); ) { String exclude = (String) j.next(); excludes += exclude + ","; } } // ---------------------------------------------------------------------- // Find all the files to pass to the renderer. // ---------------------------------------------------------------------- if ( getLog().isDebugEnabled() ) { getLog().debug( "Locating files to include in the book:" ); getLog().debug( "Basedir: " + basedir ); getLog().debug( "Includes: " + includes ); getLog().debug( "Excludes: " + excludes ); } List files; try { files = FileUtils.getFiles( new File( basedir, book.getDirectory() ), includes, excludes ); } catch ( IOException e ) { throw new MojoExecutionException( "Error while looking for input files. " + "Basedir=" + basedir.getAbsolutePath() + ", " + "includes=" + includes + ", " + "excludes=" + excludes, e ); } // ----------------------------------------------------------------------- // Load the model // ----------------------------------------------------------------------- BookModel bookModel; try { bookModel = bookDoxia.loadBook( descriptor ); } catch ( InvalidBookDescriptorException e ) { throw new MojoFailureException( "Invalid book descriptor: " + LINE_SEPARATOR + formatResult( e.getValidationResult() ) ); } catch ( BookDoxiaException e ) { throw new MojoExecutionException( "Error while loading the book descriptor", e ); } // ----------------------------------------------------------------------- // Render the book in all the formats // ----------------------------------------------------------------------- List localesList = siteTool.getAvailableLocales( locales ); // Default is first in the list Locale defaultLocale = (Locale) localesList.get( 0 ); Locale.setDefault( defaultLocale ); for ( Iterator iterator = localesList.iterator(); iterator.hasNext(); ) { Locale locale = (Locale) iterator.next(); for ( Iterator j = book.getFormats().iterator(); j.hasNext(); ) { Format format = (Format) j.next(); File outputDirectory = new File( generatedDocs, format.getId() ); File directory = new File( outputDirectory + "/" + locale.toString(), bookModel.getId() ); if ( locale.equals( defaultLocale ) ) { directory = new File( outputDirectory, bookModel.getId() ); } try { bookDoxia.renderBook( bookModel, format.getId(), files, directory, locale, getInputEncoding(), getOutputEncoding() ); } catch ( BookDoxiaException e ) { throw new MojoExecutionException( "Error while generating book in format '" + format.getId() + "'.", e ); } } } } } /** * Gets the input files encoding. * * @return The input files encoding, never null. * @since 1.1 */ protected String getInputEncoding() { return ( inputEncoding == null ) ? ReaderFactory.ISO_8859_1 : inputEncoding; } /** * Gets the effective reporting output files encoding. * * @return The effective reporting output file encoding, never null. * @since 1.1 */ protected String getOutputEncoding() { return ( outputEncoding == null ) ? ReaderFactory.UTF_8 : outputEncoding; } /** * Returns a formatted message of a ValidationResult. * * @param result the ValidationResult to format. * @return the formatted result. */ private String formatResult( ValidationResult result ) { StringBuffer buffer = new StringBuffer(); if ( result.getErrors().size() > 0 ) { buffer.append( "Validation errors:" ); for ( Iterator it = result.getErrors().iterator(); it.hasNext(); ) { String error = (String) it.next(); buffer.append( LINE_SEPARATOR ).append( " " ).append( error ); } } if ( result.getWarnings().size() > 0 ) { buffer.append( "Validation warnings:" ); for ( Iterator it = result.getWarnings().iterator(); it.hasNext(); ) { String error = (String) it.next(); buffer.append( LINE_SEPARATOR ).append( " " ).append( error ); } } return buffer.toString(); } }