|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wikimodel.wem.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 java.lang.String |
getLabel(java.lang.String[] chunks)
Extracts the label from the array of chunks and returns it. |
protected java.lang.String |
getLink(java.lang.String[] chunks)
Extracts the link from the array of chunks and returns it. |
protected WikiParameters |
getParameters(java.lang.String[] chunks)
Extracts parameters part of the original reference and returns it as a WikiParameters. |
WikiReference |
parse(java.lang.String str)
Parses the given reference, recognizes individual parts of this reference (link, label, parameters) and returns the corresponding reference object. |
protected java.lang.String[] |
splitToChunks(java.lang.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 java.lang.String getLabel(java.lang.String[] chunks)
chunks - the array of chunks
protected java.lang.String getLink(java.lang.String[] chunks)
chunks - the array of chunks
protected WikiParameters getParameters(java.lang.String[] chunks)
chunks - the array of chunks
public WikiReference parse(java.lang.String str)
IWikiReferenceParser
parse in interface IWikiReferenceParserstr - the reference to parse
IWikiReferenceParser.parse(java.lang.String)protected java.lang.String[] splitToChunks(java.lang.String str)
str - the string to split
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||