|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.clay.parser.AttributeTokenizer
public class AttributeTokenizer
Tokenizes a portion of the document for attributes. The complete document is
passed by reference and new Token
offsets are created for the name
and value of the discovered attributes.
Constructor Summary | |
---|---|
AttributeTokenizer(StringBuffer buffer,
int beginOffset,
int endOffset,
int lineNumber,
int lineBeginOffset)
Overloaded constructor that is passed the complete document and the starting and ending offset of the node body within the document. |
Method Summary | |
---|---|
Iterator |
iterator()
Returns an instance of an Iterator that
will enumerate attributes in the document where the attributes
are represented by a AttributeTokenizer.AttributeEntry instance. |
protected org.apache.shale.clay.parser.AttributeTokenizer.TokenOffset |
nextToken(int startOffset,
String endDelim,
String otherDelim,
boolean isKey)
Returns the next Token given an startOffset and a
endDelim . |
protected void |
parse(ArrayList tokenIndex)
Builds an ArrayList of
AttributeTokenizer.AttributeEntry instances identifying
name and value pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeTokenizer(StringBuffer buffer, int beginOffset, int endOffset, int lineNumber, int lineBeginOffset)
Overloaded constructor that is passed the complete document and the starting and ending offset of the node body within the document.
buffer
- documentbeginOffset
- start index of node body in the documentendOffset
- end index of node body in the documentlineNumber
- line number of the node within the documentlineBeginOffset
- index in the document that the line beginsMethod Detail |
---|
protected void parse(ArrayList tokenIndex)
Builds an ArrayList
of
AttributeTokenizer.AttributeEntry
instances identifying
name and value pairs.
tokenIndex
- populated attribute offset of a beging node bodyprotected org.apache.shale.clay.parser.AttributeTokenizer.TokenOffset nextToken(int startOffset, String endDelim, String otherDelim, boolean isKey)
Returns the next Token
given an startOffset
and a
endDelim
.
startOffset
- begining offset in the documentendDelim
- primary token delimiterotherDelim
- secondary token delimiterisKey
- looking for an attribute name not a value
public Iterator iterator()
Returns an instance of an Iterator
that
will enumerate attributes in the document where the attributes
are represented by a AttributeTokenizer.AttributeEntry
instance.
AttributeTokenizer.TokenIterator
iterator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |