Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AptMarkup |
|
| 0.0;0 |
1 | package org.apache.maven.doxia.module.apt; | |
2 | ||
3 | /* | |
4 | * Licensed to the Apache Software Foundation (ASF) under one | |
5 | * or more contributor license agreements. See the NOTICE file | |
6 | * distributed with this work for additional information | |
7 | * regarding copyright ownership. The ASF licenses this file | |
8 | * to you under the Apache License, Version 2.0 (the | |
9 | * "License"); you may not use this file except in compliance | |
10 | * with the License. You may obtain a copy of the License at | |
11 | * | |
12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
13 | * | |
14 | * Unless required by applicable law or agreed to in writing, | |
15 | * software distributed under the License is distributed on an | |
16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
17 | * KIND, either express or implied. See the License for the | |
18 | * specific language governing permissions and limitations | |
19 | * under the License. | |
20 | */ | |
21 | ||
22 | import org.apache.maven.doxia.markup.TextMarkup; | |
23 | import org.codehaus.plexus.util.StringUtils; | |
24 | ||
25 | /** | |
26 | * This interface defines all markups and syntaxes used by the <b>APT</b> format. | |
27 | * | |
28 | * @see <a href="http://maven.apache.org/doxia/references/apt-format.html">http://maven.apache.org/doxia/references/apt-format.html</a> | |
29 | * | |
30 | * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> | |
31 | * @version $Id: AptMarkup.java 657808 2008-05-19 12:11:53Z ltheussl $ | |
32 | * @since 1.0 | |
33 | */ | |
34 | public interface AptMarkup | |
35 | extends TextMarkup | |
36 | { | |
37 | // ---------------------------------------------------------------------- | |
38 | // Markup separators | |
39 | // ---------------------------------------------------------------------- | |
40 | ||
41 | /** APT backslash markup char: '\\' */ | |
42 | char BACKSLASH = '\\'; | |
43 | ||
44 | /** APT comment markup char: '~' */ | |
45 | char COMMENT = '~'; | |
46 | ||
47 | /** APT numbering decimal markup char: '1' */ | |
48 | char NUMBERING = '1'; | |
49 | ||
50 | /** APT numbering lower alpha markup char: 'a' */ | |
51 | char NUMBERING_LOWER_ALPHA_CHAR = 'a'; | |
52 | ||
53 | /** APT numbering lower roman markup char: 'i' */ | |
54 | char NUMBERING_LOWER_ROMAN_CHAR = 'i'; | |
55 | ||
56 | /** APT numbering upper alpha markup char: 'A' */ | |
57 | char NUMBERING_UPPER_ALPHA_CHAR = 'A'; | |
58 | ||
59 | /** APT numbering upper roman markup char: 'I' */ | |
60 | char NUMBERING_UPPER_ROMAN_CHAR = 'I'; | |
61 | ||
62 | /** APT page break markup char: '\f' */ | |
63 | char PAGE_BREAK = '\f'; | |
64 | ||
65 | /** APT percent markup char: '%' */ | |
66 | char PERCENT = '%'; | |
67 | ||
68 | /** APT tab markup char: '\t' */ | |
69 | char TAB = '\t'; | |
70 | ||
71 | // ---------------------------------------------------------------------- | |
72 | // Markup syntax | |
73 | // ---------------------------------------------------------------------- | |
74 | ||
75 | /** Syntax for the anchor end: "}" */ | |
76 | String ANCHOR_END_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); | |
77 | ||
78 | /** Syntax for the anchor start: "{" */ | |
79 | String ANCHOR_START_MARKUP = String.valueOf( LEFT_CURLY_BRACKET ); | |
80 | ||
81 | /** Syntax for the bold style end: ">>" */ | |
82 | String BOLD_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 2 ); | |
83 | ||
84 | /** Syntax for the bold style start: "<<" */ | |
85 | String BOLD_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 2 ); | |
86 | ||
87 | /** Syntax for the boxed verbatim start: "+------+" */ | |
88 | String BOXED_VERBATIM_START_MARKUP = String.valueOf( PLUS ) | |
89 | + StringUtils.repeat( String.valueOf( MINUS ), 6 ) + String.valueOf( PLUS ); | |
90 | ||
91 | /** Syntax for the header start: " -----" */ | |
92 | String HEADER_START_MARKUP = String.valueOf( SPACE ) + StringUtils.repeat( String.valueOf( MINUS ), 5 ); | |
93 | ||
94 | /** Syntax for the horizontal rule: "========" */ | |
95 | String HORIZONTAL_RULE_MARKUP = StringUtils.repeat( String.valueOf( EQUAL ), 8 ); | |
96 | ||
97 | /** Syntax for the italic style end: ">" */ | |
98 | String ITALIC_END_MARKUP = String.valueOf( GREATER_THAN ); | |
99 | ||
100 | /** Syntax for the italic style start: "<" */ | |
101 | String ITALIC_START_MARKUP = String.valueOf( LESS_THAN ); | |
102 | ||
103 | /** Syntax for the link end: "}}" */ | |
104 | String LINK_END_MARKUP = StringUtils.repeat( String.valueOf( RIGHT_CURLY_BRACKET ), 2 ); | |
105 | ||
106 | /** Syntax for the link start: "{{{" */ | |
107 | String LINK_START_1_MARKUP = StringUtils.repeat( String.valueOf( LEFT_CURLY_BRACKET ), 3 ); | |
108 | ||
109 | /** Syntax for the link start: "}" */ | |
110 | String LINK_START_2_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); | |
111 | ||
112 | /** Syntax for the list end: "[]" */ | |
113 | String LIST_END_MARKUP = String.valueOf( LEFT_SQUARE_BRACKET ) + String.valueOf( RIGHT_SQUARE_BRACKET ); | |
114 | ||
115 | /** Syntax for the list start: "*" */ | |
116 | String LIST_START_MARKUP = String.valueOf( STAR ); | |
117 | ||
118 | /** Syntax for the mono-spaced style end: ">>>" */ | |
119 | String MONOSPACED_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 3 ); | |
120 | ||
121 | /** Syntax for the mono-spaced style start: "<<<" */ | |
122 | String MONOSPACED_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 3 ); | |
123 | ||
124 | /** Syntax for the non boxed verbatim start: "------" */ | |
125 | String NON_BOXED_VERBATIM_START_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 6 ); | |
126 | ||
127 | /** Syntax for the non breaking space: "\ " */ | |
128 | String NON_BREAKING_SPACE_MARKUP = String.valueOf( BACKSLASH ) + String.valueOf( SPACE ); | |
129 | ||
130 | /** Syntax for the page break: "\f" */ | |
131 | String PAGE_BREAK_MARKUP = String.valueOf( PAGE_BREAK ); | |
132 | ||
133 | /** Syntax for the section title start: "*" */ | |
134 | String SECTION_TITLE_START_MARKUP = String.valueOf( STAR ); | |
135 | ||
136 | /** Syntax for the table cell start: "|" */ | |
137 | String TABLE_CELL_SEPARATOR_MARKUP = String.valueOf( PIPE ); | |
138 | ||
139 | /** Syntax for the table column, centered style: "-*" */ | |
140 | String TABLE_COL_CENTERED_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) | |
141 | + String.valueOf( STAR ); | |
142 | ||
143 | /** Syntax for the table column, left style: "-+" */ | |
144 | String TABLE_COL_LEFT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) | |
145 | + String.valueOf( PLUS ); | |
146 | ||
147 | /** Syntax for the table column, right style: "-:" */ | |
148 | String TABLE_COL_RIGHT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) | |
149 | + String.valueOf( COLON ); | |
150 | ||
151 | /** Syntax for the table row end: "|" */ | |
152 | String TABLE_ROW_SEPARATOR_MARKUP = String.valueOf( PIPE ); | |
153 | ||
154 | /** Syntax for the table row start: "*--" */ | |
155 | String TABLE_ROW_START_MARKUP = String.valueOf( STAR ) + StringUtils.repeat( String.valueOf( MINUS ), 2 ); | |
156 | ||
157 | /** Syntax for the boxed verbatim end: "+------+" */ | |
158 | String BOXED_VERBATIM_END_MARKUP = BOXED_VERBATIM_START_MARKUP; | |
159 | ||
160 | /** Syntax for the non boxed verbatim end: "------" */ | |
161 | String NON_BOXED_VERBATIM_END_MARKUP = NON_BOXED_VERBATIM_START_MARKUP; | |
162 | } |