Package org.apache.jackrabbit.oak.plugins.memory

Examples of org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState


    public PropertyState currentProperty() {
        PropertyState p = selector.currentProperty(Query.JCR_SCORE);
        if (p == null) {
            // TODO if score() is not supported by the index, use the value 0.0?
            CoreValue v = query.getValueFactory().createValue(0.0);
            p = new SinglePropertyState(Query.JCR_SCORE, v);
        }
        return p;
    }
View Full Code Here


        }
        // TODO what is the expected result of LOWER(x) for an array property?
        // currently throws an exception
        String value = p.getValue().getString();
        CoreValue v = query.getValueFactory().createValue(value.toLowerCase());
        return new SinglePropertyState(p.getName(), v);
    }
View Full Code Here

        }
        // TODO what is the expected result of UPPER(x) for an array property?
        // currently throws an exception
        String value = p.getValue().getString();
        CoreValue v = query.getValueFactory().createValue(value.toUpperCase());
        return new SinglePropertyState(p.getName(), v);
    }
View Full Code Here

            return null;
        }
        if (!p.isArray()) {
            long length = p.getValue().length();
            CoreValue v = query.getValueFactory().createValue(length);
            return new SinglePropertyState("LENGTH", v);
        }
        // TODO what is the expected result for LENGTH(multiValueProperty)?
        throw new IllegalArgumentException("LENGTH(x) on multi-valued property is not supported");
    }
View Full Code Here

            if (local == null) {
                // not a local path
                return null;
            }
            CoreValue v = query.getValueFactory().createValue(local);
            return new SinglePropertyState(Query.JCR_PATH, v);
        }
        if (cursor == null) {
            return null;
        }
        IndexRow r = cursor.currentRow();
View Full Code Here

            String p = selector.currentPath();
            if (p == null) {
                return null;
            }
            CoreValue v = query.getValueFactory().createValue(p);
            return new SinglePropertyState(Query.JCR_PATH, v);
        }
        return selector.currentProperty(propertyName);
    }
View Full Code Here

                } else if (reader.matches('[')) {
                    List<CoreValue> values = listFromJsopReader(reader, kernel);
                    properties.put(name, new MultiPropertyState(name, values));
                } else {
                    CoreValue cv = fromJsopReader(reader, kernel);
                    properties.put(name, new SinglePropertyState(name, cv));
                }
            } while (reader.matches(','));
            reader.read('}');
            reader.read(JsopReader.END);
            // optimize for empty childNodes
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState

Copyright © 2018 www.massapicom. 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.