Class PathImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.query.ast.DynamicOperandImpl
-
- org.apache.jackrabbit.oak.query.ast.PathImpl
-
public class PathImpl extends DynamicOperandImpl
The function "path(..)".
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindSelector(SourceImpl source)booleancanRestrictSelector(SelectorImpl s)Check whether the condition can be applied to a selector (to restrict the selector).protected PropertyValueconvertValueToType(PropertyValue v, PropertyValue targetType)@NotNull org.apache.jackrabbit.oak.query.ast.AstElementcopyOf()DynamicOperandImplcreateCopy()PropertyValuecurrentProperty()StringgetFunction(SelectorImpl s)Get the function of a function-based index, in Polish notation.protected StringgetLocalPath(String path)Calculate the session local path (the path excluding the workspace name) if possible.QueryIndex.OrderEntrygetOrderEntry(SelectorImpl s, OrderingImpl o)Create an entry for the "order by" list for a given filter.PropertyExistenceImplgetPropertyExistence()Get the property existence condition for this operand, if this operand is used as part of a condition.Set<SelectorImpl>getSelectors()Get the set of selectors for this operand.protected StringnormalizePath(String path)Validate and normalize the path.protected StringnormalizePropertyName(String propertyName)Normalize the property name (including namespace remapping).protected Stringprotect(Object expression)protected static Stringquote(String pathOrName)protected static StringquoteJson(String string)voidrestrict(FilterImpl f, Operator operator, PropertyValue v)Apply a restriction of type "this = value" to the given filter.voidrestrictList(FilterImpl f, List<PropertyValue> list)Apply a restriction of type "this in (list)" to the given filter.voidsetQuery(QueryImpl query)StringtoString()-
Methods inherited from class org.apache.jackrabbit.oak.query.ast.DynamicOperandImpl
equals, getOrderEntryPropertyName, hashCode, supportsRangeConditions
-
-
-
-
Field Detail
-
query
protected QueryImpl query
-
-
Constructor Detail
-
PathImpl
public PathImpl(String selectorName)
-
-
Method Detail
-
bindSelector
public void bindSelector(SourceImpl source)
-
getPropertyExistence
public PropertyExistenceImpl getPropertyExistence()
Description copied from class:DynamicOperandImplGet the property existence condition for this operand, if this operand is used as part of a condition.- Specified by:
getPropertyExistencein classDynamicOperandImpl- Returns:
- the property existence condition, or null if none
-
getSelectors
public Set<SelectorImpl> getSelectors()
Description copied from class:DynamicOperandImplGet the set of selectors for this operand.- Specified by:
getSelectorsin classDynamicOperandImpl- Returns:
- the set of selectors
-
currentProperty
public PropertyValue currentProperty()
- Specified by:
currentPropertyin classDynamicOperandImpl
-
restrict
public void restrict(FilterImpl f, Operator operator, PropertyValue v)
Description copied from class:DynamicOperandImplApply a restriction of type "this = value" to the given filter.- Specified by:
restrictin classDynamicOperandImpl- Parameters:
f- the filter where the restriction is applied.operator- the operator (for example "=").v- the value
-
restrictList
public void restrictList(FilterImpl f, List<PropertyValue> list)
Description copied from class:DynamicOperandImplApply a restriction of type "this in (list)" to the given filter.- Specified by:
restrictListin classDynamicOperandImpl- Parameters:
f- the filter where the restriction is applied.list- the list of values
-
getFunction
public String getFunction(SelectorImpl s)
Description copied from class:DynamicOperandImplGet the function of a function-based index, in Polish notation.- Specified by:
getFunctionin classDynamicOperandImpl- Parameters:
s- the selector- Returns:
- the function, or null if not supported
-
canRestrictSelector
public boolean canRestrictSelector(SelectorImpl s)
Description copied from class:DynamicOperandImplCheck whether the condition can be applied to a selector (to restrict the selector). The method may return true if the operand can be evaluated when the given selector and all previous selectors in the join can be evaluated.- Specified by:
canRestrictSelectorin classDynamicOperandImpl- Parameters:
s- the selector- Returns:
- true if the condition can be applied
-
createCopy
public DynamicOperandImpl createCopy()
- Specified by:
createCopyin classDynamicOperandImpl
-
getOrderEntry
public QueryIndex.OrderEntry getOrderEntry(SelectorImpl s, OrderingImpl o)
Description copied from class:DynamicOperandImplCreate an entry for the "order by" list for a given filter.- Specified by:
getOrderEntryin classDynamicOperandImpl- Parameters:
s- the selectoro- the ordering- Returns:
- the entry
-
setQuery
public void setQuery(QueryImpl query)
-
normalizePropertyName
protected String normalizePropertyName(String propertyName)
Normalize the property name (including namespace remapping). Asterisks are kept.- Parameters:
propertyName- the property name to normalize- Returns:
- the normalized (oak-) property name
-
normalizePath
protected String normalizePath(String path)
Validate and normalize the path.- Parameters:
path- the path to validate- Returns:
- the validated and normalized path
-
convertValueToType
protected PropertyValue convertValueToType(PropertyValue v, PropertyValue targetType)
-
getLocalPath
protected String getLocalPath(String path)
Calculate the session local path (the path excluding the workspace name) if possible.- Parameters:
path- the absolute path- Returns:
- the session local path, or null if not within this workspace
-
copyOf
@NotNull public @NotNull org.apache.jackrabbit.oak.query.ast.AstElement copyOf()
- Returns:
- a clone of self. Default implementation in
AstElementreturns same reference tothis.
-
-