com.bea.content.expression
Class SearchTranslator

java.lang.Object
  extended by com.bea.content.expression.SearchTranslator

public abstract class SearchTranslator
extends Object

Abstract class for third-party repositories to extend and use as a helper to translate repository-specific search syntax to/from a com.bea.content.expression.Search object.

For example, in the SearchOps implementation of public ID[] search(Search search) public ID[] search(Search search) { SearchTranslator translator = new FooSearchTranslator(); // Your implementation String searchExpr = translator.parseSearchObject(search); return translator.search(searchExpr); }

Client code could use the SearchTranslator to create the Search object needed by SearchOps SearchTranslator translator = new FooSearchTranslator(); Search search = translator.transformSyntax("keyword:foo"); // this is a contrived example. Use valid syntax for your repository ISearchManager searchManager = ContentManagerFactory.getSearchManager(); ISortableFilterablePagedList results = searchManager.search(new ContentContext(), search);


Field Summary
static String SHAREPOINT_KEYWORD_TOKEN
          Special tokens denoting use of SharePoint search syntax
static String SHAREPOINT_MSSQL_TOKEN
           
 
Constructor Summary
SearchTranslator()
           
 
Method Summary
abstract  String parseSearchObject(Search search)
          Parse the input Search object and return a String the underlying implementation can understand
abstract  ID[] search(String searchString)
          Execute the search using a String the underlying implementation can understand
abstract  Search transformSyntax(String searchString)
          Transform the input syntax to a Search object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHAREPOINT_KEYWORD_TOKEN

public static final String SHAREPOINT_KEYWORD_TOKEN
Special tokens denoting use of SharePoint search syntax

See Also
Constants Summary

SHAREPOINT_MSSQL_TOKEN

public static final String SHAREPOINT_MSSQL_TOKEN
See Also
Constants Summary
Constructor Detail

SearchTranslator

public SearchTranslator()
Method Detail

transformSyntax

public abstract Search transformSyntax(String searchString)
Transform the input syntax to a Search object


parseSearchObject

public abstract String parseSearchObject(Search search)
                                  throws RepositoryException
Parse the input Search object and return a String the underlying implementation can understand

Parameters
search -
Returns
Throws
RepositoryException

search

public abstract ID[] search(String searchString)
                     throws RepositoryException
Execute the search using a String the underlying implementation can understand

Returns
Throws
RepositoryException


Copyright © 2000, 2008, 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.