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 specvoid
checkFieldApplies
(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()
boolean
isMultiValued
(String propertyName) Is this a multi-valued property?boolean
isObjectId
(String propertyName) boolean
isOrderable
(String fieldName) boolean
isQueryable
(String fieldName) void
setCmisDictionaryService
(CMISDictionaryService cmisDictionaryService) void
setNodeInfos
(Map<NodeRef, CMISNodeInfo> nodeInfos) void
setNodeRefs
(Map<String, NodeRef> nodeRefs) void
setNodeService
(NodeService nodeService) void
void
void
setValidScopes
(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:
getNodeRefs
in interfaceFunctionEvaluationContext
- Returns:
- the matching nodes by selector (at navigation time)
-
getNodeService
- Specified by:
getNodeService
in interfaceFunctionEvaluationContext
- Returns:
- the node service
-
getProperty
Description copied from interface:FunctionEvaluationContext
Get a property- Specified by:
getProperty
in interfaceFunctionEvaluationContext
- Parameters:
nodeRef
- NodeRefpropertyName
- String- Returns:
- the property (at navigation time)
-
getScores
- Specified by:
getScores
in interfaceFunctionEvaluationContext
- Returns:
- the scores by selector (at navigation time)
-
getScore
- Specified by:
getScore
in 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:
buildLuceneEquality
in interfaceFunctionEvaluationContext
propertyName
- 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:FunctionEvaluationContext
Note: null and not null are not required to support functions from the spec- Specified by:
buildLuceneExists
in interfaceFunctionEvaluationContext
propertyName
- 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:
buildLuceneGreaterThan
in interfaceFunctionEvaluationContext
propertyName
- 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:
buildLuceneGreaterThanOrEquals
in interfaceFunctionEvaluationContext
propertyName
- 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:FunctionEvaluationContext
Note: In is not required to support functions from the spec- Specified by:
buildLuceneIn
in interfaceFunctionEvaluationContext
propertyName
- 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:
buildLuceneInequality
in interfaceFunctionEvaluationContext
propertyName
- 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:
buildLuceneLessThan
in interfaceFunctionEvaluationContext
propertyName
- 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:
buildLuceneLessThanOrEquals
in interfaceFunctionEvaluationContext
propertyName
- 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:FunctionEvaluationContext
Note: Like is not required to support functions from the spec- Specified by:
buildLuceneLike
in interfaceFunctionEvaluationContext
propertyName
- 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:
getLuceneSortField
in interfaceFunctionEvaluationContext
propertyName
- String- Returns:
- the field used for sorting the given property
- Throws:
E
-
isObjectId
- Specified by:
isObjectId
in interfaceFunctionEvaluationContext
- Parameters:
propertyName
- String- Returns:
- - is this an object id
-
isOrderable
- Specified by:
isOrderable
in interfaceFunctionEvaluationContext
- Parameters:
fieldName
- String- Returns:
- Is this property orderable
-
isQueryable
- Specified by:
isQueryable
in interfaceFunctionEvaluationContext
- Parameters:
fieldName
- String- Returns:
- is this property queryable
-
getLuceneFieldName
- Specified by:
getLuceneFieldName
in interfaceFunctionEvaluationContext
- Parameters:
propertyName
- String- Returns:
- the lucene field name for the property
-
getLuceneFunction
- Specified by:
getLuceneFunction
in interfaceFunctionEvaluationContext
- Parameters:
functionArgument
- FunctionArgument- Returns:
- the lucene function appropriate to a function argument
-
checkFieldApplies
- Specified by:
checkFieldApplies
in interfaceFunctionEvaluationContext
- Parameters:
selector
- SelectorpropertyName
- String
-
isMultiValued
Description copied from interface:FunctionEvaluationContext
Is this a multi-valued property?- Specified by:
isMultiValued
in interfaceFunctionEvaluationContext
- Parameters:
propertyName
- String- Returns:
- boolean
-
getAlfrescoPropertyName
- Specified by:
getAlfrescoPropertyName
in interfaceFunctionEvaluationContext
-
getAlfrescoTypeName
- Specified by:
getAlfrescoTypeName
in interfaceFunctionEvaluationContext
- Parameters:
typeName
- String- Returns:
- String
-