|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.utils.tagging.GetFormHyperlinkTagWriter
Generates a hyperlink tag containing an HTTP get request.
Contains a hash map of source words --> parameter sets. When source words are identified in text to be tagged, inserts a hyperlink that looks like:
This allows different word sets to be routed differently depending on the http parameter settings.
<a href="theActionURL?type=sourceWordType&word=sourceWord¶m1=parm1val¶m2=param2val" >sourceWord</a>XML Configuration Template:
<TagWriter taggingClass="com.raritantechnologies.utils.tagging.GetFormHyperlinkTagWriter"
action="theActionURL"
target="newWin" >
<SourceWord type="someSourceWordType" >
<!-- Set ov valid word values for this word type -->
<ValidValues>
<Value>some sourceWordVal</Value>
<Value>another sourcewordVal</Value>
</ValidValues>
<!-- Parameters to be added to the HTTP request for these words -->
<Params>
<Param name="paramName" value="paramVal" />
<Param name="paramName2" value="paramVal2" />
</Params>
</SourceWord>
<!-- Alternatively can get source words from a flat file -->
<SourceWord type="someOtherSourceWordType" >
<ValidValues fileName="AFileName" delimiter=" .(-:|" />
</SourceWord>
</TagWriter>
| Field Summary |
| Fields inherited from interface com.raritantechnologies.utils.tagging.ITagWriter |
TEMPLATE |
| Constructor Summary | |
GetFormHyperlinkTagWriter()
|
|
| Method Summary | |
void |
addTag(java.lang.String tagWord,
java.lang.Object tagReference)
tagReference is tag type. |
void |
clearTags()
|
void |
initialize(org.w3c.dom.Element elem)
Initialize TagWriter from an XML configuation element. |
void |
setMatchCase(java.lang.String matchCase)
|
java.lang.String |
tagWord(java.lang.String sessionID,
java.lang.String sourceWord)
returns a "tagged" version of the source word. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GetFormHyperlinkTagWriter()
| Method Detail |
public void setMatchCase(java.lang.String matchCase)
setMatchCase in interface ITagWriterpublic void initialize(org.w3c.dom.Element elem)
ITagWriter
initialize in interface ITagWriter
public void addTag(java.lang.String tagWord,
java.lang.Object tagReference)
addTag in interface ITagWriterpublic void clearTags()
clearTags in interface ITagWriter
public java.lang.String tagWord(java.lang.String sessionID,
java.lang.String sourceWord)
ITagWriter
tagWord in interface ITagWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||