Examples of CoreValue


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

    }

    @Override
    public boolean evaluate() {
        if (propertyName != null) {
            CoreValue v = selector.currentProperty(propertyName);
            if (v == null) {
                return false;
            }
            return evaluateContains(v);
        }
        Tree tree = getTree(selector.currentPath());
        for (PropertyState p : tree.getProperties()) {
            CoreValue v = selector.currentProperty(p.getName());
            if (evaluateContains(v)) {
                return true;
            }
        }
        return false;
View Full Code Here

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

    public void bindSelector(SourceImpl source) {
        selector = source.getSelector(selectorName);
        if (selector == null) {
            throw new IllegalArgumentException("Unknown selector: " + selectorName);
        }
        CoreValue v = fullTextSearchExpression.currentValue();
        try {
            expr = FullTextParser.parse(v.getString());
        } catch (ParseException e) {
            throw new IllegalArgumentException("Invalid expression: " + fullTextSearchExpression, e);
        }
    }
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

        return "LENGTH(" + getPropertyValue() + ')';
    }

    @Override
    public CoreValue currentValue() {
        CoreValue v = propertyValue.currentValue();
        if (v == null) {
            return null;
        }
        return query.getValueFactory().createValue(v.length());
    }
View Full Code Here

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

            Tree tree = getTree(cursor.currentPath());
            PropertyState p = tree.getProperty(JCR_PRIMARY_TYPE);
            if (p == null) {
                return true;
            }
            CoreValue v = p.getValue();
            // TODO node type matching
            if (nodeTypeName.equals(v.getString())) {
                return true;
            }
        }
    }
View Full Code Here

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

    }

    @Override
    public CoreValue currentValue() {
        String name = PathUtils.getName(selector.currentPath());
        CoreValue v = query.getValueFactory().createValue(name);
        String path = v.getString();
        // normalize paths (./name > name)
        path = getOakPath(path);
        return query.getValueFactory().createValue(path, PropertyType.NAME);
    }
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;
        }
        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

        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

                    }
                    childNodes.put(name, new KernelNodeState(kernel, valueFactory, childPath, revision));
                } else if (reader.matches('[')) {
                    properties.put(name, new PropertyStateImpl(name, CoreValueMapper.listFromJsopReader(reader, valueFactory)));
                } else {
                    CoreValue cv = CoreValueMapper.fromJsopReader(reader, valueFactory);
                    properties.put(name, new PropertyStateImpl(name, cv));
                }
            } while (reader.matches(','));
            reader.read('}');
            reader.read(JsopReader.END);
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.