org.outerj.daisy.repository.query
Interface QueryManager


public interface QueryManager

The QueryManager allows to perform queries on the repository.


Method Summary
 org.outerx.daisy.x10.FacetedQueryResultDocument performFacetedQuery(java.lang.String query, FacetConf[] facetConfs, int chunkOffset, int chunkLength, java.util.Locale locale)
          Performs a query and includes for each selected value the set of distinct values, if the isFacet property of the corresponding entry in the given facetConfs array is true.
 org.outerx.daisy.x10.SearchResultDocument performQuery(java.lang.String query, java.util.Locale locale)
          Executes a query and returns the results as XML.
 org.outerx.daisy.x10.SearchResultDocument performQuery(java.lang.String query, java.lang.String extraCond, java.util.Locale locale)
          Same as performQueryReturnKeys(java.lang.String, java.lang.String, java.util.Locale) but returns the results as XML.
 VariantKey[] performQueryReturnKeys(java.lang.String query, java.util.Locale locale)
          Executes a query and returns the keys of the matching document variants.
 VariantKey[] performQueryReturnKeys(java.lang.String query, java.lang.String extraCond, java.util.Locale locale)
          Executes a query and returns the keys of the matching document variants.
 

Method Detail

performQuery

public org.outerx.daisy.x10.SearchResultDocument performQuery(java.lang.String query,
                                                              java.util.Locale locale)
                                                       throws RepositoryException
Executes a query and returns the results as XML.

Parameters:
query - a query written in the Daisy Query Language
locale - influences the sort behaviour and formatting of non-string fields
Throws:
RepositoryException

performQueryReturnKeys

public VariantKey[] performQueryReturnKeys(java.lang.String query,
                                           java.util.Locale locale)
                                    throws RepositoryException
Executes a query and returns the keys of the matching document variants.

In this case, the select part of the query is ignored, but should still be specified to have a valid query. Use eg "select id where ...".

Parameters:
query - a query written in the Daisy Query Language
locale - influences the sort behaviour
Throws:
RepositoryException

performQueryReturnKeys

public VariantKey[] performQueryReturnKeys(java.lang.String query,
                                           java.lang.String extraCond,
                                           java.util.Locale locale)
                                    throws RepositoryException
Executes a query and returns the keys of the matching document variants.

In this case, the select part of the query is ignored, but should still be specified to have a valid query. Use eg "select id where ...".

Parameters:
query - a query written in the Daisy Query Language
extraCond - extra conditions that will be and-ed to the conditions of the query. This allows to force certain conditions, eg only returning documents part of a certain collection.
locale - influences the sort behaviour
Throws:
RepositoryException

performQuery

public org.outerx.daisy.x10.SearchResultDocument performQuery(java.lang.String query,
                                                              java.lang.String extraCond,
                                                              java.util.Locale locale)
                                                       throws RepositoryException
Same as performQueryReturnKeys(java.lang.String, java.lang.String, java.util.Locale) but returns the results as XML.

Throws:
RepositoryException

performFacetedQuery

public org.outerx.daisy.x10.FacetedQueryResultDocument performFacetedQuery(java.lang.String query,
                                                                           FacetConf[] facetConfs,
                                                                           int chunkOffset,
                                                                           int chunkLength,
                                                                           java.util.Locale locale)
                                                                    throws RepositoryException
Performs a query and includes for each selected value the set of distinct values, if the isFacet property of the corresponding entry in the given facetConfs array is true.

If the length of the facetConf array does not correspond to the number of selected values, this will not give an error.

Throws:
RepositoryException


Copyright © -2005 . All Rights Reserved.