Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr.xpath
Class XPathParser.XPathTokenizer

    java.lang.Object
      org.modeshape.jcr.xpath.XPathParser.XPathTokenizer

All Implemented Interfaces:
  TokenStream.Tokenizer

Enclosing class:
  XPathParser

    public static class XPathParser.XPathTokenizer

extends Object
implements TokenStream.Tokenizer

A `TokenStream.Tokenizer` implementation that parses single- and double-quoted strings, symbols, words consisting of `NCName`s (as defined by the Namespaces in XML 1.0 specification), XPath comments,and `other` single-character tokens. Quoted phrases are delimited by single-quote and double-quote characters (which may be escaped within the quote). XPath comments begin with a "(:" and end with a ":)".

Field Summary
`static int` | `COMMENT` The token type for tokens that consist of all the characters between "(:" and ":)".
`static int` | `NAME` The token type for tokens that represent an unquoted string containing a character sequence made up of non-whitespace and non-symbol characters.
`static int` | `OTHER` The token type for tokens that consist of single characters that are not a `SYMBOL`, valid `NAME`, or `QUOTED_STRING`.
`static int` | `QUOTED_STRING` The token type for tokens that consist of all the characters within single-quotes, double-quotes, or square brackets.
`static int` | `SYMBOL` The token type for tokens that consist of an individual "symbol" character.

Constructor Summary
`XPathParser.XPathTokenizer(boolean useComments)`

Method Summary
`void` | `tokenize(TokenStream.CharacterStream input, TokenStream.Tokens tokens)` Process the supplied characters and construct the appropriate `TokenStream.Token` objects.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME

    public static final int NAME

  The token type for tokens that represent an unquoted string containing a character sequence made up of non-whitespace and non-symbol characters.

  See Also:
    Constant Field Values

### SYMBOL

    public static final int SYMBOL

  The token type for tokens that consist of an individual "symbol" character. The set of characters includes: `(){}*.,;+%?$!<>|=:-[]^/\#@`

  See Also:
    Constant Field Values

### QUOTED_STRING

    public static final int QUOTED_STRING

  The token type for tokens that consist of all the characters within single-quotes, double-quotes, or square brackets.

  See Also:
    Constant Field Values

### COMMENT

    public static final int COMMENT

  The token type for tokens that consist of all the characters between "(:" and ":)".

  See Also:
    Constant Field Values

### OTHER

    public static final int OTHER

  The token type for tokens that consist of single characters that are not a `SYMBOL`, valid `NAME`, or `QUOTED_STRING`.

  See Also:
    Constant Field Values

Constructor Detail

### XPathParser.XPathTokenizer

    public XPathParser.XPathTokenizer(boolean useComments)

Method Detail

### tokenize

    public void tokenize(TokenStream.CharacterStream input,
                         TokenStream.Tokens tokens)
                  throws ParsingException

  Process the supplied characters and construct the appropriate `TokenStream.Token` objects.

  Specified by:
    `tokenize` in interface `TokenStream.Tokenizer`
  Parameters:
    `input` - the character input stream; never null
    `tokens` - the factory for `TokenStream.Token` objects, which records the order in which the tokens are created
  Throws:
    `ParsingException` - if there is an error while processing the character stream (e.g., a quote is not closed, etc.)
  See Also:
    `org.modeshape.common.text.TokenStream.Tokenizer#tokenize(CharacterStream, Tokens)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.