1 17 package org.alfresco.repo.search; 18 19 import java.io.Serializable ; 20 import java.util.List ; 21 22 import org.alfresco.service.cmr.repository.InvalidNodeRefException; 23 import org.alfresco.service.cmr.repository.NodeRef; 24 import org.alfresco.service.cmr.repository.Path; 25 import org.alfresco.service.cmr.repository.StoreRef; 26 import org.alfresco.service.cmr.repository.XPathException; 27 import org.alfresco.service.cmr.search.QueryParameterDefinition; 28 import org.alfresco.service.cmr.search.ResultSet; 29 import org.alfresco.service.cmr.search.SearchService; 30 import org.alfresco.service.namespace.NamespacePrefixResolver; 31 import org.alfresco.util.SearchLanguageConversion; 32 33 38 public abstract class AbstractSearcherComponent implements SearchService 39 { 40 44 protected String translateQuery(String fromLanguage, String toLangage, String query) 45 { 46 throw new UnsupportedOperationException (); 47 } 48 49 public ResultSet query(StoreRef store, String language, String query) 50 { 51 return query(store, language, query, null, null); 52 } 53 54 public ResultSet query(StoreRef store, String language, String query, 55 QueryParameterDefinition[] queryParameterDefintions) 56 { 57 return query(store, language, query, null, queryParameterDefintions); 58 } 59 60 public ResultSet query(StoreRef store, String language, String query, Path[] attributePaths) 61 { 62 return query(store, language, query, attributePaths, null); 63 } 64 65 public List <NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters, 66 NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks) 67 throws InvalidNodeRefException, XPathException 68 { 69 return selectNodes(contextNodeRef, xpath, parameters, namespacePrefixResolver, followAllParentLinks, 70 SearchService.LANGUAGE_XPATH); 71 } 72 73 public List <Serializable > selectProperties(NodeRef contextNodeRef, String xpath, 74 QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, 75 boolean followAllParentLinks) throws InvalidNodeRefException, XPathException 76 { 77 return selectProperties(contextNodeRef, xpath, parameters, namespacePrefixResolver, followAllParentLinks, 78 SearchService.LANGUAGE_XPATH); 79 } 80 } 81 | Popular Tags |