Examples of nextProperty()


Examples of javax.jcr.PropertyIterator.nextProperty()

        getNode(TEST_PATH).setProperty("reference", session.getValueFactory().createValue(referee));
        session.save();

        PropertyIterator refs = referee.getReferences();
        assertTrue(refs.hasNext());
        Property p = refs.nextProperty();
        assertEquals("reference", p.getName());
        assertFalse(refs.hasNext());
    }

    @Test
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        getNode("/bar").setProperty("reference2", value);
        session.save();

        PropertyIterator refs = referee.getReferences("reference1");
        assertTrue(refs.hasNext());
        Property p = refs.nextProperty();
        assertEquals("reference1", p.getName());
        assertFalse(refs.hasNext());
    }

    @Test
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        getNode(TEST_PATH).setProperty("weak-reference", session.getValueFactory().createValue(referee, true));
        session.save();

        PropertyIterator refs = referee.getWeakReferences();
        assertTrue(refs.hasNext());
        Property p = refs.nextProperty();
        assertEquals("weak-reference", p.getName());
        assertFalse(refs.hasNext());
    }

    @Test
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        getNode("/bar").setProperty("weak-reference2", value);
        session.save();

        PropertyIterator refs = referee.getWeakReferences("weak-reference1");
        assertTrue(refs.hasNext());
        Property p = refs.nextProperty();
        assertEquals("weak-reference1", p.getName());
        assertFalse(refs.hasNext());
    }

    @Test
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

                    if (event.getType() == Event.PROPERTY_ADDED) {
                        Node node = observingSession.getNode(Text.getRelativeParent(event.getPath(), 1));
                        PropertyIterator iter = node.getProperties();
                        boolean ok = false;
                        while (iter.hasNext()) {
                            Property p = iter.nextProperty();
                            if (p.getPath().equals(event.getPath())) {
                                ok = true;
                            }
                        }
                        if (!ok) {
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        // non-protected JCR properties defined on the underlying jcr node
        try {
            PropertyIterator it = node.getProperties();
            while (it.hasNext()) {
                Property p = it.nextProperty();
                String pName = p.getName();
                PropertyDefinition def = p.getDefinition();
                if (def.isMultiple() || isFilteredItem(p)) {
                    log.debug("Property '" + pName + "' not added to webdav property set (either multivalue or filtered).");
                    continue;
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

                // required DAV:checkout-set (computed) property
                PropertyIterator it = v.getReferences();
                List nodeList = new ArrayList();
                while (it.hasNext()) {
                    Property p = it.nextProperty();
                    if (JcrConstants.JCR_BASEVERSION.equals(p.getName())) {
                        Node n = p.getParent();
                        if (n.isCheckedOut()) {
                           nodeList.add(n);
                        }
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

                    memberList.add(createResourceFromLocator(loc));
                }
                // add all property members
                PropertyIterator propIt = n.getProperties();
                while (propIt.hasNext()) {
                    Property prop = propIt.nextProperty();
                    DavResourceLocator loc = getLocatorFromItem(prop);
                    memberList.add(createResourceFromLocator(loc));
                }
            } catch (RepositoryException e) {
                // ignore
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        w.object();
        PropertyIterator props = node.getProperties();

        // the node's actual properties
        while (props.hasNext()) {
            Property prop = props.nextProperty();

            if (propertyNamesToIgnore != null
                && propertyNamesToIgnore.contains(prop.getName())) {
                continue;
            }
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        // Add all matching properties to result
        try {
            PropertyIterator it = node.getProperties(name);
            while (it.hasNext()) {
                Property prop = it.nextProperty();
                int type = prop.getType();
                if (prop.getDefinition().isMultiple()) {
                    Value[] values = prop.getValues();
                    for (int i=0;i<values.length;i++) {
                        items.add(wrap(values[i]));
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.