org.alfresco.repo.search.impl.querymodel
Interface FunctionEvaluationContext

All Known Implementing Classes:
AlfrescoFunctionEvaluationContext, CmisFunctionEvaluationContext

public interface FunctionEvaluationContext

The function evaluation context for lucene query implementations. This context is used at query time and also when navigating the results to get column values.


Method Summary
 org.apache.lucene.search.Query buildLuceneEquality(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneExists(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.lang.Boolean not)
          Note: null and not null are not required to support functions from the spec
 org.apache.lucene.search.Query buildLuceneGreaterThan(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneGreaterThanOrEquals(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneIn(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.util.Collection values, java.lang.Boolean not, PredicateMode mode)
          Note: In is not required to support functions from the spec
 org.apache.lucene.search.Query buildLuceneInequality(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLessThan(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLessThanOrEquals(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
           
 org.apache.lucene.search.Query buildLuceneLike(AbstractLuceneQueryParser lqp, java.lang.String propertyName, java.io.Serializable value, java.lang.Boolean not)
          Note: Like is not required to support functions from the spec
 void checkFieldApplies(Selector selector, java.lang.String propertyName)
           
 java.lang.String getLuceneFieldName(java.lang.String propertyName)
           
 LuceneFunction getLuceneFunction(FunctionArgument functionArgument)
           
 java.lang.String getLuceneSortField(AbstractLuceneQueryParser lqp, java.lang.String propertyName)
           
 java.util.Map getNodeRefs()
           
 NodeService getNodeService()
           
 java.io.Serializable getProperty(NodeRef nodeRef, java.lang.String propertyName)
          Get a property
 java.lang.Float getScore()
           
 java.util.Map getScores()
           
 boolean isMultiValued(java.lang.String propertyName)
          Is this a multi-valued property?
 boolean isObjectId(java.lang.String propertyName)
           
 boolean isOrderable(java.lang.String propertyName)
           
 boolean isQueryable(java.lang.String propertyName)
           
 

Method Detail

getNodeRefs

java.util.Map getNodeRefs()
Returns:
the matching nodes by selector (at navigation time)

getScores

java.util.Map getScores()
Returns:
the scores by selector (at navigation time)

getProperty

java.io.Serializable getProperty(NodeRef nodeRef,
                                 java.lang.String propertyName)
Get a property

Parameters:
nodeRef -
propertyName -
Returns:
the property (at navigation time)

getNodeService

NodeService getNodeService()
Returns:
the node service

getScore

java.lang.Float getScore()
Returns:
the score (at navigation time)

buildLuceneEquality

org.apache.lucene.search.Query buildLuceneEquality(AbstractLuceneQueryParser lqp,
                                                   java.lang.String propertyName,
                                                   java.io.Serializable value,
                                                   PredicateMode mode,
                                                   LuceneFunction luceneFunction)
                                                   throws org.apache.lucene.queryParser.ParseException
Parameters:
lqp -
propertyName -
value -
mode -
luceneFunction -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneExists

org.apache.lucene.search.Query buildLuceneExists(AbstractLuceneQueryParser lqp,
                                                 java.lang.String propertyName,
                                                 java.lang.Boolean not)
                                                 throws org.apache.lucene.queryParser.ParseException
Note: null and not null are not required to support functions from the spec

Parameters:
lqp -
propertyName -
not -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneGreaterThan

org.apache.lucene.search.Query buildLuceneGreaterThan(AbstractLuceneQueryParser lqp,
                                                      java.lang.String propertyName,
                                                      java.io.Serializable value,
                                                      PredicateMode mode,
                                                      LuceneFunction luceneFunction)
                                                      throws org.apache.lucene.queryParser.ParseException
Parameters:
lqp -
propertyName -
value -
mode -
luceneFunction -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneGreaterThanOrEquals

org.apache.lucene.search.Query buildLuceneGreaterThanOrEquals(AbstractLuceneQueryParser lqp,
                                                              java.lang.String propertyName,
                                                              java.io.Serializable value,
                                                              PredicateMode mode,
                                                              LuceneFunction luceneFunction)
                                                              throws org.apache.lucene.queryParser.ParseException
Parameters:
lqp -
propertyName -
value -
mode -
luceneFunction -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLessThan

org.apache.lucene.search.Query buildLuceneLessThan(AbstractLuceneQueryParser lqp,
                                                   java.lang.String propertyName,
                                                   java.io.Serializable value,
                                                   PredicateMode mode,
                                                   LuceneFunction luceneFunction)
                                                   throws org.apache.lucene.queryParser.ParseException
Parameters:
lqp -
propertyName -
value -
mode -
luceneFunction -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLessThanOrEquals

org.apache.lucene.search.Query buildLuceneLessThanOrEquals(AbstractLuceneQueryParser lqp,
                                                           java.lang.String propertyName,
                                                           java.io.Serializable value,
                                                           PredicateMode mode,
                                                           LuceneFunction luceneFunction)
                                                           throws org.apache.lucene.queryParser.ParseException
Parameters:
lqp -
propertyName -
value -
mode -
luceneFunction -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneLike

org.apache.lucene.search.Query buildLuceneLike(AbstractLuceneQueryParser lqp,
                                               java.lang.String propertyName,
                                               java.io.Serializable value,
                                               java.lang.Boolean not)
                                               throws org.apache.lucene.queryParser.ParseException
Note: Like is not required to support functions from the spec

Parameters:
lqp -
propertyName -
value -
not -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneInequality

org.apache.lucene.search.Query buildLuceneInequality(AbstractLuceneQueryParser lqp,
                                                     java.lang.String propertyName,
                                                     java.io.Serializable value,
                                                     PredicateMode mode,
                                                     LuceneFunction luceneFunction)
                                                     throws org.apache.lucene.queryParser.ParseException
Parameters:
lqp -
propertyName -
value -
mode -
luceneFunction -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

buildLuceneIn

org.apache.lucene.search.Query buildLuceneIn(AbstractLuceneQueryParser lqp,
                                             java.lang.String propertyName,
                                             java.util.Collection values,
                                             java.lang.Boolean not,
                                             PredicateMode mode)
                                             throws org.apache.lucene.queryParser.ParseException
Note: In is not required to support functions from the spec

Parameters:
lqp -
propertyName -
values -
not -
mode -
Returns:
the query
Throws:
org.apache.lucene.queryParser.ParseException

getLuceneSortField

java.lang.String getLuceneSortField(AbstractLuceneQueryParser lqp,
                                    java.lang.String propertyName)
Parameters:
propertyName -
luceneContext -
locales -
analysisMode -
reader -
Returns:
the field used for sorting the given property

isObjectId

boolean isObjectId(java.lang.String propertyName)
Parameters:
propertyName -
Returns:
- is this an object id

isQueryable

boolean isQueryable(java.lang.String propertyName)
Parameters:
propertyName -
Returns:
is this property queryable

isOrderable

boolean isOrderable(java.lang.String propertyName)
Parameters:
propertyName -
Returns:
Is this property orderable

getLuceneFieldName

java.lang.String getLuceneFieldName(java.lang.String propertyName)
Parameters:
propertyName -
Returns:
the lucene field name for the property

getLuceneFunction

LuceneFunction getLuceneFunction(FunctionArgument functionArgument)
Parameters:
functionArgument -
Returns:
the lucene function appropriate to a function argument

checkFieldApplies

void checkFieldApplies(Selector selector,
                       java.lang.String propertyName)
Parameters:
type -
propertyName -

isMultiValued

boolean isMultiValued(java.lang.String propertyName)
Is this a multi-valued property?

Parameters:
propertyName -
Returns:


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