@Deprecated public class AutoTagPlugin extends XWikiDefaultPlugin implements XWikiPluginInterface
Modifier and Type | Field and Description |
---|---|
static int |
LANG_ENGLISH
Deprecated.
Identifier for the English language.
|
static int |
LANG_FRENCH
Deprecated.
Identifier for the French language.
|
Constructor and Description |
---|
AutoTagPlugin(String name,
String className,
XWikiContext context)
Deprecated.
The mandatory plugin constructor, this is the method called (through reflection) by the plugin manager.
|
Modifier and Type | Method and Description |
---|---|
TagCloud |
countWords(String text,
int lang)
Deprecated.
Analyze a piece of text, splitting it into individual words, along with their frequencies.
|
TagCloud |
generateTagCloud(String text,
int lang)
Deprecated.
Analyze a piece of text, and extract the most common words into a "tag cloud".
|
int |
getLanguageConstant(String lang)
Deprecated.
Get the identifier corresponding to the given two-leter country code.
|
String |
getName()
Deprecated.
|
AutoTagPluginAPI |
getPluginApi(XWikiPluginInterface plugin,
XWikiContext context)
Deprecated.
|
void |
init(XWikiContext context)
Deprecated.
|
static <K,V> Map<K,V> |
sortMap(Map<K,V> hmap)
Deprecated.
Return a copy of a map, sorted in ascending order of their values.
|
static <T extends Comparable<T>> |
sortSet(Set<T> oSet)
Deprecated.
Return a sorted copy of a set.
|
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, flushCache, getClassName, getLocalization, insidePREHandler, localizePlainOrKey, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, insidePREHandler, outsidePREHandler, startRenderingHandler, virtualInit
public static final int LANG_FRENCH
public static final int LANG_ENGLISH
public AutoTagPlugin(String name, String className, XWikiContext context)
name
- the plugin name, usually ignored, since plugins have a fixed nameclassName
- the name of this class, ignoredcontext
- the current request contextpublic void init(XWikiContext context)
init
in interface XWikiPluginInterface
init
in class XWikiDefaultPlugin
public String getName()
getName
in interface XWikiPluginInterface
getName
in class XWikiDefaultPlugin
public AutoTagPluginAPI getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
getPluginApi
in interface XWikiPluginInterface
getPluginApi
in class XWikiDefaultPlugin
public TagCloud generateTagCloud(String text, int lang)
text
- the text to analyzelang
- the language in which the text is written, 0
for French or 1
for Englishpublic TagCloud countWords(String text, int lang)
generateTagCloud(String, int)
also prepares an HTML tag
cloud which can be printed in the response.text
- the text to analyzelang
- the language, 0
for French or 1
for Englishpublic static <T extends Comparable<T>> SortedSet<T> sortSet(Set<T> oSet)
T
- the type of the items in the setoSet
- the set containing the values to sort; it is not affected in any way by this methodpublic static <K,V> Map<K,V> sortMap(Map<K,V> hmap)
K
- the type of the map keysV
- the type of the map valueshmap
- the map containing the entries to sort; it is not affected in any way by this methodpublic int getLanguageConstant(String lang)
lang
- the two-letter ISO 3166-1 alpha-2 code of a country0
for French ("fr") or 1
for English ("en") and all other passed valuesCopyright © 2004–2019 XWiki. All rights reserved.