org.modeshape.graph.query.parse
Interface QueryParser

All Known Implementing Classes:
JcrQomQueryParser, JcrSql2QueryParser, JcrSqlQueryParser, SqlQueryParser, XPathQueryParser

@Immutable
public interface QueryParser

The basic interface defining a component that is able to parse a string query into a QueryCommand.


Method Summary
 String getLanguage()
          Get the name of the language that this parser is able to understand.
 QueryCommand parseQuery(String query, TypeSystem typeSystem)
          Parse the supplied query from a string representation into a QueryCommand.
 

Method Detail

getLanguage

String getLanguage()
Get the name of the language that this parser is able to understand.

Returns:
the language name; never null

parseQuery

QueryCommand parseQuery(String query,
                        TypeSystem typeSystem)
                        throws InvalidQueryException
Parse the supplied query from a string representation into a QueryCommand.

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:
ParsingException - if there is an error parsing the supplied query
InvalidQueryException - if the supplied query can be parsed but is invalid


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