Package javax.jcr

Examples of javax.jcr.PropertyIterator.nextProperty()


            }
        }
        // remove properties that do not exist in the frozen representation
        PropertyIterator piter = getProperties();
        while (piter.hasNext()) {
            PropertyImpl prop = (PropertyImpl) piter.nextProperty();
            // ignore some props that are not well guarded by the OPV
            if (prop.getQName().equals(NameConstants.JCR_VERSIONHISTORY)) {
                continue;
            } else if (prop.getQName().equals(NameConstants.JCR_PREDECESSORS)) {
                continue;
View Full Code Here


            it = node.getWeakReferences(jcrName);
        } else {
            it = node.getReferences(jcrName);
        }
        while (it.hasNext()) {
            ids.add(idFactory.createPropertyId(it.nextProperty(), sInfo.getNamePathResolver()));
        }
        return ids.iterator();
    }

    /**
 
View Full Code Here

            exportProperties(exportContext, isCollection, cn);

            // export all other properties as well
            PropertyIterator it = cn.getProperties();
            while (it.hasNext()) {
                Property p = it.nextProperty();
                String name = p.getName();
                PropertyDefinition def = p.getDefinition();
                if (def.isMultiple() || isDefinedByFilteredNodeType(def)) {
                    log.debug("Skip property '" + name + "': not added to webdav property set.");
                    continue;
View Full Code Here

                node.getSession()
        ));

        PropertyIterator iter = node.getProperties();
        while (iter.hasNext()) {
            PropertyImpl prop = (PropertyImpl) iter.nextProperty();
            events.add(EventState.propertyAdded(
                    (NodeId) node.getId(),
                    node.getPrimaryPath(),
                    prop.getPrimaryPath().getLastElement(),
                    ((NodeTypeImpl) node.getPrimaryNodeType()).getQName(),
View Full Code Here

                // required DAV:checkout-set (computed) property
                PropertyIterator it = v.getReferences();
                List<Node> nodeList = new ArrayList<Node>();
                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

                    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

            return null;
        }

        while (refs.hasNext()) {
            try {
                PropertyImpl pMember = (PropertyImpl) refs.nextProperty();
                NodeImpl nGroup = (NodeImpl) pMember.getParent();

                Set<String> groupNodeIdentifiers;
                if (P_MEMBERS.equals(pMember.getQName())) {
                    // Found membership information in members property
View Full Code Here

        writer.write('{');

        // append the jcr properties as JSON pairs.
        PropertyIterator props = node.getProperties();       
        while (props.hasNext()) {
            Property prop = props.nextProperty();
            writeProperty(writer, prop);
            // add separator: next json pair/member is either a property or
            // a childnode or the special no-children-present pair.
            writer.write(',');
        }
View Full Code Here

        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

        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

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.