com.sonyericsson.hudson.plugins.metadata.search
Class MetadataQuerySearch

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.metadata.search.MetadataQuerySearch

public class MetadataQuerySearch
extends Object

This class will parse the query and search for the matched projects.

Author:
Shemeer Sulaiman <shemeer.x.sulaiman@sonymobile.com>

Constructor Summary
protected MetadataQuerySearch(org.antlr.runtime.tree.CommonTree queryTree)
          MetadataQuerySearch Constructor.
 
Method Summary
static MetadataQuerySearch parseQuery(String queryString)
          The method will parse the query using QueryParser and construct the CommonTree and return the instance of MetadataQuerySearch.
 List<hudson.model.TopLevelItem> searchQuery(List<hudson.model.TopLevelItem> all)
          Method will perform the search using QueryWalker and returns the list of matched projects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataQuerySearch

protected MetadataQuerySearch(org.antlr.runtime.tree.CommonTree queryTree)
MetadataQuerySearch Constructor.

Parameters:
queryTree - CommomTree.
Method Detail

searchQuery

public List<hudson.model.TopLevelItem> searchQuery(List<hudson.model.TopLevelItem> all)
                                            throws Exception
Method will perform the search using QueryWalker and returns the list of matched projects.

Parameters:
all - List.
Returns:
ArrayList of matched TopLevelItems.
Throws:
Exception - exception.

parseQuery

public static MetadataQuerySearch parseQuery(String queryString)
                                      throws Exception
The method will parse the query using QueryParser and construct the CommonTree and return the instance of MetadataQuerySearch.

Parameters:
queryString - the search query.
Returns:
query tree.
Throws:
Exception - if an error occur.


Copyright © 2004-2013. All Rights Reserved.