Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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)
|
protected void |
parse(ArrayList tokenIndex)
Builds an
ArrayList of
AttributeTokenizer.AttributeEntry instances identifying
name and value pairs. |
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 beginsprotected 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 valuepublic 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.Copyright © 2004-2013 Apache Software Foundation. All Rights Reserved.