|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.greenstone.gatherer.util
Class HTMLStringTokenizer

java.lang.Objectorg.greenstone.gatherer.util.HTMLStringTokenizer
- public class HTMLStringTokenizer
- extends java.lang.Object
This class functions much like a StringTokenizer in that it tokenizes a long string into tokens, however this tokenizer cleverly notices HTML formatting tags.
| Field Summary | |
private java.lang.String |
current
The current token, usually created by the last nextToken call. |
private int |
pos
The current position in the source string. |
private java.lang.String |
previous
The previous token. |
private java.lang.String |
source
The string to be tokenized, including any HTML markup. |
| Constructor Summary | |
HTMLStringTokenizer(java.lang.String source)
Constructor. |
|
| Method Summary | |
private void |
dumpWhiteSpace()
Method to ignore whitespace in the source. |
boolean |
hasMoreTokens()
Determines if there are still tokens remaining unparsed in the source. |
boolean |
isTag()
Determines if the tag currently being returned by sameToken is a tag. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
nextToken()
Retrieves the next token. |
private void |
parseToken()
Parses the next token and stores it in current. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
pos
private int pos
- The current position in the source string.
current
private java.lang.String current
- The current token, usually created by the last nextToken call.
previous
private java.lang.String previous
- The previous token.
source
private java.lang.String source
- The string to be tokenized, including any HTML markup.
| Constructor Detail |
HTMLStringTokenizer
public HTMLStringTokenizer(java.lang.String source)
- Constructor.
| Method Detail |
hasMoreTokens
public boolean hasMoreTokens()
- Determines if there are still tokens remaining unparsed in the source.
isTag
public boolean isTag()
- Determines if the tag currently being returned by sameToken is a tag.
nextToken
public java.lang.String nextToken()
- Retrieves the next token.
parseToken
private void parseToken()
- Parses the next token and stores it in current.
dumpWhiteSpace
private void dumpWhiteSpace()
- Method to ignore whitespace in the source.
main
public static void main(java.lang.String[] args)
|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.greenstone.gatherer.util.HTMLStringTokenizer