本文整理匯總了Java中org.LexGrid.LexBIG.Extensions.Generic.SearchExtension類的典型用法代碼示例。如果您正苦於以下問題:Java SearchExtension類的具體用法?Java SearchExtension怎麽用?Java SearchExtension使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
SearchExtension類屬於org.LexGrid.LexBIG.Extensions.Generic包,在下文中一共展示了SearchExtension類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: converToMatchAlgorithm
import org.LexGrid.LexBIG.Extensions.Generic.SearchExtension; //導入依賴的package包/類
public SearchExtension.MatchAlgorithm converToMatchAlgorithm(int searchOption, String algorithm) {
if (algorithm == null) return null;
if (searchOption != BY_CODE && searchOption != BY_NAME) return null;
if (searchOption == BY_NAME) {
if (algorithm.compareTo("exactMatch") == 0) {
return SearchExtension.MatchAlgorithm.PRESENTATION_EXACT;
} else if (algorithm.compareTo("contains") == 0) {
return SearchExtension.MatchAlgorithm.PRESENTATION_CONTAINS;
} else if (algorithm.compareTo("lucene") == 0) {
return SearchExtension.MatchAlgorithm.LUCENE;
} else { // Note: there is no startsWith equivalence in the search extension algorithm.
return SearchExtension.MatchAlgorithm.LUCENE;
}
} else if (algorithm.compareTo("exactMatch") == 0 && searchOption == BY_CODE) {
return SearchExtension.MatchAlgorithm.CODE_EXACT;
}
return null;
}
示例2: afterPropertiesSet
import org.LexGrid.LexBIG.Extensions.Generic.SearchExtension; //導入依賴的package包/類
@Override
public void afterPropertiesSet() throws Exception {
try {
this.searchExtension =
(SearchExtension) this.getLexBigService().getGenericExtension("SearchExtension");
} catch (Exception e){
log.warn("SearchExtension is not available.");
}
}
示例3: afterPropertiesSet
import org.LexGrid.LexBIG.Extensions.Generic.SearchExtension; //導入依賴的package包/類
@Override
public void afterPropertiesSet() throws Exception {
try {
this.searchExtension =
(SearchExtension) this.lexBigService.getGenericExtension("SearchExtension");
} catch (Exception e){
log.warn("SearchExtension is not available.");
}
}