Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.PathFactory.create()


        if (cne == null && loadIfNotFound
                && !containsAtticChild(entries, nodeName, index)
                && !childNodeEntries.isComplete()) {
            PathFactory pf = factory.getPathFactory();
            NodeId cId = factory.getIdFactory().createNodeId(getWorkspaceId(), pf.create(nodeName, index));
            cne = loadNodeEntry(cId);
        }
        return cne;
    }


                new PropertyId(id, factory.create("", "path")));
        property.setType(PropertyType.PATH);
        property.setMultiValued(true);
        PathFactory pathFactory = PathFactoryImpl.getInstance();
        Path root = pathFactory.getRootPath();
        Path path = pathFactory.create(root, NameConstants.JCR_SYSTEM, false);
        property.setValues(new InternalValue[] {
                InternalValue.create(root), InternalValue.create(path) });
        bundle.addProperty(property);

        property = new PropertyEntry(

    @Override
    public FieldComparator newComparator(String propertyName, int numHits, int sortPos,
                                         boolean reversed) throws IOException {

        PathFactory factory = PathFactoryImpl.getInstance();
        Path path = factory.create(propertyName);

        try {
            SimpleFieldComparator simple = new SimpleFieldComparator(nsMappings.translatePath(path), field, numHits);

            return path.getLength() == 1

    public void testResolveNodePath() throws Exception {
        NodeId rootNodeId = new NodeId(UUID.randomUUID());
        ItemStateManager provider = new MyItemStateManager();
        cache = new CachingHierarchyManager(rootNodeId, provider, null);
        PathFactory factory = PathFactoryImpl.getInstance();
        final Path path = factory.create("{}\t{}");
        for(int i=0; i<3; i++) {
            new Thread(new Runnable() {
                public void run() {
                    while(!stop) {
                        try {

     */
    public ScoreDocComparator newComparator(IndexReader reader,
                                            String relPath)
            throws IOException {
        PathFactory factory = PathFactoryImpl.getInstance();
        Path p = factory.create(relPath);
        try {
            ScoreDocComparator simple = new SimpleScoreDocComparator(
                    reader, nsMappings.translatePath(p));
            if (p.getLength() == 1) {
                return simple;

            PathFactory pf = factory.getPathFactory();
            if (parent == null) {
                // root node
                return idFactory.createNodeId((String) null, pf.getRootPath());
            } else {
                Path p = pf.create(getName(), getIndex());
                return idFactory.createNodeId(parent.getId(), p);
            }
        }
    }

            // uniqueID and root-node -> internal id is always the same as getId().
            return getId();
        } else {
            PathFactory pf = factory.getPathFactory();
            NodeId parentId = (revertInfo != null) ? revertInfo.oldParent.getWorkspaceId() : parent.getWorkspaceId();
            return idFactory.createNodeId(parentId, pf.create(getWorkspaceName(), getWorkspaceIndex()));
        }
    }

    /**
     * @inheritDoc
 

        } else if (loadIfNotFound
                && !containsAtticChild(entries, nodeName, index)
                && Status.NEW != getStatus()) {

            PathFactory pf = factory.getPathFactory();
            NodeId cId = factory.getIdFactory().createNodeId(getId(), pf.create(nodeName, index));
            cne = loadNodeEntry(cId);
        }
        return cne;
    }

            PathFactory pf = getPathFactory();
            if (parent == null) {
                // root node
                return idFactory.createNodeId((String) null, pf.getRootPath());
            } else {
                Path p = pf.create(getName(), getIndex());
                return idFactory.createNodeId(parent.getId(), p);
            }
        }
    }

            PathFactory pf = factory.getPathFactory();
            if (parent == null) {
                // root node
                return idFactory.createNodeId((String) null, pf.getRootPath());
            } else {
                Path p = pf.create(getName(), getIndex());
                return idFactory.createNodeId(parent.getId(), p);
            }
        }
    }

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.