本文整理汇总了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.");
}
}