Examples of Sail


Examples of org.openrdf.sail.Sail

public class MemInferencingTest extends TestCase {

  public static Test suite()
    throws StoreException
  {
    Sail sailStack = new ForwardChainingRDFSInferencer(new MemoryStore());
    return InferencingTest.suite(sailStack, MemInferencingTest.class.getName());
  }
View Full Code Here

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

Examples of org.openrdf.sail.Sail

    throws StoreConfigException
  {
    if (config instanceof SailRepositoryConfig) {
      SailRepositoryConfig sailRepConfig = (SailRepositoryConfig)config;

      Sail sail = createSailStack(sailRepConfig.getSailImplConfig());
      return new SailRepository(sail);
    }

    throw new StoreConfigException("Invalid configuration class: " + config.getClass());
  }
View Full Code Here

Examples of org.openrdf.sail.Sail

  }

  private Sail createSailStack(SailImplConfig config)
    throws StoreConfigException
  {
    Sail sail = createSail(config);

    if (config instanceof DelegatingSailImplConfig) {
      SailImplConfig delegateConfig = ((DelegatingSailImplConfig)config).getDelegate();
      if (delegateConfig != null) {
        addDelegate(delegateConfig, sail);
View Full Code Here

Examples of org.openrdf.sail.Sail

  }

  private void addDelegate(SailImplConfig config, Sail sail)
    throws StoreConfigException
  {
    Sail delegateSail = createSailStack(config);

    try {
      ((StackableSail)sail).setDelegate(delegateSail);
    }
    catch (ClassCastException e) {
View Full Code Here

Examples of org.openrdf.sail.Sail

  @Override
  protected Sail createSail()
    throws StoreException
  {
    Sail sail = new AccessControlSail(new MemoryStore());
    sail.initialize();
    return sail;
  }
View Full Code Here

Examples of org.openrdf.sail.Sail

     * @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

Examples of org.openrdf.sail.Sail

        Any23 any23;
        RepositoryConnection conn;
        RepositoryWriter repositoryWriter;
       
        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

Examples of org.openrdf.sail.Sail

{
    public static void main( String[] args )
      throws SailException, RDFParseException, RDFHandlerException, FileNotFoundException, IOException
    {
      Neo4jGraph neo = new Neo4jGraph("dbpedia4neo");
      Sail sail = new GraphSail(neo);
      CommitManager manager = TransactionalGraphHelper.createCommitManager(neo, 10000);

      for (String file: args) {
        System.out.println("Loading " + file + ": ");
        loadFile(file, sail.getConnection(), sail.getValueFactory(), manager);
        System.out.print('\n');
      }
      manager.close();
      sail.shutDown();
    }
View Full Code Here

Examples of org.openrdf.sail.Sail

    URI a = new URIImpl("urn:rel:a");
    URI b = new URIImpl("urn:rel:b");
    URI c = new URIImpl("urn:rel:c");
    URI defaultContext = null;
    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSInferencer(sail);
    // create a Repository
    Repository repository = new SailRepository(sail);
    repository.initialize();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.