Java Code Examples for com.bigdata.rdf.sail.BigdataSail#getIndexManager()

The following examples show how to use com.bigdata.rdf.sail.BigdataSail#getIndexManager() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SPARQLUpdateTestv2.java    From database with GNU General Public License v2.0 5 votes vote down vote up
protected Repository newRepository() throws RepositoryException {

        final Properties props = getProperties();
        
        final BigdataSail sail = new BigdataSail(props);
        
        backend = sail.getIndexManager();

        return new BigdataSailRepository(sail);

//        if (true) {
//            final Properties props = getProperties();
//            
//            if (cannotInlineTests.contains(testURI)){
//                // The test can not be run using XSD inlining.
//                props.setProperty(Options.INLINE_XSD_DATATYPE_LITERALS, "false");
//                props.setProperty(Options.INLINE_DATE_TIMES, "false");
//            }
//            
//            if(unicodeStrengthIdentical.contains(testURI)) {
//                // Force identical Unicode comparisons.
//                props.setProperty(Options.COLLATOR, CollatorEnum.JDK.toString());
//                props.setProperty(Options.STRENGTH, StrengthEnum.Identical.toString());
//            }
//            
//            final BigdataSail sail = new BigdataSail(props);
//            return new DatasetRepository(new BigdataSailRepository(sail));
//        } else {
//            return new DatasetRepository(new SailRepository(new MemoryStore()));
//        }

    }
 
Example 2
Source File: BigdataSPARQLUpdateTest.java    From database with GNU General Public License v2.0 5 votes vote down vote up
@Override
    protected Repository newRepository() throws RepositoryException {

        final Properties props = getProperties();
        
        final BigdataSail sail = new BigdataSail(props);
        
        backend = sail.getIndexManager();

        return new BigdataSailRepository(sail);

//        if (true) {
//            final Properties props = getProperties();
//            
//            if (cannotInlineTests.contains(testURI)){
//                // The test can not be run using XSD inlining.
//                props.setProperty(Options.INLINE_XSD_DATATYPE_LITERALS, "false");
//                props.setProperty(Options.INLINE_DATE_TIMES, "false");
//            }
//            
//            if(unicodeStrengthIdentical.contains(testURI)) {
//                // Force identical Unicode comparisons.
//                props.setProperty(Options.COLLATOR, CollatorEnum.JDK.toString());
//                props.setProperty(Options.STRENGTH, StrengthEnum.Identical.toString());
//            }
//            
//            final BigdataSail sail = new BigdataSail(props);
//            return new DatasetRepository(new BigdataSailRepository(sail));
//        } else {
//            return new DatasetRepository(new SailRepository(new MemoryStore()));
//        }

    }
 
Example 3
Source File: BigdataComplexSparqlQueryTest.java    From database with GNU General Public License v2.0 5 votes vote down vote up
@Override
    protected Repository newRepository() throws RepositoryException {

        final Properties props = getProperties();
        
        final BigdataSail sail = new BigdataSail(props);
        
        backend = sail.getIndexManager();

        return new BigdataSailRepository(sail);

//        if (true) {
//            final Properties props = getProperties();
//            
//            if (cannotInlineTests.contains(testURI)){
//                // The test can not be run using XSD inlining.
//                props.setProperty(Options.INLINE_XSD_DATATYPE_LITERALS, "false");
//                props.setProperty(Options.INLINE_DATE_TIMES, "false");
//            }
//            
//            if(unicodeStrengthIdentical.contains(testURI)) {
//                // Force identical Unicode comparisons.
//                props.setProperty(Options.COLLATOR, CollatorEnum.JDK.toString());
//                props.setProperty(Options.STRENGTH, StrengthEnum.Identical.toString());
//            }
//            
//            final BigdataSail sail = new BigdataSail(props);
//            return new DatasetRepository(new BigdataSailRepository(sail));
//        } else {
//            return new DatasetRepository(new SailRepository(new MemoryStore()));
//        }

    }
 
Example 4
Source File: TestRollbacks.java    From database with GNU General Public License v2.0 5 votes vote down vote up
private void doTest(final int maxCounter) throws InterruptedException, Exception {

        /*
         * Note: Each run needs to be in a distinct namespace since we otherwise
         * can have side-effects through the BigdataValueFactoryImpl for a given
         * namespace.
         */
        
        final Properties properties = new Properties(getProperties());
        
        properties.setProperty(BigdataSail.Options.NAMESPACE,
                "kb" + runCount.incrementAndGet());
        
        final BigdataSail sail = getSail(properties);
        
        try {
        	// Note: Modified to use the BigdataSailRepository rather than the base SailRepository class.
            final BigdataSailRepository repo = new BigdataSailRepository(sail);
            repo.initialize();
            runConcurrentStuff(repo,maxCounter);
        } finally {
			final IIndexManager db = sail.getIndexManager();
			try {
				if (sail.isOpen()) {
					try {
						sail.shutDown();
					} catch (Throwable t) {
						log.error(t, t);
					}
				}
			} finally {
				db.destroy();
			}
        }
    }
 
Example 5
Source File: BigdataSPARQLUpdateTest2.java    From database with GNU General Public License v2.0 3 votes vote down vote up
protected Repository newRepository() throws RepositoryException {

        final Properties props = getProperties();
        
        final BigdataSail sail = new BigdataSail(props);
        
        backend = sail.getIndexManager();

        return new BigdataSailRepository(sail);

    }