Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.PropertyId


        // retrieve parent node id
        NodeId parentId = getNodeId(parentUri, sessionInfo);
        // build property id
        try {
            Name name = service.getNamePathResolver(sessionInfo).getQName(propName);
            PropertyId propertyId = service.getIdFactory().createPropertyId(parentId, name);
            cache.add(uri, propertyId);

            return propertyId;
        } catch (NameException e) {
            throw new RepositoryException(e);
View Full Code Here


                stale = true;

                NodeId parentId = parent.getId();
                Name propertyName = NameFactoryImpl.getInstance().create(Name.NS_DEFAULT_URI, this.name);
                Path path = PathFactoryImpl.getInstance().create(parentId.getPath(), propertyName, true);
                PropertyId id = IdFactoryImpl.getInstance().createPropertyId(parentId, propertyName);

                propertyInfo = new PropertyInfoImpl(path, id, type, isMultivalued,
                        values.toArray(new QValue[values.size()]));

                if (listener != null) {
View Full Code Here

                    new Iterator<PropertyId>() {
                        public boolean hasNext() {
                            return propIds.hasNext();
                        }
                        public PropertyId next() {
                            PropertyId propId = propIds.next();
                            NodeId parentId = propId.getParentId();
                            idFactory.createNodeId(
                                    parentId.getUniqueID(), parentId.getPath());
                            return idFactory.createPropertyId(
                                    parentId, propId.getName());
                        }
                        public void remove() {
                            throw new UnsupportedOperationException();
                        }
                    },
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

            Path remainingPath = pb.getPath();

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

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

    }

    private PropertyInfoImpl createPropertyInfo(QValue value, boolean isMultiValued) throws RepositoryException {
        NodeInfoImpl parent = getCurrentNodeInfo();
        Path p = pFactory.create(parent.getPath(), name, true);
        PropertyId id = idFactory.createPropertyId(parent.getId(), name);

        PropertyInfoImpl pInfo;
        if (isMultiValued) {
            pInfo = new PropertyInfoImpl(id, p, propertyType);
            // not added to parent but upon having read all values.
View Full Code Here

                        childProps.get(DavPropertyName.RESOURCETYPE).getValue() != null) {
                    // any other resource type than default (empty) is represented by a node item
                    // --> build child info object
                    nInfo.addChildInfo(buildChildInfo(childProps, sessionInfo));
                } else {
                    PropertyId childId = uriResolver.buildPropertyId(nInfo.getId(), resp, sessionInfo.getWorkspaceName(), getNamePathResolver(sessionInfo));
                    nInfo.addPropertyId(childId);
                }
            }
            return nInfo;
        } catch (IOException e) {
View Full Code Here

        NodeId id = uriResolver.buildNodeId(parentId, nodeResponse, sessionInfo.getWorkspaceName(), getNamePathResolver(sessionInfo));
        NodeInfoImpl nInfo = new NodeInfoImpl(id, propSet, resolver);
        if (propSet.contains(ItemResourceConstants.JCR_REFERENCES)) {
            HrefProperty refProp = new HrefProperty(propSet.get(ItemResourceConstants.JCR_REFERENCES));
            for (String propertyHref : refProp.getHrefs()) {
                PropertyId propertyId = uriResolver.getPropertyId(propertyHref, sessionInfo);
                nInfo.addReference(propertyId);
            }
        }
        return nInfo;
    }
View Full Code Here

        List<PropertyInfo> l = new ArrayList<PropertyInfo>(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

                    if (p != null) {
                        refIds = new ArrayList<PropertyId>();
                        HrefProperty hp = new HrefProperty(p);
                        for (String propHref : hp.getHrefs()) {
                            PropertyId propId = uriResolver.getPropertyId(propHref, sessionInfo);
                            if (propertyName == null || propertyName.equals(propId.getName())) {
                                refIds.add(propId);
                            }
                        }
                    }
                }
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.