Package org.openrdf.sail

Examples of org.openrdf.sail.Sail


    if (sailClass == null) {
      return null;
    }

    // Check Sails on the stack one by one, starting with the top-most.
    Sail currentSail = topSail;

    while (currentSail != null) {
      // Check current Sail
      if (sailClass.isInstance(currentSail)) {
        break;
View Full Code Here


  @Override
  protected Sail createSail()
    throws SailException
  {
    Sail sail = new NativeStore(dataDir, "spoc,posc");
    sail.initialize();
    return sail;
  }
View Full Code Here

  public static Test suite()
    throws SailException, IOException
  {
    dataDir = FileUtil.createTempDir("nativestore");
    Sail sailStack = new NativeStore(dataDir, "spoc,posc");
    sailStack = new ForwardChainingRDFSInferencer(sailStack);
    return InferencingTest.suite(sailStack);
  }
View Full Code Here

  {
    String query = readQuery();

    // Create a repository with the query data

    Sail sail = new MemoryStore();

    if ("RDF".equals(entailment)) {
      // do not add inferencers
    }
    else if ("RDFS".equals(entailment)) {
      sail = new ForwardChainingRDFSInferencer(sail);
    }
    else if ("RDFS-VP".equals(entailment)) {
      sail = new ForwardChainingRDFSInferencer(sail);
      sail = new DirectTypeHierarchyInferencer(sail);
    }
    else {
      sail.shutDown();
      fail("Invalid value for entailment level:" + entailment);
    }

    Repository dataRep = new SailRepository(sail);
    dataRep.initialize();
View Full Code Here

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

   * @param File dir Data file that the native store will use.
   * @param String indexes If not null, the store will use the given indexes to speed up queries
   * @param boolean inferencing If true (and not null), it will activate rdfs inferencing
   */
  public RepositoryConnection initWithNative(File dir, String indexes, boolean inferencing) {
    Sail sailStack;
   
    if(indexes == null) {
      sailStack = new NativeStore(dir);
    } else {
      sailStack = new NativeStore(dir, indexes);
View Full Code Here

   * @param url JDBC connect URL
   * @param user Username for the database, or null
   * @param password Password for the database user, or null
   */
  public RepositoryConnection initWithRDBMS(String driver, String url, String user, String password, boolean inferencing) {
    Sail sailStack;
   
    if(user == null) {
      sailStack = new RdbmsStore(driver, url);
    } else {
      sailStack = new RdbmsStore(driver, url, user, password);
View Full Code Here

                    log.info("- notifying plugin: {} (DISABLED)", provider.getName());
                }
            }

            // wrap all standard sails
            Sail standardSail = notifyingSail;
            for(StandardSailProvider provider : standardSailProviders) {
                if(provider.isEnabled()) {
                    log.info("- standard plugin: {}",provider.getName());
                    standardSail = provider.createSail(standardSail);
                } else {
View Full Code Here

        final KiWiStore sail = new KiWiStore(config);
        KiWiTransactionalSail tsail = new KiWiTransactionalSail(sail);
        rsail = new KiWiReasoningSail(tsail, new ReasoningConfiguration());

        Sail wsail = new SailWrapper(rsail) {
            @Override
            public void shutDown() throws SailException {
                rsail.getEngine().shutdown(true);

                try {
View Full Code Here

        this.kiwiConfig = kiwiConfig;
    }
   
    @Override
    protected Sail createSail() throws SailException {
        Sail store = new SailWrapper(new KiWiStore(kiwiConfig)) {
            @Override
            public void shutDown() throws SailException {
                try {
                    ((KiWiStore)getBaseSail()).getPersistence().dropDatabase();
                } catch (SQLException e) {
                    fail("SQL exception while deleting database");
                }

                super.shutDown();
            }
        };
        store.initialize();
        return store;
    }
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.