Examples of CoreValue


Examples of org.apache.jackrabbit.oak.api.CoreValue

        return "LOWER(" + operand + ')';
    }

    @Override
    public CoreValue currentValue() {
        CoreValue v = operand.currentValue();
        if (v == null) {
            return null;
        }
        String value = v.getString();
        return query.getValueFactory().createValue(value.toLowerCase());
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

        return selectorName;
    }

    @Override
    public boolean evaluate() {
        CoreValue v = selector.currentProperty(propertyName);
        return v != null;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

        if (x == null) {
            x = new PropertyRestriction();
            x.propertyName = propertyName;
            propertyRestrictions.put(propertyName, x);
        }
        CoreValue oldFirst = x.first, oldLast = x.last;
        switch (op) {
        case EQUAL:
            x.first = maxValue(oldFirst, value);
            x.firstIncluding = x.first == oldFirst ? x.firstIncluding : true;
            x.last = minValue(oldLast, value);
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

        String propertyName = index.getName();
        Filter.PropertyRestriction restriction = filter.getPropertyRestriction(propertyName);
        if (restriction == null) {
            throw new IllegalArgumentException("No restriction for " + propertyName);
        }
        CoreValue first = restriction.first;
        String f = first == null ? null : first.toString();
        Iterator<String> it = index.getPaths(f, revisionId);
        return new ContentCursor(mk, revisionId, it);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

        }
    }

    @Override
    public boolean evaluate() {
        CoreValue v1 = selector1.currentProperty(property1Name);
        if (v1 == null) {
            return false;
        }
        // TODO data type mapping
        CoreValue v2 = selector2.currentProperty(property2Name);
        return v2 != null && v1.equals(v2);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

        return v2 != null && v1.equals(v2);
    }

    @Override
    public void apply(FilterImpl f) {
        CoreValue v1 = selector1.currentProperty(property1Name);
        CoreValue v2 = selector2.currentProperty(property2Name);
        if (f.getSelector() == selector1 && v2 != null) {
            f.restrictProperty(property1Name, Operator.EQUAL, v2);
        }
        if (f.getSelector() == selector2 && v1 != null) {
            f.restrictProperty(property2Name, Operator.EQUAL, v1);
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

        return operand2;
    }

    @Override
    public boolean evaluate() {
        CoreValue v1 = operand1.currentValue();
        CoreValue v2 = operand2.currentValue();
        if (v1 == null || v2 == null) {
            // TODO comparison: what about (null <> x) ?
            return false;
        }
        switch (operator) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

    }

    @Override
    public void apply(FilterImpl f) {
        CoreValue v = operand2.currentValue();
        if (v != null) {
            if (operator == Operator.LIKE) {
                String pattern;
                pattern = v.getString();
                LikePattern p = new LikePattern(pattern);
                String lowerBound = p.getLowerBound();
                String upperBound = p.getUpperBound();
                if (lowerBound == null && upperBound == null) {
                    // ignore
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

    }

    private String readName() throws ParseException {
        if (readIf("[")) {
            if (currentTokenType == VALUE) {
                CoreValue value = readString();
                read("]");
                return value.getString();
            } else {
                int level = 1;
                StringBuilder buff = new StringBuilder();
                while (true) {
                    if (isToken("]")) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.CoreValue

            StaticOperandImpl op = parseStaticOperand();
            if (!(op instanceof LiteralImpl)) {
                throw getSyntaxError("literal");
            }
            LiteralImpl literal = (LiteralImpl) op;
            CoreValue value = literal.getLiteralValue();
            read("AS");
            value = parseCastAs(value);
            read(")");
            // CastLiteral
            literal = factory.literal(value);
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.