org.dspace.app.xmlui.aspect.artifactbrowser
Class AdvancedSearchUtils

java.lang.Object
  extended by org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearchUtils

public class AdvancedSearchUtils
extends Object

Central place where advanced search queries can be built since these are built on several places

Author:
Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)

Nested Class Summary
static class AdvancedSearchUtils.SearchField
          A private record keeping class to relate the various components of a search field together.
 
Constructor Summary
AdvancedSearchUtils()
           
 
Method Summary
static String buildQuery(List<AdvancedSearchUtils.SearchField> fields)
          Given a list of search fields build a lucene search query string.
static List<AdvancedSearchUtils.SearchField> getSearchFields(org.apache.cocoon.environment.Request request)
          Get a list of search fields from the request object and parse them into a linear array of fileds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedSearchUtils

public AdvancedSearchUtils()
Method Detail

buildQuery

public static String buildQuery(List<AdvancedSearchUtils.SearchField> fields)
Given a list of search fields build a lucene search query string.

Parameters:
fields - The search fields
Returns:
A string

getSearchFields

public static List<AdvancedSearchUtils.SearchField> getSearchFields(org.apache.cocoon.environment.Request request)
                                                             throws UIException
Get a list of search fields from the request object and parse them into a linear array of fileds. The field's index is preserved, so if it comes in as index 17 it will be outputted as field 17.

Parameters:
request - The http request object
Returns:
Array of search fields
Throws:
UIException


Copyright © 2012 DuraSpace. All Rights Reserved.