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

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


        String name = PathUtils.getName(selector.currentPath());
        int colon = name.indexOf(':');
        // TODO LOCALNAME: evaluation of local name might not be correct
        String localName = colon < 0 ? name : name.substring(colon + 1);
        CoreValue v = query.getValueFactory().createValue(localName);
        return new SinglePropertyState("LOCALNAME", v);
    }
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(PATH, v);
        }
        String path = currentPath();
        if (path == null) {
            return null;
        }
View Full Code Here

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

        CoreValue v = query.getValueFactory().createValue(name);
        String path = v.getString();
        // normalize paths (./name > name)
        path = getOakPath(path);
        CoreValue v2 = query.getValueFactory().createValue(path, PropertyType.NAME);
        return new SinglePropertyState("NAME", v2);
    }
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);
        }
View Full Code Here

    public PropertyState currentProperty() {
        String path = selector.currentPath();
        // Name escaping (convert space to _x0020_)
        String name = ISO9075.encode(PathUtils.getName(path));
        CoreValue v2 = query.getValueFactory().createValue(name, PropertyType.NAME);
        return new SinglePropertyState("NAME", v2);
    }
View Full Code Here

        name = ISO9075.encode(name);
        int colon = name.indexOf(':');
        // TODO LOCALNAME: evaluation of local name might not be correct
        String localName = colon < 0 ? name : name.substring(colon + 1);
        CoreValue v = query.getValueFactory().createValue(localName);
        return new SinglePropertyState("LOCALNAME", v);
    }
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.