001package org.apache.maven.doxia.module.apt; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import org.apache.maven.doxia.markup.TextMarkup; 023import org.codehaus.plexus.util.StringUtils; 024 025/** 026 * This interface defines all markups and syntaxes used by the <b>APT</b> format. 027 * 028 * @see <a href="http://maven.apache.org/doxia/references/apt-format.html">http://maven.apache.org/doxia/references/apt-format.html</a> 029 * 030 * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> 031 * @version $Id$ 032 * @since 1.0 033 */ 034@SuppressWarnings( "checkstyle:interfaceistype" ) 035public interface AptMarkup 036 extends TextMarkup 037{ 038 // ---------------------------------------------------------------------- 039 // Markup separators 040 // ---------------------------------------------------------------------- 041 042 /** APT backslash markup char: '\\' */ 043 char BACKSLASH = '\\'; 044 045 /** APT comment markup char: '~' */ 046 char COMMENT = '~'; 047 048 /** APT numbering decimal markup char: '1' */ 049 char NUMBERING = '1'; 050 051 /** APT numbering lower alpha markup char: 'a' */ 052 char NUMBERING_LOWER_ALPHA_CHAR = 'a'; 053 054 /** APT numbering lower roman markup char: 'i' */ 055 char NUMBERING_LOWER_ROMAN_CHAR = 'i'; 056 057 /** APT numbering upper alpha markup char: 'A' */ 058 char NUMBERING_UPPER_ALPHA_CHAR = 'A'; 059 060 /** APT numbering upper roman markup char: 'I' */ 061 char NUMBERING_UPPER_ROMAN_CHAR = 'I'; 062 063 /** APT page break markup char: '\f' */ 064 char PAGE_BREAK = '\f'; 065 066 /** APT percent markup char: '%' */ 067 char PERCENT = '%'; 068 069 /** APT tab markup char: '\t' */ 070 char TAB = '\t'; 071 072 // ---------------------------------------------------------------------- 073 // Markup syntax 074 // ---------------------------------------------------------------------- 075 076 /** Syntax for the anchor end: "}" */ 077 String ANCHOR_END_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); 078 079 /** Syntax for the anchor start: "{" */ 080 String ANCHOR_START_MARKUP = String.valueOf( LEFT_CURLY_BRACKET ); 081 082 /** Syntax for the bold style end: ">>" */ 083 String BOLD_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 2 ); 084 085 /** Syntax for the bold style start: "<<" */ 086 String BOLD_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 2 ); 087 088 /** Syntax for the boxed verbatim start: "+------+" */ 089 String BOXED_VERBATIM_START_MARKUP = String.valueOf( PLUS ) 090 + StringUtils.repeat( String.valueOf( MINUS ), 6 ) + String.valueOf( PLUS ); 091 092 /** Syntax for the header start: " -----" */ 093 String HEADER_START_MARKUP = String.valueOf( SPACE ) + StringUtils.repeat( String.valueOf( MINUS ), 5 ); 094 095 /** Syntax for the horizontal rule: "========" */ 096 String HORIZONTAL_RULE_MARKUP = StringUtils.repeat( String.valueOf( EQUAL ), 8 ); 097 098 /** Syntax for the italic style end: ">" */ 099 String ITALIC_END_MARKUP = String.valueOf( GREATER_THAN ); 100 101 /** Syntax for the italic style start: "<" */ 102 String ITALIC_START_MARKUP = String.valueOf( LESS_THAN ); 103 104 /** Syntax for the link end: "}}" */ 105 String LINK_END_MARKUP = StringUtils.repeat( String.valueOf( RIGHT_CURLY_BRACKET ), 2 ); 106 107 /** Syntax for the link start: "{{{" */ 108 String LINK_START_1_MARKUP = StringUtils.repeat( String.valueOf( LEFT_CURLY_BRACKET ), 3 ); 109 110 /** Syntax for the link start: "}" */ 111 String LINK_START_2_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); 112 113 /** Syntax for the list end: "[]" */ 114 String LIST_END_MARKUP = String.valueOf( LEFT_SQUARE_BRACKET ) + String.valueOf( RIGHT_SQUARE_BRACKET ); 115 116 /** Syntax for the list start: "*" */ 117 String LIST_START_MARKUP = String.valueOf( STAR ); 118 119 /** Syntax for the mono-spaced style end: ">>>" */ 120 String MONOSPACED_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 3 ); 121 122 /** Syntax for the mono-spaced style start: "<<<" */ 123 String MONOSPACED_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 3 ); 124 125 /** Syntax for the non boxed verbatim start: "------" */ 126 String NON_BOXED_VERBATIM_START_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 6 ); 127 128 /** Syntax for the non breaking space: "\ " */ 129 String NON_BREAKING_SPACE_MARKUP = String.valueOf( BACKSLASH ) + String.valueOf( SPACE ); 130 131 /** Syntax for the page break: "\f" */ 132 String PAGE_BREAK_MARKUP = String.valueOf( PAGE_BREAK ); 133 134 /** Syntax for the section title start: "*" */ 135 String SECTION_TITLE_START_MARKUP = String.valueOf( STAR ); 136 137 /** Syntax for the table cell start: "|" */ 138 String TABLE_CELL_SEPARATOR_MARKUP = String.valueOf( PIPE ); 139 140 /** Syntax for the table column, centered style: "-*" */ 141 String TABLE_COL_CENTERED_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) 142 + String.valueOf( STAR ); 143 144 /** Syntax for the table column, left style: "-+" */ 145 String TABLE_COL_LEFT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) 146 + String.valueOf( PLUS ); 147 148 /** Syntax for the table column, right style: "-:" */ 149 String TABLE_COL_RIGHT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) 150 + String.valueOf( COLON ); 151 152 /** Syntax for the table row end: "|" */ 153 String TABLE_ROW_SEPARATOR_MARKUP = String.valueOf( PIPE ); 154 155 /** Syntax for the table row start: "*--" */ 156 String TABLE_ROW_START_MARKUP = String.valueOf( STAR ) + StringUtils.repeat( String.valueOf( MINUS ), 2 ); 157 158 /** Syntax for the boxed verbatim end: "+------+" */ 159 String BOXED_VERBATIM_END_MARKUP = BOXED_VERBATIM_START_MARKUP; 160 161 /** Syntax for the non boxed verbatim end: "------" */ 162 String NON_BOXED_VERBATIM_END_MARKUP = NON_BOXED_VERBATIM_START_MARKUP; 163}