View Javadoc
1   /*
2    * The contents of this file are subject to the terms of the Common Development and
3    * Distribution License (the License). You may not use this file except in compliance with the
4    * License.
5    *
6    * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
7    * specific language governing permission and limitations under the License.
8    *
9    * When distributing Covered Software, include this CDDL Header Notice in each file and include
10   * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
11   * Header, with the fields enclosed by brackets [] replaced by your own identifying
12   * information: "Portions copyright [year] [name of copyright owner]".
13   *
14   * Copyright 2016 ForgeRock AS.
15   */
16  
17  package org.forgerock.api.markup.asciidoc;
18  
19  /**
20   * Enumeration of AsciiDoc markup symbols.
21   */
22  public enum AsciiDocSymbols {
23      /**
24       * Cross-reference <a href="http://asciidoctor.org/docs/user-manual/#anchordef">anchor</a> start.
25       */
26      ANCHOR_START("[["),
27      /**
28       * Cross-reference <a href="http://asciidoctor.org/docs/user-manual/#anchordef">anchor</a> end.
29       */
30      ANCHOR_END("]]"),
31      /**
32       * <a href="http://asciidoctor.org/docs/user-manual/#title">Block title</a>.
33       */
34      BLOCK_TITLE("."),
35      /**
36       * <a href="http://asciidoctor.org/docs/user-manual/#bold-and-italic">Bold</a> text.
37       */
38      BOLD("*"),
39      /**
40       * <a href="http://asciidoctor.org/docs/user-manual/#internal-cross-references">Cross-reference</a> start.
41       */
42      CROSS_REF_START("<<"),
43      /**
44       * <a href="http://asciidoctor.org/docs/user-manual/#internal-cross-references">Cross-reference</a> end.
45       */
46      CROSS_REF_END(">>"),
47      /**
48       * <a href="http://asciidoctor.org/docs/user-manual/#document-title">Document title</a>.
49       */
50      DOC_TITLE("= "),
51      /**
52       * <a href="http://asciidoctor.org/docs/user-manual/#line-breaks">Hardbreaks</a> attribute preserves line-breaks
53       * below its location in the document.
54       */
55      HARDBREAKS(":hardbreaks:"),
56      /**
57       * <a href="http://asciidoctor.org/docs/user-manual/#built-in-blocks-summary">Example</a> block.
58       */
59      EXAMPLE("===="),
60      /**
61       * <a href="http://asciidoctor.org/docs/user-manual/#horizontal-rules">Horizontal rule</a>.
62       */
63      HORIZONTAL_RULE("'''"),
64      /**
65       * <a href="http://asciidoctor.org/docs/user-manual/#include-directive">Include</a>-directive.
66       */
67      INCLUDE("include::"),
68      /**
69       * <a href="http://asciidoctor.org/docs/user-manual/#bold-and-italic">Italic</a> text.
70       */
71      ITALIC("_"),
72      /**
73       * Single <a href="http://asciidoctor.org/docs/user-manual/#line-breaks">line-break</a>.
74       */
75      LINE_BREAK(" +"),
76      /**
77       * Pre-formatted <a href="http://asciidoctor.org/docs/user-manual/#listing-blocks">listing</a> block.
78       */
79      LISTING("----"),
80      /**
81       * <a href="http://asciidoctor.org/docs/user-manual/#complex-list-content">List continuation</a> marker, for
82       * including complex markup in a list-item.
83       */
84      LIST_CONTINUATION("+"),
85      /**
86       * <a href="http://asciidoctor.org/docs/user-manual/#built-in-blocks-summary">Literal</a> block.
87       */
88      LITERAL("...."),
89      /**
90       * <a href="http://asciidoctor.org/docs/user-manual/#mono">Monospaced</a> text.
91       */
92      MONO("`"),
93      /**
94       * Unordered <a href="http://asciidoctor.org/docs/user-manual/#unordered-lists">list item</a> at level-1.
95       *
96       * @see #LIST_CONTINUATION
97       */
98      UNORDERED_LIST_1("* "),
99      /**
100      * UNIX newline character.
101      */
102     NEWLINE("\n"),
103      /**
104      * <a href="http://asciidoctor.org/docs/user-manual/#built-in-blocks-summary">Pass-through</a> block.
105      */
106     PASSTHROUGH("++++"),
107     /**
108      * Start/end of <a href="http://asciidoctor.org/docs/user-manual/#tables">table</a>.
109      */
110     TABLE("|==="),
111     /**
112      * <a href="http://asciidoctor.org/docs/user-manual/#tables">Table</a>-cell delimiter.
113      */
114     TABLE_CELL("|"),
115     /**
116      * <a href="http://asciidoctor.org/docs/user-manual/#user-toc">Table-of-Contents</a> directive.
117      */
118     TABLE_OF_CONTENTS(":toc:"),
119     /**
120      * <a href="http://asciidoctor.org/docs/user-manual/#sections">Section</a> title, level 1.
121      */
122     SECTION_TITLE_1("== "),
123     /**
124      * <a href="http://asciidoctor.org/docs/user-manual/#sections">Section</a> title, level 2.
125      */
126     SECTION_TITLE_2("=== "),
127     /**
128      * <a href="http://asciidoctor.org/docs/user-manual/#sections">Section</a> title, level 3.
129      */
130     SECTION_TITLE_3("==== "),
131     /**
132      * <a href="http://asciidoctor.org/docs/user-manual/#sections">Section</a> title, level 4.
133      */
134     SECTION_TITLE_4("===== "),
135     /**
136      * <a href="http://asciidoctor.org/docs/user-manual/#sections">Section</a> title, level 5.
137      */
138     SECTION_TITLE_5("====== "),
139     /**
140      * <a href="http://asciidoctor.org/docs/user-manual/#built-in-blocks-summary">Sidebar</a> block.
141      */
142     SIDEBAR("****");
143 
144     private final String s;
145 
146     AsciiDocSymbols(final String s) {
147         this.s = s;
148     }
149 
150     /**
151      * Returns the AsciiDocSymbols markup symbol associated with this item.
152      *
153      * @return AsciiDocSymbols markup symbol
154      */
155     @Override
156     public String toString() {
157         return s;
158     }
159 }