Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.endeca.portal.data.functions
Class SearchFilter

    java.lang.Object
      com.endeca.portal.data.functions.QueryFunction
          com.endeca.portal.data.functions.QueryFilter
              com.endeca.portal.data.functions.SearchFilter

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class SearchFilter

extends QueryFilter

Permits adding a keyword search to a QueryState.

Author:
  Endeca Technologies, Inc.
See Also:
  Serialized Form

Nested Class Summary
`static class` | `SearchFilter.MatchMode`

Field Summary
`static java.lang.String` | `PASSTHROUGH_SEARCH_FILTER`
`static java.lang.String` | `PASSTHROUGH_SEARCH_FILTER_INFO`

Fields inherited from class com.endeca.portal.data.functions.QueryFunction
`CLASS_PROPERTY`

Constructor Summary
`protected` | `SearchFilter()` Empty constructor is not public, to nudge users toward one of the more useful constructors.
`` | `SearchFilter(org.json.JSONObject jsonObject)` Constructs a search filter from a JSON object
`` | `SearchFilter(java.lang.String searchInterface, java.lang.String terms)` Constructs a search filter with the specified interface and terms, defaulting to match mode "all" and no additional search options.
`` | `SearchFilter(java.lang.String searchInterface, java.lang.String terms, SearchFilter.MatchMode matchMode)` Constructs a search filter with the specified interface, terms, and match mode and no additional search options.
`` | `SearchFilter(java.lang.String searchInterface, java.lang.String terms, SearchFilter.MatchMode matchMode, java.lang.String searchOpts)` Constructs a search filter with the specified interface, terms, match mode and search options.
`` | `SearchFilter(java.lang.String searchInterface, java.lang.String terms, java.lang.String matchMode)` Constructs a search filter with the specified interface, terms, and match mode (as parsed by parseMatchMode method) and no additional search options.
`` | `SearchFilter(java.lang.String searchInterface, java.lang.String terms, java.lang.String matchMode, java.lang.String searchOpts)` Constructs a search filter with the specified interface, terms, match mode (as parsed by parseMatchMode method) and search options.

Method Summary
`void` | `applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)` Apply this function to a Request.
`void` | `applyToENEQuery(com.endeca.navigation.ENEQuery query)` Apply this function to an ENEQuery.
`java.util.List<java.lang.reflect.Method>` | `getGetters()` Return the list of property getters on this function.
`SearchFilter.MatchMode` | `getMatchMode()`
`static java.util.List<SearchFilter>` | `getSearchFilterPassThroughs(com.endeca.mdex.conversation.Request request)` Gets the SearchFilterInfo passthrough element from the v7 request object, and returns the search filter metadata.
`static java.util.List<SearchFilter>` | `getSearchFilterPassThroughs(com.endeca.mdex.conversation.Results results)` Gets the SearchFilterInfo passthrough element from the v7 results object, and returns the search filter metadata.
`java.lang.String` | `getSearchInterface()`
`java.lang.String` | `getSearchOptions()`
`java.util.List<java.lang.reflect.Method>` | `getSetters()` Return the list of property setters on this function.
`java.lang.String` | `getTerms()`
`boolean` | `isSearchWithin()`
`void` | `setMatchMode(SearchFilter.MatchMode matchMode)`
`void` | `setMatchMode(java.lang.String matchModeStr)`
`void` | `setSearchInterface(java.lang.String searchInterface)`
`void` | `setSearchOptions(java.lang.String searchOptions)`
`void` | `setSearchWithin(boolean searchWithin)`
`void` | `setSearchWithin(java.lang.String searchWithin)`
`void` | `setTerms(java.lang.String terms)`
`java.lang.String` | `toString()` This class' toString is abstract: all concrete subclasses are expected to provide an implementation. toString is used in comparing QueryFunction instances for equality, so if you implement a QueryFunction subclass it is important that your toString implementation be consistent and deterministic.

Methods inherited from class com.endeca.portal.data.functions.QueryFunction
`clone, equals, equals, getInstance, getInstance, getName, hashCode, init, setName, toJSON`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### PASSTHROUGH_SEARCH_FILTER_INFO

    public static final java.lang.String PASSTHROUGH_SEARCH_FILTER_INFO

See Also:
  Constant Field Values

### PASSTHROUGH_SEARCH_FILTER

    public static final java.lang.String PASSTHROUGH_SEARCH_FILTER

See Also:
  Constant Field Values

Constructor Detail

### SearchFilter

    protected SearchFilter()

  Empty constructor is not public, to nudge users toward one of the more useful constructors.

### SearchFilter

    public SearchFilter(org.json.JSONObject jsonObject)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalAccessException,
                        org.json.JSONException

  Constructs a search filter from a JSON object

  Parameters:
    `jsonObject` - the JSON object representing this search filter
  Throws:
    `java.lang.IllegalArgumentException`
    `java.lang.IllegalAccessException`
    `org.json.JSONException`

### SearchFilter

    public SearchFilter(java.lang.String searchInterface,
                        java.lang.String terms)

  Constructs a search filter with the specified interface and terms, defaulting to match mode "all" and no additional search options.

  Parameters:
    `searchInterface` -
    `terms` -

### SearchFilter

    public SearchFilter(java.lang.String searchInterface,
                        java.lang.String terms,
                        java.lang.String matchMode)

  Constructs a search filter with the specified interface, terms, and match mode (as parsed by parseMatchMode method) and no additional search options.

  Parameters:
    `searchInterface` -
    `terms` -
    `matchMode` -

### SearchFilter

    public SearchFilter(java.lang.String searchInterface,
                        java.lang.String terms,
                        SearchFilter.MatchMode matchMode)

  Constructs a search filter with the specified interface, terms, and match mode and no additional search options.

  Parameters:
    `searchInterface` -
    `terms` -
    `matchMode` -

### SearchFilter

    public SearchFilter(java.lang.String searchInterface,
                        java.lang.String terms,
                        java.lang.String matchMode,
                        java.lang.String searchOpts)

  Constructs a search filter with the specified interface, terms, match mode (as parsed by parseMatchMode method) and search options. NOTE: Search options are not validated (to ensure they are valid, or to ensure they do not duplicate the match mode search option specified separately).

  Parameters:
    `searchInterface` -
    `terms` -
    `matchMode` -
    `searchOpts` -

### SearchFilter

    public SearchFilter(java.lang.String searchInterface,
                        java.lang.String terms,
                        SearchFilter.MatchMode matchMode,
                        java.lang.String searchOpts)

  Constructs a search filter with the specified interface, terms, match mode and search options. NOTE: Search options are not validated (to ensure they are valid, or to ensure they do not duplicate the match mode search option specified separately).

  Parameters:
    `searchInterface` -
    `terms` -
    `matchMode` -
    `searchOpts` -

Method Detail

### getSearchInterface

    public java.lang.String getSearchInterface()

### setSearchInterface

    public void setSearchInterface(java.lang.String searchInterface)

### getTerms

    public java.lang.String getTerms()

### setTerms

    public void setTerms(java.lang.String terms)

### getMatchMode

    public SearchFilter.MatchMode getMatchMode()

### setMatchMode

    public void setMatchMode(SearchFilter.MatchMode matchMode)

### setMatchMode

    public void setMatchMode(java.lang.String matchModeStr)

### getSearchOptions

    public java.lang.String getSearchOptions()

### setSearchOptions

    public void setSearchOptions(java.lang.String searchOptions)

### isSearchWithin

    public boolean isSearchWithin()

### setSearchWithin

    public void setSearchWithin(boolean searchWithin)

### setSearchWithin

    public void setSearchWithin(java.lang.String searchWithin)

### getSetters

    public java.util.List<java.lang.reflect.Method> getSetters()

  Description copied from class: `QueryFunction`
  Return the list of property setters on this function. Must be implemented by subclass. Required for correct JSON serialization/deserialization support. For most subclasses, implementing this method should be simple, as long as your setter methods follow standard Java naming conventions (e.g. "setPropertyName(PropertyType)"). All you should need to write is: `

       private static List setters = Reflection.getSetters(MyFunctionClass.class);
       \@Override
       public List getSetters() {
              return setters;
       }

  `

  Specified by:
    `getSetters` in class `QueryFunction`
  Returns:
    the list of setters

### getGetters

    public java.util.List<java.lang.reflect.Method> getGetters()

  Description copied from class: `QueryFunction`
  Return the list of property getters on this function. Must be implemented by subclass. Required for correct JSON serialization/deserialization support. For most subclasses, implementing this method should be simple, as long as your getter methods follow standard Java naming conventions (e.g. "getPropertyName()"). All you should need to write is: `

       private static List getters = Reflection.getGetters(MyFunctionClass.class);
       \@Override
       public List getGetters() {
              return getters;
       }

  `

  Specified by:
    `getGetters` in class `QueryFunction`
  Returns:
    the list of getters

### applyToENEQuery

    public void applyToENEQuery(com.endeca.navigation.ENEQuery query)

  Description copied from class: `QueryFunction`
  Apply this function to an ENEQuery. Must be implemented by subclass.

  Specified by:
    `applyToENEQuery` in class `QueryFunction`

### applyToDiscoveryServiceQuery

    public void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)

  Description copied from class: `QueryFunction`
  Apply this function to a Request. Must be implemented by subclass.

  Specified by:
    `applyToDiscoveryServiceQuery` in class `QueryFunction`

### toString

    public java.lang.String toString()

  Description copied from class: `QueryFunction`
  This class' toString is abstract: all concrete subclasses are expected to provide an implementation. toString is used in comparing QueryFunction instances for equality, so if you implement a QueryFunction subclass it is important that your toString implementation be consistent and deterministic.

  Specified by:
    `toString` in class `QueryFunction`

### getSearchFilterPassThroughs

    public static java.util.List<SearchFilter> getSearchFilterPassThroughs(com.endeca.mdex.conversation.Results results)

  Gets the SearchFilterInfo passthrough element from the v7 results object, and returns the search filter metadata.

  Parameters:
    `results` -
  Returns:

### getSearchFilterPassThroughs

    public static java.util.List<SearchFilter> getSearchFilterPassThroughs(com.endeca.mdex.conversation.Request request)

  Gets the SearchFilterInfo passthrough element from the v7 request object, and returns the search filter metadata. THIS IS UNIMPLEMENTED.

  Parameters:
    `results` -
  Returns:

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD