Package org.apache.jackrabbit.oak.spi.query

Examples of org.apache.jackrabbit.oak.spi.query.IndexRow


        public IndexRow next() {
            if (i < results.size()) {
                final SolrDocument doc = results.get(i);
                i++;
                return new IndexRow() {
                    @Override
                    public String getPath() {
                        String path = String.valueOf(doc.getFieldValue(
                                configuration.getPathField()));
                        if ("/".equals(path)) {
View Full Code Here


                init = true;
                return;
            }
            aggregates = null;
            if (cursor.hasNext()) {
                IndexRow row = cursor.next();
                String path = row.getPath();
                aggregates = Iterators.filter(Iterators.concat(
                        Iterators.singletonIterator(path),
                        aggregator.getParents(rootState, path)), Predicates
                        .not(Predicates.in(seenPaths)));
                fetchNext();
View Full Code Here

        public IndexRow next() {
            if (i < results.size()) {
                final SolrDocument doc = results.get(i);
                i++;
                return new IndexRow() {
                    @Override
                    public String getPath() {
                        String path = String.valueOf(doc.getFieldValue(
                                configuration.getPathField()));
                        if ("/".equals(path)) {
View Full Code Here

        filter.restrictProperty("prop", Operator.EQUAL,
                PropertyValues.newString("val"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
        assertTrue("no results found", cursor.hasNext());
        IndexRow next = cursor.next();
        assertNotNull("first returned item should not be null", next);
        assertEquals("/newnode", next.getPath());
        assertFalse(cursor.hasNext());
    }
View Full Code Here

        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
        assertTrue("no results found", cursor.hasNext());
        IndexRow next = cursor.next();
        assertNotNull("first returned item should not be null", next);
        assertEquals("/", next.getPath());
        assertNotNull(next.getValue("foo"));
        assertEquals(PropertyValues.newString("[bar]"), next.getValue("foo"));
        assertFalse(cursor.hasNext());
    }
View Full Code Here

    public PropertyValue currentProperty(String propertyName) {
        boolean relative = propertyName.indexOf('/') >= 0;
        if (cursor == null) {
            return null;
        }
        IndexRow r = currentRow;
        if (r == null) {
            return null;
        }
        String path = r.getPath();
        if (path == null) {
            return null;
        }
        Tree t = getTree(path);
        if (relative) {
View Full Code Here

        filter.restrictProperty("prop", Operator.EQUAL,
                PropertyValues.newString("val"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
        assertTrue("no results found", cursor.hasNext());
        IndexRow next = cursor.next();
        assertNotNull("first returned item should not be null", next);
        assertEquals("/newnode", next.getPath());
        assertFalse(cursor.hasNext());
    }
View Full Code Here

        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
        assertTrue("no results found", cursor.hasNext());
        IndexRow next = cursor.next();
        assertNotNull("first returned item should not be null", next);
        assertEquals("/", next.getPath());
        assertNotNull(next.getValue("foo"));
        assertEquals(PropertyValues.newString("[bar]"), next.getValue("foo"));
        assertFalse(cursor.hasNext());
    }
View Full Code Here

        public IndexRow next() {
            if (i < results.size()) {
                final SolrDocument doc = results.get(i);
                i++;
                return new IndexRow() {
                    @Override
                    public String getPath() {
                        String path = String.valueOf(doc.getFieldValue(
                                configuration.getPathField()));
                        if ("/".equals(path)) {
View Full Code Here

        public IndexRow next() {
            if (i < results.size()) {
                final SolrDocument doc = results.get(i);
                i++;
                return new IndexRow() {
                    @Override
                    public String getPath() {
                        return String.valueOf(doc.getFieldValue(configuration.getPathField()));
                    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.query.IndexRow

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.