Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.expression
Interface ISearchTranslator

    public interface ISearchTranslator

Interface for third-party repositories to implement and use as a helper to translate repository-specific search syntax to/from a com.bea.content.expression.Search object. The implementation class of the repository-specific SearchTranslator must be specified in content-config.xml: `The SearchTranslator implementation specific to this repository SearchTranslator com.stellent.ridc.spi.search.SearchTranslator`

Field Summary
`static String` | `PARAMETER_MAP`
`static String` | `QUERY_PARAM`
`static String` | `TRANSLATOR_CLASS`

Method Summary
`Search` | `createQuery(String queryString)` Transform and set the (repository-specific) queryString into the SearchTranslator instance (which may be obtained via a Class.forName() using the class specified in content-config.xml as shown above).
`Search` | `parameterizeSearch(Map<String,String> parameterMap)` Parameterize a Search object with the given data.
`ID[]` | `search(Search search)` Execute the search using the underlying implementation.

Field Detail

### TRANSLATOR_CLASS

    static final String TRANSLATOR_CLASS

See Also
  Constants Summary

### QUERY_PARAM

    static final String QUERY_PARAM

See Also
  Constants Summary

### PARAMETER_MAP

    static final String PARAMETER_MAP

See Also
  Constants Summary

Method Detail

### search

    ID[] search(Search search)
                throws Exception

  Execute the search using the underlying implementation. The SearchTranslator instance is parameterized from the Search object.

  Returns
    array of ID representing the search results, or an empty array if none found
  Throws
    `Exception`

### createQuery

    Search createQuery(String queryString)

  Transform and set the (repository-specific) queryString into the SearchTranslator instance (which may be obtained via a Class.forName() using the class specified in content-config.xml as shown above).

  Returns
    Search object that contains a reference to the SearchTranslator instance. All parameters are in the SearchTranslator instance at this point.

### parameterizeSearch

    Search parameterizeSearch(Map<String,String> parameterMap)

  Parameterize a Search object with the given data. This sets the required search context parameters so Search can recognize the need to use a translator to perform the search. This method is used for more complex query constructions. Here is an example for parameterizing Stellent's Content Server search service for simple keyword Map parameterMap = new HashMap(); map.put("QueryText", "Nederland"); map.put("ResultCount", "20"); // defaults to 25 if not set An example for Stellent's Content Server search service for metadata Map parameterMap = new HashMap(); map.put("QueryText", "dDocTitle `Joshua`"); map.put("SortField", "dInDate");

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.