public class WikiReferenceParser extends Object implements IWikiReferenceParser
WikiReference
. Methods of this class should be overloaded to parse
correctly wiki-specific references.WikiReference
Constructor and Description |
---|
WikiReferenceParser() |
Modifier and Type | Method and Description |
---|---|
protected String |
getLabel(String[] chunks)
Extracts the label from the array of chunks and returns it.
|
protected String |
getLink(String[] chunks)
Extracts the link from the array of chunks and returns it.
|
protected WikiParameters |
getParameters(String[] chunks)
Extracts parameters part of the original reference and returns it as a
WikiParameters.
|
WikiReference |
parse(String str)
Parses the given reference, recognizes individual parts of this reference
(link, label, parameters) and returns the corresponding reference object.
|
protected String[] |
splitToChunks(String str)
Returns the given string split to individual segments
|
protected String getLabel(String[] chunks)
chunks
- the array of chunksprotected String getLink(String[] chunks)
chunks
- the array of chunksprotected WikiParameters getParameters(String[] chunks)
chunks
- the array of chunkspublic WikiReference parse(String str)
IWikiReferenceParser
parse
in interface IWikiReferenceParser
str
- the reference to parseIWikiReferenceParser.parse(java.lang.String)
Copyright © 2004–2021 XWiki. All rights reserved.