org.jboss.dna.jcr.xpath
Class XPathQueryParser

java.lang.Object
  extended by org.jboss.dna.jcr.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 DNA Abstract Query Model representation.


Constructor Summary
XPathQueryParser()
           
 
Method Summary
 boolean equals(Object obj)
          
 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.
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XPathQueryParser

public XPathQueryParser()
Method Detail

getLanguage

public String getLanguage()
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
See Also:
QueryParser.getLanguage()

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

parseQuery

public QueryCommand parseQuery(String query,
                               TypeSystem typeSystem)
                        throws InvalidQueryException,
                               ParsingException
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
See Also:
QueryParser.parseQuery(java.lang.String, org.jboss.dna.graph.query.model.TypeSystem)


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