org.alfresco.repo.search
Class AbstractSearcherComponent

java.lang.Object
  extended by org.alfresco.repo.search.AbstractSearcherComponent
All Implemented Interfaces:
SearchService
Direct Known Subclasses:
JCR170Searcher, SearcherComponent

public abstract class AbstractSearcherComponent
extends java.lang.Object
implements SearchService

Provides basic searcher support


Field Summary
 
Fields inherited from interface org.alfresco.service.cmr.search.SearchService
LANGUAGE_CMIS_ALFRESCO, LANGUAGE_CMIS_STRICT, LANGUAGE_FTS_ALFRESCO, LANGUAGE_JCR_XPATH, LANGUAGE_LUCENE, LANGUAGE_XPATH
 
Constructor Summary
AbstractSearcherComponent()
           
 
Method Summary
 ResultSet query(StoreRef store, java.lang.String language, java.lang.String query)
          Search against a store.
 java.util.List selectNodes(NodeRef contextNodeRef, java.lang.String xpath, QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
          Select nodes using an xpath expression.
 java.util.List selectProperties(NodeRef contextNodeRef, java.lang.String xpath, QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
          Select properties using an xpath expression
protected  java.lang.String translateQuery(java.lang.String fromLanguage, java.lang.String toLangage, java.lang.String query)
          Not implemented, but will eventually map directly to SearchLanguageConversion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.service.cmr.search.SearchService
contains, contains, like, query, query, query, selectNodes, selectProperties
 

Constructor Detail

AbstractSearcherComponent

public AbstractSearcherComponent()
Method Detail

translateQuery

protected java.lang.String translateQuery(java.lang.String fromLanguage,
                                          java.lang.String toLangage,
                                          java.lang.String query)
Not implemented, but will eventually map directly to SearchLanguageConversion.


query

public ResultSet query(StoreRef store,
                       java.lang.String language,
                       java.lang.String query)
Description copied from interface: SearchService
Search against a store. Pulls back all attributes on each node. Does not allow parameterisation.

Specified by:
query in interface SearchService
Parameters:
store - - the store against which to search
language - - the query language
query - - the query string - which may include parameters
Returns:
Returns the query results

selectNodes

public java.util.List selectNodes(NodeRef contextNodeRef,
                                  java.lang.String xpath,
                                  QueryParameterDefinition[] parameters,
                                  NamespacePrefixResolver namespacePrefixResolver,
                                  boolean followAllParentLinks)
                           throws InvalidNodeRefException,
                                  XPathException
Description copied from interface: SearchService
Select nodes using an xpath expression.

Specified by:
selectNodes in interface SearchService
Parameters:
contextNodeRef - - the context node for relative expressions etc
xpath - - the xpath string to evaluate
parameters - - parameters to bind in to the xpath expression
namespacePrefixResolver - - prefix to namespace mappings
followAllParentLinks - - if false ".." follows only the primary parent links, if true it follows all
Returns:
a list of all the child assoc relationships to the selected nodes
Throws:
InvalidNodeRefException
XPathException

selectProperties

public java.util.List selectProperties(NodeRef contextNodeRef,
                                       java.lang.String xpath,
                                       QueryParameterDefinition[] parameters,
                                       NamespacePrefixResolver namespacePrefixResolver,
                                       boolean followAllParentLinks)
                                throws InvalidNodeRefException,
                                       XPathException
Description copied from interface: SearchService
Select properties using an xpath expression

Specified by:
selectProperties in interface SearchService
Parameters:
contextNodeRef - - the context node for relative expressions etc
xpath - - the xpath string to evaluate
parameters - - parameters to bind in to the xpath expression
namespacePrefixResolver - - prefix to namespace mappings
followAllParentLinks - - if false ".." follows only the primary parent links, if true it follows all
Returns:
a list of property values
Throws:
InvalidNodeRefException
XPathException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.