Examples of CoreValue


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

        return createValue(value, false);
    }

    @Override
    public Value createValue(String value, int type) throws ValueFormatException {
        CoreValue cv;
        try {
            if (type == PropertyType.NAME) {
                cv = factory.createValue(namePathMapper.getOakName(value), type);
            } else if (type == PropertyType.PATH) {
                String oakPath = namePathMapper.toOakPath(value);
View Full Code Here

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

        }
    }

    @Override
    public Value createValue(BigDecimal value) {
        CoreValue cv = factory.createValue(value);
        return new ValueImpl(cv, namePathMapper);
    }
View Full Code Here

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

        return new ValueImpl(cv, namePathMapper);
    }

    @Override
    public Value createValue(Node value, boolean weak) throws RepositoryException {
        CoreValue cv = factory.createValue(value.getUUID(), weak ? PropertyType.WEAKREFERENCE : PropertyType.REFERENCE);
        return new ValueImpl(cv, namePathMapper);
    }
View Full Code Here

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

        if (value == null) {
            Property p = getProperty(jcrName);
            p.remove();
            return p;
        } else {
            CoreValue oakValue = ValueConverter.toCoreValue(targetValue, sessionContext);
            return new PropertyImpl(dlg.setProperty(toOakPath(jcrName), oakValue));
        }
    }
View Full Code Here

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

        if (nt.isAbstract() || nt.isMixin()) {
            throw new ConstraintViolationException();
        }
        // TODO: END

        CoreValue cv = ValueConverter.toCoreValue(nodeTypeName, PropertyType.NAME, sessionContext);
        dlg.setProperty(toOakPath(Property.JCR_PRIMARY_TYPE), cv);
    }
View Full Code Here

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

        }
        setInternalProperty(userNode, AuthorizableImpl.REP_PRINCIPAL_NAME, principal.getName(), PropertyType.STRING);
    }

    void setInternalProperty(NodeImpl userNode, String name, String value, int type) throws RepositoryException {
        CoreValue cv = ValueConverter.toCoreValue(value, type, sessionContext);
        sessionContext.getTree(userNode.getOakPath()).setProperty(name, cv);
    }
View Full Code Here

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

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

    @Override
    public CoreValue currentValue() {
        CoreValue v = operand.currentValue();
        if (v == null) {
            return null;
        }
        String value = v.getString();
        return query.getValueFactory().createValue(value.toUpperCase());
    }
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;
        }
        // TODO LENGTH(..) is the length of the string representation?
        String value = v.getString();
        return query.getValueFactory().createValue(value.length());
    }
View Full Code Here

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

    @Override
    public boolean evaluate() {
        // JCR 2.0 spec, 6.7.16 Comparison:
        // "operand1 may evaluate to an array of values"
        // TODO support arrays
        CoreValue v1 = operand1.currentValue();
        // "operand2 always evaluates to a scalar value"
        CoreValue v2 = operand2.currentValue();
        if (v1 == null || v2 == null) {
            // TODO comparison: what about (null <> x) ?
            return false;
        }
        if (v1.getType() != v2.getType()) {
            // "the value of operand2 is converted to the
            // property type of the value of operand1"
            v2 = convert(v2, v1.getType());
        }
        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
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.