|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.erowid.sperowider.SperowiderCommandInterpreter
This class is used to perform certain transforms to comments in HTML, if they match the Sperowider command syntax. There are currently three supported commands : include, exclude, and loadurl. Include indicates the the contents of the HTML comment should be included as HTML text. Exclude indicates that all of the HTML content between the end of the comment and the start of the next (terminating) exclude command should be removed. loadurl indicates that the contents of another URL should be inserted at this point.
It should be understood that this class does not implement this functionality, but simply interprets the command and sets values (isCommand()
, isExcludeStart()
, isExcludeEnd()
, isInclude()
,
getIncludeText()
, getURLs()
) that can be read by the class that does the actual work.
Examples will be included in this document soon.
Constructor Summary | |
SperowiderCommandInterpreter()
|
Method Summary | |
String |
getIncludeText()
Returns the include text corresponding to the recent include command. |
List |
getURLs()
Returns the URLs contained in the recent loadurls command, if the most recent command was one. |
boolean |
isCommand()
Returns true if the most recently parsed command text was an actual command, or just a regular comment. |
boolean |
isExcludeEnd()
Returns true if the most recently parsed command text was an exclude-end command. |
boolean |
isExcludeStart()
Returns true if the most recently parsed command text was an exclude-start command. |
boolean |
isInclude()
Returns true if the most recently parsed command text was an include command. |
boolean |
isNoIndex()
Returns true if a noindex tag was found. |
void |
setCommentText(String commentText)
Sets the comment text, to prepare for parsing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SperowiderCommandInterpreter()
Method Detail |
public boolean isNoIndex()
public boolean isCommand()
public boolean isExcludeStart()
public boolean isExcludeEnd()
public boolean isInclude()
public String getIncludeText()
public List getURLs()
public void setCommentText(String commentText)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |