SelectorName replacement = rewrittenSelectors.get(score.selectorName());
if (replacement == null) return score;
return new FullTextSearchScore(replacement);
}
if (operand instanceof Length) {
Length operation = (Length)operand;
PropertyValue wrapped = operation.getPropertyValue();
SelectorName replacement = rewrittenSelectors.get(wrapped.selectorName());
if (replacement == null) return operand;
return new Length(new PropertyValue(replacement, wrapped.getPropertyName()));
}
if (operand instanceof LowerCase) {
LowerCase operation = (LowerCase)operand;
SelectorName replacement = rewrittenSelectors.get(operation.selectorName());
if (replacement == null) return operand;
return new LowerCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
}
if (operand instanceof UpperCase) {
UpperCase operation = (UpperCase)operand;
SelectorName replacement = rewrittenSelectors.get(operation.selectorName());
if (replacement == null) return operand;
return new UpperCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
}
if (operand instanceof NodeName) {
NodeName name = (NodeName)operand;
SelectorName replacement = rewrittenSelectors.get(name.selectorName());
if (replacement == null) return name;