Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.PropertyInfo


        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);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here


                isMultiValued = true;
            } else {
                throw new ItemNotFoundException("Unable to retrieve the property with id " + saveGetIdString(propertyId, resolver));
            }

            PropertyInfo pInfo = new PropertyInfoImpl(propertyId, path, type, isMultiValued, values);
            return pInfo;
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
View Full Code Here

                                return object instanceof PropertyInfo;
                            }
                        }),
                        new Transformer() {
                            public Object transform(Object input) {
                                PropertyInfo info = (PropertyInfo) input;
                                return info.getId();
                            }});

                Iterator childInfos = new TransformIterator(itemInfos.iterator(), new Transformer(){
                    public Object transform(Object input) {
                        ItemInfo info = (ItemInfo) input;
                        Name name = info.getPath().getNameElement().getName();
                        return new ChildInfoImpl(name, null, Path.INDEX_DEFAULT);
                    }});

                nodeInfo = new NodeInfoImpl(path, id, Path.INDEX_DEFAULT, NameConstants.NT_UNSTRUCTURED,
                        Name.EMPTY_ARRAY, EmptyIterator.INSTANCE, propertyIds, childInfos);
View Full Code Here

        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);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here

                isMultiValued = true;
            } else {
                throw new ItemNotFoundException("Unable to retrieve the property with id " + saveGetIdString(propertyId, resolver));
            }

            PropertyInfo pInfo = new PropertyInfoImpl(propertyId, path, type, isMultiValued, values);
            return pInfo;
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
View Full Code Here

        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);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here

     * @see RepositoryService#getItemInfos(SessionInfo, NodeId)
     */
    @Override
    public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId itemId) throws ItemNotFoundException, RepositoryException {
        if (!itemId.denotesNode()) {
            PropertyInfo propertyInfo = super.getPropertyInfo(sessionInfo, (PropertyId) itemId);
            return Iterators.singleton(propertyInfo);
        }
        else {
            NodeId nodeId = (NodeId) itemId;
            Path path = getPath(itemId, sessionInfo);
View Full Code Here

     * @see RepositoryService#getItemInfos(SessionInfo, ItemId)
     */
    @Override
    public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId itemId) throws ItemNotFoundException, RepositoryException {
        if (!itemId.denotesNode()) {
            PropertyInfo propertyInfo = getPropertyInfo(sessionInfo, (PropertyId) itemId);
            return Iterators.singleton(propertyInfo);
        } else {
            NodeId nodeId = (NodeId) itemId;
            Path path = getPath(itemId, sessionInfo);
            String uri = getURI(path, sessionInfo);
View Full Code Here

            // nodeInfo.
            l.addAll(buildPropertyInfos(nInfo));
            return l.iterator();
        }
        else {
            PropertyInfo pInfo = getPropertyInfo(sessionInfo, (PropertyId) itemId);
            return Iterators.singleton(pInfo);
        }
    }
View Full Code Here

        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);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here

TOP

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

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.