|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tm4j.topicmap.utils.extractors.ExtractorBase org.tm4j.topicmap.utils.extractors.TopicNameExtractor
An extractor function which takes a Topic as input and returns a String as output. The string returned will be one of the base name strings for the input Topic. This function provides a number of configuration options for controlling the selection and transformation of the returned string.
The base name returned is selected as follows:
Prior to being returned, the string value may be folded to lower case and/or have special XML characters escaped.
Constructor Summary | |
TopicNameExtractor()
|
Method Summary | |
java.lang.Object |
_extract(java.lang.Object in)
|
void |
addPreferredTheme(Topic theme)
Adds a Topic to the list of scope themes that are preferred for the returned name string. |
void |
addPreferredVariant(Topic v)
Adds a Topic to the list of variant parameters that are preferred for the returned name string. |
void |
clearPreferredThemes()
Clears the set of scope themes that are preferred for the returned name string. |
void |
clearPreferredVariants()
Clears the set of variant parameters that are preferred for the returned name string. |
java.lang.Object |
fn(java.lang.Object in,
java.lang.Object arg)
|
void |
removePreferredVariant(Topic v)
Removes a Topic from the list of variant parameters that are preferred for the returned name string. |
void |
setCaseFolding(boolean foldCase)
Sets the case-folding flag. |
void |
setXmlEscaping(boolean xmlEscape)
Sets the XML escaping flag. |
Methods inherited from class org.tm4j.topicmap.utils.extractors.ExtractorBase |
fn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TopicNameExtractor()
Method Detail |
public void addPreferredVariant(Topic v)
v
- the variant parameter to addpublic void removePreferredVariant(Topic v)
v
- the variant parameter to removepublic void addPreferredTheme(Topic theme)
theme
- the scope theme to addpublic void clearPreferredThemes()
public void clearPreferredVariants()
public java.lang.Object _extract(java.lang.Object in)
_extract
in class ExtractorBase
public java.lang.Object fn(java.lang.Object in, java.lang.Object arg)
fn
in interface uk.co.jezuk.mango.BinaryFunction
public void setCaseFolding(boolean foldCase)
true
then the returned
string will be transformed by folding it
to lower case.
foldCase
- the new value for the case-folding flag.public void setXmlEscaping(boolean xmlEscape)
true
then the XML special
characters &, < and > will be escaped
to & < and > respectively.
xmlEscape
- the new value for the XML escaping flag.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |