Package org.xwiki.rendering.syntax
Class SyntaxType
java.lang.Object
org.xwiki.rendering.syntax.SyntaxType
- All Implemented Interfaces:
Comparable<SyntaxType>
A syntax type is made of three parts:
- a base syntax type (e.g.
xwiki,confluence,mediawiki, etc). - zero or more variants, which represent Syntax type variations. For example the
markdownsyntax has thecommonmarkvariant and thegithubvariant. - a human-readable name (e.g.
XWiki,Confluence,MediaWiki).
<base type>[+<variant>]*.
Examples:
xwikimarkdown+commonmarksometype+variant1+...+variantN
- Since:
- 2.0RC1
- Version:
- $Id: 1ca2da469027c460c662725a907f7f98f80141c3 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SyntaxTypeAnnotated HTML syntax.static final SyntaxTypeAnnotated XHTML syntax.static final SyntaxTypeAPT syntax.static final SyntaxTypeConfluence wiki syntax.static final SyntaxTypeConfluence XHTML based syntax.static final SyntaxTypeCreole wiki syntax.static final SyntaxTypeDoxBook syntax.static final SyntaxTypeDokuWiki wiki syntax.static final SyntaxTypeEvents syntax.static final SyntaxTypeHTML syntaxes.static final Set<SyntaxType>Syntaxes that are from the HTML family.static final SyntaxTypeJSPWiki wiki syntax.static final SyntaxTypeMarkDown wiki syntax.static final SyntaxTypeMediaWiki wiki syntax.static final SyntaxTypePlain text syntax.static final SyntaxTypeTEX syntax.static final SyntaxTypeTWiki wiki syntax.static final SyntaxTypeXML based XWiki DOM syntax.static final SyntaxTypeXHTML syntax.static final SyntaxTypeXWiki wiki syntax. -
Constructor Summary
ConstructorsConstructorDescriptionSyntaxType(String id, String name) SyntaxType(String id, List<String> variants, String name) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(SyntaxType syntaxType) booleangetId()getName()static Map<String,SyntaxType> Deprecated.inthashCode()toString()static SyntaxType
-
Field Details
-
XWIKI
XWiki wiki syntax. -
CONFLUENCE
Confluence wiki syntax. -
CONFLUENCEXHTML
Confluence XHTML based syntax.- Since:
- 5.3M1
-
MEDIAWIKI
MediaWiki wiki syntax. -
DOKUWIKI
DokuWiki wiki syntax.- Since:
- 9.8RC1
-
CREOLE
Creole wiki syntax. -
JSPWIKI
JSPWiki wiki syntax. -
TWIKI
TWiki wiki syntax. -
XHTML
XHTML syntax. -
ANNOTATED_XHTML
Annotated XHTML syntax. -
ANNOTATED_HTML
Annotated HTML syntax. -
HTML
HTML syntaxes. -
HTML_FAMILY_TYPES
Syntaxes that are from the HTML family.- Since:
- 13.9RC1
-
PLAIN
Plain text syntax. -
EVENT
Events syntax. -
TEX
TEX syntax. -
DOCBOOK
DoxBook syntax. -
XDOMXML
XML based XWiki DOM syntax.- Since:
- 3.3M1
-
MARKDOWN
MarkDown wiki syntax.- Since:
- 3.4M1
-
APT
APT syntax.- Since:
- 4.3M1
-
-
Constructor Details
-
SyntaxType
- Parameters:
id- the technical id of the Syntax type (ex "annotatedxhtml")name- the human readable name of the Syntax type (ex "Annotated XHTML")- Since:
- 2.0M3
-
SyntaxType
- Parameters:
id- the technical id of the Syntax type (ex "annotatedxhtml")name- the human readable name of the Syntax type (ex "Annotated XHTML")variants- the variants (can be empty or null)- Since:
- 13.0, 12.10.1
-
-
Method Details
-
getSyntaxTypes
Deprecated.since 13.3RC1, useSyntaxRegistry.getSyntaxes()- Returns:
- the well-known Syntax types
-
getId
- Returns:
- the technical id of the Syntax type (ex "annotatedxhtml")
- Since:
- 2.0M3
-
getVariants
- Returns:
- the variants (can never be null but can be empty)
- Since:
- 13.0, 12.10.1
-
getName
- Returns:
- the human readable name of the Syntax type (ex "Annotated XHTML")
- Since:
- 2.0M3
-
toIdString
- Returns:
- a unique String identifier, does not contain the display name. Usable when searching for parsers and renderers components for example.
- Since:
- 13.0, 12.10.1
-
toString
Display a human readable name of the Syntax type.
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<SyntaxType>
-
valueOf
- Parameters:
syntaxTypesString- the syntax type as a string (egxwiki,confluence+xhtml)- Returns:
- the parsed syntax type as a SyntaxType object
- Throws:
ParseException- in case the string doesn't represent a valid syntax type- Since:
- 13.0, 12.10.1
-
SyntaxRegistry.getSyntaxes()