org.apache.slide.search.basic
Class BasicQueryEnvelope

java.lang.Object
  extended byorg.apache.slide.search.SearchQuery
      extended byorg.apache.slide.search.basic.BasicQueryEnvelope
All Implemented Interfaces:
IBasicQuery

public class BasicQueryEnvelope
extends SearchQuery
implements IBasicQuery

Envelopes all queries that are necessary, if a scope covers several stores. For example: /mycoll is mapped to an SQL store, /mycoll/xml is mapped to an XML database. A query with scope /mycoll must be divided in two different queries, the result must be joined.

Version:
$Revision: 1.12 $

Field Summary
 
Fields inherited from class org.apache.slide.search.SearchQuery
searchToken, structureHelper
 
Constructor Summary
BasicQueryEnvelope(SearchToken token, QueryScope queryScope)
           
 
Method Summary
 SearchQueryResult execute()
          Executes each involved query and merges the results
 IBasicExpressionFactory getContentExpressionFactory()
          Should never be called ??
 IBasicExpression getExpression()
          Method getExpression
 int getLimit()
          Method getLimit
 IBasicExpressionFactory getPropertiesExpressionFactory()
          Should never be called ??
 PropertyProvider getPropertyProvider()
          Method getPropertyProvider
 QueryScope getScope()
          Method getScope
 SearchToken getSearchToken()
          Method getSearchToken
 java.lang.String getSlidePath()
          Method getSlidePath
 AbstractStore getStore()
          Method getStore
 void init(SearchToken token)
          Method init
 boolean isLimitDefined()
          Method isLimitDefined
 void parseQueryElement(org.jdom.Element basicSearchElement, PropertyProvider propertyProvider)
          parses all subQueries.
 RequestedProperties requestedProperties()
          Method requestedProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicQueryEnvelope

public BasicQueryEnvelope(SearchToken token,
                          QueryScope queryScope)
                   throws InvalidScopeException
Method Detail

getContentExpressionFactory

public IBasicExpressionFactory getContentExpressionFactory()
Should never be called ??

Specified by:
getContentExpressionFactory in interface IBasicQuery
Returns:
an IBasicExpressionFactory

getPropertiesExpressionFactory

public IBasicExpressionFactory getPropertiesExpressionFactory()
Should never be called ??

Specified by:
getPropertiesExpressionFactory in interface IBasicQuery
Returns:
an IBasicExpressionFactory

parseQueryElement

public void parseQueryElement(org.jdom.Element basicSearchElement,
                              PropertyProvider propertyProvider)
                       throws BadQueryException
parses all subQueries. The scope must be calculated for each subquery.

Specified by:
parseQueryElement in interface IBasicQuery
Parameters:
basicSearchElement - an Element
propertyProvider - a PropertyProvider
Throws:
BadQueryException

execute

public SearchQueryResult execute()
                          throws ServiceAccessException
Executes each involved query and merges the results

Specified by:
execute in interface IBasicQuery
Specified by:
execute in class SearchQuery
Returns:
a SearchQueryResult
Throws:
ServiceAccessException

getStore

public AbstractStore getStore()
Method getStore

Specified by:
getStore in interface IBasicQuery
Returns:
an AbstractStore

getScope

public QueryScope getScope()
Method getScope

Specified by:
getScope in interface IBasicQuery
Returns:
a QueryScope

getPropertyProvider

public PropertyProvider getPropertyProvider()
Method getPropertyProvider

Specified by:
getPropertyProvider in interface IBasicQuery
Returns:
a PropertyProvider

isLimitDefined

public boolean isLimitDefined()
Method isLimitDefined

Specified by:
isLimitDefined in interface IBasicQuery
Returns:
a boolean

getLimit

public int getLimit()
Method getLimit

Specified by:
getLimit in interface IBasicQuery
Returns:
an int

getExpression

public IBasicExpression getExpression()
Method getExpression

Specified by:
getExpression in interface IBasicQuery
Returns:
an IBasicExpression

requestedProperties

public RequestedProperties requestedProperties()
Method requestedProperties

Specified by:
requestedProperties in interface IBasicQuery
Specified by:
requestedProperties in class SearchQuery
Returns:
a RequestedProperties

getSlidePath

public java.lang.String getSlidePath()
                              throws InvalidScopeException
Method getSlidePath

Specified by:
getSlidePath in interface IBasicQuery
Returns:
a String
Throws:
InvalidScopeException

getSearchToken

public SearchToken getSearchToken()
Method getSearchToken

Specified by:
getSearchToken in interface IBasicQuery
Returns:
a SearchToken

init

public void init(SearchToken token)
Description copied from interface: IBasicQuery
Method init

Specified by:
init in interface IBasicQuery
Parameters:
token - a SearchToken