Package org.openrdf.sail

Examples of org.openrdf.sail.Sail


public class TestRDFSInverseInferencer {

  @Test
  public void testRDFSPlusInversesInferencer() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here


  }

  @Test
  public void testInferencer_0_directly() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here

  }

  @Test
  public void testStrangeBug() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here

  }

  @Test
  public void testInverseTriplesOnRDFDirectly() throws RepositoryException {
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
View Full Code Here

    // find out if we need reasoning
    String reasoningProperty = properties == null ? null : properties.getProperty(REASONING);
    boolean reasoning = Reasoning.rdfs.toString().equalsIgnoreCase(reasoningProperty);
   
    // create a Sail stack
    Sail sail = new MemoryStore();
   
    if(reasoning) {
      sail = new ForwardChainingRDFSInferencer((MemoryStore)sail);
    }
   
View Full Code Here

     * Test case initialization.
     * @throws Exception
     */
    @Before
    public void setUp() throws Exception {
        Sail store = new MemoryStore();
        store.initialize();
        conn = new SailRepository(store).getConnection();
    }
View Full Code Here

        RepositoryConnection conn;
        RepositoryWriter repositoryWriter;

        fileDocumentSource = new FileDocumentSource(input);
        any23 = new Any23();
        Sail store = new MemoryStore();
        store.initialize();
        conn = new SailRepository(store).getConnection();
        repositoryWriter = new RepositoryWriter(conn);
        Assert.assertTrue( any23.extract(fileDocumentSource, repositoryWriter, encoding).hasMatchingExtractors() );

        RepositoryResult<Statement> statements = conn.getStatements(null, vDCTERMS.title, null, false);
View Full Code Here

            throw new IllegalStateException("repository already initialized");
        }
        log.debug("initializing kiwi-store: {}", kiwi);
        KiWiStore store = new KiWiStore(kiwi.getName(), kiwi.getJdbcUrl(), kiwi.getDbUser(), kiwi.getDbPassword(), kiwi.getDialect(), context, context);

        final Sail sail;
        if (isVersioningEnabled || isReasoningEnabled) {
            TransactionalSail tSail = new KiWiTransactionalSail(store);
            if (isVersioningEnabled) {
                log.debug("enabling versioning...");
                // TODO: Add Versioning
View Full Code Here

    }
   
    static public RepoSailTuple createMemoryRepository(File dir) {
        try {
            Repository r = null;
            Sail s = null;
            if (dir != null) {
                s = new MemoryStore(dir);
                r = new SailRepository(s);
            } else {
                s = new MemoryStore();
View Full Code Here

        }
    }

    static public RepoSailTuple createNativeRepository(File dir) {
        try {
            Sail sail = new NativeStore();
            sail.setDataDir(dir);
            ((NativeStore) sail).setTripleIndexes("spoc,posc,opsc");
            Repository r = new SailRepository(sail);
            r.initialize();
            return new RepoSailTuple(r,sail);
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.openrdf.sail.Sail

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.