Examples of selectorName()


Examples of org.modeshape.jcr.query.model.FullTextSearch.selectorName()

        assertThat(same.selectorName(), is(selectorName("tableA")));
        assertThat(same.getPath(), is("/a/b/c"));

        assertThat(or.right(), is(instanceOf(FullTextSearch.class)));
        FullTextSearch search = (FullTextSearch)or.right();
        assertThat(search.selectorName(), is(selectorName("tableA")));
        assertThat(search.getPropertyName(), is("p1"));
        assertThat(search.fullTextSearchExpression(), is("term1"));

    }
View Full Code Here

Examples of org.modeshape.jcr.query.model.FullTextSearch.selectorName()

    public void shouldParseConstraintFromStringWithIsContainsExpressionWithPropertyAndNoSelectorNameOnlyIfThereIsOneSelectorSource() {
        NamedSelector selector = new NamedSelector(selectorName("tableA"));
        Constraint constraint = parser.parseConstraint(tokens("CONTAINS(propertyA,'term1 term2 -term3')"), typeSystem, selector);
        assertThat(constraint, is(instanceOf(FullTextSearch.class)));
        FullTextSearch search = (FullTextSearch)constraint;
        assertThat(search.selectorName(), is(selectorName("tableA")));
        assertThat(search.getPropertyName(), is("propertyA"));
        assertThat(search.fullTextSearchExpression(), is("term1 term2 -term3"));
    }

    @Test
View Full Code Here

Examples of org.modeshape.jcr.query.model.FullTextSearch.selectorName()

        Constraint constraint = parser.parseConstraint(tokens("CONTAINS(tableA.propertyA,'term1 term2 -term3')"),
                                                       typeSystem,
                                                       mock(Source.class));
        assertThat(constraint, is(instanceOf(FullTextSearch.class)));
        FullTextSearch search = (FullTextSearch)constraint;
        assertThat(search.selectorName(), is(selectorName("tableA")));
        assertThat(search.getPropertyName(), is("propertyA"));
        assertThat(search.fullTextSearchExpression(), is("term1 term2 -term3"));
    }

    @Test
View Full Code Here

Examples of org.modeshape.jcr.query.model.FullTextSearchScore.selectorName()

    public static DynamicOperand replaceReferencesToRemovedSource( QueryContext context,
                                                                   DynamicOperand operand,
                                                                   Map<SelectorName, SelectorName> rewrittenSelectors ) {
        if (operand instanceof FullTextSearchScore) {
            FullTextSearchScore score = (FullTextSearchScore)operand;
            SelectorName replacement = rewrittenSelectors.get(score.selectorName());
            if (replacement == null) return score;
            return new FullTextSearchScore(replacement);
        }
        if (operand instanceof Length) {
            Length operation = (Length)operand;
View Full Code Here

Examples of org.modeshape.jcr.query.model.Length.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;
View Full Code Here

Examples of org.modeshape.jcr.query.model.LowerCase.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;
View Full Code Here

Examples of org.modeshape.jcr.query.model.NodeDepth.selectorName()

            if (replacement == null) return operand;
            return new ReferenceValue(replacement, value.getPropertyName());
        }
        if (operand instanceof NodeDepth) {
            NodeDepth depth = (NodeDepth)operand;
            SelectorName replacement = rewrittenSelectors.get(depth.selectorName());
            if (replacement == null) return operand;
            return new NodeDepth(replacement);
        }
        if (operand instanceof NodePath) {
            NodePath path = (NodePath)operand;
View Full Code Here

Examples of org.modeshape.jcr.query.model.NodeLocalName.selectorName()

            if (replacement == null) return name;
            return new NodeName(replacement);
        }
        if (operand instanceof NodeLocalName) {
            NodeLocalName name = (NodeLocalName)operand;
            SelectorName replacement = rewrittenSelectors.get(name.selectorName());
            if (replacement == null) return name;
            return new NodeLocalName(replacement);
        }
        if (operand instanceof PropertyValue) {
            PropertyValue value = (PropertyValue)operand;
View Full Code Here

Examples of org.modeshape.jcr.query.model.NodeName.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;
            return new NodeName(replacement);
        }
        if (operand instanceof NodeLocalName) {
            NodeLocalName name = (NodeLocalName)operand;
View Full Code Here

Examples of org.modeshape.jcr.query.model.NodePath.selectorName()

            if (replacement == null) return operand;
            return new NodeDepth(replacement);
        }
        if (operand instanceof NodePath) {
            NodePath path = (NodePath)operand;
            SelectorName replacement = rewrittenSelectors.get(path.selectorName());
            if (replacement == null) return operand;
            return new NodePath(replacement);
        }
        if (operand instanceof ChildCount) {
            ChildCount count = (ChildCount)operand;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.