Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.QValueFactory


    public QValueFactory getQValueFactory() throws RepositoryException {
        return QValueFactoryImpl.getInstance();
    }

    protected AbstractRepositoryService() throws RepositoryException {
        QValueFactory qvf = QValueFactoryImpl.getInstance();
        QValue[] vFalse = new QValue[] {qvf.create(false)};

        descriptors.put(Repository.WRITE_SUPPORTED, vFalse);
        descriptors.put(Repository.IDENTIFIER_STABILITY,
                new QValue[] {qvf.create(Repository.IDENTIFIER_STABILITY_SAVE_DURATION, PropertyType.STRING)});
        descriptors.put(Repository.OPTION_XML_IMPORT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_XML_EXPORT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_UNFILED_CONTENT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_VERSIONING_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_ACCESS_CONTROL_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_LOCKING_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_OBSERVATION_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_RETENTION_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_LIFECYCLE_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_TRANSACTIONS_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_SHAREABLE_NODES_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, vFalse);

        descriptors.put(Repository.QUERY_LANGUAGES, new QValue[0]);
        descriptors.put(Repository.QUERY_STORED_QUERIES_SUPPORTED, vFalse);
        descriptors.put(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED, vFalse);
        descriptors.put(Repository.QUERY_JOINS,
                new QValue[] {qvf.create(Repository.QUERY_JOINS_NONE, PropertyType.STRING)});

        descriptors.putAll(descriptors);
    }
View Full Code Here


        this.excerptProvider = exProvider;
        this.spellSuggestion = spellSuggestion;
        if (valueFactory instanceof ValueFactoryQImpl) {
            this.valueFactory = (ValueFactoryQImpl) valueFactory;
        } else {
            QValueFactory qvf = QValueFactoryImpl.getInstance();
            this.valueFactory = new ValueFactoryQImpl(qvf, resolver);
        }
    }
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

                ? null
                : create(result, logWriterProvider);
        }

        public QValueFactory getQValueFactory() throws RepositoryException {
            QValueFactory result = super.getQValueFactory();
            return result == null
                ? null
                : create(result, logWriterProvider);
        }
View Full Code Here

    public QValueFactory getQValueFactory() throws RepositoryException {
        return QValueFactoryImpl.getInstance();
    }

    protected AbstractRepositoryService() throws RepositoryException {
        QValueFactory qvf = QValueFactoryImpl.getInstance();
        QValue[] vFalse = new QValue[] {qvf.create(false)};

        descriptors.put(Repository.WRITE_SUPPORTED, vFalse);
        descriptors.put(Repository.IDENTIFIER_STABILITY,
                new QValue[] {qvf.create(Repository.IDENTIFIER_STABILITY_SAVE_DURATION, PropertyType.STRING)});
        descriptors.put(Repository.OPTION_XML_IMPORT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_XML_EXPORT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_UNFILED_CONTENT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_VERSIONING_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_ACCESS_CONTROL_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_LOCKING_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_OBSERVATION_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_RETENTION_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_LIFECYCLE_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_TRANSACTIONS_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_SHAREABLE_NODES_SUPPORTED, vFalse);
        descriptors.put(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, vFalse);

        descriptors.put(Repository.QUERY_LANGUAGES, new QValue[0]);
        descriptors.put(Repository.QUERY_STORED_QUERIES_SUPPORTED, vFalse);
        descriptors.put(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED, vFalse);
        descriptors.put(Repository.QUERY_JOINS,
                new QValue[] {qvf.create(Repository.QUERY_JOINS_NONE, PropertyType.STRING)});

        descriptors.putAll(descriptors);
    }
View Full Code Here

        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

    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 void testSetStringValue() throws RepositoryException {
        NodeId nid = getNodeId(testPath);
        Name propName = resolver.getQName("stringProp");
        QValueFactory vf = rs.getQValueFactory();

        List l = new ArrayList();
        l.add("String value containing \"double quotes\" and \'single\' and \"undeterminated quote.");
        l.add("String value \ncontaining \n\rline \r\nseparators and \t tab.");
        l.add("String value containing \r\n\r\r\n\r\n multiple \r\n\r\n line separators in sequence.");
        l.add("String value containing >diff -char +act ^ters.");
        l.add("String value containing \n>line sep \r+and \r\n-diff\n\r^chars.");
        l.add("String value containing \u0633\u0634 unicode chars.");

        for (Iterator it = l.iterator(); it.hasNext();) {
            QValue v = vf.create(it.next().toString(), PropertyType.STRING);
            Batch b = rs.createBatch(si, nid);
            b.addProperty(nid, propName, v);
            rs.submit(b);

            PropertyInfo pi = getPropertyInfo(nid, propName);
View Full Code Here

            pathFactory = (PathFactory) param;
        } else {
            pathFactory = PathFactoryImpl.getInstance();
        }

        QValueFactory vFactory;
        param = parameters.get(PARAM_QVALUE_FACTORY);
        if (param != null && param instanceof QValueFactory) {
            vFactory = (QValueFactory) param;
        } else {
            vFactory = QValueFactoryImpl.getInstance();
View Full Code Here

    }

    protected Map<String, QValue[]> getDescriptors() throws RepositoryException {
        Map<String, QValue[]> descriptorKeys = new HashMap<String, QValue[]>();

        QValueFactory qvf = QValueFactoryImpl.getInstance();

        descriptorKeys.put(Repository.REP_NAME_DESC, new QValue[] {qvf.create("Mock Repository", PropertyType.STRING)});
        descriptorKeys.put(Repository.REP_VENDOR_DESC, new QValue[] {qvf.create("Apache Software Foundation", PropertyType.STRING)});
        descriptorKeys.put(Repository.REP_VENDOR_URL_DESC, new QValue[] {qvf.create("http://www.apache.org/", PropertyType.STRING)});
        descriptorKeys.put(Repository.REP_VERSION_DESC, new QValue[] {qvf.create("2.0", PropertyType.STRING)});
        descriptorKeys.put(Repository.SPEC_NAME_DESC, new QValue[] {qvf.create("Content Repository API for Java(TM) Technology Specification", PropertyType.STRING)});
        descriptorKeys.put(Repository.SPEC_VERSION_DESC, new QValue[] {qvf.create("2.0", PropertyType.STRING)});

        return descriptorKeys;
    }
View Full Code Here

TOP

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

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.