Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.PathFactory


    }

    protected RepositoryService createService(String uri) throws RepositoryException {
        IdFactory idFactory = IdFactoryImpl.getInstance();
        NameFactory nFactory = NameFactoryImpl.getInstance();
        PathFactory pFactory = PathFactoryImpl.getInstance();
        QValueFactory vFactory = QValueFactoryImpl.getInstance();
        return new RepositoryServiceImpl(uri, idFactory, nFactory, pFactory, vFactory);
    }
View Full Code Here


            nameFactory = (NameFactory) param;
        } else {
            nameFactory = NameFactoryImpl.getInstance();
        }

        PathFactory pathFactory;
        param = parameters.get(PARAM_PATH_FACTORY);
        if (param != null && param instanceof PathFactory) {
            pathFactory = (PathFactory) param;
        } else {
            pathFactory = PathFactoryImpl.getInstance();
View Full Code Here

    public RepositoryService getRepositoryService() throws RepositoryException {
        if (service == null) {
            String uri = getProperty(PROP_REPOSITORY_URI);
            IdFactory idFactory = IdFactoryImpl.getInstance();
            NameFactory nFactory = NameFactoryImpl.getInstance();
            PathFactory pFactory = PathFactoryImpl.getInstance();
            QValueFactory vFactory = QValueFactoryImpl.getInstance();
            service = new RepositoryServiceImpl(uri, idFactory, nFactory, pFactory, vFactory);
        }
        return service;
    }
View Full Code Here

    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 {
View Full Code Here

     * @throws IOException if an error occurs while reading from the index.
     */
    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;
View Full Code Here

     * @inheritDoc
     * @see ItemStateFactory#createRootState(NodeEntry)
     */
    public NodeState createRootState(NodeEntry entry) throws ItemNotFoundException, RepositoryException {
        IdFactory idFactory = service.getIdFactory();
        PathFactory pf = service.getPathFactory();

        return createNodeState(idFactory.createNodeId((String) null, pf.getRootPath()), entry);
    }
View Full Code Here

    /**
     * @see HierarchyEntryImpl#buildPath(boolean)
     */
    Path buildPath(boolean wspPath) throws RepositoryException {
        PathFactory pf = getPathFactory();
        // shortcut for root state
        if (parent == null) {
            return pf.getRootPath();
        }
        // build path otherwise
        PathBuilder builder = new PathBuilder(pf);
        buildPath(builder, this, wspPath);
        return builder.getPath();
View Full Code Here

    /**
     * @see HierarchyEntryImpl#buildPath(boolean)
     */
    @Override
    Path buildPath(boolean wspPath) throws RepositoryException {
        PathFactory pf = getPathFactory();
        // shortcut for root state
        if (parent == null) {
            return pf.getRootPath();
        }
        // build path otherwise
        PathBuilder builder = new PathBuilder(pf);
        buildPath(builder, this, wspPath);
        return builder.getPath();
View Full Code Here

    }

    protected RepositoryService createService(String uri) throws RepositoryException {
        IdFactory idFactory = IdFactoryImpl.getInstance();
        NameFactory nFactory = NameFactoryImpl.getInstance();
        PathFactory pFactory = PathFactoryImpl.getInstance();
        QValueFactory vFactory = QValueFactoryImpl.getInstance();
        return new RepositoryServiceImpl(uri, idFactory, nFactory, pFactory, vFactory);
    }
View Full Code Here

    public NodeId getId() {
        IdFactory idFactory = factory.getIdFactory();
        if (uniqueID != null) {
            return idFactory.createNodeId(uniqueID);
        } else {
            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);
            }
        }
    }
View Full Code Here

TOP

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

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.