Modelers

org.topcased.search.core.engine
Class AbstractModelExtensibleSearchQuery

java.lang.Object
  extended by org.topcased.search.core.engine.AbstractModelExtensibleSearchQuery
All Implemented Interfaces:
org.eclipse.search.ui.ISearchQuery, INamedQuery

public class AbstractModelExtensibleSearchQuery
extends java.lang.Object
implements org.eclipse.search.ui.ISearchQuery, INamedQuery

Describes an abstract model search query to be subclassed by users. This abtraction describes the fact each query needs parameters common to all kind of queries such as :

  • queryText
  • modelSearchEngineID
  • selectedScope
  • selection


    Users wanting to describe such query parameters must extends this class. It allows to describe arbitrary parameters using a Object map.


    Field Summary
    protected  java.util.List<?> participantElements
               
    protected  java.lang.Object root
               
    protected  java.util.Collection<?> validParticipantMetaElements
               
     
    Constructor Summary
    AbstractModelExtensibleSearchQuery(AbstractModelExtensibleSearchParameters parameters)
               
     
    Method Summary
     boolean canRerun()
               
     boolean canRunInBackground()
               
     java.lang.String getLabel()
               
     AbstractModelExtensibleSearchParameters getModelSearchParameters()
               
     ModelExtensibleSearchResult getModelSearchResult()
               
     java.lang.String getName()
               
     java.lang.String getQueryKind()
               
     java.lang.String getQueryText()
               
     org.eclipse.search.ui.ISearchResult getSearchResult()
               
     ModelSearchQueryTextualExpressionMatchingHelper getTextualExpressionMatchingHelper()
               
    protected  void processSearchResultMatching(org.eclipse.core.resources.IResource resource, java.lang.Object o)
               
     org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
               
    protected  org.eclipse.core.runtime.IStatus search(org.eclipse.core.resources.IResource resource)
              Users wanting to get results must override this method.
     void setQueryKind(java.lang.String queryKind)
               
     void setQueryText(java.lang.String queryText)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    root

    protected java.lang.Object root

    participantElements

    protected java.util.List<?> participantElements

    validParticipantMetaElements

    protected java.util.Collection<?> validParticipantMetaElements
    Constructor Detail

    AbstractModelExtensibleSearchQuery

    public AbstractModelExtensibleSearchQuery(AbstractModelExtensibleSearchParameters parameters)
    Method Detail

    canRerun

    public boolean canRerun()
    Specified by:
    canRerun in interface org.eclipse.search.ui.ISearchQuery
    See Also:
    ISearchQuery.canRerun()

    canRunInBackground

    public boolean canRunInBackground()
    Specified by:
    canRunInBackground in interface org.eclipse.search.ui.ISearchQuery
    See Also:
    ISearchQuery.canRunInBackground()

    processSearchResultMatching

    protected void processSearchResultMatching(org.eclipse.core.resources.IResource resource,
                                               java.lang.Object o)

    getLabel

    public java.lang.String getLabel()
    Specified by:
    getLabel in interface org.eclipse.search.ui.ISearchQuery
    See Also:
    ISearchQuery.getLabel()

    getSearchResult

    public org.eclipse.search.ui.ISearchResult getSearchResult()
    Specified by:
    getSearchResult in interface org.eclipse.search.ui.ISearchQuery
    See Also:
    ISearchQuery.getSearchResult()

    run

    public org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
                                         throws org.eclipse.core.runtime.OperationCanceledException
    Specified by:
    run in interface org.eclipse.search.ui.ISearchQuery
    Throws:
    org.eclipse.core.runtime.OperationCanceledException
    See Also:
    ISearchQuery.run(org.eclipse.core.runtime.IProgressMonitor)

    search

    protected org.eclipse.core.runtime.IStatus search(org.eclipse.core.resources.IResource resource)
    Users wanting to get results must override this method.

    Parameters:
    resource - A valid participant IResource according to IModelResourceValidator checkings coming from search page selection.

    getModelSearchParameters

    public AbstractModelExtensibleSearchParameters getModelSearchParameters()

    getModelSearchResult

    public ModelExtensibleSearchResult getModelSearchResult()

    getQueryKind

    public java.lang.String getQueryKind()

    setQueryKind

    public void setQueryKind(java.lang.String queryKind)

    getQueryText

    public java.lang.String getQueryText()

    setQueryText

    public void setQueryText(java.lang.String queryText)

    getTextualExpressionMatchingHelper

    public ModelSearchQueryTextualExpressionMatchingHelper getTextualExpressionMatchingHelper()

    getName

    public java.lang.String getName()
    Specified by:
    getName in interface INamedQuery

    Modelers

    Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.