1 package org.apache.maven.doxia.module.twiki; 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 javax.swing.text.html.HTML.Tag; 23 24 import org.apache.maven.doxia.markup.TextMarkup; 25 26 /** 27 * This interface defines all markups and syntaxes used by the <b>TWiki</b> format. 28 * 29 * @see <a href="http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules">http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules</a> 30 * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> 31 * @version $Id: TWikiMarkup.java 1633964 2014-10-23 22:01:01Z hboutemy $ 32 * @since 1.0 33 */ 34 @SuppressWarnings( "checkstyle:interfaceistype" ) 35 public interface TWikiMarkup 36 extends TextMarkup 37 { 38 // ---------------------------------------------------------------------- 39 // Twiki markups 40 // ---------------------------------------------------------------------- 41 42 /** Syntax for the anchor : '#' */ 43 char ANCHOR_MARKUP = '#'; 44 45 /** Syntax for the start line separator: " " */ 46 String THREE_SPACES_MARKUP = " "; 47 48 /** Syntax for the bold markup: "*" */ 49 String BOLD_END_MARKUP = "*"; 50 51 /** Syntax for the bold markup: "*" */ 52 String BOLD_START_MARKUP = "*"; 53 54 /** Syntax for the bold italic markup: "__" */ 55 String BOLD_ITALIC_END_MARKUP = "__"; 56 57 /** Syntax for the bold italic markup: "__" */ 58 String BOLD_ITALIC_START_MARKUP = "__"; 59 60 /** Syntax for the bold monospaced markup: "==" */ 61 String BOLD_MONOSPACED_END_MARKUP = "=="; 62 63 /** Syntax for the bold monospaced markup: "==" */ 64 String BOLD_MONOSPACED_START_MARKUP = "=="; 65 66 /** Syntax for the definition list item: " $ " */ 67 String DEFINITION_LIST_ITEM_MARKUP = THREE_SPACES_MARKUP + "$ "; 68 69 /** Syntax for the definition list definition: ": " */ 70 String DEFINITION_LIST_DEFINITION_MARKUP = ": "; 71 72 /** Syntax for the horizontal rule markup: "---" */ 73 String HORIZONTAL_RULE_MARKUP = "---"; 74 75 /** Syntax for the italic markup: "_" */ 76 String ITALIC_END_MARKUP = "_"; 77 78 /** Syntax for the italic markup: "_" */ 79 String ITALIC_START_MARKUP = "_"; 80 81 /** Syntax for the link end markup: "]]" */ 82 String LINK_END_MARKUP = "]]"; 83 84 /** Syntax for the link middle markup: "][" */ 85 String LINK_MIDDLE_MARKUP = "]["; 86 87 /** Syntax for the link start markup: "[[" */ 88 String LINK_START_MARKUP = "[["; 89 90 /** Syntax for the list item markup: "* */ 91 String LIST_ITEM_MARKUP = "* "; 92 93 /** Syntax for the mono-spaced style end: "=" */ 94 String MONOSPACED_END_MARKUP = "="; 95 96 /** Syntax for the mono-spaced style start: "=" */ 97 String MONOSPACED_START_MARKUP = "="; 98 99 /** Syntax for the numbering decimal markup char: "1." */ 100 String NUMBERING_MARKUP = "1."; 101 102 /** Syntax for the numbering lower alpha markup char: "a." */ 103 String NUMBERING_LOWER_ALPHA_MARKUP = "a."; 104 105 /** Syntax for the numbering lower roman markup char: "i." */ 106 String NUMBERING_LOWER_ROMAN_MARKUP = "i."; 107 108 /** Syntax for the numbering upper alpha markup char: "A." */ 109 String NUMBERING_UPPER_ALPHA_MARKUP = "A."; 110 111 /** Syntax for the numbering upper roman markup char: "I." */ 112 String NUMBERING_UPPER_ROMAN_MARKUP = "I."; 113 114 /** Syntax for the table cell header end markup: "* |" */ 115 String TABLE_CELL_HEADER_END_MARKUP = "* |"; 116 117 /** Syntax for the table cell header start markup: " *" */ 118 String TABLE_CELL_HEADER_START_MARKUP = " *"; 119 120 /** Syntax for the table cell markup: "| " */ 121 String TABLE_CELL_MARKUP = " |"; 122 123 /** Syntax for the table row markup: "|" */ 124 String TABLE_ROW_MARKUP = "|"; 125 126 // ---------------------------------------------------------------------- 127 // Specific Twiki tags 128 // ---------------------------------------------------------------------- 129 130 /** TWiki tag for <code>verbatim</code> */ 131 Tag VERBATIM_TAG = new Tag() 132 { 133 /** {@inheritDoc} */ 134 public String toString() 135 { 136 return "verbatim"; 137 } 138 }; 139 }