org.modeshape.jcr.query.xpath

## Class XPathQueryParser

- java.lang.Object
- - org.modeshape.jcr.query.xpath.XPathQueryParser

- All Implemented Interfaces:
    QueryParser

      public class XPathQueryParser
      extends Object
      implements QueryParser

  A `QueryParser` implementation that accepts XPath expressions and converts them to a `ModeShape Abstract Query Model` representation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XPathQueryParser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `String` | `getLanguage()` Get the name of the language that this parser is able to understand.
    `int` | `hashCode()`
    `QueryCommand` | `parseQuery(String query, TypeSystem typeSystem)` Parse the supplied query from a string representation into a `QueryCommand`.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### XPathQueryParser

          public XPathQueryParser()

  - ### Method Detail

    - #### getLanguage

          public String getLanguage()

      Description copied from interface: `QueryParser`
      Get the name of the language that this parser is able to understand.
      Specified by:
        `getLanguage` in interface `QueryParser`
      Returns:
        the language name; never null

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### parseQuery

          public QueryCommand parseQuery(String query,
                                TypeSystem typeSystem)
                                  throws InvalidQueryException,
                                         ParsingException

      Description copied from interface: `QueryParser`
      Parse the supplied query from a string representation into a `QueryCommand`.
      Specified by:
        `parseQuery` in interface `QueryParser`
      Parameters:
        `query` - the query in string form; may not be null
        `typeSystem` - the type system used by the query; may not be null
      Returns:
        the query command
      Throws:
        `InvalidQueryException` - if the supplied query can be parsed but is invalid
        `ParsingException` - if there is an error parsing the supplied query

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