Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.PropertyId


        if (propSet.contains(ItemResourceConstants.JCR_REFERENCES)) {
            HrefProperty refProp = new HrefProperty(propSet.get(ItemResourceConstants.JCR_REFERENCES));
            Iterator hrefIter = refProp.getHrefs().iterator();
            while(hrefIter.hasNext()) {
                String propertyHref = hrefIter.next().toString();
                PropertyId propertyId = uriResolver.getPropertyId(propertyHref, sessionInfo);
                nInfo.addReference(propertyId);
            }
        }
        return nInfo;
    }
View Full Code Here


        List l = new ArrayList(3);
        NodeId nid = nInfo.getId();
        Path nPath = nInfo.getPath();

        if (nid.getPath() == null) {
            PropertyId id = getIdFactory().createPropertyId(nid, NameConstants.JCR_UUID);
            QValue[] vs = new QValue[] {getQValueFactory().create(nid.getUniqueID(), PropertyType.STRING)};
            Path p = getPathFactory().create(nPath, NameConstants.JCR_UUID, true);
            PropertyInfo pi = new PropertyInfoImpl(id, p, PropertyType.STRING, false, vs);
            l.add(pi);
        }
View Full Code Here

                        return Collections.EMPTY_LIST.iterator();
                    } else {
                        HrefProperty hp = new HrefProperty(p);
                        for (Iterator it = hp.getHrefs().iterator(); it.hasNext();) {
                            String propHref = it.next().toString();
                            PropertyId propId = uriResolver.getPropertyId(propHref, sessionInfo);
                            if (propertyName == null || propertyName.equals(propId.getName())) {
                                refIds.add(propId);
                            }
                        }
                    }
                }
View Full Code Here

        /**
         * @see OperationVisitor#visit(SetPropertyValue)
         */
        public void visit(SetPropertyValue operation) throws RepositoryException {
            PropertyId id = operation.getPropertyId();
            if (operation.isMultiValued()) {
                batch.setValue(id, operation.getValues());
            } else {
                batch.setValue(id, operation.getValues()[0]);
            }
View Full Code Here

        }

        // update NodeEntry from the information present in the NodeInfo (prop entries)
        List<Name> propNames = new ArrayList<Name>();
        for (Iterator<PropertyId> it = info.getPropertyIds(); it.hasNext(); ) {
            PropertyId pId = it.next();
            Name propertyName = pId.getName();
            propNames.add(propertyName);
        }
        try {
            entry.setPropertyEntries(propNames);
        } catch (ItemExistsException e) {
View Full Code Here

            IdFactory idFactory = getIdFactory();
            NodeId parentId = entry.getWorkspaceId();
            if (remainingPath.getLength() != 1) {
                parentId = idFactory.createNodeId(parentId, remainingPath.getAncestor(1));
            }
            PropertyId propId = idFactory.createPropertyId(parentId, remainingPath.getName());
            pe = entry.loadPropertyEntry(propId);
        }

        if (pe == null) {
            throw new PathNotFoundException(factory.saveGetJCRPath(path));
View Full Code Here

                }
                jcrPath = Text.unescape(jcrPath);
                return resolver.getQPath(jcrPath);
            }
        } else {
            PropertyId pId = (PropertyId) itemId;
            Path parentPath = getPath(pId.getParentId(), sessionInfo, workspaceName);
            return getPathFactory().create(parentPath, pId.getName(), true);
        }
    }
View Full Code Here

                }
            }
            // create multi-valued property info
            NodeInfoImpl parent = getCurrentNodeInfo();
            Path p = pFactory.create(parent.getPath(), name, true);
            PropertyId id = idFactory.createPropertyId(parent.getId(), name);
            PropertyInfoImpl propInfo = new PropertyInfoImpl(id, p, propertyType, propValues.toArray(new QValue[propValues.size()]));
            propInfo.checkCompleted();
            getCurrentPropInfos().add(propInfo);
        } catch (RepositoryException e) {
            throw new IOException(e.getMessage());
View Full Code Here

                    propertyType = value.getType();
                }
                // create single-valued property info
                NodeInfoImpl parent = getCurrentNodeInfo();
                Path p = pFactory.create(parent.getPath(), name, true);
                PropertyId id = idFactory.createPropertyId(parent.getId(), name);
                PropertyInfoImpl propInfo = new PropertyInfoImpl(id, p, propertyType, value);
                propInfo.checkCompleted();
                // add property info to current list, will be processed on endObject() event
                getCurrentPropInfos().add(propInfo);
            } finally {
View Full Code Here

            IdFactory idFactory = getIdFactory();
            NodeId parentId = entry.getWorkspaceId();
            if (remainingPath.getLength() != 1) {
                parentId = idFactory.createNodeId(parentId, remainingPath.getAncestor(1));
            }
            PropertyId propId = idFactory.createPropertyId(parentId, remainingPath.getName());
            pe = entry.loadPropertyEntry(propId);
        }

        if (pe == null) {
            throw new PathNotFoundException(factory.saveGetJCRPath(path));
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.PropertyId

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.