org.apache.slide.search
Class SearchLanguage

java.lang.Object
  extended byorg.apache.slide.search.SearchLanguage
Direct Known Subclasses:
BasicSearchLanguage

public abstract class SearchLanguage
extends java.lang.Object

Base class for a search language.

Version:
$Revision: 1.11 $

Constructor Summary
SearchLanguage()
           
 
Method Summary
abstract  java.lang.String getGrammarUri()
          Returns the grammar URI for this language, this is what the DASL response Header returns.
abstract  java.lang.String getName()
          Returns this language's name.
abstract  SearchQuery parseQuery(org.jdom.Element queryElement, SearchToken token, PropertyProvider propertyProvider)
          Generate a query object from a JDOM Element.
abstract  SearchQuery parseQuery(java.lang.String queryString, SearchToken token, PropertyProvider propertyProvider)
          Generate a query object from a String, set the maximum depth.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchLanguage

public SearchLanguage()
Method Detail

getName

public abstract java.lang.String getName()
Returns this language's name. This is the name of the first element within the searchrequest.


getGrammarUri

public abstract java.lang.String getGrammarUri()
Returns the grammar URI for this language, this is what the DASL response Header returns.

Returns:
the URI identifying this language

parseQuery

public abstract SearchQuery parseQuery(java.lang.String queryString,
                                       SearchToken token,
                                       PropertyProvider propertyProvider)
                                throws BadQueryException
Generate a query object from a String, set the maximum depth.

Throws:
BadQueryException

parseQuery

public abstract SearchQuery parseQuery(org.jdom.Element queryElement,
                                       SearchToken token,
                                       PropertyProvider propertyProvider)
                                throws BadQueryException
Generate a query object from a JDOM Element.

Parameters:
queryElement - JDOM element containing the query
token - the SearchToken
propertyProvider - the PropertyProvider to use (may be null).
Returns:
a SearchQuery
Throws:
BadQueryException