|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.wikimodel.WikiReferenceParser
public class WikiReferenceParser
This class is used as a common parser of references. It is used to transform
references found in wiki documents into corresponding structured objects -
WikiReference. Methods of this class should be overloaded to parse
correctly wiki-specific references.
WikiReference| Constructor Summary | |
|---|---|
WikiReferenceParser()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WikiReferenceParser()
| Method Detail |
|---|
protected String getLabel(String[] chunks)
chunks - the array of chunks
protected String getLink(String[] chunks)
chunks - the array of chunks
protected WikiParameters getParameters(String[] chunks)
chunks - the array of chunks
public WikiReference parse(String str)
IWikiReferenceParser
parse in interface IWikiReferenceParserstr - the reference to parse
IWikiReferenceParser.parse(java.lang.String)protected String[] splitToChunks(String str)
str - the string to split
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||