Package org.alfresco.opencmis.search
Class CmisFunctionEvaluationContext
java.lang.Object
org.alfresco.opencmis.search.CmisFunctionEvaluationContext
- All Implemented Interfaces:
FunctionEvaluationContext
- Author:
- andyh
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.apache.chemistry.opencmis.commons.enums.BaseTypeId[]static org.apache.chemistry.opencmis.commons.enums.BaseTypeId[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<Q,S, E extends Throwable>
QbuildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,S, E extends Throwable>
QbuildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) Note: null and not null are not required to support functions from the spec<Q,S, E extends Throwable>
QbuildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,S, E extends Throwable>
QbuildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,S, E extends Throwable>
QbuildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) Note: In is not required to support functions from the spec<Q,S, E extends Throwable>
QbuildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,S, E extends Throwable>
QbuildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,S, E extends Throwable>
QbuildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,S, E extends Throwable>
QbuildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) Note: Like is not required to support functions from the specvoidcheckFieldApplies(Selector selector, String propertyName) getAlfrescoPropertyName(String propertyName) getAlfrescoTypeName(String typeName) getLuceneFieldName(String propertyName) getLuceneFunction(FunctionArgument functionArgument) getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) getProperty(NodeRef nodeRef, String propertyName) Get a propertygetScore()booleanisMultiValued(String propertyName) Is this a multi-valued property?booleanisObjectId(String propertyName) booleanisOrderable(String fieldName) booleanisQueryable(String fieldName) voidsetCmisDictionaryService(CMISDictionaryService cmisDictionaryService) voidsetNodeInfos(Map<NodeRef, CMISNodeInfo> nodeInfos) voidsetNodeRefs(Map<String, NodeRef> nodeRefs) voidsetNodeService(NodeService nodeService) voidvoidvoidsetValidScopes(org.apache.chemistry.opencmis.commons.enums.BaseTypeId[] validScopes)
-
Field Details
-
STRICT_SCOPES
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId[] STRICT_SCOPES -
ALFRESCO_SCOPES
public static org.apache.chemistry.opencmis.commons.enums.BaseTypeId[] ALFRESCO_SCOPES
-
-
Constructor Details
-
CmisFunctionEvaluationContext
public CmisFunctionEvaluationContext()
-
-
Method Details
-
setNodeRefs
- Parameters:
nodeRefs- the nodeRefs to set
-
setScores
- Parameters:
scores- the scores to set
-
setNodeInfos
-
setNodeService
- Parameters:
nodeService- the nodeService to set
-
setCmisDictionaryService
- Parameters:
cmisDictionaryService- the cmisDictionaryService to set
-
setValidScopes
public void setValidScopes(org.apache.chemistry.opencmis.commons.enums.BaseTypeId[] validScopes) - Parameters:
validScopes- the valid scopes to set
-
getNodeRefs
- Specified by:
getNodeRefsin interfaceFunctionEvaluationContext- Returns:
- the matching nodes by selector (at navigation time)
-
getNodeService
- Specified by:
getNodeServicein interfaceFunctionEvaluationContext- Returns:
- the node service
-
getProperty
Description copied from interface:FunctionEvaluationContextGet a property- Specified by:
getPropertyin interfaceFunctionEvaluationContext- Parameters:
nodeRef- NodeRefpropertyName- String- Returns:
- the property (at navigation time)
-
getScores
- Specified by:
getScoresin interfaceFunctionEvaluationContext- Returns:
- the scores by selector (at navigation time)
-
getScore
- Specified by:
getScorein interfaceFunctionEvaluationContext- Returns:
- the score
-
setScore
- Parameters:
score- the score to set
-
buildLuceneEquality
public <Q,S, Q buildLuceneEqualityE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Specified by:
buildLuceneEqualityin interfaceFunctionEvaluationContextpropertyName- Stringvalue- Serializablemode- PredicateModeluceneFunction- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneExists
public <Q,S, Q buildLuceneExistsE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Boolean not) Description copied from interface:FunctionEvaluationContextNote: null and not null are not required to support functions from the spec- Specified by:
buildLuceneExistsin interfaceFunctionEvaluationContextpropertyName- Stringnot- Boolean- Returns:
- the query
- Throws:
E
-
buildLuceneGreaterThan
public <Q,S, Q buildLuceneGreaterThanE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Specified by:
buildLuceneGreaterThanin interfaceFunctionEvaluationContextpropertyName- Stringvalue- Serializablemode- PredicateModeluceneFunction- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneGreaterThanOrEquals
public <Q,S, Q buildLuceneGreaterThanOrEqualsE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Specified by:
buildLuceneGreaterThanOrEqualsin interfaceFunctionEvaluationContextpropertyName- Stringvalue- Serializablemode- PredicateModeluceneFunction- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneIn
public <Q,S, Q buildLuceneInE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) Description copied from interface:FunctionEvaluationContextNote: In is not required to support functions from the spec- Specified by:
buildLuceneInin interfaceFunctionEvaluationContextpropertyName- Stringnot- Booleanmode- PredicateMode- Returns:
- the query
- Throws:
E
-
buildLuceneInequality
public <Q,S, Q buildLuceneInequalityE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Specified by:
buildLuceneInequalityin interfaceFunctionEvaluationContextpropertyName- Stringvalue- Serializablemode- PredicateModeluceneFunction- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneLessThan
public <Q,S, Q buildLuceneLessThanE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Specified by:
buildLuceneLessThanin interfaceFunctionEvaluationContextpropertyName- Stringvalue- Serializablemode- PredicateModeluceneFunction- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneLessThanOrEquals
public <Q,S, Q buildLuceneLessThanOrEqualsE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Specified by:
buildLuceneLessThanOrEqualsin interfaceFunctionEvaluationContextpropertyName- Stringvalue- Serializablemode- PredicateModeluceneFunction- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneLike
public <Q,S, Q buildLuceneLikeE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, Boolean not) Description copied from interface:FunctionEvaluationContextNote: Like is not required to support functions from the spec- Specified by:
buildLuceneLikein interfaceFunctionEvaluationContextpropertyName- Stringvalue- Serializablenot- Boolean- Returns:
- the query
- Throws:
E
-
getLuceneSortField
public <Q,S, String getLuceneSortFieldE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName) - Specified by:
getLuceneSortFieldin interfaceFunctionEvaluationContextpropertyName- String- Returns:
- the field used for sorting the given property
- Throws:
E
-
isObjectId
- Specified by:
isObjectIdin interfaceFunctionEvaluationContext- Parameters:
propertyName- String- Returns:
- - is this an object id
-
isOrderable
- Specified by:
isOrderablein interfaceFunctionEvaluationContext- Parameters:
fieldName- String- Returns:
- Is this property orderable
-
isQueryable
- Specified by:
isQueryablein interfaceFunctionEvaluationContext- Parameters:
fieldName- String- Returns:
- is this property queryable
-
getLuceneFieldName
- Specified by:
getLuceneFieldNamein interfaceFunctionEvaluationContext- Parameters:
propertyName- String- Returns:
- the lucene field name for the property
-
getLuceneFunction
- Specified by:
getLuceneFunctionin interfaceFunctionEvaluationContext- Parameters:
functionArgument- FunctionArgument- Returns:
- the lucene function appropriate to a function argument
-
checkFieldApplies
- Specified by:
checkFieldAppliesin interfaceFunctionEvaluationContext- Parameters:
selector- SelectorpropertyName- String
-
isMultiValued
Description copied from interface:FunctionEvaluationContextIs this a multi-valued property?- Specified by:
isMultiValuedin interfaceFunctionEvaluationContext- Parameters:
propertyName- String- Returns:
- boolean
-
getAlfrescoPropertyName
- Specified by:
getAlfrescoPropertyNamein interfaceFunctionEvaluationContext
-
getAlfrescoTypeName
- Specified by:
getAlfrescoTypeNamein interfaceFunctionEvaluationContext- Parameters:
typeName- String- Returns:
- String
-