org.apache.shale.clay.parser
Interface Token


public interface Token

A Token identifies an offset range within the document. Nodes and Attributes implementing this interface are identified by the NodeTokenizer and AttributeTokenizer.


Method Summary
 int getBeginOffset()
          Beginning offset of the token within the document.
 StringBuffer getDocument()
          Returns a reference to the complete document.
 int getEndOffset()
          Ending offset of the token within the document.
 int getLineBeginOffset()
          Returns the line begining offset in the document that the node starts.
 int getLineNumber()
          Returns the line number in the document that the node starts.
 String getRawText()
          The complete identifier within the document defined by the range between the beginOffset and endOffset.
 

Method Detail

getBeginOffset

int getBeginOffset()

Beginning offset of the token within the document.

Returns:
beginning offset

getEndOffset

int getEndOffset()

Ending offset of the token within the document.

Returns:
ending offset

getRawText

String getRawText()

The complete identifier within the document defined by the range between the beginOffset and endOffset.

Returns:
text between offset ranges

getDocument

StringBuffer getDocument()

Returns a reference to the complete document.

Returns:
parsed document

getLineNumber

int getLineNumber()

Returns the line number in the document that the node starts.

Returns:
line number the token is find on

getLineBeginOffset

int getLineBeginOffset()

Returns the line begining offset in the document that the node starts.

Returns:
line offset the token is found on


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.