Package org.xwiki.rendering.syntax
Class Syntax
java.lang.Object
org.xwiki.rendering.syntax.Syntax
- All Implemented Interfaces:
Comparable<Syntax>
Represents a wiki syntax that the user can use to enter wiki content. A syntax is made of three parts:
- a syntax type (e.g.
xwiki,confluence,confluence+xhtml, etc). - a version (
1.0,2.0, etc. - an optional qualifier which is a free form string adding some additional information about the Syntax when serialized as a String). Can be used for example to mark a Syntax as experimental.
<type>/<version>.
Examples:
xwiki/2.1markdown+commonmark/1.2sometype+variant1+...+variantN/1.0
- Since:
- 2.0RC1
- Version:
- $Id: 08fcdbb4884bee932d1fabaca8be39b8acab4550 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SyntaxThis is HTML5 with annotations (comments) in order to allow round tripping between for example the WYSIWYG editor and wiki syntax.static final SyntaxThis is HTML with annotations (comments) in order to allow round tripping between for example the WYSIWYG editor and wiki syntax.static final Syntaxstatic final SyntaxConfluence wiki syntax.static final SyntaxConfluence XHTML based syntax.static final SyntaxCreole syntax.static final SyntaxDocbook 4.4 syntax.static final SyntaxDokuWiki syntax.static final SyntaxEvents syntax.static final SyntaxHTML 4.01 syntax.static final SyntaxHTML5 syntax.static final SyntaxJSPWiki syntax.static final Syntaxstatic final Syntaxstatic final SyntaxDeprecated.static final SyntaxNew MediaWiki syntax.static final SyntaxPlain text syntax.static final SyntaxTEX syntax.static final SyntaxTWiki syntax.static final Syntaxstatic final Syntaxstatic final SyntaxXHTML 1.0 syntax.static final SyntaxXHTML5 syntax.static final SyntaxDeprecated.useXWIKI_2_1insteadstatic final SyntaxXWiki 2.0 syntax.static final SyntaxXWiki 2.1 syntax. -
Constructor Summary
ConstructorsConstructorDescriptionSyntax(SyntaxType type, String version) Syntax(SyntaxType type, String version, String qualifier) -
Method Summary
-
Field Details
-
XHTML_5
XHTML5 syntax.- Since:
- 14.1RC1
-
HTML_5_0
HTML5 syntax.- Since:
- 6.4M3
-
XHTML_1_0
XHTML 1.0 syntax. -
HTML_4_01
HTML 4.01 syntax. -
XWIKI_1_0
Deprecated.useXWIKI_2_1insteadXWiki 1.0 syntax. -
XWIKI_2_0
XWiki 2.0 syntax. -
XWIKI_2_1
XWiki 2.1 syntax. -
PLAIN_1_0
Plain text syntax. -
EVENT_1_0
Events syntax. -
TEX_1_0
TEX syntax. -
CREOLE_1_0
Creole syntax. -
JSPWIKI_1_0
JSPWiki syntax. -
MEDIAWIKI_1_0
Deprecated.useMEDIAWIKI_1_6insteadOld MediaWiki syntax. -
MEDIAWIKI_1_6
New MediaWiki syntax. -
DOKUWIKI_1_0
DokuWiki syntax.- Since:
- 9.8RC1
-
TWIKI_1_0
TWiki syntax. -
DOCBOOK_4_4
Docbook 4.4 syntax. -
CONFLUENCE_1_0
Confluence wiki syntax. -
CONFLUENCEXHTML_1_0
Confluence XHTML based syntax.- Since:
- 5.3M1
-
XDOMXML_CURRENT
- Since:
- 3.3M1
-
XDOMXML_1_0
- Since:
- 3.3M1
-
MARKDOWN_1_0
- Since:
- 3.4M1
-
MARKDOWN_1_1
- Since:
- 5.2M1
-
APT_1_0
- Since:
- 4.3M1
-
ANNOTATED_XHTML_1_0
This is HTML with annotations (comments) in order to allow round tripping between for example the WYSIWYG editor and wiki syntax. -
ANNOTATED_HTML_5_0
This is HTML5 with annotations (comments) in order to allow round tripping between for example the WYSIWYG editor and wiki syntax.
-
-
Constructor Details
-
Syntax
- Parameters:
type- the type of the syntaxversion- the specific version of the syntax
-
Syntax
- Parameters:
type- the type of the syntaxversion- the specific version of the syntaxqualifier- a qualifier
-
-
Method Details
-
valueOf
@Deprecated(since="13.3RC1") public static Syntax valueOf(String syntaxIdAsString) throws ParseException Deprecated.- Parameters:
syntaxIdAsString- the syntax as a string (eg "xwiki/2.0", "plain/1.0")- Returns:
- the parsed syntax as a Syntax object
- Throws:
ParseException- in case the string doesn't represent a valid syntax- Since:
- 9.8RC1
-
getType
- Returns:
- the type of the syntax
-
getVersion
- Returns:
- the specific version of the syntax
-
getQualifier
- Returns:
- a qualifier
-
toIdString
- Returns:
- a unique String identifier, does not contain display name and qualifier. Usable when searching for parsers and renderers components for example.
-
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Syntax>
-
MEDIAWIKI_1_6instead