|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.plugin.XWikiDefaultPlugin
com.xpn.xwiki.plugin.autotag.AutoTagPlugin
@Deprecated public class AutoTagPlugin
Plugin which extracts a set of tags from a text.
Field Summary | |
---|---|
static int |
LANG_ENGLISH
Deprecated. Identifier for the English language. |
static int |
LANG_FRENCH
Deprecated. Identifier for the French language. |
Constructor Summary | |
---|---|
AutoTagPlugin(String name,
String className,
XWikiContext context)
Deprecated. The mandatory plugin constructor, this is the method called (through reflection) by the plugin manager. |
Method Summary | ||
---|---|---|
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
|
sortMap(Map<K,V> hmap)
Deprecated. Return a copy of a map, sorted in ascending order of their values. |
|
static
|
sortSet(Set<T> oSet)
Deprecated. Return a sorted copy of a set. |
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
---|
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, flushCache, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.xpn.xwiki.plugin.XWikiPluginInterface |
---|
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, insidePREHandler, outsidePREHandler, startRenderingHandler, virtualInit |
Field Detail |
---|
public static final int LANG_FRENCH
public static final int LANG_ENGLISH
Constructor Detail |
---|
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 contextMethod Detail |
---|
public 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 English
public 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 English
public 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 method
public 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 method
public int getLanguageConstant(String lang)
lang
- the two-letter ISO 3166-1 alpha-2 code of a country
0
for French ("fr") or 1
for English ("en") and all other passed values
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |